Oracle Process Manufacturing

Similar documents
Oracle Process Manufacturing

Oracle Process Manufacturing

Oracle Process Manufacturing

Oracle Process Manufacturing

Oracle Process Manufacturing

1 Enterprise Modeler

JavaFX. JavaFX 2.2 Installation Guide Release 2.2 E August 2012 Installation instructions by operating system for JavaFX 2.

Oracle Release Management Implementation Manual

Web OS Switch Software

Baan Finance Financial Statements

Customer Portal Quick Reference User Guide

Avid Interplay Bundle

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8

CA Top Secret r14 for z/os

Baan Tools User Management

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Adapter for Mainframe

STRATEGIC. alliances & Services

MOTIF XF Extension Owner s Manual

Data Warehousing. Paper

Oracle Balanced Scorecard

Service Oriented Enterprise Architecture and Service Oriented Enterprise

Global Support Guide. Verizon WIreless. For the BlackBerry 8830 World Edition Smartphone and the Motorola Z6c

TargetLink. Installation Notes. MATLAB R14SP3 Compatibility Update for TargetLink 2.1

Configuring Rational Suite

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

BEA WebLogic Process Integrator

Python Programming: An Introduction to Computer Science

BAAN IV. BAAN IV Installation Manual for DB2 on Windows NT

Oracle Server. What s New in this Release? Release Notes

What are Information Systems?

MANAGED! PREPARE TO BE FEATURES HANDHELD USER DISPLAYS. Specifications MEASUREMENT STABILIZATION INDICATOR

BEA WebLogic Commerce Server. Registration and User Processing Package

Custodial Integrator Automation Guide

One advantage that SONAR has over any other music-sequencing product I ve worked

Workflow Extensions User Guide. StarTeam 12.0

n Learn how resiliency strategies reduce risk n Discover automation strategies to reduce risk

Oracle SDP Number Portability

Weston Anniversary Fund

GAAFR. Supplement. Now Available. Covering: pronouncements: Statement Nos. 67, 68, 69, and 70

GE FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III

Floristic Quality Assessment (FQA) Calculator for Colorado User s Guide

Getting Started. Getting Started - 1

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

Python Programming: An Introduction to Computer Science

BaanERP. DB2 Installation Guide for BaanERP on Windows NT

CA InterTest for CICS r8.5

BE Software Upgrades to ITALYCS 5. It s in the. Software

BEA Tuxedo. Creating CORBA Server Applications

BEA WebLogic XML/Non-XML Translator

n Explore virtualization concepts n Become familiar with cloud concepts

2016 LEARNING SYSTEM FOR CSCP CERTIFICATION EXAM PREPARATION. learncscp.com

Guide to Applying Online

System and Software Architecture Description (SSAD)

Panel for Adobe Premiere Pro CC Partner Solution

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Elementary Educational Computer

User Guide. Using Caliber Datamart

Oracle Install Base. API Reference Guide. Release 11i. October 2001 Part No. A

User s Guide. OMEGAMON XE for Oracle. Version 300 GC April 2002

In this chapter, you learn the concepts and terminology of databases and

USB TO PARALLEL USB to DB25 Parallel Adapter Cable

Continuity Logic Frontline Live

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Architectural styles for software systems The client-server style

Oracle Process Manufacturing

Princeton Instruments Reference Manual

Oracle Copy Inventory Organization

Oracle Portal. Building Portals. Release January, 2001 Part No. A

2 Oracle Data Integrator Console Issues and Workarounds

Outline. CSCI 4730 Operating Systems. Questions. What is an Operating System? Computer System Layers. Computer System Layers

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.

LifeBook P Series Notebook BIOS BIOS SETUP UTILITY

IMP: Superposer Integrated Morphometrics Package Superposition Tool

Oracle Process Manufacturing

TUTORIAL Create Playlist Helen Doron Course

2017 LEARNING SYSTEM CONTACT INFORMATION FOR CLTD CERTIFICATION EXAM PREPARATION. learncltd.com. Joni Holeman, VP Education. APICS DC Metro Chapter

TruVu 360 User Community. SpectroCare. Enterprise Fluid Intelligence for Predictive Maintenance. TruVu 360 Product Information

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings

Security of Bluetooth: An overview of Bluetooth Security

Bike MS: 2013 Participant Center guide

Bike MS: 2014 Participant Center guide

Fujitsu LifeBook P Series

Computers and Scientific Thinking

User s Guide. OMEGAMON XE for WebSphere MQ Integrator. Version 110 GC July 2002

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software

BEA WebLogic Collaborate

Code Review Defects. Authors: Mika V. Mäntylä and Casper Lassenius Original version: 4 Sep, 2007 Made available online: 24 April, 2013

Avid DS Nitris. Installation and Administration Guide. Version 7.0. Avid make manage move media

BEA Tuxedo. Using the BEA Tuxedo System on Windows NT

BAAN IVb/c. Structure, master data, and configuration of BEMIS

. Written in factored form it is easy to see that the roots are 2, 2, i,

BEA elink Business Process Option User s Guide

Ones Assignment Method for Solving Traveling Salesman Problem

Neolane Social Marketing. Neolane v6.1

Avid recommends that you read all the information in this ReadMe file thoroughly before installing or using any new software release.

BEA WebLogic Portal. JSP Commerce and Campaign Tour

2 Oracle Data Integrator Console Issues and Workarounds

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS

Transcription:

Oracle Process Maufacturig Cost Maagemet API User s Guide Release 11i Part No. A95270-02 Jauary 2003

Oracle Process Maufacturig Cost Maagemet API User s Guide, Release 11i Part No. A95270-02 Copyright 2003 Oracle Corporatio. All rights reserved. Primary Author: Michele-Adrea Fields The Programs (which iclude both the software ad documetatio) cotai proprietary iformatio of Oracle Corporatio; they are provided uder a licese agreemet cotaiig restrictios o use ad disclosure ad are also protected by copyright, patet, ad other itellectual ad idustrial property laws. Reverse egieerig, disassembly, or decompilatio of the Programs is prohibited. Program Documetatio is licesed for use solely to support the deploymet of the Programs ad ot for ay other purpose. The iformatio cotaied i this documet is subject to chage without otice. If you fid ay problems i the documetatio, please report them to us i writig. Oracle Corporatio does ot warrat that this documet is error free. Except as may be expressly permitted i your licese agreemet for these Programs, o part of these Programs may be reproduced or trasmitted i ay form or by ay meas, electroic or mechaical, for ay purpose, without the express writte permissio of Oracle Corporatio. If the Programs are delivered to the U.S. Govermet or ayoe licesig or usig the programs o behalf of the U.S. Govermet, the followig otice is applicable: Restricted Rights Notice Programs delivered subject to the DOD FAR Supplemet are "commercial computer software" ad use, duplicatio, ad disclosure of the Programs, icludig documetatio, shall be subject to the licesig restrictios set forth i the applicable Oracle licese agreemet. Otherwise, Programs delivered subject to the Federal Acquisitio Regulatios are "restricted computer software" ad use, duplicatio, ad disclosure of the Programs shall be subject to the restrictios i FAR 52.227-19, Commercial Computer Software - Restricted Rights (Jue, 1987). Oracle Corporatio, 500 Oracle Parkway, Redwood City, CA 94065. The Programs are ot iteded for use i ay uclear, aviatio, mass trasit, medical, or other iheretly dagerous applicatios. It shall be the licesee's resposibility to take all appropriate fail-safe, backup, redudacy, ad other measures to esure the safe use of such applicatios if the Programs are used for such purposes, ad Oracle Corporatio disclaims liability for ay damages caused by such use of the Programs. Oracle is a registered trademark of Oracle Corporatio. Other ames may be trademarks of their respective owers.

Cotets Sed Us Your Commets... vii Preface... ix Audiece for This Guide... ix How To Use This Guide... ix Documetatio Accessibility... x Other Iformatio Sources... x Olie Documetatio... x Related User s Guides... xi Guides Related to All Products... xi User Guides Related to This Product... xi Istallatio ad System Admiistratio... xvi Other Implemetatio Documetatio... xviii Traiig ad Support... xix Do Not Use Database Tools to Modify Oracle Applicatios Data... xx About Oracle... xxi Your Feedback... xxi 1 Cost Maagemet APIs Itroducig the Cost Maagemet APIs... 1-2 Basic Busiess Needs... 1-2 Major Features... 1-3 Item Cost APIs... 1-4 Resource Cost APIs... 1-4 iii

Allocatio Defiitio APIs... 1-5 Burde Details APIs... 1-5 Cost Maagemet API Features... 1-6 Cost Maagemet API Support Policy... 1-6 Oracle Applicatios Packages Supplied... 1-7 Cost Maagemet API Bill of Materials... 1-7 2 Cost Maagemet API Usage Callig the API Iterface Code... 2-1 Callig the API Code - Example... 2-2 Wrapper logic... 2-2 API Hits... 2-4 Item Cost Example... 2-5 3 Techical Overview Item Cost... 3-1 Structure for Item Cost Public APIs... 3-1 Resource Cost... 3-3 Structure for Resource Cost Public APIs... 3-3 Allocatio Defiitio... 3-4 Structure for Allocatio Defiitio Public APIs... 3-4 Burde Details... 3-5 Structure for Burde Details Public APIs... 3-5 Stadard Parameters... 3-6 4 Busiess Objects Item Cost... 4-1 Cost Header Etity... 4-2 This Level Cost Detail Etity... 4-3 Lower Level Cost Detail Etity... 4-4 Structure ad Logic... 4-5 Resource Cost... 4-12 Resource Cost Etity... 4-12 Structure ad Logic... 4-13 iv

Allocatio Defiitio... 4-17 Allocatio Defiitio Etity... 4-17 Structure ad Logic... 4-18 Burde Details... 4-22 Header Etity... 4-22 Detail Etity... 4-23 Structure ad Logic... 4-24 A Messages ad Errors Idex Hadlig Messages... A-1 Iterpretig Error Coditios... A-4 Uderstadig Error Messages... A-4 v

vi

Sed Us Your Commets Oracle Process Maufacturig Cost Maagemet API User s Guide, Release 11i Part No. A95270-02 Oracle Corporatio welcomes your commets ad suggestios o the quality ad usefuless of this documet. Your iput is a importat part of the iformatio used for revisio. Did you fid ay errors? Is the iformatio clearly preseted? Do you eed more iformatio? If so, where? Are the examples correct? Do you eed more examples? What features did you like most? If you fid ay errors or have ay other suggestios for improvemet, please idicate the documet title ad part umber, ad the chapter, sectio, ad page umber (if available). You ca sed commets to us i the followig ways: FAX: 650-506-7200 Att: Oracle Process Maufacturig Postal service: Oracle Corporatio Oracle Process Maufacturig 500 Oracle Parkway Redwood City, CA 94065 U.S.A. Electroic mail message to appsdoc@us.oracle.com If you would like a reply, please give your ame, address, telephoe umber, ad (optioally) electroic mail address. If you have problems with the software, please cotact your local Oracle Support Services. vii

viii

Preface Audiece for This Guide How To Use This Guide Welcome to Release 11i of the Oracle Process Maufacturig Cost Maagemet API User s Guide. This guide assumes you have a workig kowledge of the followig: The priciples ad customary practices of your busiess area. Oracle Process Maufacturig If you have ever used Oracle Process Maufacturig Cost Maagemet APIs, Oracle suggests you atted oe or more of the Oracle Process Maufacturig Cost Maagemet APIs traiig classes available through Oracle Uiversity. The Oracle Applicatios graphical user iterface. To lear more about the Oracle Applicatios graphical user iterface, read the Oracle Applicatios User s Guide. See Other Iformatio Sources for more iformatio about Oracle Applicatios product iformatio. This guide cotais the iformatio you eed to uderstad ad use Oracle Process Maufacturig. Chapter 1 describes the Applicatio Program Iterfaces (APIs) that support exteral iterfaces to the OPM Cost Maagemet tables. Chapter 2 provides iformatio o the usage ad layout of the Cost Maagemet APIs. Chapter 3 provides the relatioships betwee Costig API table structure ad its etities. Discusses Costig API busiess objects, the etity relatioship diagram, busiess object iterface desig, creatig a cost ad importig cost data structures. Appedix A provides message hadlig, the iterpretatio of error coditios, ad a uderstadig of error messages. ix

Documetatio Accessibility Our goal is to make Oracle products, services, ad supportig documetatio accessible, with good usability, to the disabled commuity. To that ed, our documetatio icludes features that make iformatio available to users of assistive techology. This documetatio is available i HTML format, ad cotais markup to facilitate access by the disabled commuity. Stadards will cotiue to evolve over time, ad Oracle Corporatio is actively egaged with other market-leadig techology vedors to address techical obstacles so that our documetatio ca be accessible to all of our customers. For additioal iformatio, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/. Accessibility of Code Examples i Documetatio JAWS, a Widows scree reader, may ot always correctly read the code examples i this documet. The covetios for writig code require that closig braces should appear o a otherwise empty lie; however, JAWS may ot always read a lie of text that cosists solely of a bracket or brace. Other Iformatio Sources Olie Documetatio You ca choose from may sources of iformatio, icludig olie documetatio, traiig, ad support services, to icrease your kowledge ad uderstadig of Oracle Process Maufacturig Cost Maagemet APIs. If this guide refers you to other Oracle Applicatios documetatio, use oly the Release 11i versios of those guides. All Oracle Applicatios documetatio is available olie (HTML or PDF). Olie Help - The ew features sectio i the HTML help describes ew features i 11i. This iformatio is updated for each ew release of Oracle Process Maufacturig Cost Maagemet APIs. The ew features sectio also icludes iformatio about ay features that were ot yet available whe this guide was prited. For example, if your admiistrator has istalled software from a mii-packs a upgrade, this documet describes the ew features. Olie help patches are available o MetaLik. x

