Social Icons

Wednesday, July 24, 2013

LOV Changes using CUSTOM.PLL


Hi,

Here i am discussing about the topic how to change the LOV Query and how to change the LOV column Title using CUSTOM.pll. The second one is very simple thing

For changing the LOV Column title, first you need to know the LOV name and column position. After knowing these two, download the CUSTOM.pll to your system and open the package body section and write blow logic undet the event section.

Below Customization applied in the Transaction from in Receivables. Tax Payer details are sensitive information don't want explore to outside.

Changing the TAX Payer ID column name to "No Display", this we can't achieve using personalization
-------- Code for  Changing the LOV Title -----------

 form_name      varchar2(30) := name_in('system.current_form');
 block_name     varchar2(30) := name_in('system.cursor_block');
    v_lov LOV;
 rg_id RecordGroup;
    rg_name VARCHAR2(40) :='AR_CUSTOMER1';
 
  BEGIN
   IF (event_name = 'WHEN-NEW-ITEM-INSTANCE' AND form_name= 'ARXTWMAI')
   THEN
  IF (block_name = 'TGW_QF_TRX')
    THEN
    rg_id := FIND_GROUP(rg_name);
    v_lov := FIND_LOV('AR_CUSTOMER_NAME1');
    SET_LOV_COLUMN_PROPERTY(v_lov, 3, TITLE, 'No Display');
  END IF;
 END IF;
  END;



Hidding the Tax Payer ID column values from the LOV list,this we can achieve using personalization
------ Changing the LOV Query --------------------


 form_name      varchar2(30) := name_in('system.current_form');
    block_name     varchar2(30) := name_in('system.cursor_block');
    v_lov LOV;
 rg_name VARCHAR2(40) :='AR_CUSTOMER1';
 rg_id RecordGroup;
 v_sql  varchar2(5000);
 result Number;
    rec_id RecordGroup;
  
   BEGIN

   IF (event_name = 'WHEN-NEW-ITEM-INSTANCE' AND form_name= 'ARXTWMAI')
  THEN
        IF (block_name = 'TGW_QF_TRX')
   THEN
    rg_id := FIND_GROUP(rg_name);
    v_lov := FIND_LOV('AR_CUSTOMER_NAME1');
         
                 v_sql := 'select cust_acct.account_number account_number,
                party.party_name party_name,
                NULL jgzz_fiscal_code,  -- This the Tax payer ID column
                party.tax_reference tax_reference,
                cust_acct.cust_account_id customer_id,
                cust_acct.fob_point fob_point,
                null fob_point_meaning,
                cust_acct.ship_via ship_via,
                null ship_via_meaning,
                cust_acct.primary_salesrep_id primary_salesrep_id,
                null primary_salesrep_name,
                null primary_salesrep_num,
                cust_acct.account_name account_description
          from  hz_cust_accounts cust_acct,
                 hz_parties party
          where cust_acct.party_id = party.party_id
          order by party_name';
              
     rec_id := CREATE_GROUP_FROM_QUERY( 'AR_TAX_PAYER_HIDE', v_sql );
     result := POPULATE_GROUP(FIND_GROUP( 'AR_TAX_PAYER_HIDE'));
     SET_LOV_PROPERTY('AR_CUSTOMER_NAME1', GROUP_NAME, 'AR_TAX_PAYER_HIDE' );
                 
   END IF;
  END IF;
 END;
 
 
-------- Running the CUSTOM.pll in putty using below command -------------------

frmcmp_batch module=$AU_TOP/resource/CUSTOM.pll userid=apps/apps module_type=LIBRARY compile_all=YES output_file=$AU_TOP/resource/CUSTOM.plx

No comments :

Post a Comment

">