Home >Documents >Oracle Applications Developer's Guide

Oracle Applications Developer's Guide

Date post:12-Nov-2014
Category:
View:35 times
Download:6 times
Share this document with a friend
Description:
Oracle Applications Developer's Guide
Transcript:

R Oracle Applications Developers GuideRELEASE 11i VOLUME 1

April 2001

Oracle Applications Developers Guide, RELEASE 11i VOLUME 1

The part number for this volume is A8370503. To reorder this book, please use the set part number, A7554503. Copyright E 1995, 2001 Oracle Corporation. All rights reserved. Contributing Authors: Anne Carlson, Emily Nordhagen, Lisa Nordhagen, Dana Spradley, Martin Taylor, Peter Wallack, Millie Wang, Sara Woodhull Contributors: Ram Bhoopalam, Eric Bing, Steven Carter, Cliff Godwin, Mark Fisher, Michael Konopik, Michael Mast, Tom Morrow, Robert Nix, Gursat Olgun, Susan Stratton, Leslie Studdard, Venkata Vengala, Maxine ZasowskiThe 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 property law. Reverse engineering of the Programs is prohibited. No part of this document 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. 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 LEGEND 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.22719, 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 licensees responsibility to take all appropriate failsafe, back up, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and Oracle disclaims liability for any damages caused by such use of the Programs. Oracle is a registered trademark and Oracle7, Oracle8, Oracle Application Object Library, Oracle Applications, Oracle Alert, Oracle Financials, Oracle Workflow, SQL*Forms, SQL*Plus, SQL*Report, Oracle Data Browser, Oracle Forms, Oracle General Ledger, Oracle Human Resources, Oracle Manufacturing, Oracle Reports, PL/SQL, Pro*C and SmartClient are trademarks or registered trademarks of Oracle Corporation. All other company or product names are mentioned for identification purposes only, and may be trademarks of their respective owners.

Contents

Volume 1VOLUME 1 . . . . . . . . . . . . . . . . . . . . . . . . .Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Audience for This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Do Not Use Database Tools to Modify Oracle Applications Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Your Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

i

i ii ii vi vii ix ix

Chapter 1

Overview of Coding Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Coding Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . Importance of these Standards . . . . . . . . . . . . . . . . . . . . . . . . . Coding Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding With Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding for Web Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . The Standard Development Environment . . . . . . . . . . . . . . . . . . . Oracle Application Object Library for Release 11i . . . . . . . . . Setting Object Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . Shared Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Standard Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11 12 12 12 13 14 15 16 17 19 19 1 10 1 11

Contents

i

Property Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Visual Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Building an Application . . . . . . . . . . . . . . . . . . . . . . . Overall Design Issues to Consider . . . . . . . . . . . . . . . . . . . . . . Overview of Application Development Steps . . . . . . . . . . . . Overview of Form Development Steps . . . . . . . . . . . . . . . . . .

1 13 1 14 1 15 1 15 1 16 1 17

Chapter 2

Setting Up Your Application Framework . . . . . . . . . . . . . . . . . . . Overview of Setting Up Your Application Framework . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Set Up Your Application Directory Structures . . . . . . . . . . . . Register Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modify Your Environment Files . . . . . . . . . . . . . . . . . . . . . . . . Set Up and Register Your Oracle Schema . . . . . . . . . . . . . . . . Create Database Objects and Integrate with APPS Schema . Add Your Application to a Data Group . . . . . . . . . . . . . . . . . . Set Up Concurrent Managers . . . . . . . . . . . . . . . . . . . . . . . . . . Applications Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applications Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21 22 22 23 23 24 24 25 25 25 26 27 27

Chapter 3

Building Your Database Objects . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Building Your Database Objects . . . . . . . . . . . . . . . . Using CostBased Optimization . . . . . . . . . . . . . . . . . . . . . . . . Tracking Data Changes with Record History (WHO) . . . . . . Oracle8i Declarative Constraints . . . . . . . . . . . . . . . . . . . . . . . LONG, LONG RAW and RAW Datatypes . . . . . . . . . . . . . . . Columns Using a Reserved Word . . . . . . . . . . . . . . . . . . . . . . . Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Table Registration API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31 32 32 32 35 37 37 37 3 10 3 11

Chapter 4

Using PL/SQL in Oracle Applications . . . . . . . . . . . . . . . . . . . . . Overview of Using PL/SQL in Applications . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General PL/SQL Coding Standards . . . . . . . . . . . . . . . . . . . . . Database Server Side versus Client Side . . . . . . . . . . . . . . . . . Formatting PL/SQL Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41 42 43 43 46 47 49

ii Oracle Applications Developers Guide

SQL Coding Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Triggers in Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Replacements for Oracle Forms Builtins . . . . . . . . . . . . . . . . . . . . Coding Item, Event and Table Handlers . . . . . . . . . . . . . . . . . . . . . Coding Item Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding Event Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding Table Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example ClientSide Table Handler . . . . . . . . . . . . . . . . . . . . . Example ServerSide Table Handler . . . . . . . . . . . . . . . . . . . .

4 11 4 11 4 12 4 14 4 17 4 17 4 19 4 20 4 21 4 24

Chapter 5

Setting the Properties of Container Objects . . . . . . . . . . . . . . . . Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . NonModal Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modal Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Canvases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Content Canvases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stacked Canvases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Context Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dialog Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Blocks With No Base Table . . . . . . . . . . . . . . . . . . . . . . . SingleRecord Data Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . MultiRecord Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Combination Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MasterDetail Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dynamic WHERE Clauses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tabbed Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Alternative Regions (Obsolete for Release 11i) . . . . . . . . . . . . Overflow Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51 52 53 53 55 58 58 58 5 10 5 11 5 11 5 13 5 13 5 14 5 16 5 16 5 17 5 19 5 19 5 19 5 19

Chapter 6

Setting the Properties of Widget Objects . . . . . . . . . . . . . . . . . . . Text Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Date Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Display Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Poplists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Option Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61 62 63 64 66 68

Contents

iii

Check Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lists of Values (LOVs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LOV Behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LOVs in ENTERQUERY Mode . . . . . . . . . . . . . . . . . . . . . . . . Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Item Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using APP_ITEM_PROPERTY.SET_PROPERTY . . . . . . . . . . Item Properties with Unique Oracle Applications Behavior Impact of Itemlevel and Iteminstancelevel Settings . . . . . Setting Properties at Design Time . . . . . . . . . . . . . . . . . . . . . . . Setting Visual Attributes Programatically . . . . . . . . . . . . . . . .

69 6 10 6 12 6 14 6 15 6 17 6 18 6 19 6 20 6 20 6 21 6 25 6 26 6 26

Chapter 7

Controlling Window, Block and Region Behavior . . . . . . . . . . . Controlling Window Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Positioning Windows Upon Opening . . . . . . . . . . . . . . . . . . . Closing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Window Titles Dynamically . . . . . . . . . . . . . . . . . . . . . Controlling Block Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding MasterDetail Relations . . . . . . . . . . . . . . . . . . . . . . . . Implementing a Combination Block . . . . . . . . . . . . . . . . . . . . . Coding Tabbed Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tabbed Region Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Three Degrees of Coding Difficulty . . . . . . . . . . . . . . . . . . . . . Implementing Tabbed Regions . . . . . . . . . . . . . . . . . . . . . . . . . Tab Handler Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WHENTABPAGECHANGED Logic . . . . . . . . . . . . . . . . . WHENNEWITEMINSTANCE Logic . . . . . . . . . . . . . . . . . Handling Dynamic Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Code You May Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding Alternative Region Behavior . . . . . . . . . . . . . . . . . . . . . . . Alternative Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example: Coding an Alternative Region . . . . . . . . . . . . . . . . . Controlling Records in a Window . . . . . . . . . . . . . . . . . . . . . . . . . . Duplicating Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Renumbering All Records in a Window . . . . . . . . . . . . . . . . . Passing Instructions to a Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71 72 72 73 75 76 76 78 7 12 7 12 7 13 7 14 7 15 7 18 7 18 7 22 7 23 7 25 7 27 7 27 7 27 7 31 7 31 7 32 7 34

iv Oracle Applications Developers Guide

Chapter 8

Enabling Query Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Query Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Raising Query Find on Form Startup . . . . . . . . . . . . . . . . . . . . Implementing RowLOV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Find Windows . . . . . . . . . . . . . . . . . . . . . . . . . .

81 82 82 83 84

Chapter 9

Coding Item Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Item Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dependent Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conditionally Dependent Item . . . . . . . . . . . . . . . . . . . . . . . . . Multiple Dependent Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Two Master Items and One Dependent Item . . . . . . . . . . . . . Cascading Dependence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mutually Exclusive Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mutually Inclusive Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mutually Inclusive Items with Dependent Items . . . . . . . . . . Conditionally Mandatory Items . . . . . . . . . . . . . . . . . . . . . . . . Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Integrity Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Uniqueness Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referential Integrity Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advanced Calendar Options . . . . . . . . . . . . . . . . . . . . . . . . . . . Calendar Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CALENDAR: Calendar Package . . . . . . . . . . . . . . . . . . . . . . . . . . . CALENDAR.SHOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CALENDAR.SETUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CALENDAR.EVENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91 92 93 95 96 97 98 9 10 9 12 9 13 9 15 9 18 9 19 9 19 9 20 9 23 9 24 9 26 9 28 9 28 9 28 9 28

Chapter 10

Controlling the Toolbar and the Default Menu . . . . . . . . . . . . . Pulldown Menus and the Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . Menu and Toolbar Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Save and Proceed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synchronizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ApplicationSpecific Entries: Special Menus . . . . . . . . . . . . . Customizing RightMouse Menus (Popup Menus) . . . . . . . APP_POPUP: RightMouse Menu Control . . . . . . . . . . . . . . . . . . APP_POPUP.INSTANTIATE . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_SPECIAL: Menu and Toolbar Control . . . . . . . . . . . . . . . . . . APP_SPECIAL.INSTANTIATE . . . . . . . . . . . . . . . . . . . . . . . . .

10 1 10 2 10 2 10 8 10 8 10 8 10 10 10 13 10 13 10 15 10 15

Contents

v

APP_SPECIAL.ENABLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 17 APP_SPECIAL.GET_CHECKBOX . . . . . . . . . . . . . . . . . . . . . . 10 18 APP_SPECIAL.SET_CHECKBOX . . . . . . . . . . . . . . . . . . . . . . 10 19

Chapter 11

Menus and Function Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Menus and Function Security . . . . . . . . . . . . . . . . . . Using Form Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Security Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General Function and Menu Standards . . . . . . . . . . . . . . . . . . Form Function Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subfunction Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Security Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Security APIs for PL/SQL Procedures . . . . . . . . . . . . . . FND_FUNCTION.TEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FUNCTION.QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FUNCTION.EXECUTE . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FUNCTION.USER_FUNCTION_NAME . . . . . . . . . . . FND_FUNCTION.CURRENT_FORM_FUNCTION . . . . . . . Forms Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Forms Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Form Functions Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Form Functions Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Menus Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Menus Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Menu Entries Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11 1 11 2 11 6 11 9 11 9 11 10 11 11 11 14 11 15 11 15 11 15 11 16 11 19 11 20 11 21 11 21 11 21 11 23 11 24 11 28 11 29 11 30

Chapter 12

Message Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Message Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . Major Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Message Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . Create Your Message Directories . . . . . . . . . . . . . . . . . . . . . . . Define Your Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create Your Message Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Logic to Set Up Messages . . . . . . . . . . . . . . . . . . . . . . . . Code Logic to Display Messages . . . . . . . . . . . . . . . . . . . . . . . Message Dictionary APIs for PL/SQL Procedures . . . . . . . . . . . . FND_MESSAGE.CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.DEBUG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12 1 12 2 12 2 12 3 12 5 12 5 12 5 12 6 12 7 12 8 12 11 12 11 12 11

vi Oracle Applications Developers Guide

FND_MESSAGE.ERASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.GET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.HINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.QUESTION . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.RETRIEVE . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.SET_NAME . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.SET_STRING . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.SET_TOKEN . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.SHOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_MESSAGE.WARN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application Message Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Naming Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Numbering Standards . . . . . . . . . . . . . . . . . . . . . . . . Message Type Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Description Standards . . . . . . . . . . . . . . . . . . . . . . . . Message Content Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Token Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Few General Guidelines for Writing Good Messages . . . . When the User Needs to Get Help . . . . . . . . . . . . . . . . . . . . . . Complex Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specific Types of Message Content . . . . . . . . . . . . . . . . . . . . . . Message Writing Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special Purpose Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Messages Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Messages Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12 12 12 12 12 13 12 14 12 14 12 17 12 17 12 19 12 19 12 22 12 22 12 24 12 24 12 26 12 27 12 29 12 31 12 33 12 33 12 36 12 37 12 39 12 40 12 42 12 52 12 55 12 56 12 56

Chapter 13

User Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of User Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining New User Profile Options . . . . . . . . . . . . . . . . . . . . . Setting User Profile Option Values . . . . . . . . . . . . . . . . . . . . . . Setting Your Personal User Profile . . . . . . . . . . . . . . . . . . . . . . Implementing User Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Predefined User Profile Options . . . . . . . . . . . . . . . . . . . . . . . . FND_PROFILE: User Profile APIs . . . . . . . . . . . . . . . . . . . . . . . . . . FND_PROFILE.PUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_PROFILE.GET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_PROFILE.VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13 1 13 2 13 2 13 3 13 4 13 4 13 5 13 5 13 9 13 9 13 10 13 11

Contents

vii

User Profile C Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . afpoget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . afpoput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Profiles Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Profiles Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13 12 13 12 13 12 13 14 13 14 13 15

Chapter 14

Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Building a Flexfield into Your Application . . . . . . . . . . . . . . . Flexfields and Application Upgrades . . . . . . . . . . . . . . . . . . . Implementing Key Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Key Flexfield Database Columns . . . . . . . . . . . . . . . Registering Your Key Flexfield Table . . . . . . . . . . . . . . . . . . . . Registering Your Key Flexfield . . . . . . . . . . . . . . . . . . . . . . . . . Add Your Flexfield to Your Forms . . . . . . . . . . . . . . . . . . . . . . Implementing Descriptive Flexfields . . . . . . . . . . . . . . . . . . . . . . . . Planning for Reference Fields . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Descriptive Flexfield Database Columns . . . . . . . . Adding a Descriptive Flexfield to a Table with Existing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protected Descriptive Flexfields . . . . . . . . . . . . . . . . . . . . . . . . Registering Your Descriptive Flexfield Table . . . . . . . . . . . . . Registering Your Descriptive Flexfield . . . . . . . . . . . . . . . . . . Add Your Flexfield to Your Forms . . . . . . . . . . . . . . . . . . . . . . Adding Flexfields to Your Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . Create Your Hidden Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create Your Displayed Fields . . . . . . . . . . . . . . . . . . . . . . . . . . Create Your Flexfield Definition . . . . . . . . . . . . . . . . . . . . . . . . Invoke Your Flexfield Definition from Several Event Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flexfield Definition Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . Key Flexfield Definition Syntax . . . . . . . . . . . . . . . . . . . . . . . . Range (Type) Flexfield Definition Syntax . . . . . . . . . . . . . . . . Descriptive Flexfield Definition Syntax . . . . . . . . . . . . . . . . . . Flexfield Definition Arguments . . . . . . . . . . . . . . . . . . . . . . . . Flexfield Definition Examples . . . . . . . . . . . . . . . . . . . . . . . . . . Updating Flexfield Definitions . . . . . . . . . . . . . . . . . . . . . . . . . Update Key Flexfield Definition Syntax . . . . . . . . . . . . . . . . . Update Range (Type) Flexfield Definition Syntax . . . . . . . . .

14 1 14 2 14 5 14 8 14 10 14 11 14 15 14 18 14 18 14 19 14 20 14 20 14 21 14 22 14 23 14 24 14 24 14 24 14 25 14 25 14 27 14 27 14 28 14 30 14 30 14 33 14 35 14 36 14 55 14 59 14 60 14 62

viii Oracle Applications Developers Guide

Update Descriptive Flexfield Definition Syntax . . . . . . . . . . . Updating Flexfield Definition Example . . . . . . . . . . . . . . . . . . Using Key Flexfields in Find Windows . . . . . . . . . . . . . . . . . . Using Range Flexfields in Query Find Windows . . . . . . . . . . Troubleshooting Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Key Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Key Flexfields Block . . . . . . . . . . . . . . . . . . . . . . . . . . Qualifiers Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Columns Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Descriptive Flexfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Register Descriptive Flexfields Block . . . . . . . . . . . . . . . . . . . . Reference Fields Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Columns Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index

14 64 14 65 14 65 14 67 14 69 14 71 14 72 14 74 14 76 14 78 14 78 14 81 14 83

Contents

ix

Volume 2VOLUME 1 . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 15

14 1

Overview of Concurrent Processing . . . . . . . . . . . . . . . . . . . . . . . Overview of Concurrent Processing . . . . . . . . . . . . . . . . . . . . . . . . Basic Application Development Needs . . . . . . . . . . . . . . . . . . Major Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Designing Concurrent Programs . . . . . . . . . . . . . . . Submitting Concurrent Programs on the Client . . . . . . . . . . . Using Concurrent Processing . . . . . . . . . . . . . . . . . . . . . . . . . . Automated Recovery for Concurrent Processing . . . . . . . . . . Overview of Implementing Concurrent Processing . . . . . . . . . . . Choosing Your Implementation . . . . . . . . . . . . . . . . . . . . . . . .

15 1 15 2 15 2 15 2 15 4 15 8 15 15 15 16 15 17 15 21 15 21

Chapter 16

Defining Concurrent Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Concurrent Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concurrent Program Executable Window . . . . . . . . . . . . . . . . . . . Concurrent Program Executable Block . . . . . . . . . . . . . . . . . . Stage Function Parameters Window . . . . . . . . . . . . . . . . . . . . Concurrent Programs Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concurrent Programs Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copy to Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Session Control Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Incompatible Programs Window . . . . . . . . . . . . . . . . . . . . . . . Concurrent Program Libraries Window . . . . . . . . . . . . . . . . . . . . . Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concurrent Program Libraries Block . . . . . . . . . . . . . . . . . . . . Concurrent Programs Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rebuild Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16 1 16 2 16 6 16 6 16 9 16 11 16 12 16 18 16 18 16 20 16 27 16 28 16 28 16 29 16 29

Chapter 17

Coding Oracle Tools Concurrent Programs . . . . . . . . . . . . . . . . . Oracle Tool Concurrent Programs . . . . . . . . . . . . . . . . . . . . . . . . . SQL*PLUS Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PL/SQL Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . SQL*Loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Accepting Input Parameters For Oracle Tool Programs . . . . Naming Your Oracle Tool Concurrent Program . . . . . . . . . . .

17 1 17 2 17 2 17 3 17 4 17 5 17 5

x Oracle Applications Developers Guide

Chapter 18

Coding Oracle Reports Concurrent Programs . . . . . . . . . . . . . . . Oracle Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concurrent Processing with Oracle Reports . . . . . . . . . . . . . . Oracle Reports Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . Accessing User Exits and Profile Options . . . . . . . . . . . . . . . . User Exits Used in Oracle Reports . . . . . . . . . . . . . . . . . . . . . . . . . . FND SRWINIT / FND SRWEXIT . . . . . . . . . . . . . . . . . . . . . . . FND FLEXIDVAL / FND FLEXSQL . . . . . . . . . . . . . . . . . . . . Using Dynamic Currency in Oracle Reports . . . . . . . . . . . . . . . . . FND FORMAT_CURRENCY User Exit . . . . . . . . . . . . . . . . . . Example Report Using FND FORMAT_CURRENCY . . . . . . . . . Sample Report Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Reports Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . .

18 1 18 2 18 2 18 4 18 5 18 8 18 8 18 8 18 9 18 10 18 15 18 15 18 17 18 20 18 22

Chapter 19

Coding C or Pro*C Concurrent Programs . . . . . . . . . . . . . . . . . . . Coding C and Pro*C Concurrent Programs . . . . . . . . . . . . . . . . . . Pro*C Concurrent Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . Header Files Used With Concurrent Programs . . . . . . . . . . . Concurrent Processing Pro*C Utility Routines . . . . . . . . . . . . . . . afpend() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . fdpfrs() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . fdpscp() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . fdpscr() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . fdpwrt() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19 1 19 2 19 2 19 9 19 10 19 10 19 11 19 13 19 14 19 16

Chapter 20

Coding Concurrent Programs using Java Stored Procedures . . Coding Concurrent Programs Using Java Stored Procedures . . . How to Write a Concurrent Program using a Java Stored Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20 1 20 2 20 2 20 2

Chapter 21

PL/SQL APIs for Concurrent Processing . . . . . . . . . . . . . . . . . . . FND_CONC_GLOBAL Package . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_CONC_GLOBAL.REQUEST_DATA . . . . . . . . . . . . . . . FND_CONC_GLOBAL.SET_REQ_GLOBALS . . . . . . . . . . . . Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_CONCURRENT Package . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21 1 21 2 21 2 21 2 21 2 21 5

Contents

xi

FND_CONCURRENT.AF_COMMIT . . . . . . . . . . . . . . . . . . . . FND_CONCURRENT.AF_ROLLBACK . . . . . . . . . . . . . . . . . FND_CONCURRENT.GET_REQUEST_STATUS (Client or Server) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_CONCURRENT.WAIT_FOR_REQUEST (Client or Server) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_CONCURRENT.SET_COMPLETION_STATUS (Server) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FILE: PL/SQL File I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FILE.PUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FILE.PUT_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FILE.NEW_LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FILE.PUT_NAMES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_FILE.CLOSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_PROGRAM: Concurrent Program Loaders . . . . . . . . . . . . . FND_PROGRAM.MESSAGE . . . . . . . . . . . . . . . . . . . . . . . . . . FND_PROGRAM.EXECUTABLE . . . . . . . . . . . . . . . . . . . . . . . FND_PROGRAM.DELETE_EXECUTABLE . . . . . . . . . . . . . . FND_PROGRAM.REGISTER . . . . . . . . . . . . . . . . . . . . . . . . . . FND_PROGRAM.DELETE_PROGRAM . . . . . . . . . . . . . . . . . FND_PROGRAM.PARAMETER . . . . . . . . . . . . . . . . . . . . . . . FND_PROGRAM.DELETE_PARAMETER . . . . . . . . . . . . . . . FND_PROGRAM.INCOMPATIBILITY . . . . . . . . . . . . . . . . . . FND_PROGRAM.DELETE_INCOMPATIBILITY . . . . . . . . . FND_PROGRAM.REQUEST_GROUP . . . . . . . . . . . . . . . . . . FND_PROGRAM.DELETE_GROUP . . . . . . . . . . . . . . . . . . . . FND_PROGRAM.ADD_TO_GROUP . . . . . . . . . . . . . . . . . . . FND_PROGRAM.REMOVE_FROM_GROUP . . . . . . . . . . . . FND_PROGRAM.PROGRAM_EXISTS . . . . . . . . . . . . . . . . . . FND_PROGRAM.PARAMETER_EXISTS . . . . . . . . . . . . . . . . FND_PROGRAM.INCOMPATIBILITY_EXISTS . . . . . . . . . . FND_PROGRAM.EXECUTABLE_EXISTS . . . . . . . . . . . . . . . FND_PROGRAM.REQUEST_GROUP_EXISTS . . . . . . . . . . . FND_PROGRAM.PROGRAM_IN_GROUP . . . . . . . . . . . . . . FND_PROGRAM.ENABLE_PROGRAM . . . . . . . . . . . . . . . . FND_REQUEST Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_REQUEST.SET_OPTIONS (Client or Server) . . . . . . . . FND_REQUEST.SET_REPEAT_OPTIONS (Client or Server) 21 30 FND_REQUEST.SET_PRINT_OPTIONS (Client or Server) . FND_REQUEST.SUBMIT_REQUEST (Client or Server) . . . .

21 5 21 5 21 5 21 8 21 9 21 11 21 11 21 11 21 12 21 13 21 13 21 14 21 15 21 15 21 15 21 16 21 17 21 19 21 20 21 21 21 22 21 22 21 23 21 23 21 24 21 24 21 25 21 25 21 26 21 26 21 27 21 27 21 27 21 29 21 29

21 31 21 32

xii Oracle Applications Developers Guide

FND_REQUEST.SET_MODE (Server) . . . . . . . . . . . . . . . . . . . Example Request Submissions . . . . . . . . . . . . . . . . . . . . . . . . . FND_REQUEST_INFO and Multiple Language Support (MLS) FND_REQUEST_INFO.GET_PARAM_NUMBER . . . . . . . . . FND_REQUEST_INFO.GET_PARAM_INFO . . . . . . . . . . . . . FND_REQUEST_INFO.GET_PROGRAM . . . . . . . . . . . . . . . . FND_REQUEST_INFO.GET_PARAMETER . . . . . . . . . . . . . . Example MLS Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET: Request Set Loaders . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.MESSAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.CREATE_SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.DELETE_SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.ADD_PROGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.REMOVE_PROGRAM . . . . . . . . . . . . . . . . . . . . . . . FND_SET.PROGRAM_PARAMETER . . . . . . . . . . . . . . . . . . . FND_SET.DELETE_PROGRAM_PARAMETER . . . . . . . . . . FND_SET.ADD_STAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.REMOVE_STAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.LINK_STAGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.INCOMPATIBILITY . . . . . . . . . . . . . . . . . . . . . . . . . FND_SET.DELETE_INCOMPATIBILITY . . . . . . . . . . . . . . . . FND_SET.ADD_SET_TO_GROUP . . . . . . . . . . . . . . . . . . . . . . FND_SET.REMOVE_SET_FROM_GROUP . . . . . . . . . . . . . . . FND_SUBMIT: Request Set Submission . . . . . . . . . . . . . . . . . . . . . FND_SUBMIT.SET_MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_SUBMIT.SET_REL_CLASS_OPTIONS . . . . . . . . . . . . . FND_SUBMIT.SET_REPEAT_OPTIONS . . . . . . . . . . . . . . . . . FND_SUBMIT_SET.REQUEST_SET . . . . . . . . . . . . . . . . . . . . . FND_SUBMIT.SET_PRINT_OPTIONS . . . . . . . . . . . . . . . . . . FND_SUBMIT.ADD_PRINTER . . . . . . . . . . . . . . . . . . . . . . . . . FND_SUBMIT.ADD_NOTIFICATION . . . . . . . . . . . . . . . . . . FND_SUBMIT.SET_NLS_OPTIONS . . . . . . . . . . . . . . . . . . . . FND_SUBMIT.SUBMIT_PROGRAM . . . . . . . . . . . . . . . . . . . . FND_SUBMIT.SUBMIT_SET . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples of Request Set Submission . . . . . . . . . . . . . . . . . . . .

21 33 21 34 21 38 21 38 21 39 21 39 21 39 21 40 21 42 21 42 21 42 21 43 21 44 21 45 21 45 21 46 21 47 21 48 21 49 21 49 21 51 21 52 21 52 21 53 21 53 21 53 21 54 21 55 21 55 21 56 21 56 21 57 21 57 21 58 21 58

Chapter 22

Standard Request Submission . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Standard Request Submission . . . . . . . . . . . . . . . . . . Basic Application Development Needs . . . . . . . . . . . . . . . . . . Major Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22 1 22 2 22 2 22 3 22 5

Contents

xiii

Controlling Access to Your Reports and Programs . . . . . . . . Implementing Standard Request Submission . . . . . . . . . . . . . . . . Developing Reports for Standard Request Submission . . . . Defining Parameter Validation . . . . . . . . . . . . . . . . . . . . . . . . . Defining Your Report or Other Program . . . . . . . . . . . . . . . . . Crossapplication Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . .

22 6 22 8 22 8 22 9 22 11 22 12

Chapter 23

Request Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Request Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sets, Stages, and Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stage Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Request Set Completion Status . . . . . . . . . . . . . . . . . . . . . . . . .

23 1 23 2 23 2 23 6 23 7

Chapter 24

The TEMPLATE Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of the TEMPLATE Form . . . . . . . . . . . . . . . . . . . . . . . . . Libraries in the TEMPLATE Form . . . . . . . . . . . . . . . . . . . . . . . . . . Special Triggers in the TEMPLATE form . . . . . . . . . . . . . . . . . . . . Triggers That Often Require Some Modification . . . . . . . . . . Triggers That Cannot Be Modified . . . . . . . . . . . . . . . . . . . . . .

241 242 243 246 247 2411

Chapter 25

Attachments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Attachments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Attachments Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Attachments for Forms or Form Functions . . . . . . . . . . . . . . . Planning and Defining the Attachments Feature . . . . . . . . . . . . . Planning to Add the Attachments Feature to Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Up the Attachments Feature for Your Form . . . . . . . Document Entities Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Entities Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Categories Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Categories Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . Category Assignments Window . . . . . . . . . . . . . . . . . . . . . . . . Attachment Functions Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . Attachment Functions Block . . . . . . . . . . . . . . . . . . . . . . . . . . . Categories Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Block Declaration Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . Entity Declaration Window . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25 1 25 2 25 2 25 4 25 6 25 7 25 7 25 10 25 11 25 11 25 13 25 13 25 14 25 16 25 16 25 17 25 18 25 20

xiv Oracle Applications Developers Guide

Chapter 26

Handling Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Year 2000 Compliance in Oracle Applications . . . . . . . . . . . . . . . . RR Date Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Paths to Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dates in Oracle Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . Date Coding Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Dates While Developing Application Forms . . . . . . . . Using Dates With Compliant Versions of OAS . . . . . . . . . . . . Conversion To Date Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . Verify Compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Character Mode and External Programs Code Review . . . . . DateEnhanced Forms Code Review . . . . . . . . . . . . . . . . . . . . NonDateEnhanced Forms Code Review . . . . . . . . . . . . . . . Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use the DATECHECK Script to Identify Issues . . . . . . . . . . . Problems Observed During Testing . . . . . . . . . . . . . . . . . . . . . Date Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26 1 26 2 26 3 26 4 26 4 26 9 26 9 26 13 26 15 26 15 26 16 26 17 26 17 26 18 26 20 26 20 26 21 26 21

Chapter 27

Customization Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Customizing Oracle Applications . . . . . . . . . . . . . . . Basic Business Needs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Determining Your Needs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Customization By Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Your Custom Application . . . . . . . . . . . . . . . . . . . . . Adding a Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding a Report or Concurrent Program . . . . . . . . . . . . . . . . Adding a New Report Submission Form . . . . . . . . . . . . . . . . Adding Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Message Dictionary Messages . . . . . . . . . . . . . . . . . . Customization By Modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying an Existing Form . . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying an Existing Report . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying an Existing C Program . . . . . . . . . . . . . . . . . . . . . . Modifying an Existing PL/SQL Stored Procedure . . . . . . . . . Modifying Existing Online Help . . . . . . . . . . . . . . . . . . . . . . . . Modifying Existing Message Dictionary Messages . . . . . . . .

27 1 27 2 27 2 27 3 27 5 27 6 27 7 27 8 27 9 27 10 27 10 27 10 27 11 27 11 27 12 27 14 27 16 27 18 27 18 27 19 27 19

Contents

xv

Modifying Existing Menus and Responsibilities . . . . . . . . . . Oracle Applications Database Customization . . . . . . . . . . . . . . . . Oracle Applications Upgrades and Patches . . . . . . . . . . . . . . . . . . Building Online Help for Custom Applications . . . . . . . . . . . . . . How the Help System Works . . . . . . . . . . . . . . . . . . . . . . . . . . Prepare Your Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create HTML Help Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create a Help Navigation Tree . . . . . . . . . . . . . . . . . . . . . . . . . Upgrades and Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Integrating Custom Objects and Schemas . . . . . . . . . . . . . . . . . . . Upgrading Custom Forms to Release 11i . . . . . . . . . . . . . . . . . . . . Converting Your Form to Oracle Forms 6i . . . . . . . . . . . . . . . Upgrading Your Forms to Release 11i Standards . . . . . . . . . . Performing Required Manual Changes on Your Forms . . . . Performing Optional Manual Changes on Your Forms . . . . . The Upgrade Utility and Standards Compliance Checker: flint60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preparing to Run flint60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the flint60 Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reviewing flint60 Log File Output . . . . . . . . . . . . . . . . . . . . . . Changes to Internal Menu Names from Release 11 to Release 11i . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27 19 27 21 27 24 27 26 27 26 27 27 27 27 27 28 27 28 27 29 27 31 27 31 27 32 27 32 27 33 27 36 27 37 27 38 27 39 27 42

Chapter 28

Using the CUSTOM Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Customizing Oracle Applications with the CUSTOM Library . . Writing Code for the CUSTOM Library . . . . . . . . . . . . . . . . . . Events Passed to the CUSTOM Library . . . . . . . . . . . . . . . . . . When to Use the CUSTOM Library . . . . . . . . . . . . . . . . . . . . . Coding Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding Generic Form Events . . . . . . . . . . . . . . . . . . . . . . . . . . Coding ProductSpecific Events . . . . . . . . . . . . . . . . . . . . . . . . Adding Custom Entries to the Special Menu . . . . . . . . . . . . . Support and Upgrading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ProductSpecific Events in Oracle Application Object Library . . WHENLOGONCHANGED Event . . . . . . . . . . . . . . . . . . . . WHENRESPONSIBILITYCHANGED Event . . . . . . . . . . . CUSTOM Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUSTOM.ZOOM_AVAILABLE . . . . . . . . . . . . . . . . . . . . . . . . CUSTOM.STYLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CUSTOM.EVENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example of Implementing Zoom Using the CUSTOM Library . .

28 1 28 2 28 2 28 5 28 6 28 6 28 10 28 12 28 12 28 15 28 17 28 17 28 17 28 19 28 19 28 19 28 20 28 23

xvi Oracle Applications Developers Guide

Modify the Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 23 Modify the CUSTOM Library . . . . . . . . . . . . . . . . . . . . . . . . . . 28 24

Chapter 29

APPCORE Routine APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_COMBO: Combination Block API . . . . . . . . . . . . . . . . . . . . . APP_COMBO.KEY_PREV_ITEM . . . . . . . . . . . . . . . . . . . . . . . APP_DATE and FND_DATE: Date Conversion APIs . . . . . . . . . . List of Date Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_DATE.CANONICAL_TO_DATE and FND_DATE.CANONICAL_TO_DATE . . . . . . . . . . . . . . . . . . APP_DATE.DISPLAYDATE_TO_DATE and FND_DATE.DISPLAYDATE_TO_DATE . . . . . . . . . . . . . . . . . APP_DATE.DISPLAYDT_TO_DATE and FND_DATE.DISPLAYDT_TO_DATE . . . . . . . . . . . . . . . . . . . . APP_DATE.DATE_TO_CANONICAL and FND_DATE.DATE_TO_CANONICAL . . . . . . . . . . . . . . . . . . APP_DATE.DATE_TO_DISPLAYDATE and FND_DATE.DATE_TO_DISPLAYDATE . . . . . . . . . . . . . . . . . APP_DATE.DATE_TO_DISPLAYDT and FND_DATE.DATE_TO_DISPLAYDT . . . . . . . . . . . . . . . . . . . . APP_DATE.DATE_TO_FIELD . . . . . . . . . . . . . . . . . . . . . . . . . APP_DATE.FIELD_TO_DATE . . . . . . . . . . . . . . . . . . . . . . . . . APP_DATE.VALIDATE_CHARDATE . . . . . . . . . . . . . . . . . . . APP_DATE.VALIDATE_CHARDT . . . . . . . . . . . . . . . . . . . . . FND_DATE.STRING_TO_DATE . . . . . . . . . . . . . . . . . . . . . . . FND_DATE.STRING_TO_CANONICAL . . . . . . . . . . . . . . . . APP_EXCEPTION: Exception Processing APIs . . . . . . . . . . . . . . . APP_EXCEPTION.RAISE_EXCEPTION . . . . . . . . . . . . . . . . . APP_EXCEPTION.RETRIEVE . . . . . . . . . . . . . . . . . . . . . . . . . APP_EXCEPTION.GET_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . APP_EXCEPTION.GET_CODE . . . . . . . . . . . . . . . . . . . . . . . . APP_EXCEPTION.GET_TEXT . . . . . . . . . . . . . . . . . . . . . . . . . APP_EXCEPTION.RECORD_LOCK_EXCEPTION . . . . . . . APP_EXCEPTION.RECORD_LOCK_ERROR . . . . . . . . . . . . APP_EXCEPTION.DISABLED . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIELD: Item Relationship Utilities . . . . . . . . . . . . . . . . . . . . . APP_FIELD.CLEAR_FIELDS . . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIELD.CLEAR_DEPENDENT_FIELDS . . . . . . . . . . . . . APP_FIELD.SET_DEPENDENT_FIELD . . . . . . . . . . . . . . . . . APP_FIELD.SET_EXCLUSIVE_FIELD . . . . . . . . . . . . . . . . . . APP_FIELD.SET_INCLUSIVE_FIELD . . . . . . . . . . . . . . . . . . . APP_FIELD.SET_REQUIRED_FIELD . . . . . . . . . . . . . . . . . . .

29 1 29 3 29 3 29 4 29 4 29 5 29 6 29 7 29 7 29 8 29 8 29 9 29 10 29 11 29 12 29 12 29 13 29 15 29 15 29 15 29 15 29 16 29 16 29 16 29 16 29 17 29 18 29 18 29 18 29 19 29 20 29 21 29 22

Contents

xvii

APP_FIND: QueryFind Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIND.NEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIND.CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIND.CLEAR_DETAIL . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIND.FIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIND.QUERY_RANGE . . . . . . . . . . . . . . . . . . . . . . . . . . APP_FIND.QUERY_FIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_ITEM: Individual Item Utilities . . . . . . . . . . . . . . . . . . . . . . . APP_ITEM.COPY_DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_ITEM.IS_VALID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_ITEM.SIZE_WIDGET . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_ITEM_PROPERTY: Property Utilities . . . . . . . . . . . . . . . . . . APP_ITEM_PROPERTY.GET_PROPERTY . . . . . . . . . . . . . . . APP_ITEM_PROPERTY.SET_PROPERTY . . . . . . . . . . . . . . . . APP_ITEM_PROPERTY.SET_VISUAL_ATTRIBUTE . . . . . . APP_NAVIGATE: Open a Form Function . . . . . . . . . . . . . . . . . . . APP_NAVIGATE.EXECUTE . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_RECORD: Record Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_RECORD.TOUCH_RECORD . . . . . . . . . . . . . . . . . . . . . APP_RECORD.HIGHLIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . APP_RECORD.FOR_ALL_RECORDS . . . . . . . . . . . . . . . . . . . APP_RECORD.DELETE_ROW . . . . . . . . . . . . . . . . . . . . . . . . . APP_RECORD.VALIDATE_RANGE . . . . . . . . . . . . . . . . . . . . APP_REGION: Region Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_REGION.ALT_REGION . . . . . . . . . . . . . . . . . . . . . . . . . . APP_STANDARD Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_STANDARD.APP_VALIDATE . . . . . . . . . . . . . . . . . . . . APP_STANDARD.EVENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_STANDARD.SYNCHRONIZE . . . . . . . . . . . . . . . . . . . . APP_STANDARD.PLATFORM . . . . . . . . . . . . . . . . . . . . . . . . APP_WINDOW: Window Utilities . . . . . . . . . . . . . . . . . . . . . . . . . APP_WINDOW.CLOSE_FIRST_WINDOW . . . . . . . . . . . . . . APP_WINDOW.PROGRESS . . . . . . . . . . . . . . . . . . . . . . . . . . . APP_WINDOW.SET_COORDINATION . . . . . . . . . . . . . . . . . APP_WINDOW.SET_WINDOW_POSITION . . . . . . . . . . . . . APP_WINDOW.SET_TITLE . . . . . . . . . . . . . . . . . . . . . . . . . . .

29 23 29 23 29 23 29 23 29 24 29 24 29 24 29 26 29 26 29 26 29 27 29 28 29 28 29 28 29 29 29 30 29 30 29 33 29 33 29 33 29 34 29 34 29 35 29 37 29 37 29 38 29 38 29 38 29 39 29 39 29 40 29 40 29 40 29 40 29 41 29 42

Chapter 30

FNDSQF Routine APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 1 FND_CURRENCY: Dynamic Currency APIs . . . . . . . . . . . . . . . . . 30 2 FND_CURRENCY.GET_FORMAT_MASK (Client or Server) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2

xviii Oracle Applications Developers Guide

Currency Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_DATE: Date Conversion APIs . . . . . . . . . . . . . . . . . . . . . . . . FND_GLOBAL: WHO Column Maintenance and Database Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_GLOBAL.USER_ID (Server) . . . . . . . . . . . . . . . . . . . . . . FND_GLOBAL.APPS_INITIALIZE (Server) . . . . . . . . . . . . . . FND_GLOBAL.LOGIN_ID (Server) . . . . . . . . . . . . . . . . . . . . . FND_GLOBAL.CONC_LOGIN_ID (Server) . . . . . . . . . . . . . . FND_GLOBAL.PROG_APPL_ID (Server) . . . . . . . . . . . . . . . FND_GLOBAL.CONC_PROGRAM_ID (Server) . . . . . . . . . . FND_GLOBAL.CONC_REQUEST_ID (Server) . . . . . . . . . . . FND_ORG: Organization APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_ORG.CHANGE_LOCAL_ORG . . . . . . . . . . . . . . . . . . . FND_ORG.CHANGE_GLOBAL_ORG . . . . . . . . . . . . . . . . . . FND_ORG.CHOOSE_ORG . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_STANDARD: Standard APIs . . . . . . . . . . . . . . . . . . . . . . . . . FND_STANDARD.FORM_INFO . . . . . . . . . . . . . . . . . . . . . . . FND_STANDARD.SET_WHO . . . . . . . . . . . . . . . . . . . . . . . . . FND_STANDARD.SYSTEM_DATE . . . . . . . . . . . . . . . . . . . . . FND_STANDARD.USER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FND_UTILITIES: Utility Routines . . . . . . . . . . . . . . . . . . . . . . . . . . FND_UTILITIES.OPEN_URL . . . . . . . . . . . . . . . . . . . . . . . . . . FND_UTILITIES.PARAM_EXISTS . . . . . . . . . . . . . . . . . . . . . .

30 3 30 4 30 5 30 5 30 5 30 7 30 7 30 7 30 8 30 8 30 9 30 9 30 9 30 9 30 10 30 10 30 10 30 11 30 11 30 12 30 12 30 12

Chapter 31

Naming Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Naming Standards and Definitions . . . . . . . . . . . . . . . . . . . . . . . . . Database Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Form Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PL/SQL Packages, Procedures and Source Files . . . . . . . . . . Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Glossary Index

31 1 31 2 31 2 31 5 31 9 31 10 31 11

Contents

xix

xx Oracle Applications Developers Guide

Prefacehis manual contains the coding standards followed by the Oracle Applications development staff. It describes the code needed to implement the Oracle Applications user interface described in the Oracle Applications User Interface Standards for FormsBased Products. It also provides information necessary to help you integrate your Oracle Forms Developer 6i forms with Oracle Applications. This preface includes the following topics: Audience for this Guide Other Information Sources Do Not Use Database Tools to Modify Oracle Applications Data Typographic Conventions Your Feedback

T

Preface

i

Audience for This GuideThis guide is written for the application developer and assumes assumes you have a working knowledge of the following: Oracle Forms Developer 6i 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 8 and Oracle8i If you have never used Oracle8i or PL/SQL, we suggest you attend one or more of the relevant training classes available through Oracle University. The Oracle Applications graphical user interface. To learn more about the Oracle Applications graphical user interface, read the Oracle Applications User Guide. See Other Information Sources for more information about Oracle Applications product information.

Other Information SourcesYou can choose from many sources of information, including online documentation, training, and support services, to increase your knowledge and understanding of Oracle Application Object Library. If this guide refers you to other Oracle Applications documentation, use only the Release 11i versions of those guides unless we specify otherwise.

Online DocumentationMost Oracle Applications documentation is available online (HTML and/or PDF). The technical reference guides are available in paper format only. Note that the HTML documentation is translated into over twenty languages. The HTML version of this guide is optimized for onscreen reading, and you can use it to follow hypertext links for easy access to other HTML guides in the library. When you have an HTML window open, you can use the features on the left side of the window to navigate freely throughout all Oracle Applications documentation.

ii

Oracle Applications Developers Guide

You can use the Search feature to search by words or phrases. You can use the expandable menu to search for topics in the menu structure we provide. The Library option on the menu expands to show all Oracle Applications HTML documentation. You can view HTML help in the following ways: From an application window, use the help icon or the help menu to open a new Web browser and display help about that window. Use the documentation CD. Use a URL provided by your system administrator. Your HTML help may contain information that was not available when this guide was printed.

Related User GuidesYou can read Oracle Applications products user guides online by choosing Library from the expandable menu on your HTML help window, by reading from the Oracle Applications Document Library CD included in your media pack, or by using a Web browser with a URL that your system administrator provides. If you require printed guides, you can purchase them from the Oracle store at http://oraclestore.oracle.com.

User Guides Related to All ProductsOracle Applications User Guide This guide explains how to navigate the system, enter data, and query information, and introduces other basic features of the GUI available with this release of Oracle Application Object Library (and any other Oracle Applications product). You can also access this user guide online by choosing Getting Started and Using Oracle Applications from the Oracle Applications help system. Oracle Alert User Guide Use this guide to define periodic and event alerts that monitor the status of your Oracle Applications data.

Preface

iii

Oracle Applications Implementation Wizard User Guide If you are implementing more than one Oracle product, you can use the Oracle Applications Implementation Wizard to coordinate your setup activities. This guide describes how to use the wizard. Oracle Applications User Interface Standards This guide, Oracle Applications User Interface Standards for FormsBased Products, contains the user interface (UI) standards followed by the Oracle Applications development staff. It describes the UI for the Oracle Applications products and how to apply this UI to the design of an application built by using Oracle Forms. Oracle Applications Flexfields Guide This guide provides flexfields planning, setup, and reference information for the Oracle Applications implementation team, as well as for users responsible for the ongoing maintenance of Oracle Applications product data. This guide also provides information on creating custom reports on flexfields data.

Installation and System Administration GuidesOracle Applications Concepts This guide provides an introduction to the concepts, features, technology stack, architecture, and terminology for Oracle Applications Release 11i. It provides a useful first book to read before an installation of Oracle Applications. This guide also introduces the concepts behind, and major issues, for Applicationswide features such as Business Intelligence (BIS), languages and character sets, and selfservice applications. Installing Oracle Applications This guide provides instructions for managing the installation of Oracle Applications products. In Release 11i, much of the installation process is handled using Oracle OneHour Install, which minimizes the time it takes to install Oracle Applications and the Oracle 8i Server technology stack by automating many of the required steps. This guide contains instructions for using Oracle OneHour Install and lists the tasks you need to perform to finish your installation. You should use this guide in conjunction with individual product user guides and implementation guides.

iv

Oracle Applications Developers Guide

Upgrading Oracle Applications Refer to this guide if you are upgrading your Oracle Applications Release 10.7 or Release 11.0 products to Release 11i. This guide describes the upgrade process in general and lists database upgrade and productspecific upgrade tasks. You must be at either Release 10.7 (NCA, SmartClient, or character mode) or Release 11.0 to upgrade to Release 11i. You cannot upgrade to Release 11i directly from releases prior to 10.7. Using the AD Utilities Use this guide to help you run the various AD utilities, such as AutoInstall, AutoPatch, AD Administration, AD Controller, Relink, and others. It contains howto steps, screenshots, and other information that you need to run the AD utilities. Oracle Applications Product Update Notes Use this guide as a reference if you are responsible for upgrading an installation of Oracle Applications. It provides a history of the changes to individual Oracle Applications products between Release 11.0 and Release 11i. It includes new features and enhancements and changes made to database objects, profile options, and seed data for this interval. Oracle Applications System Administrators Guide This guide provides planning and reference information for the Oracle Applications System Administrator. It contains information on how to define security, customize menus and online help, and manage processing. Oracle Applications Technical Reference Guides These reference guides contain database diagrams and a detailed description of database tables, forms, reports, and programs for Oracle Applications products. This information helps you convert data from your existing applications, integrate Oracle Applications products with nonOracle applications, and write custom reports for Oracle Applications products. You can order a technical reference guide for any product you have licensed. Technical reference guides are available in paper format only.

Preface

v

Oracle Workflow Guide This guide explains how to define new workflow business processes as well as customize existing Oracle Applicationsembedded workflow processes. You also use this guide to complete the setup steps necessary for any Oracle Applications product that includes workflowenabled processes.

Training and SupportTraining We offer a complete set of training courses to help you and your staff master Oracle Applications. We can help you develop a training plan that provides thorough training for both your project team and your end users. We will work with you to organize courses appropriate to your job or area of responsibility. Training professionals can show you how to plan your training throughout the implementation process so that the right amount of information is delivered to key people when they need it the most. You can attend courses at any one of our many Educational Centers, or you can arrange for our trainers to teach at your facility. We also offer Net classes, where training is delivered over the Internet, and many multimediabased courses on CD. In addition, we can tailor standard courses or develop custom courses to meet your needs. Support From onsite support to central support, our team of experienced professionals provides the help and information you need to keep Oracle Applications products working for you. This team includes your Technical Representative, Account Manager, and Oracles large staff of consultants and support specialists with expertise in your business area, managing an Oracle server, and your hardware and software environment.

Do Not Use Database Tools to Modify Oracle Applications DataWe STRONGLY RECOMMEND that you never use SQL*Plus, Oracle Data Browser, database triggers, or any other tool to modify Oracle Applications tables, unless we tell you to do so in our guides.

vi

Oracle Applications Developers Guide

Oracle provides powerful tools you can use to create, store, change, retrieve, and maintain information in an Oracle database. But if you use Oracle tools such as SQL*Plus to modify Oracle Applications data, you risk destroying the integrity of your data and you lose the ability to audit changes to your data. Because Oracle Applications tables are interrelated, any change you make using an Oracle Applications form can update many tables at once. But when you modify Oracle Applications data using anything other than Oracle Applications forms, you might change a row in one table without making corresponding changes in related tables. If your tables get out of synchronization with each other, you risk retrieving erroneous information and you risk unpredictable results throughout Oracle Applications. When you use Oracle Applications forms to modify your data, Oracle Applications automatically checks that your changes are valid. Oracle Applications also keeps track of who changes information. But, if you enter information into database tables using database tools, you may store invalid information. You also lose the ability to track who has changed your information because SQL*Plus and other database tools do not keep a record of changes.

Typographic ConventionsThis manual uses the following typographic conventions to distinguish important elements from the body of the manual.

Function KeysForms function keys are represented by the key name enclosed in square brackets: [Next Item]. For key mappings for your particular keyboard type, refer to the following sources: Online help Show Keys screen (for most keyboards, [CtrlK] or Help>Keyboard Help from within Oracle Applications)

Command and Example SyntaxCommands and examples appear in a monotype font, as follows: Syntax: Example:SET_CANVAS_PROPERTY(canvas_name, property, value); /*

Preface

vii

** Builtin: SET_CANVAS_PROPERTY ** Example: Change the background color by setting the ** canvas color dynamically at runtime to the name ** of a visual attribute you created. */ BEGIN Set_Canvas_Property(my_main_cnv,VISUAL_ATTRIBUTE,blue_text); END;

Command and example syntax adhere to the following conventions: Convention plain monotype italic monotype underlined monotype ... Explanation Used for code fragments and examples. Indicates usersupplied items such as variables, exceptions, and actual parameters. Indicates a default parameter. If you indicate no parameter in a parameter set, Forms applies the default parameter. An ellipsis shows that statements or clauses were left out. The ellipsis can appear horizontally as shown, or in vertical format. A slash and asterisk begin a Cstyle comment. An asterisk and slash end a Cstyle comment. Two consecutive hyphens begin an ANSIstyle comment, which extends to the end of the line. Indentation helps show structure within code examples, but is not required.

/* */ indentation

Case SensitivityAlthough neither PL/SQL nor Forms commands are case sensitive (that is, you can enter text in upper or lower case without restriction), in the documentation both upper and lower case are used for ease in reading. In syntax examples, builtin names are usually shown in all caps; userdefined values are usually shown in lower case. Syntax:SET_CANVAS_PROPERTY(canvas_name, property, value);

viii

Oracle Applications Developers Guide

Syntax ExamplesThis example illustrates first how the syntax is presented in this manual, followed by an example of how you actually enter a builtin procedure into your triggers. Example Syntax: With Values: Example Syntax: With Values:SET_FORM_PROPERTY(formmodule_name, property, value); Set_Form_Property(my_form, savepoint_mode, PROPERTY_ON); SET_TIMER(timer_name, milliseconds, iterate); Set_Timer(my_timer, 12000, REPEAT);

About OracleOracle 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. Oracle Applications provides the Ebusiness Suite, a fully integrated suite of more than 70 software modules for financial management, Internet procurement, business intelligence, supply chain management, manufacturing, project systems, human resources and sales and service management. Oracle products are available for mainframes, minicomputers, personal computers, network computers, and personal digital assistants, enabling organizations to integrate different computers, different operating systems, different networks, and even different database management systems, into a single, unified computing and information resource. Oracle is the worlds leading supplier of software for information management, and the worlds second largest software company. Oracle offers its database, tools, and application products, along with related consulting, education and support services, in over 145 countries around the world.

Your FeedbackThank you for using Oracle Application Object Library and this guide. We value your comments and feedback. This guide contains a Readers Comment Form you can use to explain what you like or dislike about Oracle Application Object Library or this guide. Mail

Preface

ix

your comments to the following address or call us directly at (650) 5067000. Oracle Applications Documentation Manager Oracle Corporation 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Or, send electronic mail to [email protected]

x

Oracle Applications Developers Guide

CHAPTER

1

Overview of Coding Standardshis chapter describes the general principles on which the Oracle Applications Coding Standards are based, and introduces basic coding standards that apply to all forms. The following topics are covered: Importance of these Standards Coding Principles Coding with Handlers Performance The Standard Development Environment Shared Objects Libraries Property Classes Visual Attributes Overview of Building an Application Overall Design Issues to Consider Overview of Application Development Steps Overview of Form Development Steps

T

Overview of Coding Standards

11

Overview of Coding Standards

Importance of these StandardsThe coding standards described in this manual, together with the user interface standards described in the Oracle Applications User Interface Standards for FormsBased Products, are used by Oracle Corporation developers to build Oracle Applications. If you want to build custom application code that integrates with and has the same look and feel as Oracle Applications, you must follow these standards. If you do not follow these standards exactly as they are presented, you may not achieve an acceptable result. This manual makes no attempt to analyze the consequences of deviating from the standards in particular cases. The libraries and procedures that are packaged with Oracle Applications all assume adherence to these standards. In fact, since the behavior of Oracle Forms, the Oracle Applications standard libraries, and the standards are so tightly linked, a deviation from standards that appears to be minor may in fact have farreaching and unpredictable results. Therefore, we recommend that when you develop custom application code, you follow the standards exactly as they are described in this manual and in the Oracle Applications User Interface Standards for FormsBased Products.

Coding PrinciplesOracle Applications coding standards are guided by the following principles: Code must be readable to be maintained Tools such as Oracle Forms and PL/SQL are used whenever possible (avoid complex user exits using other coding languages) Fast performance over the World Wide Web (the web) is critical Platformspecific code should be avoided except where absolutely necessary Reusable objects should be employed wherever possible

12

Oracle Applications Developers Guide

Coding With HandlersOracle Applications uses groups of packaged procedures, called handlers, to organize PL/SQL code in forms so that it is easier to develop, maintain, and debug. In Oracle Forms, code is placed in triggers, which execute the code when that trigger event occurs. Implementing complex logic may require scattering its code across multiple triggers. Because code in triggers is not located in one place, it cannot be written or reviewed comprehensively, making development, maintenance, and debugging more difficult. To determine what code and events affect a particular item, a developer must scan many triggers throughout the form. Code that affects multiple items can be extremely difficult to trace. To centralize the code so it is easier to develop, maintain, and debug, place the code in packaged procedures and call those procedures from the triggers. Pass the name of the trigger as an argument for the procedure to process. This scheme allows the code for a single business rule to be associated with multiple trigger points, but to reside in a single location. There are different kinds of procedures for the different kinds of code you write: item handlers, event handlers, table handlers, and business rules. Code resides in these procedures; do not put any code in the triggers other than calls to the procedures. Handlers may reside in program units in the form itself, in form libraries, or in stored packages in the database as appropriate. Item Handlers An item handler is a PL/SQL procedure that encapsulates all of the code that acts upon an item. Most of the validation, defaulting, and behavior logic for an item is typically in an item handler. Coding Item Handlers (See page 4 17) Event Handlers An event handler is a PL/SQL procedure that encapsulates all of the code that acts upon an event. Usually event handlers exist to satisfy requirements of either Oracle Forms or the Oracle Applications User Interface Standards for FormsBased Products, as opposed to particular business requirements for a product. Coding Event Handlers (See page 4 19)

Overview of Coding Standards

13

Table Handlers A table handler encapsulates all of the code that manages interactions between a block and its base table. When an updatable block is based on a view, you must supply procedures to manage the insert, update, lock and delete. Referential integrity checks often require additional procedures. Table handlers may reside on either the forms server or the database, depending on their size and the amount of interaction with the database, but they typically reside in the database. Coding Table Handlers (See page 4 20) Server side versus Client side (See page 4 6) Business Rules A business rule describes complex data behavior. For example, one business rule is: A discount cannot be greater than 10% if the current credit rating of the buyer is less than Good. Another business rule is: A NeedBy Date is required if a requisition is made for an inventory item. A business rule procedure encapsulates all of the code to implement one business rule when the business rule is complex or affects more than one item or event. The business rule procedure is then called by the item or event handlers that are involved in the business rule. If the business rule is simple and affects only one item or event, implement the business rule directly in the item or event handler.

LibrariesLibraries contain reusable clientside code. They support these form coding standards by allowing the same code to be used by all forms to enforce specific validation, navigation and cosmetic behaviors and appearances. Libraries allow code to be written once and used by multiple forms. Additionally, because the executables attach at runtime, they facilitate development and maintenance without being invasive to a form. Every form requires several standard triggers and procedures to link the form with a library. Many of these triggers and procedures have a default behavior that a developer overrides for specific items or blocks. Special Triggers in the TEMPLATE form (See page 246)

14

Oracle Applications Developers Guide

ApplicationSpecific Libraries Each application is strongly encouraged to create its own libraries. Typically, each application creates a central library that governs behaviors of objects found throughout many of its forms. Additional libraries should be created for each major transaction form to facilitate the following: Multiple developers can work on a single module, with some developers coding the actual form and others coding the supporting libraries. Shipment and installation of patches to code is vastly simplified if the correction is isolated in a library. Libraries do not require any porting or translation. All libraries should reside in the $AU_TOP/resource directory (or its equivalent). Attaching Libraries Sometimes library attachments can be lost on platforms that have casesensitive filenames. By Oracle Applications standards, library names must be in all uppercase letters (except for the file extension). However, for forms developed using Microsoft Windows, the library filename may be attached using mixed case letters, making the attachment invalid on casesensitive platforms such as Unix. If you attach a library to a form in the Oracle Forms Developer on Microsoft Windows, you should avoid using the Browse mechanism to locate the file. Instead, type in just the filename, in uppercase only, with no file extension (for example, CUSTOM). Oracle Forms will then preserve the attachment exactly as you typed it. Note that your attachment should never include a directory path; your FORMS60_PATH should include the directory that holds all your libraries.

PerformancePerformance is a critical issue in any application. Applications must avoid overloading the network that connects desktop client, server, and database server computers, since often it is network performance that most influences users perceptions of application performance. Oracle Applications are designed to minimize network traffic on all tiers. For example, they try to limit network round trips to one per userdistinguishable event by employing the following coding standards:

Overview of Coding Standards

15

Use database stored procedures when extensive SQL is required Code all nonSQL logic on the client side where possible Cache data on the client side where practical Base blocks on views that denormalize foreign key information where practical Views (See page 3 7) Server Side versus Client Side (See page 4 6)

Coding for Web CompatibilityFollowing Oracle Applications standards carefully will help ensure that your forms can be deployed on the Web. You should avoid using the following features in your forms, as they are not applicable in this architecture: ActiveX, VBX, OCX, OLE, DDE (Microsoft Windowsspecific features that would not be available for a browser running on a Macintosh, for example, and cannot be displayed to users from within the browser) Timers other than onemillisecond timers (onemillisecond timers are treated as timers that fire immediately) WHENMOUSEMOVE, WHENMOUSEENTER/LEAVE and WHENWINDOWACTIVATED/DEACTIVATED triggers Open File dialog box It would open a file on the applications server, rather than on the client machine (where the browser is) as a user might expect Combo boxes Our standards do not use combo boxes anyhow Text_IO and HOST builtin routines These would take place on the applications server, rather than on the client machine (where the browser is) as a user might expect

16

Oracle Applications Developers Guide

The Standard Development EnvironmentThese coding standards assume that you are developing code in the appropriate Oracle Applications development environment, which includes compatible versions of several products. You can ensure that you have all the correct versions of the Oracle Applications and other Oracle products by installing all products from one set of Oracle Applications Release 11i CDs. Oracle Forms Developer 6i Oracle Reports Developer 6i Oracle Application Object Library Release 11i Oracle8i JInitiator While you can develop forms using the standard Oracle Forms Developer, you cannot run your Oracle Applicationsbased forms from the Oracle Forms Developer. Running such forms requires additional Oracle Application Object Library user exits referred to by the libraries, as well as settings and runtime code that can only be seen when running forms through a browser with JInitiator. Both the libraries and the user exits also assume a full installation of the Oracle Application Object Library database schema, as they reference tables, views, and packages contained therein. Mandatory Settings for Running Oracle Applications The html file used to launch Oracle Applications must include several specific settings for Oracle Applications to function properly. The following table contains the required parameters and their required values:Name Value

colorScheme lookAndFeel separateFrame darkLook readOnlyBackground Table 1 1 (Page 1 of 2)

blue oracle true true automatic

Overview of Coding Standards

17

Name

Value

dontTruncateTabs background Table 1 1 (Page 2 of 2)

true no

Additionally, the file OracleAp

Popular Tags:

Click here to load reader

Reader Image
Embed Size (px)
Recommended