DBA Data[Home] [Help]

APPS.RCV_ROI_TRANSACTION dependencies on PO_HEADERS

Line 17: l_po_header_id po_headers_all.po_header_id%type;

13: n IN OUT NOCOPY BINARY_INTEGER,
14: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
15: x_header_record IN rcv_roi_preprocessor.header_rec_type
16: ) IS
17: l_po_header_id po_headers_all.po_header_id%type;
18: l_return_status VARCHAR2(1) :='S';
19: l_complex_flag varchar2(1);
20: l_interface_source_code rcv_transactions_interface.interface_source_code%type;
21: BEGIN

Line 235: po_headers ph

231: pl.purchase_basis,
232: pll.matching_basis --Complex Work
233: FROM po_line_locations pll,
234: po_lines pl,
235: po_headers ph
236: WHERE ph.po_header_id = pl.po_header_id
237: AND pl.po_line_id = pll.po_line_id
238: AND ph.po_header_id = v_header_id
239: AND pl.po_line_id = v_line_id

Line 362: FROM po_headers

358: IF x_cascaded_table(n).vendor_site_id IS NULL
359: AND x_cascaded_table(n).vendor_site_code IS NULL THEN --{
360: SELECT vendor_site_id
361: INTO x_vendor_site_id
362: FROM po_headers
363: WHERE po_header_id = x_cascaded_table(n).po_header_id
364: AND vendor_id = x_cascaded_table(n).vendor_id;
365:
366: SELECT vendor_site_code

Line 2729: po_headers ph

2725: TO_NUMBER(NULL) shipment_line_id, --shipment_line_id
2726: pl.item_id
2727: FROM po_line_locations pll,
2728: po_lines pl,
2729: po_headers ph
2730: WHERE ph.po_header_id = header_id
2731: AND pll.po_header_id = header_id
2732: AND pl.line_num = NVL(v_po_line_num, pl.line_num)
2733: AND NVL(pll.po_release_id, 0) = NVL(v_po_release_id, NVL(pll.po_release_id, 0))

Line 2762: po_headers ph

2758: ) IS
2759: SELECT COUNT(*)
2760: FROM po_line_locations pll,
2761: po_lines pl,
2762: po_headers ph
2763: WHERE ph.po_header_id = header_id
2764: AND pll.po_header_id = header_id
2765: AND pl.line_num = NVL(v_po_line_num, pl.line_num)
2766: AND NVL(pll.po_release_id, 0) = NVL(v_po_release_id, NVL(pll.po_release_id, 0))

Line 2784: ***** statement so that it will drive through PO_HEADERS_ALL

2780:
2781: /***** Bug # 1553154
2782: ***** There was a performance issue since the cursor COUNT_DISTRIBUTIONS
2783: ***** was driving through PO_LINE_LOCATIONS_ALL. Modified the Select
2784: ***** statement so that it will drive through PO_HEADERS_ALL
2785: ***** followed by PO_LINES_ALL which is followed by PO_LINE_LOCATIONS_ALL
2786: ***** so that there is an improvement in performance.
2787: *****/
2788: CURSOR distributions(

Line 2842: po_headers ph

2838: pl.item_id
2839: FROM po_distributions pod,
2840: po_line_locations pll,
2841: po_lines pl,
2842: po_headers ph
2843: WHERE ph.po_header_id = header_id
2844: AND pl.po_header_id = ph.po_header_id
2845: AND pll.po_line_id = pl.po_line_id
2846: AND pod.line_location_id = pll.line_location_id

Line 2866: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL

2862: ORDER BY NVL(pll.promised_date, pll.need_by_date);
2863:
2864: /***** Bug # 1553154
2865: ***** There was a performance issue since the cursor DISTRIBUTIONS
2866: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL
2867: ***** Modified the Select statement so that it will drive through
2868: ***** PO_HEADERS_ALL followed by PO_LINES_ALL which is followed by
2869: ***** PO_LINE_LOCATIONS_ALL which in turn is followed by
2870: ***** PO_DISTRIBUTIONS_ALL so that there is an improvement in

Line 2868: ***** PO_HEADERS_ALL followed by PO_LINES_ALL which is followed by

2864: /***** Bug # 1553154
2865: ***** There was a performance issue since the cursor DISTRIBUTIONS
2866: ***** was driving through PO_HEADERS_ALL followed by PO_DISTRIBUTIONS_ALL
2867: ***** Modified the Select statement so that it will drive through
2868: ***** PO_HEADERS_ALL followed by PO_LINES_ALL which is followed by
2869: ***** PO_LINE_LOCATIONS_ALL which in turn is followed by
2870: ***** PO_DISTRIBUTIONS_ALL so that there is an improvement in
2871: ***** Performance
2872: *****/

Line 2888: po_headers ph

2884: SELECT COUNT(*)
2885: FROM po_distributions pod,
2886: po_line_locations pll,
2887: po_lines pl,
2888: po_headers ph
2889: WHERE ph.po_header_id = header_id
2890: AND pl.po_header_id = ph.po_header_id
2891: AND pll.po_line_id = pl.po_line_id
2892: AND pod.line_location_id = pll.line_location_id

Line 2969: l_rate_date po_headers.rate_date%type; /* Bug#3746516 */

2965: l_asn_exists_code rcv_parameters.receipt_asn_exists_code%TYPE;
2966: l_does_asn_exist VARCHAR2(1) := 'N';
2967: l_asn_count NUMBER := 0;
2968: l_dist_count number; /* Bug#3746516 */
2969: l_rate_date po_headers.rate_date%type; /* Bug#3746516 */
2970: x_is_asn BOOLEAN;
2971: l_return_status VARCHAR2(1) :='S';
2972: l_complex_flag varchar2(1) := 'N';
2973: l_blind_receiving_flag VARCHAR2(1) := 'N'; -- Bug 6796920

Line 3721: po_headers ph

3717: SELECT COUNT(*)
3718: INTO x_temp_count
3719: FROM po_line_locations pll,
3720: po_lines pl,
3721: po_headers ph
3722: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
3723: AND pll.po_header_id = ph.po_header_id
3724: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)
3725: AND NVL(pll.po_release_id, 0) = NVL(temp_cascaded_table(current_n).po_release_id, NVL(pll.po_release_id, 0))

