You are on page 1of 9

Custom.

pll
1.

2.
3.

Custom library or custom.pll give the programmer a flexibility to add code on allowed custom events . As custom .pll is general for all the forms that open in application , you have to specify in you code , the exact form name , block name , item name and event name where the code should execute. However not all the events are supported in custom .pll but you can very control the behaviour of object and add logic to some extent with the help of custom .pll coding You should customize the custom.pll but should not change the file name. It is a collection of 2 functions (Zoom, Style) and one procedure. PACKAGE custom IS function zoom_available return BOOLEAN; function style(event_name varchar2) return integer; procedure event(event_name varchar2); before constant integer := 1; after constant integer := 2; override constant integer := 3; standard constant integer := 4; END custom;

ZOOM

1. This function allows you to specify if zooms exist for the current context. If zooms are available for this block, then return TRUE; else return FALSE 2. This routine is called on a per-block basis within every Applications form from the WHEN-NEW-BLOCK-INSTANCE trigger. Therefore, any code that will enable Zoom must test the current form and block from which the call is being made. /* Sample code: Function zoom_available return Boolean is form_name varchar2(30) := name_in('system.current_form'); block_name varchar2(30) := name_in('system.cursor_block'); begin if (form_name = 'DEMXXEOR' and block_name = 'ORDERS') then return TRUE; else return FALSE; end if; end zoom_available; */

STYLE
1. This function allows you to determine the execution style for some product-specific events. You can choose to have your code execute before, after, or in place of the code provided in Oracle Application 2. By default this routine must return custom.standard /* Sample code: begin if event_name = 'OE_LINES_PRICING' then return custom.override; else return custom.standard; end if; end style; */

EVENT /* Sample code: form_name varchar2(30) := name_in('system.current_form'); block_name varchar2(30) := name_in('system.cursor_block'); param_to_pass1 varchar2(255); param_to_pass2 varchar2(255); begin -- Zoom event opens a new session of a form and -- passes parameter values to the new session. The parameters -- already exist in the form being opened. if (event_name = 'ZOOM') then if (form_name = 'DEMXXEOR' and block_name = 'ORDERS') then param_to_pass1 := name_in('ORDERS.order_id'); param_to_pass2 := name_in('ORDERS.customer_name'); fnd_function.execute(FUNCTION_NAME=>'DEM_DEMXXEOR', OPEN_FLAG=>'Y', SESSION_FLAG=>'Y', OTHER_PARAMS=>'ORDER_ID="'||param_to_pass1|| '" CUSTOMER_NAME="'||param_to_pass2||'"'); -- all the extra single and double quotes account for -- any spaces that might be in the passed values end if; Cont..

-- This is an example of a product-specific event. Note that as -- of Prod 15, this event doesn't exist. elsif (event_name = 'OE_LINES_PRICING') then get_custom_pricing('ORDERS.item_id', 'ORDERS.price'); -- This is an example of enforcing a company-specific business -- rule, in this case, that all vendor names must be uppercase. elsif (event_name = 'WHEN-VALIDATE-RECORD') then if (form_name = 'APXVENDR') then if (block_name = 'VENDOR') then copy(upper(name_in('VENDOR.NAME')), 'VENDOR.NAME'); end if; end if; else null; end if; end event; */

Applications. These events are:


ZOOM WHENFORMNAVIGATE WHENNEWFORMINSTANCE WHENNEWBLOCKINSTANCE WHENNEWITEMINSTANCE WHENVALIDATERECORD

Command to generate the custom.plx f60gen $CUSTOM_TOP/resource/CUSTOM.pll username/passwd(of oracle) module_type=LIBRARY output_file=$CUSTOM_TOP/CUSTOM.plx

Form customization process

1) Identify the form in Oracle Apps that needs to be customized. 2) Go to the specific directory on one of the mid-tiers to get that forms executable. Say from $AU_TOP/forms/US/POENTRY.fmb. 3) FTP that form and all its dependable form objects & pll files to your PC. 4) Open the form, ensuring that you do not receive any errors pertaining to missing library or missing form object. 5) Perform a save-as to rename this form on your pc, using your company's naming conventions. 6) Make the desired modifications to the form. 7) Generate the form on PC using Control-T keystrokes. This will ensure that nothing critical has been missed out. Surely you will need to connect to apps schema before generating the form. 8) FTP the form file to $XXPO_TOP/forms/US Surely, this XX will be replaced by the naming convention at your client/company.

Cont..

Form customization process


9) cd to $XXPO_TOP/forms/US 10) And f60gen on XXPOENTRY.fmb Cont.. This will create a file executable as XXPOENTRY.fmx. 11) Go to Application Developer responsibility. Menu >applicaton>form. Register the form in the custom application. 12) Register the Forms Function. 13) Attached the form function to custom Menu/ Std menu. 14) If You add to the custom menu then add the menu to the custom responsibility and responsibility to the user.

You might also like