Tuesday, December 24, 2019

enable OAF personalization link in oracle apps R12

enable OAF personalization link in oracle apps R12



These four profile options have to enabled to enable OAF personalization link in oracle apps R12. To Assign these Profile Options, we need to go to System Administrator or Functional Administrator Responsibility.Navigation:1)System Administrator -> Profile -> SystemOR2)Functional Administrator -> Core Services -> Profiles


Profile Name                             --        Profile Value
FND: Diagnostics                         =>         Yes
Personalize Self-Service Defn            =>         Yes
FND: Personalization Region Link Enabled =>         Yes / Minimal
Disable Self-Service Personal            =>         No

Monday, December 16, 2019

How to restrict Keyflexfield using Form Personalization


Keyflexfield KFF Form Personalization

Prerequisites:
Knowledge of forms Personaliation
PLSQL
Oracle Forms Builder



Steps:

A - Form personalizion :-

Seq 30
PR distribution ac non editable and non updatable

WHEN-NEW-ITEM-INSTANCE
DISTRIBUTIONS.CHARGE_ACCOUNT_FLEX

:DISTRIBUTIONS.CHARGE_ACCOUNT_FLEX is not null



Built In
Call Custom Library

XXREADONLY_POCHARGE_KFF




 In the actions tab use Builtin action type and use Call Custom Library with a specific Event name like the following which we are going to code in CUSTOM.pll

B)CUSTOM.pll changes

Now download the custom.pll from the AU_TOP to your local machine and open it in the form builder and edit the event procedure like the following (as per your requirement)

 begin 
    --null; --commented for PO distribution Charge account KFF disable
    
    XX_READ_ONLY_CHARDGE_ACNT_P('XXREADONLY_POCHARGE_KFF');
    


  end event; 





PROCEDURE XX_READ_ONLY_CHARDGE_ACNT_P(event_name varchar2) IS
form_name                      VARCHAR2 (150);
block_name                     VARCHAR2 (150);
item_name                      VARCHAR2 (150);
v_mark_read_only               VARCHAR2 (100);
BEGIN
    form_name := NAME_IN ('SYSTEM.CURRENT_FORM');
   block_name := NAME_IN ('system.cursor_block');
   item_name := NAME_IN ('system.cursor_item');
  
   /*xxpk_debug_prc
                ('CUSTOM.PLL.XX_READ_ONLY_CHARDGE_ACNT_P',
                 '00',
                 'STARTs',
                    'event_name - :-'
                 || event_name,
                 SUBSTR (dbms_utility.format_error_backtrace||SQLERRM, 1, 2999)
                ); */
    IF event_name = 'XXREADONLY_POCHARGE_KFF' THEN
  
   /*xxpk_debug_prc
                ('CUSTOM.PLL.XX_READ_ONLY_CHARDGE_ACNT_P',
                 '01',
                 'In IF Condition',
                    'event_name - :-'
                 || event_name,
                 SUBSTR (dbms_utility.format_error_backtrace||SQLERRM, 1, 2999)
                );  */
     FND_KEY_FLEX.UPDATE_DEFINITION(
  BLOCK=>'DISTRIBUTIONS',
  FIELD=>'charge_account_flex',
  INSERTABLE=>'',
  UPDATEABLE=>'');
   END IF;


  /* IF  (event_name = 'WHEN-NEW-RECORD-INSTANCE' or event_name = 'WHEN-NEW-BLOCK-INSTANCE'
         or event_name = 'WHEN-NEW-FORM-INSTANCE' or event_name = 'WHEN-NEW-ITEM-INSTANCE')
     AND ( FND_PROFILE.VALUE ('RESP_ID')in ('50680') and form_name IN ('POXPOEPO'))THEN
 --Set_Menu_Item_Property('VIEW.ATTACHMENTS',ENABLED, PROPERTY_FALSE);--disable attachment to view
 --app_special.enable('ATTACHMENTS', PROPERTY_OFF);     --disable attachment to view
       copy(25,'SYSTEM.MESSAGE_LEVEL');--to not show repeative messages
    END IF;*/
    
    exception when others then
     null;
       /*xxpk_debug_prc
                ('CUSTOM.PLL.XX_READ_ONLY_CHARDGE_ACNT_P',
                 'XX',
                 'MainException',
                    'event_name - :-'
                 || event_name,
                 SUBSTR (dbms_utility.format_error_backtrace||SQLERRM, 1, 2999)
                ); */
    