Related User s Guides 11i Features Matrix - This documet lists ew features available by patch ad idetifies ay associated ew documetatio. The ew features matrix documet is available o MetaLik. Readme File - Refer to the readme file for patches that you have istalled to lear about ew documetatio or documetatio patches that you ca dowload. Oracle Process Maufacturig shares busiess ad setup iformatio with other Oracle Applicatios products. Therefore, you may wat to refer to other user s guides whe you set up ad use Oracle Process Maufacturig Cost Maagemet APIs. You ca read the guides olie by choosig Library from the expadable meu o your HTML help widow, by readig from the Oracle Applicatios Documet Library CD icluded i your media pack, or by usig a Web browser with a URL that your system admiistrator provides. If you require prited guides, you ca purchase them from the Oracle Store at http://oraclestore.oracle.com. Guides Related to All Products Oracle Applicatios User s Guide This guide explais how to eter data, query, ru reports, ad avigate usig the graphical user iterface (GUI) available with this release of Oracle Process Maufacturig Cost Maagemet APIs (ad ay other Oracle Applicatios products). This guide also icludes iformatio o settig user profiles, as well as ruig ad reviewig reports ad cocurret processes. You ca access this user s guide olie by choosig Gettig Started with Oracle Applicatios from ay Oracle Applicatios help file. User Guides Related to This Product Accoutig Setup User s Guide The OPM Accoutig Setup applicatio is where users set up global accoutig attributes about the way fiacial data will be collected by OPM. These attributes iclude such thigs as accout keys, fiacial caledars, ad accout segmets. Sice OPM is closely itegrated with Oracle Geeral Ledger (GL), much of the xi

attributes are defied i the Oracle GL istead of OPM, ad therefore, the widows are display oly withi OPM. The Oracle Process Maufacturig Accoutig Setup User s Guide describes how to setup ad use this applicatio. Cost Maagemet User s Guide The OPM Cost Maagemet applicatio is used by cost accoutats to capture ad review the maufacturig costs icurred i their process maufacturig busiesses. The Oracle Process Maufacturig Cost Maagemet User s Guide describes how to setup ad use this applicatio. Maufacturig Accoutig Cotroller User s Guide The Maufacturig Accoutig Cotroller applicatio is where users defie the impact of maufacturig evets o fiacials. For example, evet RCPT (Ivetory Receipts) results i a debit to ivetory, a credit to accrued accouts payable, a debit or a credit to purchase price variace, etc. These impacts are predefied i the Maufacturig Accoutig Cotroller applicatio so users may begi usig OPM to collect fiacial data out-of-the-box, however, they may also be adjusted per your busiess eeds. The Oracle Process Maufacturig Maufacturig Accoutig Cotroller User s Guide describes how to setup ad use this applicatio. Oracle Fiacials Itegratio User s Guide Sice OPM is closely itegrated with Oracle Geeral Ledger, fiacial data that is collected about the maufacturig processes must be trasferred to the Oracle Fiacials applicatios. The OPM Oracle Fiacials Itegratio applicatio is where users defie how that data is trasferred. For example, users defie whether data is trasferred real time or batched ad trasferred at itervals. The Oracle Process Maufacturig Oracle Fiacials Itegratio User s Guide describes how to setup ad use this applicatio. Ivetory Maagemet User s Guide The OPM Ivetory Maagemet applicatio is where data about the items purchased for, cosumed durig, ad created as a result of the maufacturig process are tracked. The Oracle Process Maufacturig Ivetory Maagemet User s Guide icludes iformatio to help you effectively work with the Oracle Process Maufacturig Ivetory applicatio. xii

Physical Ivetory User s Guide Performig physical ivetory cout is the most accurate way to get a accoutig of all material quatities purchased, maufactured, ad sold, ad update your ohad quatities accordigly. The OPM Physical Ivetory applicatio automates ad eables the physical ivetory process. The Oracle Process Maufacturig Physical Ivetory User s Guide describes how to setup ad use this applicatio. Order Fulfillmet User s Guide The OPM Order Fulfillmet applicatio automates sales order etry to reduce order cycle time. Order Fulfillmet eables order etry persoel to iform customers of scheduled delivery dates ad pricig. The Oracle Process Maufacturig Order Fulfillmet User s Guide describes how to setup ad use this applicatio. Purchase Maagemet User s Guide OPM Purchase Maagemet ad Oracle Purchasig combie to provide a itegrated solutio for Process Maufacturig. Purchase orders are etered i Oracle Purchasig ad received i OPM. The, the receipts etered i OPM are set to Oracle Purchasig. The Oracle Process Maufacturig Purchase Maagemet User s Guide describes how to setup ad use this itegrated solutio. Usig Oracle Order Maagemet with Process Ivetory Guide Oracle Process Maufacturig ad Oracle Order Maagemet combie to provide a itegrated solutio for process maufacturers. The maufacturig process is tracked ad hadled withi Oracle Process Maufacturig, while sales orders are take ad tracked i Oracle Order Maagemet. Process attributes, such as dual UOM ad lot cotrol, are eabled depedig o the ivetory orgaizatio for the item o the sales order. Order Maagemet accepts orders etered through Oracle Customer Relatioship Maagemet (CRM). Withi CRM, orders ca origiate from TeleSales, Sales Olie, ad istore, ad are booked i Order Maagemet, makig the CRM suite of products available to Process customers, through Order Maagemet. The Oracle Order Maagemet User s Guide ad Usig Oracle Order Maagemet with Process Ivetory Guide describes how to setup ad use this itegrated solutio. Process Executio User s Guide The OPM Process Executio applicatio lets you track firm plaed orders ad productio batches from icomig materials through fiished goods. Seamlessly itegrated to the Product Developmet applicatio, Process Executio lets you covert firm plaed orders to sigle or multiple productio batches, allocate xiii

igrediets, record actual igrediet usage, ad the complete ad close productio batches. Productio iquiries ad preformatted reports help you optimize ivetory costs while maitaiig a high level of customer satisfactio with o-time delivery of high quality products. The OPM Process Executio User s Guide presets overviews of the tasks ad resposibilities for the Productio Supervisor ad the Productio Operator. It provides prerequisite setup i other applicatios, ad details the widows, features, ad fuctioality of the OPM Process Executio applicatio. Itegratio with Advaced Plaig ad Schedulig User s Guide Oracle Process Maufacturig ad Oracle Advaced Plaig ad Schedulig (APS) combie to provide a itegrated solutio for process maufacturers that ca help icrease plaig efficiecy. The itegratio provides for costrait-based plaig, performace maagemet, materials maagemet by exceptio, mixed mode maufacturig that eables you to choose the best method to produce each of your products, ad combie all of these methods withi the same plat/compay. The Oracle Process Maufacturig Itegratio with Advaced Plaig ad Schedulig User s Guide describes how to setup ad use this applicatio. MPS/MRP ad Forecastig User s Guide The Oracle Process Maufacturig Material Requiremets Plaig (MRP) applicatio provides log-term "views" of material demads ad projected supply actios to satisfy those demads. The Master Productio Schedulig (MPS) applicatio lets you shorte that view to a much arrower ad immediate time horizo, ad see the immediate effects of demad ad supply actios. The Oracle Process Maufacturig MPS/MRP ad Forecastig User s Guide describes how to setup ad use this applicatio. Capacity Plaig User s Guide The OPM Capacity Plaig User's Guide describes the setup required to use OPM with the Oracle Applicatios Advaced Supply Chai Plaig solutios. I additio, Resource setup, used by the OPM Productio Executio ad New Product Developmet applicatios, is also described. Usig Oracle Process Maufacturig with Oracle Maufacturig Schedulig Oracle Process Maufacturig itegrates with Oracle Maufacturig Schedulig to maage ad utilize resources ad materials. Through the Process Maufacturig applicatio, you set up maufacturig, ivetory, procuremet ad sales order data. Through the Maufacturig Schedulig applicatio, you ca optimize the xiv

schedule based o resource ad compoet costraits ad user predefied priorities. Usig differet optimizatio objectives, you ca tailor Maufacturig Schedulig to meet your eeds. Usig Oracle Maufacturig Schedulig helps you improve productivity ad efficiecy o your shop floor. By optimally schedulig shop floor jobs, ad beig able to quickly react to uplaed costraits, you ca lower maufacturig costs, icrease resource utilizatio ad efficiecy, ad icrease customer satisfactio through improved o-time delivery. The Usig Oracle Process Maufacturig with Oracle Maufacturig Schedulig User s Guide describes how to setup ad use this itegrated solutio. Product Developmet User s Guide The Oracle Process Maufacturig Product Developmet applicatio provides features to maage formula ad laboratory work withi the process maufacturig operatio. It lets you maage multiple laboratory orgaizatios ad support varyig product lies throughout the orgaizatio. You ca characterize ad simulate the techical properties of igrediets ad their effects o formulas. You ca optimize formulatios before begiig expesive laboratory test batches. Product Developmet coordiates each developmet fuctio ad eables a rapid, eterprise-wide implemetatio of ew products i your plats. The Oracle Process Maufacturig Product Developmet User s Guide describes how to setup ad use this applicatio. Quality Maagemet User s Guide The Oracle Process Maufacturig Quality Maagemet applicatio provides features to test material sampled from ivetory, productio, or receipts from exteral suppliers. The applicatio lets you eter specificatios ad cotrol their use throughout the eterprise. Customized workflows ad electroic record keepig automate plas for samplig, testig, ad result processig. You ca compare specificatios to assist i regradig items, ad match customer specificatios. Aggregate test results ad prit statistical assessmets o quality certificates. Several preformatted reports ad iquiries help maage quality testig ad reportig. The Oracle Process Maufacturig Quality Maagemet User s Guide describes how to set up ad use this applicatio. Regulatory Maagemet User s Guide The Oracle Process Maufacturig Regulatory Maagemet applicatio geerates the Material Safety Data Sheets (MSDSs) required by authorities to accompay hazardous materials durig shippig. You ca create MSDSs from OPM Formula xv

Maagemet with Regulatory or Productio effectivities. The Oracle Process Maufacturig Regulatory Maagemet User s Guide describes how to setup ad use this applicatio. Implemetatio Guide The Oracle Process Maufacturig Implemetatio Guide offers iformatio o setup. That is, those tasks you must complete followig the iitial istallatio of the Oracle Process Maufacturig software. Ay tasks that must be completed i order to use the system out-of-the-box are icluded i this maual. System Admiistratio User s Guide Much of the System Admiistratio duties are performed at the Oracle Applicatios level, ad are therefore described i the Oracle Applicatios System Admiistrator's Guide. The Oracle Process Maufacturig System Admiistratio User s Guide provides iformatio o the few tasks that are specific to OPM. It offers iformatio o performig OPM file purge ad archive, ad maitaiig such thigs as resposibilities, uits of measure, ad orgaizatios. API User s Guides Public Applicatio Programmig Iterfaces (APIs) are available for use with differet areas of the Oracle Process Maufacturig applicatio. APIs make it possible to pass iformatio ito ad out of the applicatio, bypassig the user iterface. Use of these APIs is documeted i idividual mauals such as the Oracle Process Maufacturig Ivetory API User s Guide, Oracle Process Maufacturig Process Executio API User s Guide, Oracle Process Maufacturig Product Developmet Formula API User's Guide, Oracle Process Maufacturig Product Developmet Recipe API User's Guide, Oracle Process Maufacturig Quality Maagemet API User's Guide, ad the Oracle Process Maufacturig Cost Maagemet API User's Guide. Additioal API User s Guides are periodically added as additioal public APIs are made available. Istallatio ad System Admiistratio Oracle Applicatios Cocepts This guide provides a itroductio to the cocepts, features, techology stack, architecture, ad termiology for Oracle Applicatios Release 11i. It provides a useful first book to read before a istallatio of Oracle Applicatios. This guide xvi

also itroduces the cocepts behid Applicatios-wide features such as Busiess Itelligece (BIS), laguages ad character sets, ad Self-Service Web Applicatios. Istallig Oracle Applicatios This guide provides istructios for maagig the istallatio of Oracle Applicatios products. I Release 11i, much of the istallatio process is hadled usig Oracle Rapid Istall, which miimizes the time to istall Oracle Applicatios, the Oracle8 techology stack, ad the Oracle8i Server techology stack by automatig may of the required steps. This guide cotais istructios for usig Oracle Rapid Istall ad lists the tasks you eed to perform to fiish your istallatio. You should use this guide i cojuctio with idividual product user s guides ad implemetatio guides. Upgradig Oracle Applicatios Refer to this guide if you are upgradig your Oracle Applicatios Release 10.7 or Release 11.0 products to Release 11i. This guide describes the upgrade process ad lists database ad product-specific upgrade tasks. You must be either at Release 10.7 (NCA, SmartCliet, or character mode) or Release 11.0, to upgrade to Release 11i. You caot upgrade to Release 11i directly from releases prior to 10.7. Maitaiig Oracle Applicatios Use this guide to help you ru the various AD utilities, such as AutoUpgrade, AutoPatch, AD Admiistratio, AD Cotroller, AD Relik, Licese Maager, ad others. It cotais how-to steps, screeshots, ad other iformatio that you eed to ru the AD utilities. This guide also provides iformatio o maitaiig the Oracle applicatios file system ad database. Oracle Applicatios System Admiistrator s Guide This guide provides plaig ad referece iformatio for the Oracle Applicatios System Admiistrator. It cotais iformatio o how to defie security, customize meus ad olie help, ad maage cocurret processig. Oracle Alert User s Guide This guide explais how to defie periodic ad evet alerts to moitor the status of your Oracle Applicatios data. xvii

Oracle Applicatios Developer s Guide This guide cotais the codig stadards followed by the Oracle Applicatios developmet staff. It describes the Oracle Applicatio Object Library compoets eeded to implemet the Oracle Applicatios user iterface described i the Oracle Applicatios User Iterface Stadards for Forms-Based Products. It also provides iformatio to help you build your custom Oracle Forms Developer 6i forms so that they itegrate with Oracle Applicatios. Oracle Applicatios User Iterface Stadards for Forms-Based Products This guide cotais the user iterface (UI) stadards followed by the Oracle Applicatios developmet staff. It describes the UI for the Oracle Applicatios products ad how to apply this UI to the desig of a applicatio built by usig Oracle Forms. Other Implemetatio Documetatio Oracle Applicatios Product Update Notes Use this guide as a referece for upgradig a istallatio of Oracle Applicatios. It provides a history of the chages to idividual Oracle Applicatios products betwee Release 11.0 ad Release 11i. It icludes ew features, ehacemets, ad chages made to database objects, profile optios, ad seed data for this iterval. Multiple Reportig Currecies i Oracle Applicatios If you use the Multiple Reportig Currecies feature to record trasactios i more tha oe currecy, use this maual before implemetig Oracle Process Maufacturig. This maual details additioal steps ad setup cosideratios for implemetig Oracle Process Maufacturig with this feature. Multiple Orgaizatios i Oracle Applicatios This guide describes how to set up ad use Oracle Process Maufacturig with Oracle Applicatios' Multiple Orgaizatio support feature, so you ca defie ad support differet orgaizatio structures whe ruig a sigle istallatio of Oracle Process Maufacturig. Oracle Workflow Guide This guide explais how to defie ew workflow busiess processes as well as customize existig Oracle Applicatios-embedded workflow processes.you also use xviii

Traiig ad Support this guide to complete the setup steps ecessary for ay Oracle Applicatios product that icludes workflow-eabled processes. Oracle Applicatios Flexfields Guide This guide provides flexfields plaig, setup ad referece iformatio for the Oracle Process Maufacturig implemetatio team, as well as for users resposible for the ogoig maiteace of Oracle Applicatios product data. This maual also provides iformatio o creatig custom reports o flexfields data. Oracle etechical Referece Mauals Each etechical Referece Maual (etrm) cotais database diagrams ad a detailed descriptio of database tables, forms, reports, ad programs for a specific Oracle Applicatios product. This iformatio helps you covert data from your existig applicatios, itegrate Oracle Applicatios data with o-oracle applicatios, ad write custom reports for Oracle Applicatios products. Oracle etrm is available o Metalik Oracle Maufacturig APIs ad Ope Iterfaces Maual This maual cotais up-to-date iformatio about itegratig with other Oracle Maufacturig applicatios ad with your other systems. This documetatio icludes API s ad ope iterfaces foud i Oracle Maufacturig. Oracle Order Maagemet Suite APIs ad Ope Iterfaces Maual This maual cotais up-to-date iformatio about itegratig with other Oracle Maufacturig applicatios ad with your other systems. This documetatio icludes API s ad ope iterfaces foud i Oracle Order Maagemet Suite. Oracle Applicatios Message Referece Maual This maual describes all Oracle Applicatios messages. This maual is available i HTML format o the documetatio CD-ROM for Release 11i. Traiig Oracle offers a complete set of traiig courses to help you ad your staff master Oracle Process Maufacturig Cost Maagemet APIs ad reach full productivity xix

quickly. These courses are orgaized ito fuctioal learig paths, so you take oly those courses appropriate to your job or area of resposibility. You have a choice of educatioal eviromets. You ca atted courses offered by Oracle Uiversity at ay oe of our may Educatio Ceters, you ca arrage for our traiers to teach at your facility, or you ca use Oracle Learig Network (OLN), Oracle Uiversity's olie educatio utility. I additio, Oracle traiig professioals ca tailor stadard courses or develop custom courses to meet your eeds. For example, you may wat to use your orgaizatio structure, termiology, ad data as examples i a customized traiig sessio delivered at your ow facility. Support From o-site support to cetral support, our team of experieced professioals provides the help ad iformatio you eed to keep Oracle Process Maufacturig Cost Maagemet APIs workig for you. This team icludes your Techical Represetative, Accout Maager, ad Oracle s large staff of cosultats ad support specialists with expertise i your busiess area, maagig a Oracle8i server, ad your hardware ad software eviromet. Do Not Use Database Tools to Modify Oracle Applicatios Data Oracle STRONGLY RECOMMENDS that you ever use SQL*Plus, Oracle Data Browser, database triggers, or ay other tool to modify Oracle Applicatios data uless otherwise istructed. Oracle provides powerful tools you ca use to create, store, chage, retrieve, ad maitai iformatio i a Oracle database. But if you use Oracle tools such as SQL*Plus to modify Oracle Applicatios data, you risk destroyig the itegrity of your data ad you lose the ability to audit chages to your data. Because Oracle Applicatios tables are iterrelated, ay chage you make usig Oracle Applicatios ca update may tables at oce. But whe you modify Oracle Applicatios data usig aythig other tha Oracle Applicatios, you may chage a row i oe table without makig correspodig chages i related tables. If your tables get out of sychroizatio with each other, you risk retrievig erroeous iformatio ad you risk upredictable results throughout Oracle Applicatios. Whe you use Oracle Applicatios to modify your data, Oracle Applicatios automatically checks that your chages are valid. Oracle Applicatios also keeps track of who chages iformatio. If you eter iformatio ito database tables usig database tools, you may store ivalid iformatio. You also lose the ability to xx

track who has chaged your iformatio because SQL*Plus ad other database tools do ot keep a record of chages. About Oracle Your Feedback Oracle Corporatio develops ad markets a itegrated lie of software products for database maagemet, applicatios developmet, decisio support, ad office automatio, as well as Oracle Applicatios, a itegrated suite of more tha 160 software modules for fiacial maagemet, supply chai maagemet, maufacturig, project systems, huma resources ad customer relatioship maagemet. Oracle products are available for maiframes, miicomputers, persoal computers, etwork computers ad persoal digital assistats, allowig orgaizatios to itegrate differet computers, differet operatig systems, differet etworks, ad eve differet database maagemet systems, ito a sigle, uified computig ad iformatio resource. Oracle is the world s leadig supplier of software for iformatio maagemet, ad the world s secod largest software compay. Oracle offers its database, tools, ad applicatios products, alog with related cosultig, educatio, ad support services, i over 145 coutries aroud the world. Thak you for usig Oracle Process Maufacturig Cost Maagemet APIs ad this user s guide. Oracle values your commets ad feedback. At the ed of this guide is a Reader s Commet Form you ca use to explai what you like or dislike about Oracle Process Maufacturig Cost Maagemet APIs or this user s guide. Mail your commets to the followig address or call us directly at (650) 506-7000. Oracle Applicatios Documetatio Maager Oracle Corporatio 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Or, sed electroic mail to appsdoc_us@oracle.com. xxi

