Basic Introduction To Custom - PLL PL/SQL Library File
Basic Introduction To Custom - PLL PL/SQL Library File
Reference Manual
January, 2015
Contents
Table of Contents
1. Introduction to Custom.pll:..............................................................................................................................3
4. Hands – On Exercises:....................................................................................................................................13
1. Introduction to Custom.pll:
Video 1 – Introduction to Custom.pll
What is CUSTOM.pll
CUSTOM.pll is a collection of PL/SQL stored procedures, functions and
packages which are used for customizing the pre – seeded Oracle
Application Form Modules as per the business requirements without
modifying the existing code written inside the Form Module.
The Custom Library is an Oracle Forms PL/SQL Library File. It allows us
to take full advantage of all the capabilities of the Developer Suite of
products.
Function 1: ZOOM_AVAILABLE
This function allows us to specify if Zooms exists for the current context.
If Zooms exists for the block referred to in the PL/SQL code
then return TRUE else return FALSE. By default this routine must return
FALSE.
Function 2: STYLE
This function returns integer value. This function allows us to override
the execution style of product specific events but doesn’t affect generic
events like WHEN-NEW-FORM-INSTANCE. By default it returns
CUSTOM.STANDARD.
Procedure 3: EVENT
This procedure allows you to execute your code at specific events
including:
ZOOM
WHEN-NEW-FORM-INSTANCE
WHEN-NEW-BLOCK-INSTANCE
WHEN-NEW-RECORD-INSTANCE
WHEN-NEW-ITEM-INSTANCE
WHEN-VALIDATE-RECORD
By default this routine must perform NULL.
Sample Code:
procedure event (event_name varchar2)
is
form_name VARCHAR2 (30):=name_in (‘system.current_form’);
block_name VARCHAR2 (30):=name_in (‘system.cursor_block’);
begin
if (form_name = <form_name> and block_name=<block_name>) then
If (event_name=’WHEN-NEW-FORM-INSTANCE’) then
** Write PL/SQL Code Here **
elsif (event_name = ‘WHEN-VALIDATE-RECORD’) then
** Write PL/SQL Code Here **
else
null;
end if;
end if;
end;
Transfer CUSTOM.pll to $AU_TOP/resource directory :
Once we have written the code in CUSTOM.pll we need to compile this
and convert it to CUSTOM.plx file for Oracle Applications to read the
.plx file and apply the changes.
Once we run the command the system will compile all the program
units under CUSTOM.pll library file and create an executable file in the
name of CUSTOM.plx.Oracle e-Business Suite reads this CUSTOM.plx
for applying the changes done to the CUSTOM.pll depending on the
events handled.
Solution:
Execution Flow Path:
Step 1 – Copy the complete resource directory located under the
$APPL_TOP/au/12.0.0 directory to the client machine.
Step 2 - Open the CUSTOM.pll Library File from the directory to which
you had earlier copied using Oracle Forms Builder.
Step 3 – Expand the Program Units under the CUSTOM residing under
the PL/SQL Libraries section in Oracle Forms Builder.
Step 4 – Open the desired Application Form from Oracle e-Business
Suite.
For Example Mass Allocation Workbench Form under Oracle General
Ledger.
Switch Responsibility to General Ledger Super User.
Go to Journals – Define – Allocations.
Go to Help – About Oracle Applications and scroll down to locate the
.fmx file name of the form opened.
Under the Current Form section in the Form Name you will find the form
name For example – Form Name: GLXMADEF
Mention this form name in the coding section of the CUSTOM.pll
Note: Do not change the commented code in the Package Body and in
the Event procedure.
Step 6 – Save and Compile the CUSTOM.pll file.
To compile the CUSTOM.pll file press Shift + Ctrl + K to do All
Compilation as mentioned below
Step 7 – Move the changes made to the CUSTOM.pll file to
$AU_TOP/resource directory and convert the CUSTOM.pll to
CUSTOM.plx.
Open the WinSCP Software to access the server file system.
Navigate to the client location where the CUSTOM.pll resides.
Right – Click on the CUSTOM.pll and click on Copy
Step 8 – Access the Linux Box using putty software and navigate to
$APPL_TOP/au/resource directory to compile and convert the
CUSTOM.pll to CUSTOM.plx using frmcmp_batch linux command.
Solution:
Execution Flow Path:
Step 1 – We assume here that the resource directory from the AU_TOP
directory is already copied to the client machine as explained in the
earlier example
Step 2 - Open the CUSTOM.pll Library File from the directory to which
you had earlier copied using Oracle Forms Builder.
Step 3 – Expand the Program Units under the CUSTOM residing under
the PL/SQL Libraries section in Oracle Forms Builder.
Note: Do not change the commented code in the Package Body and in
the Event procedure.
Exercise 3: Change the property of an Item to Non – Enterable of a
Form Field
Exercise Task:
Follow the steps mentioned in the earlier example. Through the
customization code using CUSTOM.pll we are supposed to change the
property of the item ‘Description’ Field to Non – Enterable in the
Mass Allocation Workbench Form under General Ledger
Responsibility.
Solution:
Execution Flow Path:
Step 1 – We assume here that the resource directory from the AU_TOP
directory is already copied to the client machine as explained in the
earlier example
Step 2 - Open the CUSTOM.pll Library File from the directory to which
you had earlier copied using Oracle Forms Builder.
Step 3 – Expand the Program Units under the CUSTOM residing under
the PL/SQL Libraries section in Oracle Forms Builder.
Note: Do not change the commented code in the Package Body and in
the Event procedure.