API error: Element link does not exist for the duration of the entry
Hi,
Am facing an issue while calling the Oracle Apps, APi for creating an element entry.
Tried referring to the following post on http://kr.forums.oracle.com/forums/thread.jspa?threadID=669646 but could not understand the solution.
Request help.
While creating the same element vide Toad the same does not give any error. Inputs used ...
BEGIN
DBMS_OUTPUT.ENABLE (1000000);
DECLARE
l_effective_start_date DATE;
l_effective_end_date DATE;
l_element_entry_id NUMBER (15);
l_object_version_number NUMBER (9);
l_create_warning BOOLEAN;
element_link_id NUMBER;
element_pay_value_id NUMBER;
assignment_id NUMBER;
BEGIN
l_object_version_number := 1;
-- Fetch assignment ID for an employee
SELECT DISTINCT (b.assignment_id)
INTO assignment_id
FROM per_all_people_f a, per_all_assignments_f b
WHERE a.person_id = b.person_id
AND a.employee_number = 'J0012';
-- Fetch Element Link Id for Basic Pay
SELECT element_link_id
INTO element_link_id
FROM pay_element_types_f pt, pay_element_links_f pl
WHERE pt.element_type_id = pl.element_type_id
AND pt.business_group_id = 41
AND UPPER (pt.element_name) = UPPER ('Personal Pay');
-- Fetch Input Value Id for Basic Pay
SELECT input_value_id
INTO element_pay_value_id
FROM pay_element_types_f pet, pay_input_values_f piv
WHERE pet.element_type_id = piv.element_type_id
AND pet.business_group_id = 41
AND UPPER (piv.NAME) LIKE UPPER ('Personal Pay%');
pay_element_entry_api.create_element_entry
(
p_effective_date => TO_DATE('20-AUG-2008','DD-MON-YYYY'),
p_business_group_id => 41,
p_assignment_id => assignment_id,
p_element_link_id => element_link_id,
p_entry_type => 'E',
p_input_value_id1 => 99, -- element_pay_value_id,
p_entry_value1 => 500000,
p_effective_start_date => l_effective_start_date,
p_effective_end_date => l_effective_end_date,
p_element_entry_id => l_element_entry_id,
p_object_version_number => l_object_version_number,
p_create_warning => l_create_warning
);
COMMIT;
DBMS_OUTPUT.put_line ('l_effective_start_date :' || l_effective_start_date);
DBMS_OUTPUT.put_line ('l_effective_end_date :' || l_effective_end_date);
DBMS_OUTPUT.put_line ('l_element_entry_id :' || l_element_entry_id);
DBMS_OUTPUT.put_line ('l_object_version_number :' || l_object_version_number);
END;
END;
error thrown by the API is as follows
<remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>20001</code>
</part><part name="summary"><summary>file:/D:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_UpdateApps_1.3_aaeec389143c58f009d178be13b5502c.tmp/UpdateElement.wsdl [ UpdateElement_ptt::UpdateElement(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'UpdateElement' failed due to: Error while trying to prepare and execute an API.
An error occurred while preparing and executing the APPS.XX_BPEL_UPDATEELEMENT.PAY_ELEMENT_ENTRY_API$CREATE_ API. Cause: java.sql.SQLException: ORA-20001: Element link does not exist for the duration of the entry
Cause: The link has been purged or date effectively deleted.
Action: Check the effective start and end dates on the link definitions for this element.
ORA-06512: at "APPS.PAY_ELEMENT_ENTRY_API", line 614
ORA-06512: at "APPS.XX_BPEL_UPDATEELEMENT", line 1
ORA-06512: at line 1
[Caused by: ORA-20001: Element link does not exist for the duration of the entry
Cause: The link has been purged or date effectively deleted.
Action: Check the effective start and end dates on the link definitions for this element.
ORA-06512: at "APPS.PAY_ELEMENT_ENTRY_API", line 614
ORA-06512: at "APPS.XX_BPEL_UPDATEELEMENT", line 1
ORA-06512: at line 1
]
; nested exception is:
ORABPEL-11811
Error while trying to prepare and execute an API.
An error occurred while preparing and executing the APPS.XX_BPEL_UPDATEELEMENT.PAY_ELEMENT_ENTRY_API$CREATE_ API. Cause: java.sql.SQLException: ORA-20001: Element link does not exist for the duration of the entry
Cause: The link has been purged or date effectively deleted.
Action: Check the effective start and end dates on the link definitions for this element.
ORA-06512: at "APPS.PAY_ELEMENT_ENTRY_API", line 614
ORA-06512: at "APPS.XX_BPEL_UPDATEELEMENT", line 1
ORA-06512: at line 1
[Caused by: ORA-20001: Element link does not exist for the duration of the entry
Cause: The link has been purged or date effectively deleted.
Action: Check the effective start and end dates on the link definitions for this element.
ORA-06512: at "APPS.PAY_ELEMENT_ENTRY_API", line 614
ORA-06512: at "APPS.XX_BPEL_UPDATEELEMENT", line 1
ORA-06512: at line 1
]
Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
</summary>
</part><part name="detail"><detail>
Internal Exception: java.sql.SQLException: ORA-20001: Element link does not exist for the duration of the entry
Cause: The link has been purged or date effectively deleted.
Action: Check the effective start and end dates on the link definitions for this element.
ORA-06512: at "APPS.PAY_ELEMENT_ENTRY_API", line 614
ORA-06512: at "APPS.XX_BPEL_UPDATEELEMENT", line 1
ORA-06512: at line 1
Error Code: 20001</detail>
</part></remoteFault>