0% found this document useful (0 votes)
194 views

form_customization

The document outlines a technical training course on Forms Customizations, focusing on Oracle Forms and Applications architecture, coding standards, and security. It includes a detailed agenda spanning four days, covering topics such as implementing flexfields, query behavior, and custom menus. Additionally, it provides guidelines for coding practices, window behavior, and the use of templates and triggers in Oracle Forms development.

Uploaded by

Dinesh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
194 views

form_customization

The document outlines a technical training course on Forms Customizations, focusing on Oracle Forms and Applications architecture, coding standards, and security. It includes a detailed agenda spanning four days, covering topics such as implementing flexfields, query behavior, and custom menus. Additionally, it provides guidelines for coding practices, window behavior, and the use of templates and triggers in Oracle Forms development.

Uploaded by

Dinesh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 94

Forms Customizations

- Technical Training
- Chetan Anand

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Course Objectives
 Understand Forms Architecture

 How to implement Oracle Apps Standard Look and feel

 How To use TEMPLATE.fmb

 Understand Function & Menu Security

 Implementing Flexfields

 Implementing Query Behavior

 Implementing Custom built Menus & Right Mouse Menus

-2-
Course Agenda
 Day 1

Overview of Oracle Forms

Overview of Oracle Apps Architecture and Directory Structure

Coding a Form Using Oracle Applications Coding Standards

Menu and Function Security

Template Form

Set up required for rest of the presentation

 Day 2

Controlling Window behavior

Coding Tabbed Region

Implementing Item Behavior

Implementing Calendar

Hands On

-3-
Course Agenda
 Day 3

Enabling Query Behavior

Implementing Flexfields

Controlling the Tool bar and Right Mouse Menu

Hands On

 Day 4

Practice session on different concepts learnt during previous days

-4-
Coding a Form Using Oracle Applications
Coding Standards

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Coding 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

 Platform–specific code should be avoided except where absolutely


necessary
 Reusable objects should be employed wherever possible

 Make maximum use of Oracle Defined Libraries

 Design to minimize network traffic on all tiers


– Use database stored procedures when extensive SQL is required
– Code all non–SQL logic on the client side where possible
– Cache data on the client side where practical

-6-
Application Architecture

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
3-Tier Architecture
 Computing resources are
Client Layer Application/Web Database
distributed vertically at the Layer Layer
top-tier host, the middleware End User's
accessing application
server, and the underlying via web browsers
Application Server and Database
client workstations. Web Server located in
your DataCenter
Server located in
your DataCenter
 The top-tier is usually a
computer system containing
the majority of a company’s
data.
 The middleware server
serves as a client to the top-
tier, as well as a server to
the underlying workstations. Figure 1:
3 Tier Architecture

-8-
Apache HTTP Server

Apache Web Server

Reports Server
Server

Discoverer Server

Forms Server
Client

8i Ent Server

-9-
Oracle Applications Directory Structure

- 10 -
…Oracle Applications Directory Structure
 APPL_TOP Directory

- 11 -
…Oracle Applications Directory Structure

• APPL_TOP Product Specific Directory

- 12 -
Oracle Applications Data Model

- 13 -
Oracle Applications Data Model
 Base Product Schema
 There is one schema for each product—a base product schema—that owns the
data objects for that product.
 The following objects are installed in the base product schemas:
» Tables
» Sequences
» Indexes
» Constraints

 APPS Schema
 There is one schema—APPS—that owns all the code objects for the E-Business
Suite and has access to all data objects.
 The following code objects are installed in the APPS schema:
» Views
» Packages
» Procedures
» Functions
» Triggers

- 14 -
Menus and Function Security

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Overview of Menus and Function Security
 Function
– A function is a part of an application’s functionality that is registered under a
unique name for the purpose of assigning it to, or excluding it from, a menu.

Types of Function
Form Function

– A form function (form) invokes an Oracle Forms Developer form.

Sub Function

