8/8/2019 Custom Library Presentation
1/22
BOSS 2002 Fal l OAUG
BOSS 2002
Enhance Your Oracle Applications
Using the CUSTOM Library2002 Fall OAUG
San Diego
Scott Spivey
BOSS Corporation
8/8/2019 Custom Library Presentation
2/22
BOSS 2002 Fal l OAUG
BOSS 2002
CUSTOM PL/SQL Library
What is the CUSTOM Library
How can it be used
Limitations
Real Life Examples
8/8/2019 Custom Library Presentation
3/22
BOSS 2002 Fal l OAUG
BOSS 2002
CUSTOM library: What is it??
PL/SQL library for use with Oracle Formsto enhance the functionality of the Oracle
Applications.
Supplied by Oracle with the Applications
Designed to be altered by the customer
Implementation is supported byOracle Support
8/8/2019 Custom Library Presentation
4/22
BOSS 2002 Fal l OAUG
BOSS 2002
Usage
Allows standard PL/SQL commands
- Cursor operations- Branch logic
- Server-side procedure calls
Allows Oracle Forms built-ins- Name_in
- Set_item_property
- Set_record_property
8/8/2019 Custom Library Presentation
5/22
BOSS 2002 Fal l OAUG
BOSS 2002
Usage - continued
Automatic transfer from Forms for
triggering events
- New item, record, block, form
- Form navigation, commits
Runs within Forms processing
- Automatically attached to all Oracle Applicationsforms
8/8/2019 Custom Library Presentation
6/22
BOSS 2002 Fal l OAUG
BOSS 2002
Usage - continued
Attach other libraries (not APPCORE)
- Add other user developed libraries
Create additional packages, after
CUSTOM package
- Add other user developed routines availablefor all Oracle Applications forms
8/8/2019 Custom Library Presentation
7/22
BOSS 2002 Fal l OAUG
BOSS 2002
Limitations
No SQL allowed
- No selects, updates, deletes, inserts
- Should use record cursors
- Use server-based logic for DDL, DML
Caution when using ZOOM feature- Use FND_FUNCTION instead of
CALL_FORM
8/8/2019 Custom Library Presentation
8/22
BOSS 2002 Fal l OAUG
BOSS 2002
Limitations - continued
Loaded only once for a session
Can not change the specifications- CUSTOM package must be first in library
- Beware of re-arranging packages when
converting from a .pld file
8/8/2019 Custom Library Presentation
9/22
BOSS 2002 Fal l OAUG
BOSS 2002
Limitations - continued
For use within Oracle Applications only Not used with Self Service Web Apps
Overwritten during upgrades- Suggest using custom directory for any changes
- Alter FORMS60_PATH variable to includecustom directory, must be before AU_TOP
directory
8/8/2019 Custom Library Presentation
10/22
BOSS 2002 Fal l OAUG
BOSS 2002
Events - Generic
WHEN-FORM-NAVIGATE- Fired whenever the cursor moves within a form
WHEN-NEW-FORM-INSTANCE- Fired once upon entering a new form
WHEN-VALIDATE-RECORD
- Fired when ever the record is saved
8/8/2019 Custom Library Presentation
11/22
BOSS 2002 Fal l OAUG
BOSS 2002
Events - Generic
WHEN-NEW-BLOCK-INSTANCE- Fired once upon entering a block
WHEN-NEW-RECORD-INSTANCE- Fired once when creating a new record
WHEN-NEW-ITEM-INSTANCE- Fired once when creating a new item
8/8/2019 Custom Library Presentation
12/22
BOSS 2002 Fal l OAUG
BOSS 2002
Events - Generic
SPECIALn
- After any existing SPECIALn logic
ZOOM
- Used to open a new form
- One way movement of data
EXPORT
- Occurs after the Export feature is complete
KEY-Fn
- Fires when function key pressed
8/8/2019 Custom Library Presentation
13/22
BOSS 2002 Fal l OAUG
BOSS 2002
Events - AOL
When-Logon-Changed
When-Password-Changed When-Responsibility-Changed
8/8/2019 Custom Library Presentation
14/22
BOSS 2002 Fal l OAUG
BOSS 2002
Events - HRMS
WHEN-CREATE-RECORD
PRE-INSERT
POST-DELETE
WHEN-FORM-NAVIGATE
POST-QUERY
PRE-DELETE
POST-FORMS-COMMIT
WHEN-BUTTON-
PRESSED
KEY-DELREC
POST-UPDATE
PRE-UPDATE
POST-INSERT
NAVIGATE
8/8/2019 Custom Library Presentation
15/22
BOSS 2002 Fal l OAUG
BOSS 2002
Examples
Enforce Business Rules- Data entry requirements
Secure standard Oracle Applicationfeatures
- Hide buttons based upon security levels
Enforce naming standards- Force uppercase on suppliers, customers,etc
8/8/2019 Custom Library Presentation
16/22
BOSS 2002 Fal l OAUG
BOSS 2002
Enforce Business Rules
If (event_name = 'WHEN-NEW-RECORD-INSTANCE')
And (form_name = 'APXVDMVD') THEN
If (USER_HAS_RESP(fnd_global.user_id, 'Vendor Maint')
ThenSET_ITEM_PROPERTY('SITE.VENDOR_SITE_CODE',UP
DATEABLE,PROPERTY_TRUE);
Else
SET_ITEM_PROPERTY('SITE.VENDOR_SITE_CODE',UPDATEABLE,PROPERTY_FALSE);
End If;
End If; -- EVENT NEW-RECORD
8/8/2019 Custom Library Presentation
17/22
BOSS 2002 Fal l OAUG
BOSS 2002
Secure Standard Features
-- Turn off the Reserve/Unserve functionality
If event_name = 'WHEN-NEW-FORM-INSTANCE' Then
If form_name = 'POXPOEPO'
And (block_name = 'PO_APPROVE') then
SET_ITEM_PROPERTY('PO_APPROVE.UNRESERVE',DISPLAYED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('PO_APPROVE.UNRESERV
E_DATE',DISPLAYED,PROPERTY_FALSE);End If;
End If; -- New form
8/8/2019 Custom Library Presentation
18/22
BOSS 2002 Fal l OAUG
BOSS 2002
Enforce Naming Standards
IF (form_name = 'APXINWKB') THEN
IF LENGTH( name_in('INV_SUM_FOLDER.INVOICE_NUM')) > 20
AND GET_ITEM_PROPERTY( 'INV_SUM_FOLDER.INVOICE_NUM',UPDATE_COLUMN ) = 'TRUE THEN
V_REC_NUM := name_in('SYSTEM.CURSOR_RECORD');
SET_RECORD_PROPERTY(V_REC_NUM,'INV_SUM_FOLDER',STATUS,NEW_STATUS);
fnd_message.set_name('FND','Invoice Number must be 20 characters orless');
fnd_message.Error;
RAISE FORM_TRIGGER_FAILURE;
END IF;
END IF;
8/8/2019 Custom Library Presentation
19/22
BOSS 2002 Fal l OAUG
BOSS 2002
More Info
Oracle Applications Developers Guide
Actual code resides in
$AU_TOP/resource
8/8/2019 Custom Library Presentation
20/22
BOSS 2002 Fal l OAUG
BOSS 2002
Who is BOSS?
AboutBOSS Corporation- BOSS is an acronym that stands for BetterOrganizationService
Solutions
- Founded in 1995 by Stephen Adams and Jim Crum
- Both Stephen and Jim were responsible for Oracle consulting in
the Southeast US for Oracle Corporation before forming BOSS
- BOSS service lines are sharply focused on Oracle Application
implementations; Financials, HR/Payroll and Manufacturing,
technology consulting, and database administration services
- Headquarters are located in Atlanta, with additional offices in
Dallas, Pittsburgh, Raleigh, and Redwood Shores
8/8/2019 Custom Library Presentation
21/22
BOSS 2002 Fal l OAUG
BOSS 2002
AboutBOSS Corporation
- Author of two Oracle Application books
Special Edition: Using Oracle Applications
Special Edition: Using Oracle 11i
- Major sponsor at OAUG conferences; National, European,and many regional and local groups
Eleven presentations, papers and panel involvementFall 2001 OAUG in San Diego
Fourteen presentations, papers and panel involvementat Spring 2002 OAUG in San Diego
Ten presentations, papers and panel involvement atFall 2002 OAUG in San Diego
8/8/2019 Custom Library Presentation
22/22
BOSS 2002 Fal l OAUG
BOSS 2002
Scott [email protected]
www.bosscorporation.comAtlanta: 770.622.5500