Line 3763: po_headers ph

3759: x_ship_to_location_id,
3760: x_vendor_product_num
3761: FROM po_line_locations pll,
3762: po_lines pl,
3763: po_headers ph
3764: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
3765: AND pll.po_header_id = ph.po_header_id
3766: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)
3767: AND NVL(pll.po_release_id, 0) = NVL(temp_cascaded_table(current_n).po_release_id, NVL(pll.po_release_id, 0))

Line 3796: po_headers ph

3792: INTO x_temp_count
3793: FROM po_distributions pod,
3794: po_line_locations pll,
3795: po_lines pl,
3796: po_headers ph
3797: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
3798: AND pll.po_header_id = ph.po_header_id
3799: AND pll.line_location_id = pod.line_location_id
3800: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

Line 3841: po_headers ph

3837: x_vendor_product_num
3838: FROM po_distributions pod,
3839: po_line_locations pll,
3840: po_lines pl,
3841: po_headers ph
3842: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
3843: AND pll.po_header_id = ph.po_header_id
3844: AND pll.line_location_id = pod.line_location_id
3845: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

Line 3895: po_headers ph,

3891: l_shipment_line_status_code,
3892: l_asn_line_flag
3893: FROM po_line_locations pll,
3894: po_lines pl,
3895: po_headers ph,
3896: rcv_shipment_headers rsh,
3897: rcv_shipment_lines rsl
3898: WHERE rsh.shipment_header_id = temp_cascaded_table(current_n).shipment_header_id
3899: AND rsl.shipment_line_id = temp_cascaded_table(current_n).shipment_line_id

Line 5280: po_headers ph

5276: NVL(pll.enforce_ship_to_location_code, 'NONE') enforce_ship_to_location_code,
5277: pl.item_id
5278: FROM po_line_locations pll,
5279: po_lines pl,
5280: po_headers ph
5281: WHERE pl.po_line_id = v_po_line_id
5282: AND pll.po_line_id = v_po_line_id
5283: AND ph.po_header_id = pl.po_header_id
5284: AND pll.line_location_id = NVL(v_po_line_location_id, pll.line_location_id)

Line 5303: po_headers ph

5299: ) IS
5300: SELECT COUNT(*)
5301: FROM po_line_locations pll,
5302: po_lines pl,
5303: po_headers ph
5304: WHERE pl.po_line_id = v_po_line_id
5305: AND pll.po_line_id = v_po_line_id
5306: AND ph.po_header_id = pl.po_header_id
5307: AND pll.line_location_id = NVL(v_po_line_location_id, pll.line_location_id)

Line 5361: po_headers ph

5357: pl.item_id
5358: FROM po_distributions pod,
5359: po_line_locations pll,
5360: po_lines pl,
5361: po_headers ph
5362: WHERE pl.po_line_id = v_po_line_id
5363: AND pll.po_line_id = v_po_line_id
5364: AND ph.po_header_id = pl.po_header_id
5365: AND pod.line_location_id = pll.line_location_id