– A subfunction is a securable subset of a form’s functionality: in other words, a


function executed from within a form.
Non Form Function

– Some functions provide a way to include other types of code, such as HTML pages or
Java Server Pages (JSPs) on a menu and responsibility.

- 16 -
… Overview of Menus and Function Security
 Menu
– A menu is a hierarchical arrangement of functions and menus of functions that
appears in the Navigator. Each responsibility has a menu assigned to it.

 Responsibility

– A responsibility defines an application user’s current privileges while


working with Oracle Applications. When an application user signs on, they
select a responsibility that grants certain privileges, specifically:
 The functions that the user may access. Functions are determined by the menu
assigned to the responsibility.
 The concurrent programs, such as reports, that the user may run (request security
group).
 The application database accounts that forms, concurrent programs, and reports
connect to (data group).

- 17 -
Development Steps

 Develop Functions

 Register Functions

 Create Submenu, If Any . Then Create Menu and attach all the
Functions/Sub functions/Submenus to it
 Attach Menu to a responsibility

 Attach responsibility to a User

- 18 -
Using Form Functions
 To call Forms from programmatically Use FND_FUNCTION.EXECUTE
instead of OPEN_FORM
 For Making forms Query Only Use QUERY_ONLY=YES

 Make use of “Title” parameter to title the window

- 19 -
General Function and Menu Standards
 At the top level of a menu, two general categories should always exist,
Setup and Report.
 Create function names (not user function names) as:
 <APPLICATION_SHORTNAME>_<FORMNAME>_<MODE>

 Never begin a user function name with a number, such as ”2–Tier


Pricing Structure”,
 When the same form is used for multiple functions, differing only in the
parameters passed to it, make the user function name the logical name
for the function,

- 20 -
APPSTAND.fmb

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
APPSTAND.fmb
 The APPSTAND form contains the master copy of the shared objects. It
contains the following:
– Object group STANDARD_PC_AND_VA which contains the Visual Attributes and
Property Classes required to implement much of the user interface.
– STANDARD_TOOLBAR, which contains the windows, canvasses, blocks, and items
of the Applications Toolbar.
– Object group STANDARD_CALENDAR, which contains the windows, canvasses,
blocks, and items of the Applications Calendar.
– Object group QUERY_FIND, which contains a window, canvas, block, and items used
as a starting point for coding a Find Window.

- 22 -
TEMPLATE.fmb

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
What all template.fmb contains
 Standard Objects from APPSTAND.fmb

 Libraries
– FNDSQF
 contains packages and procedures for Message Dictionary, flexfields, profiles, and concurrent
processing.
– APPCORE and APPCORE2
 packages and procedures that are required of all forms to support the menu, Toolbar, and other
required standard behaviors.
– APPDAYPK
 packages that control the Applications Calendar.
– APPFLDR
 packages that enable folder blocks.
– VERT, GLOBE, PSAC, PQH_GEN, GHR, JA, JE, and JL
 to support globalization and vertical markets.
– CUSTOM
 calls that may be modified to provide custom code for Oracle Applications forms without modifying
the Oracle Applications forms directly.

- 24 -
Triggers that often require some modification
 ACCEPT
– Processes invocation of “Action, Save and Proceed” menu choice or toolbar

 FOLDER_RETURN_ACTION
– This trigger allows customization of specific folder events

 KEY-DUPREC
– This trigger disables the default duplicate record functionality

 KEY-CLRFRM
– This trigger validates the form before attempting to clear the form

 KEY-MENU
– This trigger disables the “Block Menu” command of Oracle Forms

 Key-LISTVAL
– This trigger performs flexfield operations or LOV invocations .
– Create block/item level triggers on fields using Calendars or fiedls that dynamically invoke flexfields

- 25 -
- 26 -
- 27 -
Triggers that often require some modification
 ON-ERROR
– This trigger processes all errors .
– To trap specific errors, check for your specific errors before the APP_STANDARD call

 POST-FORM
– Reserved for future

 PRE-FORM
– Set First window position
– Add relevant form information

 QUERY-FIND
– This trigger issues a default message saying that Query Find is not available

 WHEN-NEW-FORM-INSTANCE

 WHEN-NEW-RECORD-INSTANCE
– This trigger maintains the state of Oracle Applications menu and toolbar

- 28 -
Triggers that often require some modification
 WHEN-NEW-RECORD-INSTANCE
– This trigger maintains the state of Oracle Applications menu and toolbar

 WHEN-NEW-ITEM-INSTANCE
– This trigger maintains the state of Oracle Applications menu and toolbar

- 29 -
Property Classes
 Property classes are sets of attributes that can be applied to almost any
Oracle Forms object.
 The TEMPLATE form automatically contains property classes, via
references to APPSTAND, that enforce standard cosmetic appearances
and behaviors for all Objects.

- 30 -
Steps to follow
 Download it from $AU_TOP/forms/US to PLSQLLIB
 Download all the relevant directories, APPSTAND.fmb to PLSQLLIB
 Form should open without any error
 Rename Window, Canvas, Block
 Change the code in APP_CUSTOM.CLOSE_FIRST_WINDOW
 Change the code in the PRE-FORM trigger
 Change the arguments that have been passed to the
FND_STANDARD.FORM_INFO call in the PRE-FORM trigger
 Change argument in the FDRCSID call in the WHEN-NEW-FORM-
INSTANCE trigger with the appropriate form name, form version, etc.

- 31 -
Steps to follow
 Make changes to form

 FTP the form to $PROD_TOP/US/forms

 Compile using f60gen

 Register the form in Oracle Applications

 Register the Form Function in Oracle Applications

 Add the form function to a menu

- 32 -
Controlling Window Behavior

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
…Positioning Windows Upon Opening
 Make use of APP_WINDOW.SET_WINDOW_POSITION

 Available styles are :

CASCADE: Child window overlaps the parent window, offset to the right and
down by 0.3” from the current position of the parent window. Usually used for
detail windows.
RIGHT, BELOW: Child window opens to the right of, or below, the parent
window without obscuring it.
OVERLAP: Detail window overlaps the parent window, aligned with its left
edge, but offset down by 0.3”.
CENTER: Window opens centered relative to another window. Usually used
for modal windows.

- 34 -
…Positioning Windows Upon Opening
 Create two Master-detail Blocks in the form

 Assign proper Windows, Canvas and other properties

 Create a button on Master block and write following code in WHEN–


BUTTON–PRESSED trigger:
 app_custom.open_window(‘Window Name’);

 Modify Program Unit APP_CUSTOM.OPEN_WINDOW as follows:


IF wnd = ’DETAIL WINDOW’ THEN
APP_WINDOW.SET_WINDOW_POSITION(’DETAIL WINDOW’, ’CASCADE’, ’MASTER
WINDOW’);
go_block(DETAIL BLOCK);
END IF;

- 35 -
Closing the window
 The window close events for all non–modal windows get passed to
APP_CUSTOM.CLOSE_WINDOW.
 if the cursor is currently in the window to be closed, APP_CUSTOM
issues a do_key(’PREVIOUS_BLOCK’) to attempt to move the cursor
out of the current window

- 36 -
…Closing the window (example)
 Create 2 master detail Blocks

 Modify the procedure close_window as shown :


IF wnd = ’HEADER’ THEN
app_window.close_first_window;
ELSIF wnd = ’LINES’ THEN
IF (wnd = GET_VIEW_PROPERTY(GET_ITEM_PROPERTY(
:SYSTEM.CURSOR_ITEM,ITEM_CANVAS),WINDOW_NAME)) THEN
GO_BLOCK(’HEADER’);
END IF;
END IF;

- 37 -
Setting Windows Titles Dynamically
 Make use of procedure app_window.set_title

 Add the code in PRE-RECORD of block & WHEN-VALIDATE-ITEM of


item

- 38 -
… Setting Windows Titles Dynamically(Example)
 Create 2 master detail Blocks DEPT, EMP1 and all other related objects

 Set the title of Department window to “My Department” and Employee


window to “My Employee Details”
 Code the PRE-RECORD TRIGGERs of DEPT & EMP1 blocks as shown
below :
 app_window.set_title('WDEPT',:DEPT.DNAME);
 app_window.set_title('WEMP', :EMP1.ENAME);

 Code the WHEN–VALIDATE–ITEM trigger of the DEPT.DEPT_NAME


and EMP1. ENAME fields as shown below :
 app_window.set_title(‘WDEPT’,:DEPT.DEPT_NAME);
 app_window.set_title(‘WEMP’, :EMP1. ENAME);

- 39 -
Coding Tabbed Regions

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Coding Tabbed Regions
 Definitions

Tabbed Region

Tab Page

Topmost Tab Page

Fixed Fields

Alternative Region Fields

Controls

- 41 -
… Coding Tabbed Regions
 Three Degrees of Coding Difficulty

Simple

– no scrolling or fixed fields


– no fields are repeated on different pages.
– these are typically separate blocks of the form
– place items directly onto the tab pages.

- 42 -
… Coding Tabbed Regions
Medium

– scrolling but no fixed fields


– no fields are repeated on different pages,
– scrollbars are required to allow access to all fields within a tab page.
– These tab pages are typically each separate blocks of the form.
– place items onto stacked canvases, in front of the tab pages, to facilitate scrolling of
fields.
– ”Fixed” (but not shared) objects such as block scrollbars and buttons can be placed
directly on the tab page in this case.

- 43 -
… Coding Tabbed Regions
Difficult

– fixed fields with or without scrolling


– place items onto stacked canvases, in front of the tab pages, to facilitate scrolling of
fields.
– An extra stacked canvas is required for the fixed fields, and additional code is
required in the tab handler.

- 44 -
… Implementing Tabbed Regions
 Creating the Layout in Forms Developer

Create the tab canvas.

Adjust the tab canvas. Sequence the canvas after the content canvas, and
before any stacked canvases that will appear in front of it.
Create the tab pages.

Adjust the tab pages. Apply the property class TAB_PAGE to each tab page.
Set the tab page labels.
Place your items on the appropriate tab pages.

Adjust your layout. Set the field prompts as properties of your fields as
appropriate.

- 45 -
… Implementing Tabbed Regions
 Coding Your Tab Handler
– FNDTABS.txt for the simple and medium cases
– FNDTABFF.txt for the fixed field case
These tab handlers can be downloaded from FND_TOP/resource
Call your tab handler from triggers.

– Add a form – level WHEN–TAB–PAGE–CHANGED trigger and call your new handler
– Add a Block – Level WHEN-NEW-ITEM-INSTANCE trigger and call your new handler,
 Execution hierarchy : before

- 46 -
Implementing Item Behavior

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Dependent Field
 To create a text item, check box, or poplist that is enabled only when a
master item is populated, use the procedure APP_FIELD.
SET_DEPENDENT_FIELD.
 The dependent item is either cleared or made invalid when the master
item changes.
 Steps:

Create your item handler procedures

Call your item handler procedures in WHEN–VALIDATE–ITEM and PRE–


RECORD

- 48 -
… Dependent Field
PACKAGE BODY DEPEND IS
PROCEDURE ENAME(EVENT VARCHAR2)IS
BEGIN
IF (EVENT = 'WHEN–VALIDATE–ITEM') THEN
fnd_message.debug('1');
JOB('INIT');
ELSE
fnd_message.debug('2');
APP_FIELD.SET_DEPENDENT_FIELD(EVENT,'EMP1.ENAME','EMP1.JOB');
END IF;
END ENAME;

PROCEDURE JOB(EVENT VARCHAR2) IS


BEGIN
IF ((EVENT = 'PRE–RECORD') OR (EVENT = 'INIT')) THEN
fnd_message.debug('3');
APP_FIELD.SET_DEPENDENT_FIELD(EVENT,'EMP1.ENAME','EMP1.JOB');
ELSE
fnd_message.debug('4');
APP_FIELD.SET_DEPENDENT_FIELD(EVENT,'EMP1.ENAME','EMP1.JOB');
END IF;
END JOB;

END;

- 49 -
Mutually Exclusive Fields
 Create your item handler procedure using the procedure
APP_FIELD.SET_EXCLUSIVE_FIELD
 Code a WHEN–VALIDATE–ITEM trigger on both the mutually exclusive
items and call the procedure
 Code a PRE-RECORD and WHEN-CREATE_RECORD trigger on block

- 50 -
Implementing Calendar

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
What is Calendar?
 The Calendar is a standard object that allows selection of date and time
values from a Calendar.
 Allows the developer to specify validation rules ensuring that only valid
dates can be selected.

- 52 -
Implementing Calendar
 Date fields should use the ENABLE_LIST_LAMP LOV,

 Set ’”Validate from List” to No on fields that use this LOV.

 Code Trigger: KEY–LISTVAL: calendar.show for each date field in the


calendar
 By default the calendar shows the current field

- 53 -
…Implementing Calendar (Display Only Mode)
Add following comment BEFORE calendar.show KEY–LISTVAL
calendar.setup(’DISPLAY’);
– calendar.setup(’TITLE’, null, null, ’<translated text for window
title>’);

- 54 -
…Implementing Calendar (Disable Weekends in the Calendar Window)

Add following comment BEFORE calendar.show in trigger: KEY–LISTVAL


calendar.setup(’WEEKEND’);

- 55 -
…Implementing Calendar (Disable Specific Date Ranges)
Add following comment BEFORE calendar.show in trigger: KEY–LISTVAL
 calendar.setup(<30 char identifying name>, <low_date>, <high_date>);

- 56 -
Enabling Query Behavior

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Enabling Query Behavior
 Implementing Row–LOV

 Implementing Find Windows

- 58 -
Enabling Query behavior
 Implementing Row–LOV

- 59 -
Implementing Row–LOV
 Create a Parameter for Your Primary Key

 Create an LOV and attach the return value as your parameter

 Create a block–level PRE–QUERY trigger (Execution Hierarchy: Before)

IF :parameter.G_query_find = ’TRUE’ THEN


<Primary Key> := :parameter.<Your parameter>;
:parameter.G_query_find := ’FALSE’;
END IF;

 Create a block–level user–named trigger QUERY_FIND on the results


block (Execution Hierarchy: Override) that contains:
– APP_FIND.QUERY_FIND(’<Your LOV Name>’);

- 60 -
Implementing Find Windows
 Copy the QUERY_FIND Object Group from APPSTAND

 After copying it, delete the object group.

 Rename the Block, Canvas and Window

 Edit the NEW Button’s Trigger with :


– app_find.new(’<Your results blockname here>’);

 Edit the FIND Button’s Trigger with :


– app_find.find(’<Your results blockname here>’);

 Set the Previous Navigation Data Block property of the Find block to be the
results block.
 Edit the KEY–NXTBLK Trigger same as FIND button’s trigger so that if user
presses Go -> Next Block the behavior should mimic the FIND button
 Change the Find Window Title

 Create Necessary Items


– Set the Required property to No
– Set the default value to NULL
– Attach the LOV and canvas
– Set the query length to 100 and change the data type accordingly

- 61 -
Implementing Find Windows
 Create a block–level Pre–Query trigger in the Results block (Execution
Hierarchy: Before) that copies query criteria from the Find window block
to the Results block (where the query actually occurs).
IF :parameter.G_query_find = ’TRUE’ THEN
COPY (<find Window field>,’<results field>’);
:parameter.G_query_find := ’FALSE’;
END IF;

 Create a block–level user–named trigger ”QUERY_FIND” (Execution


Hierarchy: Override) on the Results block that contains:
APP_FIND.QUERY_FIND(’<results block window>’, ’<Find window>’, ’<Find window
block>’);

- 62 -
Raising Query Find on Form Start Up
 At the end of your WHEN–NEW–FORM–INSTANCE trigger, call:
EXECUTE_TRIGGER(’QUERY_FIND’);

- 63 -
Implementing Flex Fields

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Implementing Descriptive FlexField
 Identify the table/view upon which the customization is based on. If
required create a new table with ATTRIBUTE and
ATTRIBUTE_CATEGORY fields
 Register the table using the AD_DD.REGISTER_TABLE and
AD_DD.REGISTER_COLUMN table registration API’s in Application
Object Library
 Register the flexfield using the Flexfield registration window (Oracle
Applications  Application Developer  Flexfields  Register). In the
form, enter the Application name, Name and Title of the DFF, Table
application where the table is registered and the table name. In the
Structure column field select the ATTRIBUTE_CATEGORY column.
 Define the segments using the segments window (Oracle Applications 
Application Developer  Flexfields 

….Contd

- 65 -
Implementing Descriptive FlexField
 Freeze the flexfield definition
 Code the DFF in the form. Create the hidden fields (DFF segments) in
the block. Set the query field size to 255 for the hidden fields
 Create the displayed field with the query length as 2000 and place it at
the canvas at the required position . Name it as DESC_FLEX .Attach
the ENABLE_LIST_LAMP LOV for the field. Set the Validate from LOV
property for the item as No.
 In the WHEN-NEW-FORM-INSTANCE trigger call the Flexfield
definition procedure.
FND_DESCR_FLEX.DEFINE(
BLOCK=>’block_name’,
FIELD=>’field_name’,
APPL_SHORT_NAME=>’DFF application_short_name’,
DESC_FLEX_NAME=>’descriptive flexfield_name’
);

- 66 -
Implementing Descriptive FlexField
 Invoke the standard flexfield calls in the form as shown :

Trigger
Trigger Standard procedure calls
Level

Form PRE-QUERY Fnd_flex.event(‘PRE-QUERY’);

Form POST-QUERY Fnd_flex.event(‘POST-QUERY’);

Form PRE- INSERT Fnd_flex.event(‘PRE-INSERT’);

Form PRE-UPDATE Fnd_flex.event(‘PRE-UPDATE’);

Form WHEN-VALIDATE-RECORD Fnd_flex.event(‘WHEN-VALIDATE-RECORD’);

Form WHEN-NEW-ITEM-INSTANCE Fnd_flex.event(‘WHEN-NEW-ITEM-INSTANCE’);

Form WHEN-VALIDATE-ITEM Fnd_flex.event(‘WHEN-VALIDATE-ITEM’);

- 67 -
Implementing Key FlexField
 Register the table using the AD_DD.REGISTER_TABLE and
AD_DD.REGISTER_COLUMN table registration API’s in Application
Object Library
 Create the hidden fields (ID Segment field) in the block. Set the query
field size to 2000 for the hidden field (ID Segment field).
 Create the displayed field with the query length as 2000 and place it at
the canvas at the required position.
 Also attach the ENABLE_LIST_LAMP LOV for the field. Set the
Validate from LOV property for the item as No.

- 68 -
Implementing Key FlexField
 In the WHEN-NEW-FORM-INSTANCE trigger call the Flexfield
definition procedure. The sample call is given below.
FND_KEY_FLEX.DEFINE(
BLOCK=>’block_name’,
FIELD=>’concatenated_segments_field_name’,
ID=>’Unique_ID_field’,
DATA_FIELD=>’concatenated_hidden_IDs_field’,
APPL_SHORT_NAME=>’application_short_name’,
CODE=>’key_flexfield_code’,
NUM=>’structure_number’ );

- 69 -
Implementing Key FlexField
 Invoke the standard flexfield calls in the form. The following table provides
all the calls that need to be coded in the form.

Trigger
Trigger Standard procedure calls
Level

Form PRE-QUERY Fnd_flex.event(‘PRE-QUERY’);

Form POST-QUERY Fnd_flex.event(‘POST-QUERY’);

Form PRE- INSERT Fnd_flex.event(‘PRE-INSERT’);

Form PRE-UPDATE Fnd_flex.event(‘PRE-UPDATE’);

Form WHEN-VALIDATE-RECORD Fnd_flex.event(‘WHEN-VALIDATE-RECORD’);

Form WHEN-NEW-ITEM-INSTANCE Fnd_flex.event(‘WHEN-NEW-ITEM-INSTANCE’);

Form WHEN-VALIDATE-ITEM Fnd_flex.event(‘WHEN-VALIDATE-ITEM’);

- 70 -
Controlling the Tool bar and Right Mouse
Menu

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Special Menus
 Oracle Provides facility to customize the menu to display application–
specific values. The menu supports up to forty–five application–specific
entries
 To Implement Special Menu
– Modify the form level PRE–FORM trigger:
 app_special.instantiate(’SPECIAL1’, ’&my_menu_entry’, ’bkord’);
– Add a form–level PRE–BLOCK trigger:
 app_special.enable(’SPECIAL1’,PROPERTY_OFF);
– Add a block level PRE–BLOCK trigger to the block in which you want to
enable your special menu entries:
 app_special.enable(’SPECIAL1’,PROPERTY_ON);
– Add a block level SPECIAL1 user–named trigger that contains code to
actually perform the function. It executes when the user chooses this menu
entry.

- 72 -
Customizing Right–Mouse Menus (Popup Menus)

 The default menu entries are:


Cut
Copy
Paste
––––––
Folder
––––––
Help

- 73 -
…Customizing Right–Mouse Menus (Popup Menus)
 Set POPUP MENU property at the Item level to “POPUP”

 Modify the item–level PRE–POPUP–MENU trigger using


APP_POPUP.INSTANTIATE(

option_name varchar2,
txt varchar2,
initially_enabled boolean default true,
separator varchar2 default null);

Example :
APP_POPUP.INSTANTIATE(’POPUP1’,’First Entry’);
APP_POPUP.INSTANTIATE(’POPUP2’,’Second Entry’, TRUE, ’LINE’);
APP_POPUP.INSTANTIATE(’POPUP3’,’Third Entry’, FALSE);

- 74 -
…Customizing Right–Mouse Menus (Popup Menus)
 Add a field level POPUP1 user–named trigger that contains code to
actually perform the required function. It executes when the user
chooses this menu entry.

- 75 -
Calling User Profiles

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
User Profiles
 A user profile is a set of changeable options that affects the way
applications run

- 77 -
Hierarchy in User Profiles

User

Responsibility

Application

Site

- 78 -
User Profile APIs
 FND_PROFILE.PUT (name IN varchar2, value IN varchar2);
– Puts a value to the specified user profile option. If the option does not exist, you can
also create it with PUT.

 FND_PROFILE.GET(name IN varchar2, value OUT varchar2);


– Gets the current value of the specified user profile option, or NULL if the profile does
not exist.

 FND_PROFILE.VALUE (name IN varchar2) return varchar2;


– VALUE works exactly like GET, except it returns the value of the specified profile
option as a function result.

- 79 -
CUSTOM.pll

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
Overview of CUSTOM.pll
 CUSTOM library is an Oracle Forms Developer PL/SQL library. It allows
developer to take full advantage of all the capabilities of Oracle Forms
Developer, and integrate your code directly with Oracle Applications
without making changes to Oracle Applications code.

- 81 -
CUSTOM Package
 The CUSTOM package contains the following functions and procedure:
– CUSTOM.ZOOM_AVAILABLE
– CUSTOM.STYLE
– CUSTOM.EVENT

- 82 -
CUSTOM.ZOOM_AVAILABLE
 If Zoom is available for this block, then return TRUE; otherwise return
FALSE.
 Always test for the form and block name. Refer to the SYSTEM
variables for form name and block name in your code and branch
accordingly. The module name of your form must match the form file
name.
 By default this routine must return FALSE.

- 83 -
CUSTOM.STYLE
 This function allows to determine the execution style for a product–
specific event if custom execution styles are supported for that product–
specific event.
 Available styles are :
– custom.before
– custom.after
– custom.override
– custom.standard

- 84 -
CUSTOM.EVENT
 This procedure allows to execute code at specific events.

 Always test for event name, then for form and block name within that
event.
 Refer to the SYSTEM variables for form name and block name in code
and branch accordingly.

- 85 -
Writing Code for CUSTOM.pll
 CUSTOM library is located in the AU_TOP/resource directory (or
platform equivalent).
 After writing code in the CUSTOM procedures, compile and generate the
library using Oracle Forms. Then place this library into
$AU_TOP/resource directory (or platform equivalent).
 The specification of the CUSTOM package in the CUSTOM library
cannot be changed in any way.
 New packages can be added to the CUSTOM library, but any packages
that are newly added to this library must be sequenced after the
CUSTOM package.
 No SQL can be used in the library. However, a record group can be
used to issue SELECT statements.
 Use calls to stored procedures for any other DML operations such as
updates, inserts, or deletes.

- 86 -
Writing Code for CUSTOM.pll
 Other libraries can be attached to CUSTOM.pll, except APPCORE.pll
because it would cause a recursion problem (because CUSTOM is
attached to APPCORE). As of Oracle Applications Release 11i, attach
the APPCORE2 library to CUSTOM.

- 87 -
PL/SQL APIs for Concurrent Processing

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
FND_CONCURRENT Package
 FND_CONCURRENT.AF_COMMIT
– FND_CONCURRENT.AF_COMMIT executes the COMMIT command for the
specified rollback segment. This rollback segment must be defined in the Define
Concurrent Program form.

 FND_CONCURRENT.AF_ROLLBACK
– FND_CONCURRENT.AF_ROLLBACK executes the ROLLBACK command for the
specified rollback segment.

 FND_CONCURRENT.GET_REQUEST_STATUS
– Returns the status of a concurrent request. If the request has already completed, also
returns a completion message.

 FND_CONCURRENT.WAIT_FOR_REQUEST
– Waits for request completion, then returns the request phase/status and completion
message to the caller. Goes to sleep between checks for request completion.

- 89 -
FND_FILE package
 FND_FILE.PUT_LINE
– Arguments :
 which
 Buff

 FND_FILE.NEW_LINE
– Arguments (input)
 which
 Lines

 FND_FILE.PUT_NAMES
– Arguments (input)
 p_log
 p_out
 p_dir

 FND_FILE.CLOSE

- 90 -
FND_REQUEST. SUBMIT_REQUEST
 Arguments
– (application IN varchar2 default NULL,
– program IN varchar2 default NULL,
– description IN varchar2 default NULL,
– start_time IN varchar2 default NULL,
– sub_request IN boolean default FALSE
– argument1,
– argument2, ..., argument99,
– argument100) return number;

- 91 -
FND_REQUEST.SET_REPEAT_OPTIONS
 Arguments
– repeat_time
– repeat_interval
– repeat_unit
– repeat_type
– repeat_end_time

- 92 -
<Summary at the end of the course>

© 2003 Infosys Technologies Ltd. Strictly private and confidential.


No part of this document should be reproduced or distributed without the prior permission of Infosys Technologies Ltd.
“I CAN ONLY SHOW YOU THE WAY ,
YOU HAVE TO WALK THROUGH IT “
- Morphis to Neo

- 94 -

You might also like