xxii

1 Cost Maagemet APIs This documet describes the Applicatio Program Iterfaces (APIs) that support exteral iterfaces to the Oracle Process Maufacturig (OPM) Cost Maagemet tables. The topics discussed i this topic are: Itroducig the Cost Maagemet APIs Oracle Applicatios Packages Supplied Cost Maagemet API Bill of Materials Cost Maagemet APIs 1-1

Itroducig the Cost Maagemet APIs Itroducig the Cost Maagemet APIs Cost Maagemet APIs allow you to import costig iformatio from a existig cost maagemet system ito the Oracle Process Maufacturig Cost Maagemet tables. Whe you import this iformatio you ca ow iclude all pertiet iformatio usig a friedly tool that does ot have cryptic IDs ad system specific iformatio. Cost Maagemet APIs ca process virtually all cost types. The iterface isures that your imported costs cotai the same detail as those you would eter maually o the OPM Cost Maagemet widow. What s I This Documet? This documet describes the basic busiess eeds, major features, architecture, ad compoets for the Isert, Update ad Delete features for the Cost Maagemet APIs. Much of the applicatio is divided ito module-specific objects that allow you to lik OPM fuctioality ito your ow programs. The iterfaces ca make use of the stadard fuctioality ad logic implemeted i the Cost Maagemet module. Cost Maagemet APIs are curretly writte i PL/SQL which ca be called by your ow programs. To make use of these APIs, you must code your wrapper fuctio that passes the appropriate parameters to the APIs. Your program will also be resposible for coectig to a database before callig a API fuctio, ad discoectig from the database upo retur. You may also choose to write log files before callig ad after returig from a fuctio. If there is a problem durig executio of a call, the APIs retur oe of the followig status codes: S for success E for error Basic Busiess Needs U ukow/uexpected status. These APIs allow users to have a Applicatio Programmig Iterface (API) available for the maiteace of cost iformatio for a Item ad Resource. The purpose of these APIs is to provide a mechaism, i additio to a etry scree, through which users ca maipulate cost iformatio i the Oracle Process Maufacturig (OPM) applicatio. The usage of this API will be multifold: Help ew customers load bulk of item cost, resource cost, burde iformatio, ad allocatio basis iformatio ito OPM from exteral systems bypassig laborious ad error proe maual data etry. Eable existig customers to iterface OPM with their custom applicatios. 1-2 Product Title/BookTitle as a Variable

Major Features Allow a systematic approach to maipulate cost iformatio i OPM without compromisig ay busiess rules or database costraits of OPM. I additio to above, this APIs will also serve as a cetral place to satisfy the eed for isert, update, or delete of cost iformatio records i OPM from ay source. Followig are some of the importat characteristics that these APIs should have: Major Features Code Re-Use You should be able to maximize code reuse from all applicatio developmet tools, icludig PL/SQL, Oracle Forms ad Oracle Reports. Ease of Itegratio You should be able to itegrate API s ito other applicatios ad eablig techology, such as Oracle Workflow Server, Oracle Iteret Commerce & Oracle WebSystem, ad Oracle EDI Gateway. Isulatio from Chages You should be able to ecapsulate the structure of schema to prevet chagig schema structures from affectig other modules. Cosistet Behavior You should be able to hide Object logic specific to a module from other modules, ad to esure that this logic is correctly ivoked by other modules ad customers. Robust Validatio You should be able to fully validate all icomig iformatio ito Oracle Applicatios. I order to support requiremets metioed i Basic Busiess Needs sectio, ew APIs will be developed supportig followig fuctioality o busiess object - Item Cost, Resource Cost, Allocatio Defiitio, ad Burde Details: Cost Maagemet APIs 1-3

Major Features Item Cost APIs Isert Item Cost This API will be used to isert ew Item Cost record i OPM. It will help ew customers of OPM load Item Cost iformatio ito OPM from exteral systems. Update Item Cost This API will be used to update Item Cost record for a existig Item. Usig this API, user ca update Item Cost i OPM. Delete Item Cost This API will be used to delete Item Cost record i OPM. Usig this API, user ca delete Item Cost record. Retrieve Item Cost This API will be used to retrieve Item Cost iformatio from OPM. Usig this API, user ca retrieve Item Cost iformatio from OPM to be used by exteral systems or for ay other purpose. Note: This reflects cost iformatio directly from the cost details tables. This should ot be used to recocile subledger bookigs or ivetory valuatios. Resource Cost APIs Isert Resource Cost This API will be used to isert ew Resource Cost record i OPM. It will help ew customers of OPM load Resource Cost iformatio ito OPM from exteral systems. Update Resource Cost This API will be used to update Resource Cost record for a existig Resource. Usig this API, user ca update Resource Cost i OPM. 1-4 Product Title/BookTitle as a Variable

Major Features Allocatio Defiitio APIs Burde Details APIs Delete Resource Cost This API will be used to delete Resource Cost record i OPM. Usig this API, user ca delete Resource Cost record. Retrieve Resource Cost This API will be used to retrieve Resource Cost iformatio from OPM. Usig this API, user ca retrieve Resource Cost iformatio from OPM to be used by exteral systems or for ay other purpose. Isert Allocatio Defiitio This API will be used to isert ew Allocatio Defiitio record i OPM. It will help customers of OPM load allocatio defiitio iformatio ito OPM from exteral systems. Update Allocatio Defiitio This API will be used to update a existig Allocatio Defiitio record. Usig this API, user ca update allocatio defiitio i OPM. Delete Allocatio Defiitio This API will be used to delete Allocatio Defiitio record i OPM. Usig this API, user ca delete allocatio defiitio record. Isert Burde Details This API will be used to isert ew Burde Details i OPM. It will help ew customers of OPM load Burde Details iformatio ito OPM from exteral systems. Update Burde Details This API will be used to update Burde Details for a existig item ad resource. Usig this API, user ca update Burde Details i OPM. Cost Maagemet APIs 1-5

Major Features Delete Burde Details This API will be used to delete Burde Details record i OPM. Usig this API, user ca delete Burde Details record. Retrieve Burde Details This API will be used to retrieve Burde Details iformatio from OPM. Usig this API, user ca retrieve Burde Details iformatio from OPM to be used by exteral systems or for ay other purpose. Cost Maagemet API Features Creatig Updatig ad Deletig Iformatio Proper Ecapsulatio Sychroous Processig Followig the Busiess Hierarchy Detailed ad Traslatable Error Messages Cost Maagemet API Support Policy Cost Maagemet APIs are supported by Oracle. This meas: Oracle will provide objects ad libraries eeded to use to the APIs ad the documetatio for their use. Oracle will esure that the APIs fuctio as desiged. Oracle will ot support customer geerated programs that use the APIs. 1-6 Product Title/BookTitle as a Variable

Cost Maagemet API Bill of Materials Oracle Applicatios Packages Supplied Cost Maagemet APIs make use of the followig stadard Oracle Applicatios packages: FND_API - the stadard Oracle Applicatios API versio checkig fuctio. This is used by the stored procedure to check valid API versio umber ad also cotais costat variables such as TRUE ad FALSE. FND_MESSAGE - the stadard Oracle Applicatios messagig fuctio. This is used by the stored procedure to report status ad error hadlig. FND_PUB_MSG - the stadard Oracle Applicatios message retrieval fuctio, used to iterrogate the procedure messages. These packages are istalled as part of the curret release. Please refer to the Oracle Applicatios Codig Stadards maual for additioal details. Cost Maagemet API Bill of Materials The followig is a list of packages ad files that are delivered with OPM Cost Maagemet APIs. These must be o your system for your iterface to compile ad lik properly. Package Name File Names Descriptio GMF_ItemCost_PUB GMF_ResourceCost_PUB GMF_AllocatioDefiitio_PUB GMF_BurdeDetails_PUB GMFPCSTS.pls GMFPCSTB.pls GMFPRESS.pls GMFPCSTB.pls GMFPALCS.pls GMFPCSTB.pls GMFPBRDS.pls GMFPBRDB.pls Public Cost Maagmet package that the user defied fuctio calls. The busiess API ca be used for isertig, updatig, deletig, or retrievig a item cost. Public Cost Maagmet package that the user defied fuctio calls. The busiess API ca be used for isertig, updatig, deletig, or retrievig a resource cost. Public Cost Maagmet package that the user defied fuctio calls. The busiess API ca be used for isertig, updatig, or deletig a allocatio defiitio. Public Cost Maagmet package that the user defied fuctio calls. The busiess API ca be used for isertig, updatig, deletig, or retrievig a burde detail. Cost Maagemet APIs 1-7

Cost Maagemet API Bill of Materials 1-8 Product Title/BookTitle as a Variable

2 Cost Maagemet API Usage The Cost Maagemet APIs are curretly writte i PL/SQL. To make use of these API s, you must code your iterface or wrapper. Your program will also be resposible for coectig to a database before callig a API fuctio. You may also choose to write log files before callig ad after returig from a API fuctio. Each fuctio will retur a error code i the parameter x_retur_status which idicates whether the API was successful or failed. The values are as follows: S - Successful E - Expected error U - Uexpected error Callig the API Iterface Code The followig are sippets from a sample wrapper (referred to as wrapper from here o) ad are used to test the API code. Wrappers are writte i PL/SQL Package. Wrappers ca be writte for each API ad call the APIs directly from these wrappers. The source of data for the wrapper comes from a ASCII flat file. You will probably wat to write a similar type of wrapper to call the API code. These wrappers have followig parameters : p_dir IN VARCHAR2 - Workig directory for iput ad output files. p_iput_file IN VARCHAR2 - Name of iput file i.e., ASCII flat file with data p_output_file IN VARCHAR2 - Name of output file p_delimiter IN VARCHAR2 - Delimiter character The ASCII flat file must be character delimited (typically, but ot ecessarily, with a comma). Cost Maagemet API Usage 2-1

Callig the API Code - Example Callig the API Code - Example This sectio details how to call the API code withi the wrapper. The purpose of this is to explai how to call a stadard OPM Cost Maagemet APIs. Here Item Cost API is take as a example. The wrapper package cosists of a PL/SQL fuctio amed Create_Item_Cost which returs VARCHAR2 idicatig retur status. It is ot critical how the data values get ito your customized iterface. What is dictated is the order i which those same data values get passed ito the stadard API calls. Typically, wrappers goes through followig steps for each item: 1. Load the data from the flat file ito PL/SQL table or record. 2. Call the Item Cost API for each item. 3. Check the retur status. 4. Retrieve the messages from the message stack ad write them ito a log file. Wrapper logic 1. Lies 66-69, declares PL/SQL variables to hold the data comig from flat file. These variables gets passed to the public API, so that data type should correspod with the data types specified i the API specificatio. 2. Lies 125-132, get the first lie from the flat file ad extract the first value. I our case it is a type of the record. Followig are the possible values: 10 : Item Cost Header record 20 : This Level record for the Item 30 : Lower Level record for the Item. 3. Lies 143-261, populate the item details ito PL/SQL tables based o the type of record. 4. Lies 263-281, error hadlig. If error is raised while populatig header record the skip all the detail records. If i case of detail record the skip oly that detail record ad cotiue populatig other detail records. 5. Lies 283-335, get the ext lie from the file ad check type of record. Followig scearios may occur : If the record type is of detail, the cotiue populatig the record. 2-2 Product Title/BookTitle as a Variable

Callig the API Code - Example If the record type is header record the call the public API for the previous Item Cost Detail already read. If the fetch fails (i.e., ed of file is reached - No_Data_Foud error), the call the public API for the previous Item Cost Detail already read. 6. Lies 343-373, read all the messages from the message stack ad write it ito a log file. 7. Lies 376-383, check the out parameter l_costcmpt_ids PL/SQL table, if ay records are iserted the get the iformatio for what detail records have bee iserted. 8. Lies 385-389, check whether to cotiue the loop or ot. If yes, the start over agai from step 2. Cost Maagemet API Usage 2-3