END;

Recompile the custom.pll in the form builder and upload it to AU_TOP (don't forget to backup the original file before uploading the modified one)  

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

Restart the application services and test the personalization 

========End========================


Sunday, December 15, 2019

Purge All workflow data for HR_API_TRANSACTIONS item key



Purge Obsolete Workflow Runtime Data
Complete Defunct HR Workflow Processes


Step1: 

Please cancel the Item key work flow on production and proceed from status monitor and cancel it.


Step 2:

When we cancel the workflow the Workflow status will be changed as 'Cancel' and the Approval status will show still as 'pending for Approval'. So to delete the records we need to run the below concurrent programs.

11)   Run 'Purge Obsolete Workflow Runtime Data' with appropriate age parameters such that the workflow item gets deleted.

Step 3:

1.       Run "Complete Defunct HR Workflow Processes" with appropriate age parameters and status.






Tuesday, October 22, 2019

Sunday, October 20, 2019

Find OAF Pages Personalization SQL Query


--Find OAF Pages Personalization SQL Query

SELECT
    jp.path_docid ,
    jdr_mds_internal.getdocumentname(jp.path_docid) Personalization_path,
    jp.path_name,
    Jp.Path_Owner_Docid,
    Jp.Path_Seq,
    Jp.Path_Type,
    Jp.Path_Xml_Encoding,
    Jp.Path_Xml_Version,
    Jp.Created_By,
    Jp.Creation_Date,
    Jp.Last_Updated_By,
    Jp.Last_Update_Date 
  FROM apps.jdr_paths jp
WHERE jp.path_docid IN (
        SELECT DISTINCT comp_docid
        FROM jdr_components
        WHERE
   comp_seq = 0
    AND   comp_element = 'customization'
   AND   comp_id IS NULL
    )
    AND   upper(jdr_mds_internal.getdocumentname(jp.path_docid) ) LIKE upper('%ViewExtBankAcctPG%')
    --upper('%UpdateExtBankAcctPG%')--upper('%SuppSummPG%')

Sunday, October 13, 2019

Delete Workflow Business Event and Subscription API

--API To Delete the Workflow Business Events and Subscriptions

declare


cursor c_del_lines is
SELECT we.guid event_guid
     , wes.guid subscription_guid
     , wes.rule_function
  FROM wf_events we
     , wf_event_subscriptions wes
 WHERE we.NAME = 'oracle.apps.wf.notification.respond'--give your event name
   AND wes.event_filter_guid = we.guid;
 
   begin

   for i in c_del_lines loop
EXEC WF_EVENTS_PKG.DELETE_ROW(i.event_guid);

EXEC WF_EVENT_SUBSCRIPTIONS_PKG.DELETE_ROW(i.subscription_guid);

COMMIT;

end loop;


end;

Workflow Business Event and Subscription details SQL Query

/*Workflow Business Event and Subscription details SQL Query*/
SELECT we.guid event_guid,we.NAME, we.status event_status, wes.status subscription_status,
       NVL (wes.phase, 0) subscription_phase,
       wes.licensed_flag subscription_licensed_flag,
       we.licensed_flag event_licensed_flag,
       wes.guid subscription_guid,
        wes.rule_function,
       wes.on_error_code, wes.action_code, wes.customization_level,
       wes.owner_name subscription_owner_name,
       wes.owner_tag subscription_owner_tag,
       wes.source_type subscription_source_type,
       wes.rule_data subscription_rule_data, we.owner_name event_owner_name,
       we.owner_tag event_owner_tag,
       we.security_group_id event_security_group_id
FROM   wf_events we, wf_event_subscriptions wes
 WHERE 1 = 1
   AND we.NAME IN
          ('oracle.apps.wf.notification.send',
           'oracle.apps.wf.notification.respond',
           'oracle.apps.wf.notification.reassign'
          )
   AND wes.event_filter_guid = we.guid