Monday, October 20, 2014

Navigating to Tools > Control from Requisition Summary Results in 'No control actions found for this document'



 SYMPTOMS
When attempting to cancel an Internal Requisition, the user encounters the following error:
No control actions found for this document

Steps:
1. Under the Purchasing responsibility, navigate to Requisitions > Requisition Summary
2. Query the Internal Requisition of interest
3. Navigate to Tools > Control
4. Encounter error: No control actions found for this document
CAUSE
There are records in the OM Interface tables (OE_HEADERS_IFACE_ALL and/or OE_LINES_IFACE_ALL) corresponding to the internal requisition.
SOLUTION
It is recommended users perform the following actions in a test environment first and verify the results prior to performing the actions in production.

1. Log in to the Oracle Application
2. Set Responsibility = Order Management Super User
3. Navigate to Orders, Returns > Import Orders > Corrections
4. Set
   a. Order Source = Internal
   b. Order Reference = requisition_header_id for the Requisition of interest
5. The Corrections form should display a record corresponding to the one in OE_HEADERS_IFACE_ALL. Click the Lines button.
6. The Lines form should display records corresponding to those in OE_LINES_IFACE_ALL. Delete the record(s) and close the Lines form, returning to the Corrections form.
7. In the Corrections form, delete the record.
8. Save
9. Return to the Purchasing application and cancel the desired Internal Requisition/Requisition Lines.


Here are some queries to assist with confirming if there is stuck data:

select * FROM OE_HEADERS_IFACE_ALL
WHERE order_source_id = 10
AND orig_sys_document_ref IN( SELECT REQUISITION_HEADER_ID
FROM PO_REQUISITION_HEADERS_ALL
where segment1 = '&req_number');

select * FROM OE_ORDER_HEADERS_ALL
WHERE order_source_id = 10
AND orig_sys_document_ref IN( SELECT REQUISITION_HEADER_ID
FROM PO_REQUISITION_HEADERS_ALL
where segment1 = '&req_number');


select * FROM OE_ORDER_LINES_ALL
WHERE order_source_id = 10
AND orig_sys_document_ref IN( SELECT REQUISITION_HEADER_ID
FROM PO_REQUISITION_HEADERS_ALL
where segment1 = '&req_number');

select * FROM OE_LINES_IFACE_ALL
WHERE order_source_id = 10
AND orig_sys_document_ref IN( SELECT REQUISITION_HEADER_ID
FROM PO_REQUISITION_HEADERS_ALL
where segment1 = '&req_number');

The Order Management corrections form allows the deletion of the header record without deleting
the corresponding records in oe_lines_iface_all.  If the above scripts return records for only the
oe_lines_iface_all its means that there are orphaned records for that requisition - which is further
impacting the control options in the requisition summary.
The only method to remove the stuck records in the oe_lines_iface_all is to delete them.

The following script can be used - and is recommended only in a test instance first.
delete FROM OE_LINES_IFACE_ALL
WHERE order_source_id = 10
AND orig_sys_document_ref IN( SELECT REQUISITION_HEADER_ID
FROM PO_REQUISITION_HEADERS_ALL
where segment1 = '&req_number');
commit;


No comments: