While running while running PAY_ELEMENT_LINK_API.update_element_link to update costing and balancing flexfield , then following error is encountered:
ORA-20001: System Error: Procedure PAY_ELEMENT_LINKS_T1 at Step &STEP
.
Cause: The procedure PAY_ELEMENT_LINKS_T1 has created an error at Step
&STEP.
.
Action: Contact your system administrator quoting the procedure
PAY_ELEMENT_LINKS_T1 and Step &STEP.
ORA-6512: at “APPS.HR_UTILITY”, line 934
ORA-6512: at “APPS.PAY_ELEMENT_LINKS_T1”, line 35
ORA-4088: error during execution of trigger ‘APPS.PAY_ELEMENT_LINKS_T1’
ORA-6512: at “APPS.PAY_ELEMENT_LINK_API”, line 1221
Cause :
The trigger PAY_ELEMENT_LINKS_T1 on table PAY_ELEMENT_LINKS_F has direct update statements on PAY_LINK_INPUT_VALUES_F. Because of this the dynamic trigger PAY_LINK_INPUT_VALUES_F_ARU (defined on PAY_LINK_INPUT_VALUES_F)
fires and tries to access the parent table PAY_ELEMENT_LINKS_F to derive the business_group_id.
This leads to the Mutating error.
also the following is required in the trigger body :
declare v_effective_date date; cursor csr_effective_date is select effective_date from fnd_sessions where session_id = userenv('sessionid');
Need to insert sessionid in FND_SESSIONS table
Solution :
The following steps should be taken to address this issue:
1- Execute the following:
INSERT INTO FND_SESSIONS values (userenv('sessionid'), sysdate); commit;
2- Retest the issue and confirm on the results.
hope this helpful 🙂