Line 5388: po_headers ph

5384: SELECT COUNT(*)
5385: FROM po_distributions pod,
5386: po_line_locations pll,
5387: po_lines pl,
5388: po_headers ph
5389: WHERE pl.po_line_id = v_po_line_id
5390: AND pll.po_line_id = v_po_line_id
5391: AND ph.po_header_id = pl.po_header_id
5392: AND pod.line_location_id = pll.line_location_id

Line 5444: l_rate_date po_headers.rate_date%type; /* Bug#3746516 */

5440: x_rate NUMBER;
5441: x_allow_rate_override VARCHAR2(1);
5442: l_time_count NUMBER;
5443: l_dist_count number; /* Bug#3746516 */
5444: l_rate_date po_headers.rate_date%type; /* Bug#3746516 */
5445: BEGIN
5446: --check line quanity > 0
5447: x_progress := '097';
5448:

Line 5969: po_headers ph

5965: x_closed_code,
5966: x_shipment_type
5967: FROM po_line_locations pll,
5968: po_lines pl,
5969: po_headers ph
5970: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
5971: AND pll.po_header_id = ph.po_header_id
5972: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)
5973: AND NVL(pll.po_release_id, 0) = NVL(temp_cascaded_table(current_n).po_release_id, NVL(pll.po_release_id, 0))

Line 5985: po_headers ph

5981: INTO x_temp_count
5982: FROM po_distributions pod,
5983: po_line_locations pll,
5984: po_lines pl,
5985: po_headers ph
5986: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
5987: AND pll.po_header_id = ph.po_header_id
5988: AND pll.line_location_id = pod.line_location_id
5989: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

Line 6014: po_headers ph

6010: x_shipment_type
6011: FROM po_distributions pod,
6012: po_line_locations pll,
6013: po_lines pl,
6014: po_headers ph
6015: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
6016: AND pll.po_header_id = ph.po_header_id
6017: AND pll.line_location_id = pod.line_location_id
6018: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

Line 7993: x_po_vendor_id po_headers.vendor_id%TYPE := NULL;

7989: PROCEDURE validate_ref_integ(
7990: x_ref_integrity_rec IN OUT NOCOPY rcv_shipment_line_sv.ref_integrity_record_type,
7991: x_header_record IN rcv_roi_preprocessor.header_rec_type
7992: ) IS
7993: x_po_vendor_id po_headers.vendor_id%TYPE := NULL;
7994: x_po_line_id po_lines.po_line_id%TYPE;
7995: x_po_vendor_site_id po_headers.vendor_site_id%TYPE := NULL;
7996: x_progress VARCHAR2(3);
7997: x_error_status VARCHAR2(1);

Line 7995: x_po_vendor_site_id po_headers.vendor_site_id%TYPE := NULL;

7991: x_header_record IN rcv_roi_preprocessor.header_rec_type
7992: ) IS
7993: x_po_vendor_id po_headers.vendor_id%TYPE := NULL;
7994: x_po_line_id po_lines.po_line_id%TYPE;
7995: x_po_vendor_site_id po_headers.vendor_site_id%TYPE := NULL;
7996: x_progress VARCHAR2(3);
7997: x_error_status VARCHAR2(1);
7998: BEGIN
7999: x_error_status := rcv_error_pkg.g_ret_sts_error;

Line 8022: FROM po_headers

8018:
8019: IF x_ref_integrity_rec.vendor_id IS NOT NULL THEN
8020: SELECT NVL(MAX(vendor_id), 0)
8021: INTO x_po_vendor_id
8022: FROM po_headers
8023: WHERE po_header_id = x_ref_integrity_rec.po_header_id
8024: AND vendor_id = x_ref_integrity_rec.vendor_id;
8025:
8026: IF (x_po_vendor_id = 0) THEN

Line 8047: So now incase of null parent txn id we see from PO_headers and

8043: Changed the vendor_site_id validation code.
8044: Added parent_txn_id condition so as to take into account,
8045: the possibility that the vendor_site can change on a PO even after
8046: receipts have been created.
8047: So now incase of null parent txn id we see from PO_headers and
8048: incase of non-null parent_txn_id we look for the parent txn's vendor_site_id.
8049: */
8050: IF (x_ref_integrity_rec.parent_txn_id IS NULL) THEN
8051:

Line 8054: FROM po_headers

8050: IF (x_ref_integrity_rec.parent_txn_id IS NULL) THEN
8051:
8052: SELECT NVL(MAX(vendor_site_id), 0)
8053: INTO x_po_vendor_site_id
8054: FROM po_headers
8055: WHERE po_header_id = x_ref_integrity_rec.po_header_id
8056: AND vendor_site_id = x_ref_integrity_rec.vendor_site_id;
8057:
8058: asn_debug.put_line('vendor_site_id from PO_HEADERS ' || TO_CHAR(x_po_vendor_site_id));

Line 8058: asn_debug.put_line('vendor_site_id from PO_HEADERS ' || TO_CHAR(x_po_vendor_site_id));

8054: FROM po_headers
8055: WHERE po_header_id = x_ref_integrity_rec.po_header_id
8056: AND vendor_site_id = x_ref_integrity_rec.vendor_site_id;
8057:
8058: asn_debug.put_line('vendor_site_id from PO_HEADERS ' || TO_CHAR(x_po_vendor_site_id));
8059:
8060: END IF;
8061:
8062: IF (x_ref_integrity_rec.parent_txn_id IS NOT NULL) THEN

Line 8089: FROM po_headers

8085: END IF;
8086:
8087: SELECT NVL(MAX(vendor_site_id), 0)
8088: INTO x_po_vendor_site_id
8089: FROM po_headers
8090: WHERE po_header_id = x_ref_integrity_rec.po_header_id
8091: AND revision_num = x_ref_integrity_rec.po_revision_num;
8092:
8093: IF (x_po_vendor_site_id = 0) THEN

Line 9424: po_headers poh,

9420: 0 interface_available_qty
9421: FROM rcv_supply rsup,
9422: rcv_transactions rt,
9423: rcv_shipment_lines rsl,
9424: po_headers poh,
9425: po_lines pol
9426: WHERE rt.transaction_id = v_parent_trx_id
9427: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)
9428: AND rsup.supply_type_code = 'RECEIVING'

Line 9531: po_headers poh,

9527: 0 interface_available_qty
9528: FROM rcv_supply rsup,
9529: rcv_transactions rt,
9530: rcv_shipment_lines rsl,
9531: po_headers poh,
9532: po_lines pol,
9533: po_distributions pod
9534: WHERE rt.transaction_id = v_parent_trx_id
9535: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)

Line 9646: po_headers poh,

9642: 0 interface_available_qty
9643: FROM rcv_supply rsup,
9644: rcv_transactions rt,
9645: rcv_shipment_lines rsl,
9646: po_headers poh,
9647: po_lines pol,
9648: po_distributions pod
9649: WHERE rt.transaction_id = v_parent_trx_id
9650: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)

Line 9754: po_headers poh,

9750: 0 interface_available_qty
9751: FROM rcv_supply rsup,
9752: rcv_transactions rt,
9753: rcv_shipment_lines rsl,
9754: po_headers poh,
9755: po_lines pol,
9756: po_distributions pod
9757: WHERE rt.transaction_id = v_parent_trx_id
9758: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)

Line 9800: l_po_header_id po_headers_all.po_header_id%type;

9796: l_converted_distribution_qty NUMBER;
9797: l_distribution_qty NUMBER;
9798: l_converted_transaction_qty NUMBER;
9799: l_ship_unit po_line_locations.unit_meas_lookup_code%TYPE;
9800: l_po_header_id po_headers_all.po_header_id%type;
9801: l_return_status VARCHAR2(1) :='S';
9802: l_complex_flag varchar2(1);
9803:
9804: /* Bug 5354379 */

Line 9823: * l_po_num definition from NUMBER to po_headers_all.segment1%type

9819:
9820: /* Bug 5354379 */
9821: /** Bug:6030094
9822: * PO number can be alpha numeric. So changing the
9823: * l_po_num definition from NUMBER to po_headers_all.segment1%type
9824: */
9825: l_po_num po_headers_all.segment1%type := null;
9826: l_po_line_num NUMBER := 0;
9827: l_po_line_loc_num NUMBER := 0;

Line 9825: l_po_num po_headers_all.segment1%type := null;

9821: /** Bug:6030094
9822: * PO number can be alpha numeric. So changing the
9823: * l_po_num definition from NUMBER to po_headers_all.segment1%type
9824: */
9825: l_po_num po_headers_all.segment1%type := null;
9826: l_po_line_num NUMBER := 0;
9827: l_po_line_loc_num NUMBER := 0;
9828: l_po_dist_num NUMBER := 0;
9829: /* Bug 5354379 */

Line 10343: from po_headers_all

10339: RCV_TRX_QTY_EXCEEDS_AVAILABLE */
10340: BEGIN
10341: select segment1
10342: into l_po_num
10343: from po_headers_all
10344: where po_header_id = x_po_transferrec.po_head_id;
10345:
10346: select line_num
10347: into l_po_line_num

