100% found this document useful (1 vote)
968 views28 pages

Basic Introduction To Custom - PLL PL/SQL Library File

This document provides an introduction and reference manual for the Custom.pll PL/SQL library file used for customizing Oracle e-Business Suite applications. It discusses what the Custom library is, how it works, the events it can trap, prerequisites, and steps for modifying the file including locating it, making changes, compiling, and testing customizations. Key aspects covered include using the Custom library to call other forms, enforce business rules, and disable fields without modifying existing code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
968 views28 pages

Basic Introduction To Custom - PLL PL/SQL Library File

This document provides an introduction and reference manual for the Custom.pll PL/SQL library file used for customizing Oracle e-Business Suite applications. It discusses what the Custom library is, how it works, the events it can trap, prerequisites, and steps for modifying the file including locating it, making changes, compiling, and testing customizations. Key aspects covered include using the Custom library to call other forms, enforce business rules, and disable fields without modifying existing code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 28

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

Video 1 – Introduction to Custom.pll..................................................................................................................3

2. Building Blocks of Custom.pll...........................................................................................................................5

Video 2 – Building Blocks of Custom.pll..............................................................................................................5

3. Steps to modify CUSTOM.pll:...........................................................................................................................7

Video 3 – Steps to modify CUSTOM.pll...............................................................................................................7

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.

Why it’s used:


Oracle e-Business Suite is shipped with Pre – Seeded Products/Modules
and Applications which is tailored to meet the requirements of any
industry.
As the business expands with growth happening periodically in the
organization, products and applications pre – installed in Oracle e-
Business Suite might not be able to address to new changes happening in
the business.
In order to address these new business changes Oracle e-Business Suite
allows us to customize the Application according to each organization’s
requirements.
Oracle e-Business Suite Modules comes with pre – seeded
Oracle Form Modules. These Forms Modules reside under the
$APPL_TOP/au/forms directory in the server in .fmb file extensions.
As discussed earlier if the organization would want to customize the
Oracle Application package to suit its business needs, it would want some
facility in Oracle Application to meet the customization requirement.
One such requirement is Customization of Forms using CUSTOM.pll
The CUSTOM.pll Library File allows extension and customization of
Oracle Applications without modification of Oracle Application Forms.
We can use the Custom Library for customization such as:
 Calling other Oracle Application Forms.
 Enforcing Business Rules
 Disabling fields in Oracle Application Forms.

How does CUSTOM.pll work:


In Oracle Application every form having Form Level Trigger makes a call
to the CUSTOM.pll
Standard Event Triggers in these Forms call the APPCORE2.pll routines
which in turn call the Custom Library File.
CUSTOM.pll is attached to APPCORE2.pll and this APPCORE2.pll is
attached to all the Oracle Application Forms by default.
In short this Custom Library File is global to all the Oracle e-Business
Suite products.

Scenarios where CUSTOM.pll can work:


CUSTOM.pll is used to add extensions to Oracle’s Form functionality.
Some of the common scenarios where CUSTOM.pll can be used are:
 Enable/Disable the Fields
 Changing the List of Values in a LOV field at runtime
 Defaulting Values for fields
 Additional Record Level Validations
 Navigation to other Forms
 Enabling Special Menus
2. Building Blocks of Custom.pll
Video 2 – Building Blocks of Custom.pll

Events that are trapped using CUSTOM.pll:


Following are the events or built – ins that is trapped using CUSTOM.pll:
 WHEN-FORM-NAVIGATE
 WHEN-NEW-FORM-INSTANCE
 WHEN-NEW-BLOCK-INSTANCE
 WHEN-NEW-RECORD-INSTANCE
 WHEN-NEW-ITEM-INSTANCE
 WHEN-VALIDATE-RECORD
 SPECIALn (where n is a number between 1 and 45)
 ZOOM
 EXPORT
 KEY-Fn (where n is a number between 1 – 8)
Prerequisites:
The Built – Ins of CUSTOM.pll are internally called by the Built – Ins of a
pre – seeded Oracle Forms PL/SQL Library File APPCORE.pll
For CUSTOM.pll to work according to the business requirement we would
have to attach the following PL/SQL Library File:
 FNDSQF.pll
 APPCORE2.pll
CUSTOM.pll makes a reference to FNDSQF.pll file if we use the Flexfield
routines, Message Dictionary routines, Multi – Org routines, FND Standard
WHO column routines etc…
CUSTOM.pll also makes a reference to APPCORE2.pll if we use
built – ins to enable/disable fields in a particular form.
3. Steps to modify CUSTOM.pll:
Video 3 – Steps to modify CUSTOM.pll

Following list the steps to modify the CUSTOM.pll Library File:


