Thursday, 8 October 2015

How to compile Custom.pll in R12


Custom.pll and Personalization

Nowadays business users is providing new requirements.Sometimes we can achive this requirements through custom.pll or personalization.
Custom Library (custom.pll) allows to extend/customize Oracle Applications form(Oracle Form) without changing or modifying Oracle Applications code. Examples may include enforcing a new business rule, opening a form using zoom etc. Most of the things that we can do using custom.pll, we can achieve that using Forms Personalization. Since Custom.pll takes the full advantage of PL/SQL so it is having an edge over Forms Personalization for complex customizations.
CUSTOM.pll is used to add extensions to Oracle’s form Functionality. Some of the common scenarios where CUSTOM.pll can be used are:-
1. Enabling/Disabling the fields
2. Changing the List of Values in a LOV field at runtime,but we cannot add  the new column in standard LOV
3. Defaulting values
4. Enabling Special Menu

Custom.pll is located in $AU_TOP/resource Directory where we can download the pll file as per requirements and add or modify the code using Form builder in the program units.


How to compile this PLL?
Once you make changes you need to compile the pll. Use the F60gen to compile it at 11i version
f60gen module=custom.pll userid=APPS/ output_file=$AU_TOP/resource/custom.plx module_type=library batch=no compile_all=special

for R12 the compilation command is given below

frmcmp_batch module=CUSTOM.pll userid=apps/apps output_file=CUSTOM.plx module_type=LIBRARY batch=yes compile_all=special
 
frmcmp_batch module=$AU_TOP/forms/US/XX_DRI_INC.fmb userid=apps/devapps output_file=$XXJERI_TOP/forms/US/XX_DRI_INC.fmx compile_all=special batch=yes

How to change the title of  standard LOV in Form.

Generally In forms, LOV is using for displaying the values, so that it is easily for user to choice and select the value.
rg_id RECORDGROUP;
rg_name VARCHAR2(100) := 'XXRO_SERIAL_NUM';
v_sql_string VARCHAR2(32000);
errcode NUMBER;
l_error_message VARCHAR2(200);
the_rowcount NUMBER;
v_lov      lov;
v_rec_pos number;
form_name  varchar2(30) := name_in('system.current_form');
item_name  varchar2(30) := name_in('system.current_item');
block_name varchar2(30) := name_in('system.current_block');
IF (event_name = 'WHEN-NEW-ITEM-INSTANCE') THEN
  v_rec_pos := 2;
   IF (form_name    = 'XXCUSTOM') THEN
   v_rec_pos := 3;
   IF (block_name = 'FIND_BASIC')THEN       
BEGIN
 rg_id := Find_Group( rg_name);
IF Id_Null(rg_id) THEN
                rg_id := Create_Group_From_Query
                (rg_name,
                'select serial_number,inventory_item_id ,item,"description" '
                 ||' from (select distinct decode(a.customer_product_id,'||''' '''||',a.serial_number,'
   ||' cp.serial_number) serial_number, a.inventory_item_id, '
   ||' b.concatenated_segments item, cp.external_reference "description" '
   ||' from csd_repairs a, mtl_system_items_kfv b,csi_item_instances cp '
   ||' where a.inventory_item_id = b.inventory_item_id '
   ||' and b.organization_id = cs_std.get_item_valdn_orgzn_id '
   ||' and a.CUSTOMER_PRODUCT_ID = cp.INSTANCE_ID(+))'
   ||' where serial_number is not null '
   ||' order by 1');
             
  END IF;
errcode := Populate_Group(rg_id);
v_lov    := find_lov('RO_SERIAL_NUM');
 
  set_lov_column_property(v_lov, 4, TITLE, 'Chassis Number');  
IF get_lov_property(v_lov,group_name) = 'RO_SERIAL_NUM' THEN
     set_lov_property(v_lov,group_name,rg_name);
 END IF;
 END IF;
 END IF;
 END IF;
END;
 

No comments:

Post a Comment