Line 11841: l_po_header_id po_headers_all.po_header_id%type;

11837: n IN OUT NOCOPY BINARY_INTEGER,
11838: temp_cascaded_table IN OUT NOCOPY rcv_roi_preprocessor.cascaded_trans_tab_type,
11839: x_header_record IN rcv_roi_preprocessor.header_rec_type
11840: ) IS
11841: l_po_header_id po_headers_all.po_header_id%type;
11842: l_return_status VARCHAR2(1) :='S';
11843: l_complex_flag varchar2(1);
11844:
11845: BEGIN

Line 12072: po_headers poh,

12068: rt.bom_resource_id,
12069: rsl.ussgl_transaction_code
12070: FROM rcv_transactions rt,
12071: rcv_shipment_lines rsl,
12072: po_headers poh,
12073: po_lines pol
12074: WHERE rt.transaction_id = v_parent_trx_id
12075: AND rt.organization_id = NVL(v_to_organization_id, rt.organization_id)
12076: AND ( rt.transaction_type IN('RECEIVE', 'TRANSFER', 'ACCEPT', 'REJECT', 'MATCH')

Line 13201: po_headers poh,

13197: rt.destination_type_code,
13198: rsl.ussgl_transaction_code
13199: FROM rcv_transactions rt,
13200: rcv_shipment_lines rsl,
13201: po_headers poh,
13202: po_lines pol
13203: WHERE rt.transaction_id = v_parent_trx_id
13204: AND rt.organization_id = NVL(v_to_organization_id, rt.organization_id)
13205: AND ( rt.transaction_type IN('RECEIVE', 'TRANSFER', 'ACCEPT', 'REJECT', 'MATCH')

Line 14568: FROM po_headers

14564: IF (x_cascaded_table(n).transaction_type <> 'RECEIVE') THEN --{
14565: IF (x_cascaded_table(n).source_document_code = 'PO') THEN --{
14566: SELECT type_lookup_code
14567: INTO po_lookup_code_record.lookup_code
14568: FROM po_headers
14569: WHERE po_header_id = x_cascaded_table(n).po_header_id;
14570:
14571: po_lookup_code_record.lookup_type := 'PO TYPE';
14572: ELSE --}{

Line 15748: l_po_currency po_headers_all.currency_code%type;

15744: l_lsl_exists NUMBER := 0;
15745: l_rsl_qty NUMBER;
15746: l_rsl_uom rcv_shipment_lines.unit_of_measure%type;
15747: -- Bug 7607281
15748: l_po_currency po_headers_all.currency_code%type;
15749: l_po_rate_type po_headers_all.rate_type%type;
15750: l_po_rate_date po_headers_all.rate_date%type;
15751: l_sec_rsl_qty NUMBER;
15752: l_sec_rsl_uom rcv_shipment_lines.secondary_unit_of_measure%type;

Line 15749: l_po_rate_type po_headers_all.rate_type%type;

15745: l_rsl_qty NUMBER;
15746: l_rsl_uom rcv_shipment_lines.unit_of_measure%type;
15747: -- Bug 7607281
15748: l_po_currency po_headers_all.currency_code%type;
15749: l_po_rate_type po_headers_all.rate_type%type;
15750: l_po_rate_date po_headers_all.rate_date%type;
15751: l_sec_rsl_qty NUMBER;
15752: l_sec_rsl_uom rcv_shipment_lines.secondary_unit_of_measure%type;
15753: l_lsl_id NUMBER;

Line 15750: l_po_rate_date po_headers_all.rate_date%type;

15746: l_rsl_uom rcv_shipment_lines.unit_of_measure%type;
15747: -- Bug 7607281
15748: l_po_currency po_headers_all.currency_code%type;
15749: l_po_rate_type po_headers_all.rate_type%type;
15750: l_po_rate_date po_headers_all.rate_date%type;
15751: l_sec_rsl_qty NUMBER;
15752: l_sec_rsl_uom rcv_shipment_lines.secondary_unit_of_measure%type;
15753: l_lsl_id NUMBER;
15754: l_rate NUMBER;

Line 15954: FROM po_headers_all

15950: END IF;
15951: -- Bug 7607281
15952: SELECT currency_code, rate_type, rate_date, rate
15953: INTO l_po_currency, l_po_rate_type, l_po_rate_date, l_po_rate
15954: FROM po_headers_all
15955: WHERE po_header_id = x_cascaded_table(n).po_header_id;
15956:
15957: IF (g_asn_debug = 'Y') THEN
15958: asn_debug.put_line('l_po_currency : ' || l_po_currency);