DBA Data[Home] [Help]

APPS.RCV_ROI_TRANSACTION dependencies on PO_HEADERS

Line 434: l_po_header_id po_headers_all.po_header_id%type;

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

Line 652: po_headers ph

648: pl.purchase_basis,
649: pll.matching_basis --Complex Work
650: FROM po_line_locations pll,
651: po_lines pl,
652: po_headers ph
653: WHERE ph.po_header_id = pl.po_header_id
654: AND pl.po_line_id = pll.po_line_id
655: AND ph.po_header_id = v_header_id
656: AND pl.po_line_id = v_line_id

Line 779: FROM po_headers

775: IF x_cascaded_table(n).vendor_site_id IS NULL
776: AND x_cascaded_table(n).vendor_site_code IS NULL THEN --{
777: SELECT vendor_site_id
778: INTO x_vendor_site_id
779: FROM po_headers
780: WHERE po_header_id = x_cascaded_table(n).po_header_id
781: AND vendor_id = x_cascaded_table(n).vendor_id;
782:
783: SELECT vendor_site_code

Line 3213: po_headers ph

3209: TO_NUMBER(NULL) shipment_line_id, --shipment_line_id
3210: pl.item_id
3211: FROM po_line_locations pll,
3212: po_lines pl,
3213: po_headers ph
3214: WHERE ph.po_header_id = header_id
3215: AND pll.po_header_id = header_id
3216: AND pl.line_num = NVL(v_po_line_num, pl.line_num)
3217: AND NVL(pll.po_release_id, 0) = NVL(v_po_release_id, NVL(pll.po_release_id, 0))

Line 3246: po_headers ph

3242: ) IS
3243: SELECT COUNT(*)
3244: FROM po_line_locations pll,
3245: po_lines pl,
3246: po_headers ph
3247: WHERE ph.po_header_id = header_id
3248: AND pll.po_header_id = header_id
3249: AND pl.line_num = NVL(v_po_line_num, pl.line_num)
3250: AND NVL(pll.po_release_id, 0) = NVL(v_po_release_id, NVL(pll.po_release_id, 0))

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

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(

Line 3328: po_headers ph

3324: pl.item_id
3325: FROM po_distributions pod,
3326: po_line_locations pll,
3327: po_lines pl,
3328: po_headers ph
3329: WHERE ph.po_header_id = header_id
3330: AND pl.po_header_id = ph.po_header_id
3331: AND pll.po_line_id = pl.po_line_id
3332: AND pod.line_location_id = pll.line_location_id

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

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

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

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: *****/

Line 3374: po_headers ph

3370: SELECT COUNT(*)
3371: FROM po_distributions pod,
3372: po_line_locations pll,
3373: po_lines pl,
3374: po_headers ph
3375: WHERE ph.po_header_id = header_id
3376: AND pl.po_header_id = ph.po_header_id
3377: AND pll.po_line_id = pl.po_line_id
3378: AND pod.line_location_id = pll.line_location_id

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

3451: l_asn_exists_code rcv_parameters.receipt_asn_exists_code%TYPE;
3452: l_does_asn_exist VARCHAR2(1) := 'N';
3453: l_asn_count NUMBER := 0;
3454: l_dist_count number; /* Bug#3746516 */
3455: l_rate_date po_headers.rate_date%type; /* Bug#3746516 */
3456: x_is_asn BOOLEAN;
3457: l_return_status VARCHAR2(1) :='S';
3458: l_complex_flag varchar2(1) := 'N';
3459: l_blind_receiving_flag VARCHAR2(1) := 'N'; -- Bug 6796920

Line 4246: po_headers ph

4242: SELECT COUNT(*)
4243: INTO x_temp_count
4244: FROM po_line_locations pll,
4245: po_lines pl,
4246: po_headers ph
4247: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
4248: AND pll.po_header_id = ph.po_header_id
4249: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)
4250: AND NVL(pll.po_release_id, 0) = NVL(temp_cascaded_table(current_n).po_release_id, NVL(pll.po_release_id, 0))

Line 4288: po_headers ph

