38: begin
39:
40: SELECT Count(1)
41: INTO l_count
42: FROM rcv_transactions_interface
43: WHERE transaction_status_code = 'PENDING'
44: and processing_status_code <> 'ERROR'
45: AND source_document_code = 'PO'
46: AND (po_header_id = x_po_header_id OR (document_num = x_po_num AND org_id = x_Org_id))
62: begin
63:
64: SELECT Count(1)
65: INTO l_count
66: FROM rcv_transactions_interface
67: WHERE transaction_status_code = 'PENDING'
68: and processing_status_code <> 'ERROR'
69: AND source_document_code = 'PO'
70: AND ( po_header_id = nvl(x_po_header_id,po_header_id)
89: begin
90:
91: SELECT Count(1)
92: INTO l_count
93: FROM rcv_transactions_interface
94: WHERE transaction_status_code = 'PENDING'
95: and processing_status_code <> 'ERROR'
96: AND source_document_code = 'PO'
97: AND ( po_header_id = nvl(x_po_header_id,po_header_id)
300: l_message_name := NULL;
301:
302: SELECT count(*)
303: INTO l_rti_count
304: FROM rcv_transactions_interface rti
305: WHERE rti.po_header_id = l_po_header_id
306: OR ( (rti.receipt_source_code = 'VENDOR' OR rti.source_document_code = 'PO')
307: AND EXISTS
308: ( SELECT 1