Professional Documents
Culture Documents
Release 11i
October 2000
Part No. A87318-01
Oracle® Process Manufacturing Formula API User’s Guide, Release 11i
The Programs (which include both the software and documentation) contain proprietary information of
Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent, and other intellectual and industrial property
laws. Reverse engineering, disassembly, or decompilation of the Programs is prohibited.
Program Documentation is licensed for use solely to support the deployment of the Programs and not
for any other purpose.
The information contained in this document is subject to change without notice. If you find any problems
in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error free. Except as may be expressly permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on
behalf of the U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial
computer software" and use, duplication, and disclosure of the Programs, including documentation,
shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.
Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer
software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR
52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500
Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of such applications if the Programs are used for
such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the
Programs.
Preface........................................................................................................................................................... vii
iii
Interpreting Error Conditions .......................................................................................................... A-3
Understanding Error Messages ........................................................................................................ A-3
Index
iv
Send Us Your Comments
Oracle® Process Manufacturing Formula API User’s Guide Release 11i
Part No. A87318-01
Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this
publication. Your input is an important part of the information used for revision.
Did you find any errors?
Is the information clearly presented?
Do you need more information? If so, where?
Are the examples correct? Do you need more examples?
What features did you like most about this manual?
If you find any errors or have any other suggestions for improvement, please indicate the chapter,
section, and page number (if available). You can send comments to us in the following ways:
FAX: 650-506-7200 Attn: Oracle Process Manufacturing
Postal service:
Oracle Corporation
Oracle Process Manufacturing
500 Oracle Parkway
Redwood City, CA 94065
U.S.A.
Electronic mail message to appsdoc@us.oracle.com
If you would like a reply, please give your name, address, and telephone number below.
If you have problems with the software, please contact your local Oracle Support Services.
v
vi
Preface
Welcome to the Oracle Process Manufacturing Formula API User’s Guide. This user’s
guide includes the information you need to work with the Oracle Process
Manufacturing (OPM) application effectively.
This preface explains how this user’s guide is organized and introduces other
sources of information that can help you.
Intended Audience
This guide assumes that you have working knowledge of your business area’s
processes and tools. It also assumes that you are familiar with OPM Formula
Management. If you have never used OPM, we suggest you attend one or more of
the Oracle Process Manufacturing training classes available through Oracle World
Wide Education.
This guide also assumes that you are familiar with the Oracle Applications
graphical user interface. To learn more about Oracle Applications graphical user
interface, read the Oracle Applications User’s Guide.
vii
About This Guide
This guide contains overviews as well as task and reference information. It includes
the following:
Name Description
Formula API Describes the Application Program Interfaces (APIs) that support
Introduction external interfaces to the OPM Formula Management tables
including: packages supplied, Formula API bill of material,
wrapper function, stored procedures, and validating the user
name.
Formula API Provides the relationships between Formula API table structure
Business and its entities. Discusses Formula API business objects, the entity
Objects relationship diagram, business object interface design, creating a
new formula and importing formula data structures
Appendix A Provides message handling, the interpretation of error conditions,
and an understanding of error messages.
Information Sources
You can choose from many sources of information, including documentation,
training, and support services to increase your knowledge and understanding.
Online Documentation
Oracle Applications documentation is available on CD-ROM, except for technical
reference manuals. User’s guides are available in HTML format and on paper.
Technical reference manuals are available on paper only. Other documentation is
available on paper and sometimes in PDF format.
The content of the documentation remains the same from format to format. Slight
formatting differences could occur due to publication standards, but such
differences do not affect content. For example, page numbers are included on paper,
but are not included in HTML.
The HTML documentation is available from all Oracle Applications windows. Each
window is programmed to start your web browser and open a specific,
context-sensitive section. Once any section of the HTML documentation is open,
you can navigate freely throughout all Oracle Applications documentation.
viii
Related Documents
Oracle Process Manufacturing shares business and setup information with other
Oracle products. You may find the following Oracle Applications user’s guides
useful:
Oracle Applications User’s Guide
Oracle Application’s Flexfields Guide
Oracle Workflow User Guide
Oracle Applications System Administrator’s Guide
Oracle General Ledger User’s Guide
Oracle Payables User’s Guide
Oracle Receivables User’s Guide
Oracle Human Resources North American User’s Guide
Oracle Purchasing User’s Guide
ix
Oracle Process Manufacturing Process Operation Control User’s Guide
Oracle Process Manufacturing Production Management User’s Guide
Process Planning
Oracle Process Manufacturing Capacity Planning User’s Guide
Oracle Process Manufacturing Integration with Advanced Planning and Scheduling
User’s Guide
Oracle Process Manufacturing MPS/MRP and Forecasting User’s Guide
Product Development
Oracle Process Manufacturing Formula Management User’s Guide
Oracle Process Manufacturing Laboratory Management User’s Guide
Oracle Process Manufacturing Quality Management User’s Guide
Regulatory
Oracle Process Manufacturing Regulatory Management User’s Guide
System Administration and Technical Reference
Oracle Process Manufacturing Implementation Guide
Oracle Process Manufacturing System Administration User’s Guide
Oracle Process Manufacturing Technical Reference Manuals
Training
Oracle offers a complete set of formal training courses to help you master Oracle
Process Manufacturing and reach full productivity quickly. We organize these
courses into functional learning paths, so you take only those courses appropriate to
your area of responsibility.
You have a choice of educational environments. You can attend courses offered by
Oracle Education Services at any one of our many Education Centers, or you can
arrange for our trainers to teach at your facility. In addition, Oracle Training
professionals can tailor standard courses or develop custom courses to meet your
needs. For example, you may want to use your organization’s structure,
terminology, and data as examples in a customized training session delivered at
your own facility.
x
Conventions
The following conventions are used in this guide:
Bolded Text
Buttons, fields, keys, menus, and selections are bolded in procedures only. For
example: To access the next window, click OK. Otherwise, references to these
features appear in regular type.
Additional Menu Options
Only nonstandard menu options are discussed. Standard menu bar options (such as
Save) are not discussed. These standard options are described in the Oracle
Applications User’s Guide. Only menu options unique to the use of the specific
window are discussed.
Field References
References to fields within procedures are in bold type. References within the body
of this guide appear in regular type.
Required Fields
The word Required appears as the last word in the field description of all required
fields. When the field is required contingent on the entry in another field, or only in
specific situations, "Required if..." is the last sentence of the field description.
Fields Reserved for Future Use
Fields with no current processing implications are referenced by the statement "This
field is not currently used" or "Reserved for future use." Do not use these fields for
your own reference data, because there are plans to link future functionality to
these fields. Fields intended for informational purposes only are referenced by the
statement "This field is for informational purposes only."
Pending/Completed Transactions
Discussions about processing transactions that use the words pending and
completed refer to the status of a transaction. Pending and completed do not refer
to the database tables that are updated as a result of transactions (for example, some
completed transactions are stored in the Pending Transactions table).
Procedures
Most topics contain a procedure with numbered steps. Any actions which are
subordinate to a step are assigned letters. You can customize your Oracle
Application, therefore, all procedures are suggestive only. Navigate to windows
xi
and between responsibilities in a way that works best for your particular setup.
Also note that fields may appear in a different order than they are discussed.
Use of the Word Character
The word character means an alphanumeric character. Characters that are numeric
or alphabetic only are referenced specifically. Depending on your system security
profile, you many not have access to all of the windows and functions described in
this guide. If you do not see a menu option described in this guide, and you want
access to it, contact your System Administrator.
About Oracle
Oracle Corporation develops and markets an integrated line of software products
for database management, applications development, decision support, and office
automation, as well as Oracle Applications, an integrated suite of more than 45
software modules for financial management, supply chain management,
manufacturing, project systems, human resources, sales, and service management.
Oracle Products are available for mainframes, minicomputers, personal computers,
network computers, and personal digital assistants, allowing organizations to
integrate different computers, different operating systems, different networks, and
xii
even different database management systems, into a single, unified computing, and
information resource.
Oracle is the world’s leading supplier of software for information management, and
the world’s second largest software company. Oracle offers its database, tools, and
applications products, along with related consulting, education, and support
services in over 140 countries around the world.
Thank You
Thank you for choosing Oracle Process Manufacturing and this user’s guide.
We value your comments and feedback. At the beginning of this guide is a Reader’s
Comment Form that you can use to explain what you like or dislike about this
user’s guide. Mail your comments to the following address or call us directly at
650-506-7000.
Oracle Applications Documentation Manager
Oracle Corporation
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Or, send an electronic mail message to appsdoc@us.oracle.com
xiii
xiv
1
Formula API Introduction
This document describes the Application Program Interfaces (APIs) that support
external interfaces to the Oracle Process Manufacturing (OPM) Formula
Management tables. The topics discussed in this topic are:
Introducing the Formula API
Oracle Applications Packages Supplied
Formula API Bill of Materials
Wrapper Function and Stored Procedures
Validating the User Name
Where xxx in the Business Object Name is PVT (private) or PUB (public).
Public Package for Surrogates GMDPSURS.pls Public Formula Surrogate package used
primarily for creating surrogate keys
GMDPSURB.pls
for formula header, detail lines, and
effectivity.
e. No changes or updates are performed for any formulas that have cost
rollups done on them.
formula_desc1 varchar2 70 Y
formula_id number
formulaline_id number
fmeff_id number
routing_id number 10 N*
formula_ varchar2 70 Y
desc1
formula_id number
formulaline_ number
id
fmeff_id number
routing_id number 10 N*
Handling Messages
APIs put result messages into a message list. Programs calling APIs can then get the
messages from this list, and process them appropriately. This may be by issuing
them to the user if calling the API from an interactive process, or writing them to
database tables or log files if calling the API from a batch process.
Messages are stored in an encode format to enable API callers to find out message
names by using the standard functions provided by the message dictionary.
The structure of the message list is not public. Neither API developers nor API
callers can access this list except through calling the API message utility routines
mentioned below.
The following utility functions are defined in the FND_MSG_PUB package, in the
file AFASMSGS.pls:
Initialize - Initializes the API message list
Add - Adds a message to the API message list
Get - Gets a message from the API message list
Count_Msg - Returns the number of messages in the API message list
Delete - Deletes one or more messages from the API message list
Reset - Resets the index used in getting messages
Count_And_Get - Returns the number of messages in the API message list. If
this number is one, it also returns the message data.
You can refer to Oracle Applications Coding Standards for complete documentation of
these functions and procedures for usage information.
To add a message to the API message list, developers should use the regular
message dictionary procedures FND_MESSAGE.SET_NAME and FND_
MESSAGE.SET_TOKEN to set the message name and tokens on the message
dictionary stack. They should then call FND_MSG_PUB.Add to fetch the messages
off the message dictionary stack and add it to the API message list.
To get a message from the API message list, API callers should use the procedure
FND_MSG_PUB.Get. This procedure operates in 5 different modes :
First - Gets the first message in the API message list
Next - Gets the next message in the API message list
Last - Gets the last message in the API message list
Error Messages
(Listed Alphabetically) Message Code
Duplicate line number for item &ITEM_NO in FM _DUPLICATE_LINE_NO
formula/version &FORMULA_NO
&FORMULA_VERS
Experimental item &ITEM_NO in FM _EXPERIMENTAL_ITEM
formula/version &FORMULA_NO
&FORMULA_VERS
Formula number/version &FORMULA_NO FM _FORMULA_ALREADY_EXISTS
&FORMULA_VERS already exists
Formula number/version &FORMULA_NO FM _INVALID_FORMULA
&FORMULA_VERS cannot be located
Error Messages
(Listed Alphabetically) Message Code
Ingredient/by-product lines cannot be loaded FM _MISSING_PRODUCT
until product is established for formula/version
&FORMULA_NO &FORMULA_VERS
Invalid cost allocation for item &ITEM_NO in FM_INVALID_COST_ALLOC
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid customer &CUST_NO FM_INVALID_CUSTOMER
Invalid end_date against effectivity for FM_INVALID_END_DATE
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid formula class for formula/version FM _INVALID_FORMULA_CLASS
&FORMULA_NO &FORMULA_VERS
Invalid formula type for formula/version FM _INVALID_FORMULA_TYPE
&FORMULA_NO &FORMULA_VERS
Invalid formula_use for formula/version FM_INVALID_FORMULA_USE
&FORMULA_NO &FORMULA_VERS
Invalid item &ITEM_NO in formula/version FM _INVALID_ITEM
&FORMULA_NO &FORMULA_VERS
Invalid item number &ITEM_NO FM_INVALID_ITEM_NO
Invalid line number for item &ITEM_NO in FM_INVALID_LINE_NO
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid line type for item &ITEM_NO in FM_INVALID_LINE_TYPE
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid maximum quantity against effectivity FM_INVALID_MAX_QTY
for formula/version &FORMULA_NO
&FORMULA_VERS
Invalid minimum quantity against effectivity for FM_INVALID_MIN_QTY
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid phantom type for item &ITEM_NO in FM_INVALID_PHANTOM_TYPE
formula/version &FORMULA_NO
&FORMULA_VERS
Error Messages
(Listed Alphabetically) Message Code
Invalid preference against effectivity for FM_INVALID_PREFERENCE
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid product &ITEM_NO for FM_INVALID_FORMULA_PRODUCT
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid release type for item &ITEM_NO in FM_INVALID_RELEASE_TYPE
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid rework type for item &ITEM_NO in FM_INVALID_REWORK_TYPE
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid routing number/version &ROUTING_ FM_INVALID_ROUTING
NO &ROUTING_VERS
Invalid scale type for formula/version FM _INVALID_SCALE_TYPE
&FORMULA_NO &FORMULA_VERS
Invalid scrap factor for item &ITEM_NO in FM_INVALID_SCRAP_FACTOR
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid standard quantity against effectivity for FM_INVALID_STD_QTY
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid start_date against effectivity for FM_INVALID_START_DATE
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid UOM &ITEM_UM against effectivity for FM_INVALID_UOM
formula/version &FORMULA_NO
&FORMULA_VERS
Invalid user name &USER_NAME FM_INVALID_USER
Missing formula number FM _MISSING_FORMULA_NO
Missing formula version FM _MISSING_FORMULA_VERS
Negative quantity not permitted see item FM _NEGATIVE_QTY
&ITEM_NO in formula/version &FORMULA_
NO &FORMULA_VERS
Error Messages
(Listed Alphabetically) Message Code
No conversion defined from &ITEM_UM to FM_UOM_CONVERSION
primary UOM for item &ITEM_NO in
formula/version &FORMULA_NO
&FORMULA_VERS
No conversion to standard UOM for item FM_MISSING_UOM_CONVERSION
&ITEM_NO
Supplied Organization code &ORGN_CODE is FM_INVALID_ORGN_CODE
invalid
Index-1
version, 2-2 GMDPFMES.pls, 1-4
formula API GMDPFMHB.pls, 1-4
business objects, 2-2 GMDPFMHS.pls, 1-4
entity diagram, 2-3 GMDPFMVB.pls, 1-5
Formula Create, 1-2 GMDPFMVS.pls, 1-5
formula detail, 1-2 GMDPSURB.pls, 1-5
creation, 1-2 GMDPSURS.pls, 1-5
information, 1-2 GMDVFMDB.pls, 1-5
formula effectivity, 1-3 GMDVFMDS.pls, 1-5
creation, 1-2 GMDVFMEB.pls, 1-5
information, 1-3 GMDVFMES.pls, 1-5
formula header, 2-5 GMDVFMHB.pls, 1-4
creation, 1-2 GMDVFMHS.pls, 1-4
modification, 1-2
formula information, importing, 1-2
H
formula package, common, 1-5
formula_class, 2-9, 2-13 header, 1-6, 2-2
formula_desc1, 2-9, 2-13 header data, 2-8
formula_desc2, 2-9, 2-13 header package, private formula, 1-4
formula_id, 2-9, 2-10, 2-13
formula_no, 2-9, 2-13 I
formula_type, 2-9, 2-13
formula_use, 2-11, 2-15 ic_item_mst, 2-10
formula_vers, 2-9, 2-13 ic_item_mst.item_um, 2-10
formulaline_id, 2-9, 2-14 importing formula information, 1-2
inactive_ind, 2-9, 2-10, 2-13
ingredient, 2-2
G input structure, general, 2-7
G_MISS_CHAR, 2-13, 2-15 Insert_FormulaDetail, 1-6
general input structure, 2-7 interface design, business objects, 2-4
GMD_FORMULA_COMMON_PKG, 1-5 inventory item, 2-8
GMD_FORMULA_DETAIL_PUB, 1-4, 1-6 item_id, 2-10
GMD_FORMULA_DETAIL_PVT, 1-5 item_master, 2-11
GMD_FORMULA_DETAIL_xxx, 1-2 item_no, 2-10, 2-14, 2-15
GMD_FORMULA_EFFECTIVITY_PUB, 1-4 item_um, 2-10, 2-11, 2-14, 2-16
GMD_FORMULA_EFFECTIVITY_PVT, 1-5 item-specific data, 2-8
GMD_FORMULA_EFFECTIVITY_xxx, 1-3
GMD_FORMULA_HEADER_PUB, 2-5 L
GMD_FORMULA_PUB, 1-4
GMD_FORMULA_PVT, 1-4 line_no, 2-9, 2-14
GMD_FORMULA_xxx, 1-2 line_type, 2-9, 2-14
GMDPFMCS.pls, 1-5 linear scaling, 2-10
GMDPFMDB.pls, 1-4
GMDPFMDS.pls, 1-4
GMDPFMEB.pls, 1-4
Index-2
M public packages, validation, 1-5
public procedures, 1-6
max_qty, 2-11, 2-15
message encoding, 2-8
message list initialization, 2-7 Q
message list, specifying number of messages qty, 2-10, 2-14
added, 2-7
min_qty, 2-11, 2-15
modifying formula header information, 1-2 R
release_type, 2-10, 2-14
N rework, 2-10
rework_type, 2-10, 2-15
new formula creation, 2-5 routing_id, 2-11, 2-16
routing_no, 2-11, 2-16
O routing_vers, 2-11, 2-16
op_cust_mst, 2-11
Oracle forms, in calling function, 2-5 S
orgn_code, 2-10, 2-15 sample wrapper function, 1-3
scale_type, 2-9, 2-10, 2-13, 2-14
P scrap_factor, 2-10, 2-14
standard message function processing, 2-8
p_api_version, 2-7 start_date, 2-11, 2-15
p_commit, 2-7
std_qty, 2-11, 2-15
p_formula_insert_tbl_type, 2-8, 2-9
step scaling, 2-10
p_formula_update_tbl_type, 2-8 stored procedure, 1-6, 2-4
p_init_msg_list, 2-7
support policy, 1-3
parameter, passing in API, 1-3
surrogate package, public formula, 1-5
parameters, 2-7 SY$DEFAULT_CO, 2-11
parsing formulated information, 1-3
SY$MAX_DATE, 2-11
partial release, 2-10
SY$MIN_DATE, 2-11
pass/fail status, call, 2-7 sy_orgn_mst, 2-10
phantom, 2-10
phantom replacement, automatic, 2-10
phantom_type, 2-10, 2-14 T
PL/SQL, 1-2, 1-3, 1-6, 2-5, 2-7, 2-8 table structure, API, 2-3
PL/SQL table, 1-6 text file, comma-delimited, 2-5
preference, 2-11, 2-16
primary UOM, 2-10
private formula detail package, 1-5 U
private formula header package, 1-4 UOM, 2-11
processing standard message functions, 2-8 UOM, primary, 2-10
product, 2-2 user name validation, 1-6
public formula surrogate package, 1-5 user_name, 2-12, 2-18
public formula validation package, 1-5
public package, surrogates, 1-5
Index-3
V
valid ID, 1-6
validating the user name, 1-6
validation package, public formula, 1-5
version compatibility, validation, 2-7
W
wrapper function, 1-6, 2-8
wrapper function, sample, 1-3
X
x_msg_count, 2-7
x_msg_data, 2-8
x_return_status, 2-7
Index-4