API Hits API Hits For performace improvemet, NOCOPY hits have bee added to the OUT parameters of the APIs. Whe a API has the same type of parameter defied as IN ad OUT, you must pass i differet variables. I additio, you must check the retur status of the API (geerally retured through x_retur_status parameter) before lookig at other OUT variables retured by the API. If the retur status is ot Success, the you must ot use ay of the OUT parameters passed back from the API. For example, the Get_Resource_Cost API cotais p_resource_cost_rec ad x_ resource_cost_rec: PROCEDURE Get_Resource_Cost ( p_api_versio IN NUMBER, p_iit_msg_list IN VARCHAR2 := FND_API.G_FALSE, x_retur_status OUT NOCOPY VARCHAR2, x_msg_cout OUT NOCOPY NUMBER, x_msg_data OUT NOCOPY VARCHAR2, p_resource_cost_rec IN Resource_Cost_Rec_Type, x_resource_cost_rec OUT NOCOPY Resource_Cost_Rec_Type ); Therefore, the call ca be set up to read: GMF_RESOURCECOST_PUB.get_resource_cost( (p_api_versio => l_api_versio, p_iit_msg_list => l_iit_msg_list, x_retur_status => l_retur_status, x_msg_cout => l_msg_cout, x_msg_data => l_msg_data, p_resource_cost_rec => l_resource_cost_rec, x_resource_cost_rec => l_resource_cost_rec ); I this example, p_resource_cost_rec ad x_resource_cost_rec both have the variable l_resource_cost_rec. This gives a icorrect result because both the parameters caot have the same variable. You must set the call up so p_resource_cost_rec ad x_resource_cost_rec have differet variables: GMF_RESOURCECOST_PUB.get_resource_cost( (p_api_versio => l_api_versio, p_iit_msg_list => l_iit_msg_list, x_retur_status => l_retur_status, x_msg_cout => l_msg_cout, x_msg_data => l_msg_data, 2-4 Product Title/BookTitle as a Variable

API Hits p_resource_cost_rec => l_resource_cost_rec_i, x_resource_cost_rec => l_resource_cost_rec_out ); Item Cost Example 1 --+==========================================================================+ 2 -- FUNCTION NAME 3 -- Create_Item_Cost 4 -- 5 -- TYPE 6 -- Public 7 -- 8 -- USAGE 9 -- Create item Cost 10 -- 11 -- DESCRIPTION 12 -- This is a PL/SQL wrapper fuctio to call the 13 -- Create_Item_Cost API. 14 -- It reads item data from a flat file ad outputs ay error 15 -- messages to a secod flat file. It also geerates a log file 16 -- called gmf_api_cric_wrapper<sessio_id>.log i the p_dir directory. 17 -- 18 -- PARAMETERS 19 -- p_dir IN VARCHAR2 - Workig directory for iput 20 -- ad output files. Cost Maagemet API Usage 2-5

API Hits 21 -- p_iput_file IN VARCHAR2 - Name of iput file 22 -- p_output_file IN VARCHAR2 - Name of output file 23 -- p_delimiter IN VARCHAR2 - Delimiter character 24 -- 25 -- RETURNS 26 -- VARCHAR2 - 'S' All records processed successfully 27 -- 'E' 1 or more records errored 28 -- 'U' 1 or more record uexpected error 29 -- 30 -- HISTORY 31 -- 32 --+==========================================================================+ 33 --Api ed of commets 34 35 FUNCTION Create_Item_Cost 36 ( p_dir IN VARCHAR2 37, p_iput_file IN VARCHAR2 38, p_output_file IN VARCHAR2 39, p_delimiter IN VARCHAR2 40 ) 41 RETURN VARCHAR2 42 IS 43 44 /* Local variables */ 45 46 l_status VARCHAR2(11); 47 l_retur_status VARCHAR2(11) :=FND_API.G_RET_STS_SUCCESS; 48 l_cout NUMBER(10) ; 49 l_record_cout NUMBER(10) :=0; 50 l_loop_ct NUMBER(10) :=0; 51 l_dummy_ct NUMBER(10) :=0; 52 l_data VARCHAR2(1000); 2-6 Product Title/BookTitle as a Variable

API Hits 53 54 l_p_dir VARCHAR2(150); 55 l_output_file VARCHAR2(120); 56 l_outfile_hadle UTL_FILE.FILE_TYPE; 57 l_iput_file VARCHAR2(120); 58 l_ifile_hadle UTL_FILE.FILE_TYPE; 59 l_lie VARCHAR2(1000); 60 l_delimiter VARCHAR(11); 61 l_log_dir VARCHAR2(150); 62 l_log_ame VARCHAR2(120) :='gmf_api_cric_wrapper'; 63 l_log_hadle UTL_FILE.FILE_TYPE; 64 l_global_file VARCHAR2(120); 65 66 l_header_rec GMF_ItemCost_PUB.Header_Rec_Type; 67 l_this_lvl_tbl GMF_ItemCost_PUB.This_Level_Dtl_Tbl_Type; 68 l_lower_lvl_tbl GMF_ItemCost_PUB.Lower_Level_Dtl_Tbl_Type; 69 l_costcmpt_ids GMF_ItemCost_PUB.costcmpt_ids_tbl_type; 70 l_idx NUMBER(10); 71 l_idx1 NUMBER(10); 72 l_type NUMBER(10); 73 l_cotiue VARCHAR2(1) := 'Y' ; 74 l_skip_details VARCHAR2(1) := 'N' ; 75 76 l_sessio_id VARCHAR2(110); 77 78 BEGIN 79 80 /* Eable The Buffer */ 81 DBMS_OUTPUT.ENABLE(1000000); 82 83 l_p_dir :=p_dir; 84 l_iput_file :=p_iput_file; 85 l_output_file :=p_output_file; 86 l_delimiter :=p_delimiter; 87 l_global_file :=l_iput_file; 88 89 /* Obtai The SessioId To Apped To wrapper File Name. */ 90 91 l_sessio_id := USERENV('sessioid'); 92 93 l_log_ame := CONCAT(l_log_ame,l_sessio_id); 94 l_log_ame := CONCAT(l_log_ame,'.log'); 95 96 /* Directory is ow the same same as for the out file */ 97 l_log_dir := p_dir; Cost Maagemet API Usage 2-7

API Hits 98 99 100 /* Ope The Wrapper File For Output Ad The Iput File for Iput. */ 101 102 l_log_hadle :=UTL_FILE.FOPEN(l_log_dir, l_log_ame, 'w'); 103 l_ifile_hadle :=UTL_FILE.FOPEN(l_p_dir, l_iput_file, 'r'); 104 105 /* Loop thru flat file ad call Item Cost API */ 106 DBMS_OUTPUT.PUT_LINE('Process Started at ' to_char(sysdate,'dd-mon-yy HH24:MI:SS')); 107 DBMS_OUTPUT.PUT_LINE('Iput Directory ' l_p_dir ); 108 DBMS_OUTPUT.PUT_LINE('Iput File ' l_iput_file ); 109 DBMS_OUTPUT.PUT_LINE('Delimiter ' l_delimiter ); 110 DBMS_OUTPUT.PUT_LINE('Output File ' l_output_file ); 111 112 113 DBMS_OUTPUT.PUT_LINE('Start Processig'); 114 UTL_FILE.PUT_LINE(l_log_hadle, 'Process Started at ' to_ char(sysdate,'dd-mon-yy HH24:MI:SS')); 115 116 UTL_FILE.NEW_LINE(l_log_hadle); 117 UTL_FILE.PUT_LINE(l_log_hadle, 'Iput Directory ' l_p_dir ); 118 UTL_FILE.PUT_LINE(l_log_hadle, 'Iput File ' l_iput_file ); 119 UTL_FILE.PUT_LINE(l_log_hadle, 'Record Type ' l_delimiter ); 120 UTL_FILE.PUT_LINE(l_log_hadle, 'Output File ' l_output_file ); 121 122 l_outfile_hadle :=UTL_FILE.FOPEN(l_p_dir, l_output_file, 'w'); 123 124 /* Get the first record from the file */ 125 BEGIN 126 UTL_FILE.GET_LINE(l_ifile_hadle, l_lie); 127 l_record_cout :=l_record_cout+1; 128 l_type := Get_Field(l_lie,l_delimiter,1) ; -- 10 : header rec, 20 : this level, 30 : lower level 129 EXCEPTION 130 WHEN NO_DATA_FOUND THEN 131 raise; 132 END; 133 134 /* Populate appropriate pl/sql record or table based o the type of record */ 135 LOOP 136 BEGIN 137 138 UTL_FILE.PUT_LINE(l_log_hadle, 'Readig Record...' l_record_cout 2-8 Product Title/BookTitle as a Variable