1. Locate the CUSTOM.pll which resides in $AU_TOP/resource
directory.
2. Copy the file to the local directory
3. Take a backup of the original CUSTOM.pll residing in
$AU_TOP/resource directory by renaming the file according to
naming conventions.
4. Open Oracle Forms Builder Application.
5. Click on File – Open to locate the CUSTOM.pll file from local
directory
6. You will find the CUSTOM.pll under the PL/SQL Program Units
Section
7. Double Click on the CUSTOM Package Body to open the PL/SQL
Program Unit section
8. Make the changes as required with proper comments and version
controls
9. We are not supposed to make any changes to Package
Specifications and Package Body
10. Write the PL/SQL code under the ‘EVENT’ procedure.
11. Once we are done with writing the PL/SQL code move the
updated CUSTOM.pll file to $AU_TOP/resource directory
12. Login to Linux/Unix Box using TELNET/PUTTY software.
13. Navigate to $AU_TOP/resource directory
14. Use the following command to create executable file
CUSTOM.plx
15. frmcmp_batch Module=CUSTOM.pll Userid=apps/apps
Module_Type=LIBRARY compile_all=YES
16. Login to Oracle e-Business Suite to see the changes
incorporated.
Enable Show Custom Events:
For CUSTOM.pll to work in Oracle e-Business Suite we need to enable
Show Custom Events option.
The Show Custom Events option helps a developer to control the
customizations done through CUSTOM.pll
We can toggle between On and Off in Show Custom Events.
Access to Enable Show Custom Events is further controlled through a
Profile Option FND: Show Diagnostics – Set the value either to Yes or No.
If the value is set to Yes we can access the Enable Show Custom Events.
If the value is set to No we will not be able to access the Enable Show
Custom Events.
Gather Information:
Gathering information phase is one of the most important phases in
CUSTOM.pll.
Before starting the customization we need to gather the following:
1. The Form Name/Function Name for which we need to apply the
customization
Retrieve the form name by navigating to
Help > About Oracle Applications. Scroll down to find the Forms
Path wherein the Form Name will be mentioned along with .fmx
extension
2. The Block Name.
Retrieve the Block Name by navigating to
Help > Diagnostics > Examine
3. Field Name
4. Customization
5. When Customization will be executed. Eg When the Form is
opened.
WHEN-NEW-FORM-INSTANCE
Write Code in CUSTOM.pll:
Open the CUSTOM.pll file using Oracle Forms Builder and make
appropriate changes in the EVENT Procedure under the Custom
Package.
While writing code inside CUSTOM.pll we should consider the following
things:
 We should not run any SQL statement inside this.
 We should not perform any DML operations instead we should call
database procedure and functions for the same.
Locate the CUSTOM.pll which resides in $AU_TOP/resource directory.
Copy the file to the local directory and take a backup of the original
CUSTOM.pll which resides in $AU_TOP/resource directory by
renaming the file according to naming conventions.
Open Oracle Forms Builder Application. Click on File – Open to locate
the CUSTOM.pll file from local directory. You will find the CUSTOM.pll
under the PL/SQL Program Units Section.
Double Click on the CUSTOM Package Body to open the PL/SQL
Program Unit section. Make the changes as required with proper
comments and version controls. We are not supposed to make any
changes to Package Specifications and Package Body. Write the
PL/SQL code under the ‘EVENT’ procedure.

Custom Library contains Custom Package which is having two


functions and one procedure.

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.

Copy the CUSTOM.pll file to $AU_TOP/resource directory either using


ftp or Winscp file transfer software.
Login to Linux/Unix Box using Putty or Telnet software. Go to
$AU_TOP/resource directory.
Run the below mentioned command to compile and convert the
CUSTOM.pll to CUSTOM.plx (Executable File)
frmcmp_batch Module=CUSTOM.pll Userid=apps/apps
Module_Type=LIBRARY compile_all=YES

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.

Test your Changes:


Once we make all the necessary changes to CUSTOM.pll, compile the
.pll file and generate the .plx file accordingly.
Since the CUSTOM Library is loaded once for a given session, a user
must log out of Oracle e-Business Suite and Sign – On again before
any changes will become apparent
4. Hands – On Exercises:

Exercise 1: Display a Custom Message as ‘Mass Allocation Workbench’


In Define Mass Allocations in General Ledger Module
Exercise Task:
Identify the Oracle Application Form Name for which you are going to
call the custom message through CUSTOM.pll.Open the
CUSTOM.pll Library File in Oracle Forms under the PL/SQL Program
Units. Change the EVENT procedure under the CUSTOM package
by including the appropriate code for oracle applications to display
any custom message at runtime.

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

Step 5 – Double Click the CUSTOM (Package Body) to open the


CUSTOM package body. Go to the EVENT procedure to start writing
the code.
Scroll down to the ‘Real Code starts here’ section as mentioned in the
diagram below.

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.

Once the system compiles the CUSTOM.pll, it converts it to


CUSTOM.plx for the Oracle Application server to read the CUSTOM.plx
file.
Step 9 – Login to Oracle e-Business Suite and go to General Ledger
Super User Responsibility.Navigate to Journals – Define – Allocations
Form.
Exercise 2: Make a Field Mandatory or Required
Exercise Task:
Follow the steps mentioned in the earlier example. Through the
customization code using CUSTOM.pll we are supposed to make the
‘Description’ Field Mandatory/Required 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.

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
Identify the Block Name where the ‘Description’ field is located.
Go to Help – Diagnostics – Examine. If prompted for password enter
‘APPS’.
Click on Field to display the list of items belonging to the particular
block. You will find the field ‘Description’ in the list of values.
We will have to mention this Block Name ‘ALLOC_BATCH’ and item
name ‘DESCRIPTION’ in the CUSTOM.pll coding.
Step 5 – Double Click the CUSTOM (Package Body) to open CUSTOM
package body.Go to the EVENT procedure to start writing the code.
Scroll down to the ‘Real Code starts here’ section as mentioned in the
diagram below.

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.

Step 4 – Refer to the earlier example’s Step 4.


Step 5 – Double Click the CUSTOM (Package Body) to open CUSTOM
package body.Go to the EVENT procedure to start writing the code.
Scroll down to the ‘Real Code starts here’ section as mentioned in the
diagram below.

Note: Do not change the commented code in the Package Body and in
the Event procedure.

You might also like