430: n IN OUT NOCOPY BINARY_INTEGER,
431: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
432: x_header_record IN rcv_roi_preprocessor.header_rec_type
433: ) IS
434: l_po_header_id po_headers_all.po_header_id%type;
435: l_return_status VARCHAR2(1) :='S';
436: l_complex_flag varchar2(1);
437: l_interface_source_code rcv_transactions_interface.interface_source_code%type;
438: BEGIN
3264:
3265: /***** Bug # 1553154
3266: ***** There was a performance issue since the cursor COUNT_DISTRIBUTIONS
3267: ***** was driving through PO_LINE_LOCATIONS_ALL. Modified the Select
3268: ***** statement so that it will drive through PO_HEADERS_ALL
3269: ***** followed by PO_LINES_ALL which is followed by PO_LINE_LOCATIONS_ALL
3270: ***** so that there is an improvement in performance.
3271: *****/
3272: CURSOR distributions(
3348: ORDER BY NVL(pll.promised_date, Nvl(pll.need_by_date,pll.creation_date)), Nvl(pll.need_by_date,pll.creation_date), pll.creation_date; --bug10022180
3349:
3350: /***** Bug # 1553154
3351: ***** There was a performance issue since the cursor DISTRIBUTIONS
3352: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL
3353: ***** Modified the Select statement so that it will drive through
3354: ***** PO_HEADERS_ALL followed by PO_LINES_ALL which is followed by
3355: ***** PO_LINE_LOCATIONS_ALL which in turn is followed by
3356: ***** PO_DISTRIBUTIONS_ALL so that there is an improvement in
3350: /***** Bug # 1553154
3351: ***** There was a performance issue since the cursor DISTRIBUTIONS
3352: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL
3353: ***** Modified the Select statement so that it will drive through
3354: ***** PO_HEADERS_ALL followed by PO_LINES_ALL which is followed by
3355: ***** PO_LINE_LOCATIONS_ALL which in turn is followed by
3356: ***** PO_DISTRIBUTIONS_ALL so that there is an improvement in
3357: ***** Performance
3358: *****/
10838: l_converted_distribution_qty NUMBER;
10839: l_distribution_qty NUMBER;
10840: l_converted_transaction_qty NUMBER;
10841: l_ship_unit po_line_locations.unit_meas_lookup_code%TYPE;
10842: l_po_header_id po_headers_all.po_header_id%type;
10843: l_return_status VARCHAR2(1) :='S';
10844: l_complex_flag varchar2(1);
10845:
10846: /* Bug 5354379 */
10861:
10862: /* Bug 5354379 */
10863: /** Bug:6030094
10864: * PO number can be alpha numeric. So changing the
10865: * l_po_num definition from NUMBER to po_headers_all.segment1%type
10866: */
10867: l_po_num po_headers_all.segment1%type := null;
10868: l_po_line_num NUMBER := 0;
10869: l_po_line_loc_num NUMBER := 0;
10863: /** Bug:6030094
10864: * PO number can be alpha numeric. So changing the
10865: * l_po_num definition from NUMBER to po_headers_all.segment1%type
10866: */
10867: l_po_num po_headers_all.segment1%type := null;
10868: l_po_line_num NUMBER := 0;
10869: l_po_line_loc_num NUMBER := 0;
10870: l_po_dist_num NUMBER := 0;
10871: /* Bug 5354379 */
11402: RCV_TRX_QTY_EXCEEDS_AVAILABLE */
11403: BEGIN
11404: select segment1
11405: into l_po_num
11406: from po_headers_all
11407: where po_header_id = x_po_transferrec.po_head_id;
11408:
11409: select line_num
11410: into l_po_line_num
13133: n IN OUT NOCOPY BINARY_INTEGER,
13134: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
13135: x_header_record IN rcv_roi_preprocessor.header_rec_type
13136: ) IS
13137: l_po_header_id po_headers_all.po_header_id%type;
13138: l_return_status VARCHAR2(1) :='S';
13139: l_complex_flag varchar2(1);
13140: l_asn_type rcv_shipment_headers.asn_type%TYPE; --9534775
13141:
17179: x_currency_conversion_type rcv_transactions.currency_conversion_type%type;
17180: x_currency_conversion_rate NUMBER;
17181: -- Bug 10357707
17182: l_functional_currency cst_organization_definitions.currency_code%type;
17183: l_po_currency po_headers_all.currency_code%type;
17184:
17185: BEGIN
17186: IF (g_asn_debug = 'Y') THEN
17187: asn_debug.put_line('In validate_lcm_line');
17370: -- Bug 10357707: Start
17371: SELECT cod.currency_code, poh.currency_code
17372: INTO l_functional_currency, l_po_currency
17373: FROM cst_organization_definitions cod,
17374: po_headers_all poh
17375: WHERE cod.operating_unit = poh.org_id
17376: AND cod.organization_id = x_cascaded_table(n).to_organization_id
17377: AND poh.po_header_id = x_cascaded_table(n).po_header_id;
17378: