After running Create Internal Sales Order - POCISO, How to determine whether the Sales Order information was sent to Order Entry?
Fix
1- To check if POCISO transferred information to Order Entry, run the following query:
SELECT transferred_to_oe_flag
FROM po_requisition_headers_all
WHERE segment1= &requisition_number;
If the Value is Y, the requisition was processed by POCISO.
2- Next run the following queries to determine if the Sales Order is still in the OE Interface tables.
SELECT orig_sys_document_ref
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= &requisition_number);
SELECT orig_sys_document_ref
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= &requisition_number);
3- To check whether the Sales Order was imported already, the following query can be used:
SELECT 'Exists in OM main'
FROM oe_order_headers_all
WHERE order_source_id =10
and source_document_id in ( SELECT requisition_header_id
FROM po_requisition_headers_all
WHERE segment1= &requisition_number);
4- Following SQL can be used to find requisition number,sales order number and
order line number by passing Purchase requisition number.
This can also be used to confirm that all the lines in requisitions are populated into
sales order after order import.
SELECT porh.segment1 purchase_req, ooh.order_number sales_order,
ool.line_number so_line_no, porl.line_num pur_req_line_no
FROM oe_order_headers_all ooh,
po_requisition_headers_all porh,
po_requisition_lines_all porl,
po_req_distributions_all pord,
oe_order_lines_all ool,
po_system_parameters_all posp
WHERE ooh.order_source_id = posp.order_source_id
AND porh.org_id = posp.org_id
AND porh.requisition_header_id = ool.source_document_id
AND porl.requisition_line_id = ool.source_document_line_id
AND porh.requisition_header_id = porl.requisition_header_id
AND porl.requisition_line_id = pord.requisition_line_id
AND ooh.org_id = posp.org_id
AND ool.header_id = ooh.header_id
AND ool.orig_sys_line_ref not like '%OE_ORDER_LINES_ALL%'
AND ool.source_document_line_id is not null
and porh.segment1 = '&purchase requisition_number';