8/6/2019 Oracle 12I Developers Guide
1/654
Oracle E-Business Suite
Developer's Guide
Release 12.1
Part No. E12897-04
June 2010
8/6/2019 Oracle 12I Developers Guide
2/654
Oracle E-Business Suite Developer's Guide, Release 12.1
Part No. E12897-04
Copyright 1995, 2010, Oracle and/or its affiliates. All rights reserved.
Primary Author: Sara Woodhull, Mildred Wang
Contributing Author: Eric Bing, Anne Carlson, Steven Carter, Robert Farrington, Mark Fisher, Paul
Ferguson, Cliff Godwin, Clara Jaeckel, Taka Kamiya, Vinod Khatri, Bob Lash, Michael Mast, Tom Morrow,
Robert Nix, Emily Nordhagen, Gursat Olgun, Lisa Parekh, Jan Smith, Dana Spradley, Susan Stratton, LeslieStuddard, Martin Taylor, Venkata Vengala, Peter Wallack, Aaron Weisberg, Maxine Zasowski
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks
of their respective owners.
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf
of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS
Programs, software, databases, and related documentation and technical data delivered to U.S. Government
customers are "commercial computer software" or "commercial technical data" pursuant to the applicable
Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication,
disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the
applicable Government contract, and, to the extent applicable by the terms of the Government contract, the
additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle
USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software is developed for general use in a variety of information management applications. It is not
developed or intended for use in any inherently dangerous applications, including applications which may
create a risk of personal injury. If you use this software in dangerous applications, then you shall beresponsible to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of
this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this
software in dangerous applications.
This software and documentation may provide access to or information on content, products and services
from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
warranties of any kind with respect to third party content, products and services. Oracle Corporation and its
affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third
party content, products or services.
8/6/2019 Oracle 12I Developers Guide
3/654
iii
Contents
Send Us Your Comments
Preface
1 Overview of Coding Standards
Overview of Coding Standards.................................................................................................1-1
The Standard Development Environment................................................................................1-5
Overview of Building an Oracle E-Business Suite Application............................................ 1-11
2 Setting Up Your Application Framework
Overview of Setting Up Your Application Framework........................................................... 2-1
3 Building Database Objects
Overview of Building Your Database Objects......................................................................... 3-1
Table Registration API..............................................................................................................3-9
XML Definition File Utility.................................................................................................... 3-11
4 Using PL/SQL in Oracle E-Business Suite
Overview of Using PL/SQL in Oracle E-Business Suite.......................................................... 4-1
Replacements for Oracle Forms Built-ins...............................................................................4-11
Coding Item, Event and Table Handlers................................................................................ 4-13
5 Setting the Properties of Container Objects
Setting the Properties of Container Objects............................................................................. 5-1
Modules..................................................................................................................................... 5-1
8/6/2019 Oracle 12I Developers Guide
4/654
iv
Windows....................................................................................................................................5-2
Canvases ................................................................................................................................... 5-5
Blocks.........................................................................................................................................5-6
Regions ................................................................................................................................... 5-13
6 Setting the Properties of Widget Objects
Setting the Properties of Widget Objects................................................................................. 6-1
Text Items.................................................................................................................................. 6-1
Date Fields........................................................................................................................... 6-2
Display Items ............................................................................................................................ 6-3
Poplists ......................................................................................................................................6-4
Option Groups ..........................................................................................................................6-5
Check Boxes .............................................................................................................................. 6-5
Buttons ...................................................................................................................................... 6-5
Lists of Values (LOVs) ............................................................................................................. 6-7LOV Behaviors..................................................................................................................... 6-8
LOVs in ENTER-QUERY Mode......................................................................................... 6-10
Alerts ....................................................................................................................................... 6-10
Editors ..................................................................................................................................... 6-11
Flexfields .................................................................................................................................6-11
Setting Item Properties............................................................................................................6-11
Using APP_ITEM_PROPERTY.SET_PROPERTY.............................................................. 6-11
Item Properties with Unique Oracle E-Business Suite Behavior........................................ 6-12
Impact of Item-level and Item-instance-level Settings ...................................................... 6-16
Setting Properties at Design Time......................................................................................6-16Setting Visual Attributes Programmatically...................................................................... 6-16
7 Controlling Window, Block, and Region Behavior
Controlling Window Behavior..................................................................................................7-1
Positioning Windows Upon Opening...................................................................................... 7-1
Closing Windows...................................................................................................................... 7-2
Setting Window Titles Dynamically........................................................................................ 7-4
Controlling Block Behavior...................................................................................................... 7-4
Coding Master-Detail Relations............................................................................................... 7-4
Coordination Between Windows.............................................................................................. 7-5
Implementing a Combination Block........................................................................................ 7-6
Coding Tabbed Regions............................................................................................................7-9
Definitions........................................................................................................................... 7-9
Tabbed Region Behavior......................................................................................................7-9
Three Degrees of Coding Difficulty................................................................................... 7-10
8/6/2019 Oracle 12I Developers Guide
5/654
v
Implementing Tabbed Regions.............................................................................................. 7-11
Creating the Layout in Forms Developer................................................................................7-12
Coding Your Tab Handler....................................................................................................... 7-13
Tab Handler Logic................................................................................................................... 7-14
WHEN-TAB-PAGE-CHANGED Logic................................................................................... 7-14
WHEN-NEW-ITEM-INSTANCE Logic.................................................................................. 7-18
Handling Dynamic Tabs......................................................................................................... 7-19
Other Code You May Need..................................................................................................... 7-20
Coding Alternative Region Behavior......................................................................................7-21
Alternative Regions........................................................................................................... 7-21
Example: Coding an Alternative Region............................................................................7-22
Controlling Records in a Window.......................................................................................... 7-25
Duplicating Records.......................................................................................................... 7-25
Renumbering All Records in a Window............................................................................ 7-26
Passing Instructions to a Form................................................................................................ 7-27
8 Enabling Query Behavior
Overview of Query Find........................................................................................................... 8-1
Raising Query Find on Form Startup .................................................................................. 8-1
Implementing Row-LOV.......................................................................................................... 8-1
Implementing Find Windows.............................................................................................. 8-3
9 Coding Item Behavior
Item Relations............................................................................................................................9-1
Dependent Items.................................................................................................................. 9-2
Conditionally Dependent Item............................................................................................ 9-4
Multiple Dependent Items................................................................................................... 9-5
Two Master Items and One Dependent Item.......................................................................9-6
Cascading Dependence........................................................................................................ 9-7
Mutually Exclusive Items.....................................................................................................9-9
Mutually Inclusive Items................................................................................................... 9-10
Mutually Inclusive Items with Dependent Items...............................................................9-11
Conditionally Mandatory Items.........................................................................................9-12
Defaults................................................................................................................................... 9-14
Integrity Checking...................................................................................................................9-14
Uniqueness Check..............................................................................................................9-14
Referential Integrity Check................................................................................................ 9-15
The Calendar .......................................................................................................................... 9-18
Advanced Calendar Options............................................................................................. 9-19
Calendar Examples............................................................................................................ 9-20
8/6/2019 Oracle 12I Developers Guide
6/654
vi
CALENDAR: Calendar Package............................................................................................. 9-21
10 Controlling the Toolbar and the Default Menu
Pulldown Menus and the Toolbar.......................................................................................... 10-1
Menu and Toolbar Entries................................................................................................. 10-1
Save and Proceed............................................................................................................... 10-6
Synchronizing.................................................................................................................... 10-7
Application-Specific Entries: Special Menus......................................................................10-7
Customizing Right-Mouse Menus (Popup Menus)........................................................... 10-8
APP_POPUP: Right-Mouse Menu Control...........................................................................10-10
APP_POPUP.INSTANTIATE.......................................................................................... 10-10
APP_SPECIAL: Menu and Toolbar Control......................................................................... 10-11
APP_SPECIAL.INSTANTIATE........................................................................................10-11
APP_SPECIAL.ENABLE..................................................................................................10-13
APP_SPECIAL.GET_CHECKBOX................................................................................... 10-14APP_SPECIAL.SET_CHECKBOX.................................................................................... 10-15
11 Menus and Function Security
Overview of Menus and Function Security............................................................................11-1
Terms ................................................................................................................................ 11-2
Forms and Subfunctions ................................................................................................... 11-3
How Function Security Works ..........................................................................................11-4
Using Form Functions........................................................................................................11-5
Function Security Standards................................................................................................... 11-7
General Function and Menu Standards............................................................................. 11-7
Form Function Standards...................................................................................................11-8
Subfunction Standards....................................................................................................... 11-9
Function Security Reports.....................................................................................................11-10
Function Security APIs for PL/SQL Procedures................................................................... 11-11
FND_FUNCTION.TEST...................................................................................................11-11
FND_FUNCTION.QUERY.............................................................................................. 11-12
FND_FUNCTION.EXECUTE...........................................................................................11-13
FND_FUNCTION.USER_FUNCTION_NAME............................................................... 11-15
FND_FUNCTION.CURRENT_FORM_FUNCTION........................................................11-16
Forms Window ..................................................................................................................... 11-16
Forms Block..................................................................................................................... 11-16
12 Message Dictionary
Overview of Message Dictionary............................................................................................12-1
Major Features .................................................................................................................. 12-1
8/6/2019 Oracle 12I Developers Guide
7/654
vii
Definitions .........................................................................................................................12-2
Implementing Message Dictionary........................................................................................ 12-3
Create Your Message Directories....................................................................................... 12-3
Define Your Messages .......................................................................................................12-3
Create Your Message Files................................................................................................. 12-4
Code Logic to Set Up Messages......................................................................................... 12-5
Code Logic to Display Messages........................................................................................12-6
Message Dictionary APIs for PL/SQL Procedures..................................................................12-8
FND_MESSAGE.CLEAR................................................................................................... 12-8
FND_MESSAGE.DEBUG...................................................................................................12-8
FND_MESSAGE.ERASE.................................................................................................... 12-9
FND_MESSAGE.ERROR................................................................................................... 12-9
FND_MESSAGE.GET...................................................................................................... 12-10
FND_MESSAGE.HINT.................................................................................................... 12-11
FND_MESSAGE.QUESTION...........................................................................................12-11
FND_MESSAGE.RETRIEVE............................................................................................ 12-13
FND_MESSAGE.SET_NAME.......................................................................................... 12-13
FND_MESSAGE.SET_STRING........................................................................................ 12-14
FND_MESSAGE.SET_TOKEN.........................................................................................12-15
FND_MESSAGE.SHOW.................................................................................................. 12-16
FND_MESSAGE.WARN..................................................................................................12-17
Application Message Standards ...........................................................................................12-18
Definitions .......................................................................................................................12-18
Message Naming Standards............................................................................................ 12-19
Message Numbering Standards....................................................................................... 12-20
Message Type Standards................................................................................................. 12-22
Message Description Standards....................................................................................... 12-24
Message Content Standards..................................................................................................12-25
Message Token Standards................................................................................................12-25
A Few General Guidelines for Writing Good Messages.................................................. 12-28
When the User Needs to Get Help................................................................................... 12-29
Complex Messages...........................................................................................................12-31
Specific Types of Message Content.................................................................................. 12-31
Message Writing Style..................................................................................................... 12-33
Special Purpose Messages................................................................................................12-42Messages Window................................................................................................................. 12-44
13 User Profiles
Overview of User Profiles ...................................................................................................... 13-1
Definitions .........................................................................................................................13-1
8/6/2019 Oracle 12I Developers Guide
8/654
viii
Defining New User Profile Options .................................................................................. 13-2
Setting User Profile Option Values ................................................................................... 13-2
Setting Your Personal User Profile .................................................................................... 13-3
Implementing User Profiles ................................................................................................... 13-3
Predefined User Profile Options ....................................................................................... 13-4
FND_PROFILE: User Profile APIs ......................................................................................... 13-5
FND_PROFILE.PUT.......................................................................................................... 13-6
FND_PROFILE.GET...........................................................................................................13-6
FND_PROFILE.VALUE..................................................................................................... 13-7
User Profile C Functions ........................................................................................................ 13-7
afpoget............................................................................................................................... 13-7
afpoput...............................................................................................................................13-8
Profiles Window......................................................................................................................13-8
14 Flexfields
Overview of Flexfields ........................................................................................................... 14-1
Definitions .........................................................................................................................14-3
Building a Flexfield into Your Application ....................................................................... 14-6
Flexfields and Application Upgrades ................................................................................14-7
Implementing Key Flexfields .................................................................................................14-8
Defining Key Flexfield Database Columns ....................................................................... 14-9
Registering Your Key Flexfield Table.............................................................................. 14-12
Registering Your Key Flexfield ....................................................................................... 14-12
Add Your Flexfield to Your Forms.................................................................................. 14-13
Implementing Descriptive Flexfields .................................................................................. 14-13Planning for Reference Fields.......................................................................................... 14-13
Defining Descriptive Flexfield Database Columns ......................................................... 14-14
Adding a Descriptive Flexfield to a Table with Existing Data ........................................ 14-15
Protected Descriptive Flexfields.......................................................................................14-15
Registering Your Descriptive Flexfield Table ..................................................................14-16
Registering Your Descriptive Flexfield ........................................................................... 14-16
Add Your Flexfield to Your Forms.................................................................................. 14-16
Adding Flexfields to Your Forms..........................................................................................14-16
Create Your Hidden Fields.............................................................................................. 14-17
Create Your Displayed Fields.......................................................................................... 14-18Create Your Flexfield Definition...................................................................................... 14-19
Invoke Your Flexfield Definition from Several Event Triggers........................................14-19
Flexfield Definition Procedures............................................................................................14-20
Key Flexfield Definition Syntax....................................................................................... 14-21
Range (Type) Flexfield Definition Syntax........................................................................ 14-23
8/6/2019 Oracle 12I Developers Guide
9/654
ix
Descriptive Flexfield Definition Syntax........................................................................... 14-24
Flexfield Definition Arguments....................................................................................... 14-25
Flexfield Definition Examples..........................................................................................14-42
Updating Flexfield Definitions.........................................................................................14-44
Update Key Flexfield Definition Syntax...........................................................................14-45
Update Range (Type) Flexfield Definition Syntax........................................................... 14-47
Update Descriptive Flexfield Definition Syntax...............................................................14-48
Updating Flexfield Definition Example........................................................................... 14-49
Using Key Flexfields in Find Windows............................................................................14-49
Using Range Flexfields in Query Find Windows.............................................................14-51
Troubleshooting Flexfields................................................................................................... 14-52
Register Key Flexfields .........................................................................................................14-54
Register Key Flexfields Block...........................................................................................14-55
Qualifiers Window...........................................................................................................14-56
Columns Window ........................................................................................................... 14-58
Register Descriptive Flexfields ............................................................................................ 14-59
Register Descriptive Flexfields Block............................................................................... 14-59
Reference Fields Window................................................................................................ 14-62
Columns Window ........................................................................................................... 14-64
15 Overview of Concurrent Processing
Overview of Concurrent Processing ...................................................................................... 15-1
Basic Application Development Needs .............................................................................15-1
Major Features .................................................................................................................. 15-2
Definitions .........................................................................................................................15-3Overview of Designing Concurrent Programs ...................................................................... 15-6
Submitting Concurrent Programs on the Client.............................................................. 15-11
Using Concurrent Processing ..........................................................................................15-12
Automated Recovery for Concurrent Processing ............................................................15-13
Overview of Implementing Concurrent Processing ............................................................15-15
Choosing Your Implementation ......................................................................................15-15
16 Defining Concurrent Programs
Defining Concurrent Programs...............................................................................................16-1
Concurrent Program Libraries Window ................................................................................ 16-4
17 Coding Oracle Tools Concurrent Programs
Oracle Tool Concurrent Programs.......................................................................................... 17-1
SQL*PLUS Programs......................................................................................................... 17-1
PL/SQL Stored Procedures.................................................................................................17-2
8/6/2019 Oracle 12I Developers Guide
10/654
x
SQL*Loader........................................................................................................................17-3
Accepting Input Parameters For Oracle Tool Programs ................................................... 17-3
Naming Your Oracle Tool Concurrent Program ............................................................... 17-4
18 Coding Oracle Reports Concurrent Programs
Oracle Reports ........................................................................................................................ 18-1
Concurrent Processing with Oracle Reports...................................................................... 18-1
Oracle Reports Parameters.................................................................................................18-3
Accessing User Exits and Profile Options.......................................................................... 18-4
User Exits Used in Oracle Reports.......................................................................................... 18-5
FND SRWINIT / FND SRWEXIT....................................................................................... 18-5
FND FLEXIDVAL / FND FLEXSQL...................................................................................18-5
Using Dynamic Currency in Oracle Reports.......................................................................... 18-5
FND FORMAT_CURRENCY User Exit............................................................................. 18-6
Example Report Using FND FORMAT_CURRENCY.......................................................... 18-10Sample Report Output..................................................................................................... 18-10
Procedure for Sample Report...........................................................................................18-11
Oracle Reports Troubleshooting...........................................................................................18-14
Frequently Asked Questions............................................................................................18-15
19 Coding C and Pro*C Concurrent Programs
Coding C and Pro*C Concurrent Programs............................................................................ 19-1
Pro*C Concurrent Programs ............................................................................................. 19-1
Header Files Used With Concurrent Programs..................................................................19-7
Concurrent Processing Pro*C Utility Routines ......................................................................19-7
20 PL/SQL APIs for Concurrent Processing
Overview................................................................................................................................. 20-1
FND_CONC_GLOBAL Package............................................................................................. 20-1
FND_CONC_GLOBAL.REQUEST_DATA........................................................................ 20-1
FND_CONC_GLOBAL.SET_REQ_GLOBALS...................................................................20-2
Example............................................................................................................................. 20-3
FND_CONCURRENT Package............................................................................................... 20-4
FND_CONCURRENT.AF_COMMIT.................................................................................20-4
FND_CONCURRENT.AF_ROLLBACK............................................................................ 20-4
FND_CONCURRENT.GET_REQUEST_STATUS (Client or Server)................................. 20-5
FND_CONCURRENT.WAIT_FOR_REQUEST (Client or Server)..................................... 20-8
FND_CONCURRENT.SET_COMPLETION_STATUS (Server).........................................20-8
FND_FILE: PL/SQL File I/O.................................................................................................... 20-9
FND_FILE.PUT.................................................................................................................. 20-9
8/6/2019 Oracle 12I Developers Guide
11/654
xi
FND_FILE.PUT_LINE..................................................................................................... 20-10
FND_FILE.NEW_LINE....................................................................................................20-10
FND_FILE.PUT_NAMES.................................................................................................20-11
FND_FILE.CLOSE........................................................................................................... 20-11
Error Handling.................................................................................................................20-12
FND_PROGRAM: Concurrent Program Loaders................................................................. 20-12
FND_PROGRAM.MESSAGE...........................................................................................20-13
FND_PROGRAM.EXECUTABLE.................................................................................... 20-13
FND_PROGRAM.DELETE_EXECUTABLE.....................................................................20-14
FND_PROGRAM.REGISTER...........................................................................................20-15
FND_PROGRAM.DELETE_PROGRAM..........................................................................20-17
FND_PROGRAM.PARAMETER..................................................................................... 20-17
FND_PROGRAM.DELETE_PARAMETER......................................................................20-19
FND_PROGRAM.INCOMPATIBILITY........................................................................... 20-19
FND_PROGRAM.DELETE_INCOMPATIBILITY............................................................20-20
FND_PROGRAM.REQUEST_GROUP.............................................................................20-20
FND_PROGRAM.DELETE_GROUP............................................................................... 20-21
FND_PROGRAM.ADD_TO_GROUP.............................................................................. 20-21
FND_PROGRAM.REMOVE_FROM_GROUP................................................................. 20-21
FND_PROGRAM.PROGRAM_EXISTS............................................................................20-22
FND_PROGRAM.PARAMETER_EXISTS........................................................................20-22
FND_PROGRAM.INCOMPATIBILITY_EXISTS..............................................................20-23
FND_PROGRAM.EXECUTABLE_EXISTS.......................................................................20-23
FND_PROGRAM.REQUEST_GROUP_EXISTS............................................................... 20-23
FND_PROGRAM.PROGRAM_IN_GROUP.................................................................... 20-24
FND_PROGRAM.ENABLE_PROGRAM.........................................................................20-24
FND_REQUEST Package...................................................................................................... 20-25
FND_REQUEST.SET_OPTIONS (Client or Server)..........................................................20-25
FND_REQUEST.SET_REPEAT_OPTIONS (Client or Server)..........................................20-26
FND_REQUEST.SET_PRINT_OPTIONS (Client or Server).............................................20-27
FND_REQUEST.SUBMIT_REQUEST (Client or Server)..................................................20-28
FND_REQUEST.SET_MODE (Server)............................................................................. 20-29
Example Request Submissions.........................................................................................20-30
FND_REQUEST_INFO and Multiple Language Support (MLS)........................................ 20-32
FND_REQUEST_INFO.GET_PARAM_NUMBER...........................................................20-33FND_REQUEST_INFO.GET_PARAM_INFO.................................................................. 20-33
FND_REQUEST_INFO.GET_PROGRAM........................................................................20-33
FND_REQUEST_INFO.GET_PARAMETER....................................................................20-34
Example MLS Function....................................................................................................20-34
FND_SET: Request Set Loaders............................................................................................20-35
FND_SET.MESSAGE....................................................................................................... 20-36
8/6/2019 Oracle 12I Developers Guide
12/654
xii
FND_SET.CREATE_SET.................................................................................................. 20-36
FND_SET.DELETE_SET...................................................................................................20-37
FND_SET.ADD_PROGRAM........................................................................................... 20-37
FND_SET.REMOVE_PROGRAM.................................................................................... 20-38
FND_SET.PROGRAM_PARAMETER............................................................................. 20-39
FND_SET.DELETE_PROGRAM_PARAMETER..............................................................20-40
FND_SET.ADD_STAGE.................................................................................................. 20-41
FND_SET.REMOVE_STAGE........................................................................................... 20-42
FND_SET.LINK_STAGES................................................................................................ 20-42
FND_SET.INCOMPATIBILITY........................................................................................20-43
FND_SET.DELETE_INCOMPATIBILITY........................................................................20-44
FND_SET.ADD_SET_TO_GROUP.................................................................................. 20-45
FND_SET.REMOVE_SET_FROM_GROUP..................................................................... 20-45
FND_SUBMIT: Request Set Submission............................................................................. 20-45
FND_SUBMIT.SET_MODE..............................................................................................20-46
FND_SUBMIT.SET_REL_CLASS_OPTIONS................................................................... 20-46
FND_SUBMIT.SET_REPEAT_OPTIONS......................................................................... 20-47
FND_SUBMIT_SET.REQUEST_SET................................................................................ 20-47
FND_SUBMIT.SET_PRINT_OPTIONS............................................................................ 20-48
FND_SUBMIT.ADD_PRINTER....................................................................................... 20-48
FND_SUBMIT.ADD_NOTIFICATION............................................................................20-49
FND_SUBMIT.SET_NLS_OPTIONS................................................................................20-49
FND_SUBMIT.SUBMIT_PROGRAM...............................................................................20-49
FND_SUBMIT.SUBMIT_SET........................................................................................... 20-50
Examples of Request Set Submission...............................................................................20-51
21 Standard Request Submission
Overview of Standard Request Submission ..........................................................................21-1
Basic Application Development Needs .............................................................................21-1
Major Features .................................................................................................................. 21-2
Definitions .........................................................................................................................21-4
Controlling Access to Your Reports and Programs ...........................................................21-5
Implementing Standard Request Submission ...................................................................... 21-5
Developing Reports for Standard Request Submission .................................................... 21-5
Defining Parameter Validation ......................................................................................... 21-6Defining Your Report or Other Program .......................................................................... 21-7
Cross-application Reporting ............................................................................................. 21-8
22 Request Sets
Overview of Request Sets....................................................................................................... 22-1
8/6/2019 Oracle 12I Developers Guide
13/654
xiii
Stage Functions.................................................................................................................. 22-1
23 Logging Framework Overview
Overview................................................................................................................................. 23-1
Target Audience...................................................................................................................... 23-1
Key Features............................................................................................................................ 23-1
Terminology............................................................................................................................ 23-2
Logging Configuration Parameters.........................................................................................23-4
Overview........................................................................................................................... 23-4
AFLOG_ENABLED........................................................................................................... 23-5
AFLOG_LEVEL................................................................................................................. 23-6
AFLOG_MODULE.............................................................................................................23-8
AFLOG_FILENAME..........................................................................................................23-9
AFLOG_ECHO.................................................................................................................. 23-9
24 Logging Guidelines for Developers
Overview................................................................................................................................. 24-1
APIs..........................................................................................................................................24-1
Handling Errors....................................................................................................................... 24-2
Performance Standards........................................................................................................... 24-2
Module Source.........................................................................................................................24-3
Module Name Standards................................................................................................... 24-6
Module Name Examples....................................................................................................24-7
Severities................................................................................................................................. 24-7
Large Text and Binary Message Attachments.........................................................................24-9
Automatic Logging and Alerting for Seeded Message Dictionary Messages..................... 24-11
General Logging Tips............................................................................................................24-11
How to Log from Java............................................................................................................24-11
How to Log from PL/SQL...................................................................................................... 24-17
How to Log from C................................................................................................................ 24-18
How to Log in Concurrent Programs.................................................................................... 24-19
How to Raise System Alerts.................................................................................................. 24-20
25 The Template Form
Overview of the TEMPLATE Form.........................................................................................25-1
Libraries in the TEMPLATE Form.......................................................................................... 25-2
Special Triggers in the TEMPLATE form...............................................................................25-4
Triggers That Often Require Some Modification............................................................... 25-6
Triggers That Cannot Be Modified.....................................................................................25-9
8/6/2019 Oracle 12I Developers Guide
14/654
xiv
26 Attachments
Overview of Attachments....................................................................................................... 26-1
Definitions......................................................................................................................... 26-1
How Attachments Work.................................................................................................... 26-3
Attachments for Forms or Form Functions........................................................................26-5
Attachments and Reports...................................................................................................26-6
Planning and Defining the Attachments Feature...................................................................26-6
Planning to Add the Attachments Feature to Your Application........................................26-6
Setting Up the Attachments Feature for Your Form.......................................................... 26-7
Document Entities Window ................................................................................................... 26-8
Document Entities Block....................................................................................................26-9
Document Categories Window ............................................................................................ 26-10
Document Categories Block............................................................................................. 26-10
Category Assignments Window...................................................................................... 26-11Attachment Functions Window ........................................................................................... 26-12
Attachment Functions Block............................................................................................ 26-13
Categories Window......................................................................................................... 26-14
Block Declaration Window ............................................................................................. 26-15
Entity Declaration Window............................................................................................. 26-17
27 Handling Dates
Overview................................................................................................................................. 27-1
Year 2000 Compliance in Oracle E-Business Suite ................................................................ 27-1
Dates in Oracle E-Business Suite............................................................................................27-2
Date Coding Standards........................................................................................................... 27-5
Using Dates While Developing Application Forms........................................................... 27-6
Troubleshooting...................................................................................................................... 27-8
Use the DATECHECK Script to Identify Issues................................................................. 27-8
Problems Observed During Testing...................................................................................27-9
Date Checklist.................................................................................................................... 27-9
28 Customization Standards
Overview of Customizing Oracle E-Business Suite............................................................... 28-1
Basic Business Needs ........................................................................................................ 28-2
Definitions .........................................................................................................................28-2
Determining Your Needs .................................................................................................. 28-4
Customization By Extension .................................................................................................. 28-5
Defining Your Custom Application .................................................................................. 28-6
Adding a Form .................................................................................................................. 28-7
8/6/2019 Oracle 12I Developers Guide
15/654
xv
Adding a Report or Concurrent Program ......................................................................... 28-7
Adding a New Report Submission Form .......................................................................... 28-8
Adding Online Help.......................................................................................................... 28-8
Adding Menus .................................................................................................................. 28-8
Adding Responsibilities .................................................................................................... 28-8
Adding Message Dictionary Messages ............................................................................. 28-9
Customization By Modification ............................................................................................. 28-9
Modifying an Existing Form ........................................................................................... 28-11
Modifying an Existing Report .........................................................................................28-13
Modifying an Existing C Program .................................................................................. 28-15
Modifying an Existing PL/SQL Stored Procedure ...........................................................28-15
Modifying Existing Online Help......................................................................................28-15
Modifying Existing Message Dictionary Messages .........................................................28-15
Modifying Existing Menus and Responsibilities .............................................................28-15
Oracle E-Business Suite Database Customization .............................................................. 28-16
Oracle E-Business Suite Upgrades and Patches................................................................... 28-18
Building Online Help for Custom Applications ................................................................. 28-20
How the Help System Works ..........................................................................................28-20
Prepare Your Forms......................................................................................................... 28-20
Create HTML Help Files.................................................................................................. 28-21
Create a Help Navigation Tree........................................................................................ 28-21
Upgrades and Patches......................................................................................................28-22
Integrating Custom Objects and Schemas............................................................................28-22
Upgrading Custom Forms..................................................................................................... 28-24
29 Using the Custom Library
Customizing Oracle E-Business Suite with the CUSTOM Library....................................... 29-1
Writing Code for the CUSTOM Library.............................................................................29-1
Events Passed to the CUSTOM Library............................................................................. 29-4
When to Use the CUSTOM Library................................................................................... 29-5
Coding Zoom..................................................................................................................... 29-5
Coding Generic Form Events............................................................................................. 29-8
Coding Product-Specific Events.......................................................................................29-10
Support and Upgrading...................................................................................................29-10
Product-Specific Events in Oracle Application Object Library........................................... 29-11WHEN-LOGON-CHANGED Event................................................................................ 29-11
WHEN-RESPONSIBILITY-CHANGED Event.................................................................29-11
CUSTOM Package................................................................................................................. 29-12
CUSTOM.ZOOM_AVAILABLE...................................................................................... 29-12
CUSTOM.STYLE..............................................................................................................29-13
8/6/2019 Oracle 12I Developers Guide
16/654
xvi
CUSTOM.EVENT............................................................................................................ 29-14
Example of Implementing Zoom Using the CUSTOM Library...........................................29-15
Modify the Form.............................................................................................................. 29-16
Modify the CUSTOM Library.......................................................................................... 29-16
30 APPCORE Routine APIs
Introduction to APPCORE Routine APIs............................................................................... 30-1
APP_COMBO: Combination Block API.................................................................................30-2
APP_COMBO.KEY_PREV_ITEM...................................................................................... 30-2
APP_DATE and FND_DATE: Date Conversion APIs ...........................................................30-2
List of Date Terms..............................................................................................................30-2
APP_DATE.CANONICAL_TO_DATE and FND_DATE.CANONICAL_TO_DATE........30-3
APP_DATE.DISPLAYDATE_TO_DATE and FND_DATE.DISPLAYDATE_TO_DATE........................................................................................................................................... 30-4
APP_DATE.DISPLAYDT_TO_DATE and FND_DATE.DISPLAYDT_TO_DATE.............30-4
APP_DATE.DATE_TO_CANONICAL and FND_DATE.DATE_TO_CANONICAL........30-5
APP_DATE.DATE_TO_DISPLAYDATE and FND_DATE.DATE_TO_DISPLAYDATE........................................................................................................................................... 30-5
APP_DATE.DATE_TO_DISPLAYDT and FND_DATE.DATE_TO_DISPLAYDT.............30-6
APP_DATE.DATE_TO_FIELD.......................................................................................... 30-6
APP_DATE.FIELD_TO_DATE.......................................................................................... 30-8
APP_DATE.VALIDATE_CHARDATE.............................................................................. 30-9
APP_DATE.VALIDATE_CHARDT................................................................................... 30-9
FND_DATE.STRING_TO_DATE.......................................................................................30-9
FND_DATE.STRING_TO_CANONICAL........................................................................30-10
APP_EXCEPTION: Exception Processing APIs....................................................................30-11
APP_EXCEPTION.RAISE_EXCEPTION......................................................................... 30-11
APP_EXCEPTION.RETRIEVE......................................................................................... 30-11
APP_EXCEPTION.GET_TYPE.........................................................................................30-11
APP_EXCEPTION.GET_CODE....................................................................................... 30-12
APP_EXCEPTION.GET_TEXT.........................................................................................30-12
APP_EXCEPTION.RECORD_LOCK_EXCEPTION.........................................................30-12
APP_EXCEPTION.RECORD_LOCK_ERROR................................................................. 30-12
APP_EXCEPTION.DISABLED........................................................................................ 30-13
APP_FIELD: Item Relationship Utilities ............................................................................. 30-13
APP_FIELD.CLEAR_FIELDS...........................................................................................30-13
APP_FIELD.CLEAR_DEPENDENT_FIELDS.................................................................. 30-13
APP_FIELD.SET_DEPENDENT_FIELD.......................................................................... 30-14
APP_FIELD.SET_EXCLUSIVE_FIELD.............................................................................30-15
APP_FIELD.SET_INCLUSIVE_FIELD............................................................................. 30-16
APP_FIELD.SET_REQUIRED_FIELD..............................................................................30-16
8/6/2019 Oracle 12I Developers Guide
17/654
xvii
APP_FIND: Query-Find Utilities..........................................................................................30-17
APP_FIND.NEW..............................................................................................................30-17
APP_FIND.CLEAR.......................................................................................................... 30-18
APP_FIND.CLEAR_DETAIL...........................................................................................30-18
APP_FIND.FIND............................................................................................................. 30-18
APP_FIND.QUERY_RANGE...........................................................................................30-18
APP_FIND.QUERY_FIND............................................................................................... 30-19
APP_ITEM: Individual Item Utilities................................................................................... 30-19
APP_ITEM.COPY_DATE.................................................................................................30-19
APP_ITEM.IS_VALID......................................................................................................30-20
APP_ITEM.SIZE_WIDGET.............................................................................................. 30-20
APP_ITEM_PROPERTY: Property Utilities......................................................................... 30-20
APP_ITEM_PROPERTY.GET_PROPERTY......................................................................30-21
APP_ITEM_PROPERTY.SET_PROPERTY....................................................................... 30-21
APP_ITEM_PROPERTY.SET_VISUAL_ATTRIBUTE ..................................................... 30-22
APP_NAVIGATE: Open a Form Function............................................................................30-22
APP_NAVIGATE.EXECUTE........................................................................................... 30-22
APP_RECORD: Record Utilities........................................................................................... 30-25
APP_RECORD.TOUCH_RECORD.................................................................................. 30-25
APP_RECORD.HIGHLIGHT...........................................................................................30-25
APP_RECORD.FOR_ALL_RECORDS............................................................................. 30-26
APP_RECORD.DELETE_ROW........................................................................................30-26
APP_RECORD.VALIDATE_RANGE.............................................................................. 30-27
APP_REGION: Region Utilities............................................................................................30-28
APP_REGION.ALT_REGION..........................................................................................30-28
APP_STANDARD Package...................................................................................................30-29
APP_STANDARD.APP_VALIDATE...............................................................................30-29
APP_STANDARD.EVENT.............................................................................................. 30-29
APP_STANDARD.SYNCHRONIZE................................................................................30-29
APP_STANDARD.PLATFORM.......................................................................................30-30
APP_WINDOW: Window Utilities ...................................................................................... 30-30
APP_WINDOW.CLOSE_FIRST_WINDOW.................................................................... 30-30
APP_WINDOW.PROGRESS............................................................................................ 30-30
APP_WINDOW.SET_COORDINATION.........................................................................30-31
APP_WINDOW.SET_WINDOW_POSITION.................................................................. 30-31APP_WINDOW.SET_TITLE............................................................................................ 30-32
31 FNDSQF Routine APIs
Introduction to FNDSQF Routine APIs..................................................................................31-1
FND_CURRENCY: Dynamic Currency APIs......................................................................... 31-1
8/6/2019 Oracle 12I Developers Guide
18/654
xviii
FND_CURRENCY.GET_FORMAT_MASK (Client or Server)........................................... 31-1
Currency Examples............................................................................................................31-2
FND_DATE: Date Conversion APIs....................................................................................... 31-3
FND_GLOBAL: WHO Column Maintenance and Database Initialization...........................31-3
FND_GLOBAL.USER_ID (Server)..................................................................................... 31-3
FND_GLOBAL.APPS_INITIALIZE (Server)......................................................................31-3
FND_GLOBAL.LOGIN_ID (Server).................................................................................. 31-4
FND_GLOBAL.CONC_LOGIN_ID (Server)......................................................................31-4
FND_GLOBAL.PROG_APPL_ID (Server)......................................................................... 31-4
FND_GLOBAL.CONC_PROGRAM_ID (Server)............................................................... 31-5
FND_GLOBAL.CONC_REQUEST_ID (Server)................................................................. 31-5
FND_ORG: Organization APIs .............................................................................................. 31-5
FND_ORG.CHANGE_LOCAL_ORG................................................................................ 31-5
FND_ORG.CHANGE_GLOBAL_ORG..............................................................................31-5
FND_ORG.CHOOSE_ORG................................................................................................31-5
FND_STANDARD: Standard APIs ........................................................................................31-6
FND_STANDARD.FORM_INFO.......................................................................................31-6
FND_STANDARD.SET_WHO...........................................................................................31-6
FND_STANDARD.SYSTEM_DATE.................................................................................. 31-6
FND_STANDARD.USER...................................................................................................31-7
FND_UTILITIES: Utility Routines ........................................................................................ 31-7
FND_UTILITIES.OPEN_URL............................................................................................ 31-7
FND_UTILITIES.PARAM_EXISTS.................................................................................... 31-7
32 Naming Standards
Overview of Naming Standards ............................................................................................ 32-1
Naming Standards and Definitions........................................................................................32-1
Database Objects................................................................................................................ 32-1
Form Objects...................................................................................................................... 32-5
File Standards.................................................................................................................... 32-8
PL/SQL Packages, Procedures and Source Files.................................................................32-9
Reserved Words...............................................................................................................32-10
A Additional Features
Application Utilities Lookups and Oracle Application Object Library Lookups...................A-1
Tables........................................................................................................................................ A-4
Sequences.................................................................................................................................. A-9
Views....................................................................................................................................... A-10
Flexfields Test Form................................................................................................................A-11
8/6/2019 Oracle 12I Developers Guide
19/654
xix
B SQL Trace Options
SQL Trace Options....................................................................................................................B-1
Index
8/6/2019 Oracle 12I Developers Guide
20/654
8/6/2019 Oracle 12I Developers Guide
21/654
xxi
Send Us Your Comments
Oracle E-Business Suite Developer's Guide, Release 12.1
Part No. E12897-04
Oracle welcomes customers' comments and suggestions on the quality and usefulness of this document.Your feedback is important, and helps us to best meet your needs as a user of our products. For example:
Are the implementation steps correct and complete?
Did you understand the context of the procedures?
Did you find any errors in the information?
Does the structure of the information help you with your tasks?
Do you need different information or graphics? If so, where, and in what format?
Are the examples correct? Do you need more examples?
If you find any errors or have any other suggestions for improvement, then please tell us your name, the
name of the company who has licensed our products, the title and part number of the documentation andthe chapter, section, and page number (if available).
Note: Before sending us your comments, you might like to check that you have the latest version of the
document and if any concerns are already addressed. To do this, access the new Oracle E-Business Suite
Release Online Documentation CD available on My Oracle Support and www.oracle.com. It contains the
most current Documentation Library plus all documents revised or released recently.
Send your comments to us using the electronic mail address: [email protected]
Please give your name, address, electronic mail address, and telephone number (optional).
If you need assistance with Oracle software, then please contact your support representative or Oracle
Support Services.
If you require training or instruction in using Oracle software, then please contact your Oracle local office
and inquire about our Oracle University offerings. A list of Oracle offices is available on our Web site at
www.oracle.com.
8/6/2019 Oracle 12I Developers Guide
22/654
8/6/2019 Oracle 12I Developers Guide
23/654
xxiii
Preface
Intended Audience
Welcome to Release 12.1 of the Oracle E-Business Suite Developer's Guide.
This guide is written for the application developer and assumes you have a working
knowledge of the following:
Oracle Forms Developer. If you have never used Oracle Forms Developer, we
suggest you attend one or more of the relevant training classes available through
Oracle University.
PL/SQL and the Oracle database. If you have never used Oracle10g or PL/SQL, we
suggest you attend one or more of the relevant training classes available through
Oracle University.
The Oracle E-Business Suite graphical user interface for Oracle Forms-based
products. To learn more about the Oracle E-Business Suite graphical user interface,
read the Oracle E-Business Suite User's Guide.
Note: This book typically uses UNIX nomenclature in specifying files
and directories. Windows users should substitute the appropriate
Windows terms where applicable.
In addition, this guide assumes you have a working knowledge of the following:
The principles and customary practices of your business area.
Computer desktop application usage and terminology.
If you have never used Oracle E-Business Suite, we suggest you attend one or more of
the Oracle E-Business Suite training classes available through Oracle University.
See Related Information Sources on page xxv for more Oracle E-Business Suite product
8/6/2019 Oracle 12I Developers Guide
24/654
xxiv
information.
Deaf/Hard of Hearing Access to Oracle Support Services
To reach Oracle Support Services, use a telecommunications relay service (TRS) to call
Oracle Support at 1.800.223.1711. An Oracle Support Services engineer will handletechnical issues and provide customer support according to the Oracle service request
process. Information about TRS is available at
http://www.fcc.gov/cgb/consumerfacts/trs.html, and a list of phone numbers is
available at http://www.fcc.gov/cgb/dro/trsphonebk.html.
Documentation Accessibility
Our goal is to make Oracle products, services, and supporting documentation accessible
to all users, including users that are disabled. To that end, our documentation includes
features that make information available to users of assistive technology. This
documentation is available in HTML format, and contains markup to facilitate access by
the disabled community. Accessibility standards will continue to evolve over time, and
Oracle is actively engaged with other market-leading technology vendors to address
technical obstacles so that our documentation can be accessible to all of our customers.
For more information, visit the Oracle Accessibility Program Web site at
http://www.oracle.com/accessibility/.
Accessibility of Code Examples in Documentation
Screen readers may not always correctly read the code examples in this document. The
conventions for writing code require that closing braces should appear on an otherwise
empty line; however, some screen readers may not always read a line of text thatconsists solely of a bracket or brace.
Accessibility of Links to External Web Sites in Documentation
This documentation may contain links to Web sites of other companies or organizations
that Oracle does not own or control. Oracle neither evaluates nor makes any
representations regarding the accessibility of these Web sites.
Structure
1 Overview of Coding Standards2 Setting Up Your Application Framework
3 Building Database Objects
4 Using PL/SQL in Oracle E-Business Suite
5 Setting the Properties of Container Objects
6 Setting the Properties of Widget Objects
7 Controlling Window, Block, and Region Behavior
8 Enabling Query Behavior
8/6/2019 Oracle 12I Developers Guide
25/654
xxv
9 Coding Item Behavior
10 Controlling the Toolbar and the Default Menu
11 Menus and Function Security
12 Message Dictionary
13 User Profiles
14 Flexfields
15 Overview of Concurrent Processing16 Defining Concurrent Programs
17 Coding Oracle Tools Concurrent Programs
18 Coding Oracle Reports Concurrent Programs
19 Coding C and Pro*C Concurrent Programs
20 PL/SQL APIs for Concurrent Processing
21 Standard Request Submission
22 Request Sets
23 Logging Framework Overview
24 Logging Guidelines for Developers
25 The Template Form
26 Attachments
27 Handling Dates
28 Customization Standards
29 Using the Custom Library
30 APPCORE Routine APIs
31 FNDSQF Routine APIs
32 Naming Standards
A Additional Features
B SQL Trace Options
Related Information Sources
This book is included on the Oracle E-Business Suite Documentation Library, which is
supplied in the Release 12.1 Media Pack. You can download soft-copy documentationas PDF files from the Oracle Technology Network at
http://www.oracle.com/technology/documentation/. The Oracle E-Business Suite
Release 12.1 Documentation Library contains the latest information, including any
documents that have changed significantly between releases. If substantial changes to
this book are necessary, a revised version will be made available on the "virtual"
documentation library on My Oracle Support (formerly OracleMetaLink).
If this guide refers you to other Oracle E-Business Suite documentation, use only the
latest Release 12.1 versions of those guides.
Online Documentation
All Oracle E-Business Suite documentation is available online (HTML or PDF). Online Help - Online help patches (HTML) are available on My Oracle Support.
PDF Documentation - See the Oracle E-Business Suite Documentation Library for
current PDF documentation for your product with each release. The Oracle
E-Business Suite Documentation Library is also available on My Oracle Support and
8/6/2019 Oracle 12I Developers Guide
26/654
xxvi
is updated frequently.
Release Notes - For information about changes in this release, including new
features, known issues, and other details, see the release notes for the relevant
product, available on My Oracle Support.
Oracle Electronic Technical Reference Manual - The Oracle Electronic Technical
Reference Manual (eTRM) contains database diagrams and a detailed description of
database tables, forms, reports, and programs for each Oracle E-Business Suite
product. This information helps you convert data from your existing applications
and integrate Oracle E-Business Suite data with non-Oracle applications, and write
custom reports for Oracle E-Business Suite products. The Oracle eTRM is available
on My Oracle Support.
Related Guides
You should have the following related books on hand. Depending on the requirements
of your particular installation, you may also need additional manuals or guides.
Oracle Application Framework Developer's Guide
This guide contains the coding standards followed by the Oracle E-Business Suite
development staff to produce applications built with Oracle Application Framework.
This guide is available in PDF format on My Oracle Support and as online
documentation in JDeveloper 10g with Oracle Application Extension.
Oracle E-Business Suite Concepts
This book is intended for all those planning to deploy Oracle E-Business Suite Release
12, or contemplating significant changes to a configuration. After describing the Oracle
E-Business Suite architecture and technology stack, it focuses on strategic topics, giving
a broad outline of the actions needed to achieve a particular goal, plus the installationand configuration choices that may be available.
Oracle E-Business Suite Flexfields Guide
This guide provides flexfields planning, setup, and reference information for the Oracle
E-Business Suite implementation team, as well as for users responsible for the ongoing
maintenance of Oracle E-Business Suite product data. This guide also provides
information on creating custom reports on flexfields data.
Oracle E-Business Suite Installation Guide: Using Rapid Install
This book is intended for use by anyone who is responsible for installing or upgrading
Oracle E-Business Suite. It provides instructions for running Rapid Install either to carry
out a fresh installation of Oracle E-Business Suite Release 12, or as part of an upgrade
from Release 11i to Release 12. The book also describes the steps needed to install the
technology stack components only, for the special situations where this is applicable.
Oracle E-Business Suite System Administrator's Guide Documentation Set
This documentation set provides planning and reference information for the Oracle
E-Business Suite System Administrator. Oracle E-Business Suite System Administrator's
8/6/2019 Oracle 12I Developers Guide
27/654
xxvii
Guide - Configuration contains information on system configuration steps, including
defining concurrent programs and managers, enabling Oracle Applications Manager
features, and setting up printers and online help. Oracle E-Business Suite System
Administrator's Guide - Maintenance provides information for frequent tasks such as
monitoring your system with Oracle Applications Manager, administering Oracle
E-Business Suite Secure Enterprise Search, managing concurrent managers and reports,using diagnostic utilities including logging, managing profile options, and using alerts.
Oracle E-Business Suite System Administrator's Guide - Security describes User
Management, data security, function security, auditing, and security configurations.
Oracle E-Business Suite User's Guide