4284: x_ship_to_location_id,
4285: x_vendor_product_num
4286: FROM po_line_locations pll,
4287: po_lines pl,
4288: po_headers ph
4289: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
4290: AND pll.po_header_id = ph.po_header_id
4291: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)
4292: AND NVL(pll.po_release_id, 0) = NVL(temp_cascaded_table(current_n).po_release_id, NVL(pll.po_release_id, 0))

Line 4321: po_headers ph

4317: INTO x_temp_count
4318: FROM po_distributions pod,
4319: po_line_locations pll,
4320: po_lines pl,
4321: po_headers ph
4322: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
4323: AND pll.po_header_id = ph.po_header_id
4324: AND pll.line_location_id = pod.line_location_id
4325: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

Line 4366: po_headers ph

4362: x_vendor_product_num
4363: FROM po_distributions pod,
4364: po_line_locations pll,
4365: po_lines pl,
4366: po_headers ph
4367: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
4368: AND pll.po_header_id = ph.po_header_id
4369: AND pll.line_location_id = pod.line_location_id
4370: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

Line 4420: po_headers ph,

4416: l_shipment_line_status_code,
4417: l_asn_line_flag
4418: FROM po_line_locations pll,
4419: po_lines pl,
4420: po_headers ph,
4421: rcv_shipment_headers rsh,
4422: rcv_shipment_lines rsl
4423: WHERE rsh.shipment_header_id = temp_cascaded_table(current_n).shipment_header_id
4424: AND rsl.shipment_line_id = temp_cascaded_table(current_n).shipment_line_id

Line 5923: po_headers ph

5919: NVL(pll.enforce_ship_to_location_code, 'NONE') enforce_ship_to_location_code,
5920: pl.item_id
5921: FROM po_line_locations pll,
5922: po_lines pl,
5923: po_headers ph
5924: WHERE pl.po_line_id = v_po_line_id
5925: AND pll.po_line_id = v_po_line_id
5926: AND ph.po_header_id = pl.po_header_id
5927: AND pll.line_location_id = NVL(v_po_line_location_id, pll.line_location_id)

Line 5946: po_headers ph

5942: ) IS
5943: SELECT COUNT(*)
5944: FROM po_line_locations pll,
5945: po_lines pl,
5946: po_headers ph
5947: WHERE pl.po_line_id = v_po_line_id
5948: AND pll.po_line_id = v_po_line_id
5949: AND ph.po_header_id = pl.po_header_id
5950: AND pll.line_location_id = NVL(v_po_line_location_id, pll.line_location_id)

Line 6004: po_headers ph

6000: pl.item_id
6001: FROM po_distributions pod,
6002: po_line_locations pll,
6003: po_lines pl,
6004: po_headers ph
6005: WHERE pl.po_line_id = v_po_line_id
6006: AND pll.po_line_id = v_po_line_id
6007: AND ph.po_header_id = pl.po_header_id
6008: AND pod.line_location_id = pll.line_location_id

Line 6031: po_headers ph

6027: SELECT COUNT(*)
6028: FROM po_distributions pod,
6029: po_line_locations pll,
6030: po_lines pl,
6031: po_headers ph
6032: WHERE pl.po_line_id = v_po_line_id
6033: AND pll.po_line_id = v_po_line_id
6034: AND ph.po_header_id = pl.po_header_id
6035: AND pod.line_location_id = pll.line_location_id

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

6083: x_rate NUMBER;
6084: x_allow_rate_override VARCHAR2(1);
6085: l_time_count NUMBER;
6086: l_dist_count number; /* Bug#3746516 */
6087: l_rate_date po_headers.rate_date%type; /* Bug#3746516 */
6088:
6089: --
6090: l_is_clm_po VARCHAR2(5) := 'N';
6091: l_partial_funded_flag VARCHAR2(5) := 'N';

Line 6647: po_headers ph

6643: x_closed_code,
6644: x_shipment_type
6645: FROM po_line_locations pll,
6646: po_lines pl,
6647: po_headers ph
6648: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
6649: AND pll.po_header_id = ph.po_header_id
6650: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)
6651: AND NVL(pll.po_release_id, 0) = NVL(temp_cascaded_table(current_n).po_release_id, NVL(pll.po_release_id, 0))

Line 6663: po_headers ph

6659: INTO x_temp_count
6660: FROM po_distributions pod,
6661: po_line_locations pll,
6662: po_lines pl,
6663: po_headers ph
6664: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
6665: AND pll.po_header_id = ph.po_header_id
6666: AND pll.line_location_id = pod.line_location_id
6667: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

Line 6692: po_headers ph

6688: x_shipment_type
6689: FROM po_distributions pod,
6690: po_line_locations pll,
6691: po_lines pl,
6692: po_headers ph
6693: WHERE ph.po_header_id = temp_cascaded_table(current_n).po_header_id
6694: AND pll.po_header_id = ph.po_header_id
6695: AND pll.line_location_id = pod.line_location_id
6696: AND pl.line_num = NVL(temp_cascaded_table(current_n).document_line_num, pl.line_num)

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

8932: PROCEDURE validate_ref_integ(
8933: x_ref_integrity_rec IN OUT NOCOPY rcv_shipment_line_sv.ref_integrity_record_type,
8934: x_header_record IN rcv_roi_preprocessor.header_rec_type
8935: ) IS
8936: x_po_vendor_id po_headers.vendor_id%TYPE := NULL;
8937: x_po_line_id po_lines.po_line_id%TYPE;
8938: x_po_vendor_site_id po_headers.vendor_site_id%TYPE := NULL;
8939: x_progress VARCHAR2(3);
8940: x_error_status VARCHAR2(1);

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

8934: x_header_record IN rcv_roi_preprocessor.header_rec_type
8935: ) IS
8936: x_po_vendor_id po_headers.vendor_id%TYPE := NULL;
8937: x_po_line_id po_lines.po_line_id%TYPE;
8938: x_po_vendor_site_id po_headers.vendor_site_id%TYPE := NULL;
8939: x_progress VARCHAR2(3);
8940: x_error_status VARCHAR2(1);
8941: BEGIN
8942: x_error_status := rcv_error_pkg.g_ret_sts_error;

Line 8965: FROM po_headers

8961:
8962: IF x_ref_integrity_rec.vendor_id IS NOT NULL THEN
8963: SELECT NVL(MAX(vendor_id), 0)
8964: INTO x_po_vendor_id
8965: FROM po_headers
8966: WHERE po_header_id = x_ref_integrity_rec.po_header_id
8967: AND vendor_id = x_ref_integrity_rec.vendor_id;
8968:
8969: IF (x_po_vendor_id = 0) THEN

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

8986: Changed the vendor_site_id validation code.
8987: Added parent_txn_id condition so as to take into account,
8988: the possibility that the vendor_site can change on a PO even after
8989: receipts have been created.
8990: So now incase of null parent txn id we see from PO_headers and
8991: incase of non-null parent_txn_id we look for the parent txn's vendor_site_id.
8992: */
8993: IF (x_ref_integrity_rec.parent_txn_id IS NULL) THEN
8994:

Line 8997: FROM po_headers

8993: IF (x_ref_integrity_rec.parent_txn_id IS NULL) THEN
8994:
8995: SELECT NVL(MAX(vendor_site_id), 0)
8996: INTO x_po_vendor_site_id
8997: FROM po_headers
8998: WHERE po_header_id = x_ref_integrity_rec.po_header_id
8999: AND vendor_site_id = x_ref_integrity_rec.vendor_site_id;
9000:
9001: asn_debug.put_line('vendor_site_id from PO_HEADERS ' || TO_CHAR(x_po_vendor_site_id));

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

8997: FROM po_headers
8998: WHERE po_header_id = x_ref_integrity_rec.po_header_id
8999: AND vendor_site_id = x_ref_integrity_rec.vendor_site_id;
9000:
9001: asn_debug.put_line('vendor_site_id from PO_HEADERS ' || TO_CHAR(x_po_vendor_site_id));
9002:
9003: END IF;
9004:
9005: IF (x_ref_integrity_rec.parent_txn_id IS NOT NULL) THEN

Line 9032: FROM po_headers

9028: END IF;
9029:
9030: SELECT NVL(MAX(vendor_site_id), 0)
9031: INTO x_po_vendor_site_id
9032: FROM po_headers
9033: WHERE po_header_id = x_ref_integrity_rec.po_header_id
9034: AND revision_num = x_ref_integrity_rec.po_revision_num;
9035:
9036: IF (x_po_vendor_site_id = 0) THEN

Line 10446: po_headers poh,

10442: 0 interface_available_qty
10443: FROM rcv_supply rsup,
10444: rcv_transactions rt,
10445: rcv_shipment_lines rsl,
10446: po_headers poh,
10447: po_lines pol
10448: WHERE rt.transaction_id = v_parent_trx_id
10449: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)
10450: AND rsup.supply_type_code = 'RECEIVING'

Line 10553: po_headers poh,

10549: 0 interface_available_qty
10550: FROM rcv_supply rsup,
10551: rcv_transactions rt,
10552: rcv_shipment_lines rsl,
10553: po_headers poh,
10554: po_lines pol,
10555: po_distributions pod
10556: WHERE rt.transaction_id = v_parent_trx_id
10557: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)

Line 10668: po_headers poh,

10664: 0 interface_available_qty
10665: FROM rcv_supply rsup,
10666: rcv_transactions rt,
10667: rcv_shipment_lines rsl,
10668: po_headers poh,
10669: po_lines pol,
10670: po_distributions pod
10671: WHERE rt.transaction_id = v_parent_trx_id
10672: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)

Line 10776: po_headers poh,

10772: 0 interface_available_qty
10773: FROM rcv_supply rsup,
10774: rcv_transactions rt,
10775: rcv_shipment_lines rsl,
10776: po_headers poh,
10777: po_lines pol,
10778: po_distributions pod
10779: WHERE rt.transaction_id = v_parent_trx_id
10780: AND rsup.to_organization_id = NVL(v_to_organization_id, rsup.to_organization_id)

Line 10842: l_po_header_id po_headers_all.po_header_id%type;

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 */

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

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;

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

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 */

Line 11406: from po_headers_all

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

Line 13137: l_po_header_id po_headers_all.po_header_id%type;

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:

Line 13396: po_headers poh,

13392: rt.bom_resource_id,
13393: rsl.ussgl_transaction_code
13394: FROM rcv_transactions rt,
13395: rcv_shipment_lines rsl,
13396: po_headers poh,
13397: po_lines pol
13398: WHERE rt.transaction_id = v_parent_trx_id
13399: AND rt.organization_id = NVL(v_to_organization_id, rt.organization_id)
13400: AND ( rt.transaction_type IN('RECEIVE', 'TRANSFER', 'ACCEPT', 'REJECT', 'MATCH')

Line 14571: po_headers poh,

14567: rt.destination_type_code,
14568: rsl.ussgl_transaction_code
14569: FROM rcv_transactions rt,
14570: rcv_shipment_lines rsl,
14571: po_headers poh,
14572: po_lines pol
14573: WHERE rt.transaction_id = v_parent_trx_id
14574: AND rt.organization_id = NVL(v_to_organization_id, rt.organization_id)
14575: AND ( rt.transaction_type IN('RECEIVE', 'TRANSFER', 'ACCEPT', 'REJECT', 'MATCH')

Line 15983: FROM po_headers

15979: IF (x_cascaded_table(n).transaction_type <> 'RECEIVE') THEN --{
15980: IF (x_cascaded_table(n).source_document_code = 'PO') THEN --{
15981: SELECT type_lookup_code
15982: INTO po_lookup_code_record.lookup_code
15983: FROM po_headers
15984: WHERE po_header_id = x_cascaded_table(n).po_header_id;
15985:
15986: po_lookup_code_record.lookup_type := 'PO TYPE';
15987: ELSE --}{

Line 17183: l_po_currency po_headers_all.currency_code%type;

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');

Line 17374: po_headers_all poh

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: