233: AND pol.from_header_id = mct.transaction_source_id
234: AND pol.po_header_id = mct.consumption_po_header_id
235: AND poll.po_line_id = pol.po_line_id
236: AND poll.po_header_id = pol.po_header_id
237: AND poll.shipment_type = 'STANDARD'
238: AND poll.line_location_id = pod.line_location_id
239: AND pod.po_header_id = mct.consumption_po_header_id
240:
241: /* Bug 5604129 - Start */
1375: -- COMMENT : This procedure is called from the worker. It loads
1376: -- : unprocessed summarized change of ownership transactions
1377: -- : from the consumption temp table MTL_CONSUMPTION_TXN_TEMP
1378: -- : into the PO interface tables in preperation for the
1379: -- : creation of either a consumption advice or standard PO
1380: -- : Once this is done the autocreate procedure is called
1381: -- : to process the interface tables and create the release.
1382: -- : The corresponding records are updated with the result,
1383: -- : whether success or failure. If success the last billing date
1809: l_interface_header_id
1810: , 'CONSUMPTION_ADVICE'
1811: , p_batch_id
1812: , l_document_type_code
1813: , DECODE(l_valid_flag,'Y','RELEASE','STANDARD')
1814: , DECODE(l_valid_flag,'Y',segment1,NULL)
1815: , DECODE(l_valid_flag,'G',l_vendor_id,vendor_id) --Bug 4723164
1816: , DECODE(l_valid_flag,'G',l_vendor_site_id,vendor_site_id) --Bug 4723164
1817: , agent_id
2559: l_consumption_release_id := l_document_id;
2560: l_consumption_po_header_id := NULL;
2561: l_error_msg := NULL;
2562: l_consumption_processed_flag := 'Y';
2563: ELSE -- GA, Standard PO was created
2564:
2565: l_consumption_release_id := NULL;
2566: l_consumption_po_header_id := l_document_id;
2567: l_error_msg :=NULL;
2573: l_archive_subtype := 'BLANKET';
2574: l_archive_type := 'RELEASE';
2575: ELSIF NVL(l_valid_flag,'N') = 'G'
2576: THEN
2577: l_archive_subtype := 'STANDARD';
2578: l_archive_type := 'PO';
2579: END IF;
2580:
2581: l_api_version := 1.0;