DBA Data[Home] [Help]

APPS.AP_IMPORT_VALIDATION_PKG dependencies on PO_HEADERS

Line 1461: FROM po_headers

1457:
1458: -- differentiate PO from RFQ and Quotation
1459: SELECT closed_date, vendor_id, vendor_site_id, closed_code /* Added closed_code - 1Off Bug 10288184 / 11i Bug 8410175 */
1460: INTO l_closed_date ,l_vendor_id, l_vendor_site_id, l_closed_code /* Added l_closed_code - 1Off Bug 10288184 / 11i Bug 8410175 */
1461: FROM po_headers
1462: WHERE segment1 = p_invoice_rec.po_number
1463: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
1464: /* BUG 2902452 added*/
1465: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS');--Bug5687122 --Added In Process condition

Line 4467: FROM po_headers

4463: END IF;
4464:
4465: SELECT terms_id
4466: INTO l_term_id
4467: FROM po_headers
4468: WHERE segment1 = p_invoice_rec.po_number
4469: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
4470: END IF;
4471:

Line 4483: FROM po_headers p, ap_invoice_lines_interface l

4479: END IF;
4480: BEGIN
4481: SELECT p.terms_id
4482: INTO l_term_id
4483: FROM po_headers p, ap_invoice_lines_interface l
4484: WHERE p.type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
4485: AND ((l.po_header_id = p.po_header_id) OR
4486: (l.po_number = p.segment1))
4487: AND l.invoice_id = p_invoice_rec.invoice_id

Line 4524: po_headers p,

4520: BEGIN
4521: SELECT p.terms_id
4522: INTO l_term_id
4523: FROM rcv_transactions r,
4524: po_headers p,
4525: ap_invoice_lines_interface l
4526: WHERE p.po_header_id = r.po_header_id
4527: AND r.transaction_id = l.rcv_transaction_id
4528: AND l.invoice_id = p_invoice_rec.invoice_id

Line 9216: FROM po_headers

9212:
9213: BEGIN
9214: SELECT 'Y', po_header_id
9215: INTO l_po_is_valid_flag, l_po_header_id
9216: FROM po_headers
9217: WHERE segment1 = p_invoice_rec.po_number
9218: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
9219: /* BUG 2902452 added*/
9220: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS');--Bug5687122 --Added In Process condition

Line 9263: FROM po_headers ph

9259: END IF;
9260: --
9261: SELECT 'Y'
9262: INTO l_po_is_valid_flag
9263: FROM po_headers ph
9264: WHERE ph.po_header_id = l_po_header_id
9265: AND ph.type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
9266: /* BUG 2902452 added */
9267: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS')--Bug5687122 --Added In Process condition

Line 9345: FROM po_headers ph

9341: END IF;
9342: --
9343: SELECT 'Y', ph.po_header_id
9344: INTO l_po_is_valid_flag, l_po_header_id
9345: FROM po_headers ph
9346: WHERE segment1 = p_invoice_lines_rec.po_number
9347: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
9348: /*BUG 2902452 added*/
9349: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS')--Bug5687122 --Added In Process condition

Line 9395: FROM po_headers ph

9391: END IF;
9392: --
9393: SELECT 'Y'
9394: INTO l_po_is_consistent_flag
9395: FROM po_headers ph
9396: WHERE segment1 = p_invoice_lines_rec.po_number
9397: AND po_header_id = l_po_header_id;
9398:
9399: EXCEPTION

Line 9966: from po_lines pol, po_headers poh

9962: INTO l_po_rel_is_consistent_flag
9963: FROM po_line_locations
9964: WHERE po_line_id = (
9965: select po_line_id
9966: from po_lines pol, po_headers poh
9967: where poh.po_header_id = pol.po_header_id
9968: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
9969: -- fix for bug 2809177 commented above line and wrote the below one
9970: and poh.po_header_id = l_po_header_id

Line 9978: from po_releases por, po_headers poh

9974: and pol.po_line_id = nvl(l_po_line_id, pol.po_line_id)
9975: and pol.line_num = p_invoice_lines_rec.po_line_number )
9976: AND po_release_id = (
9977: select po_release_id
9978: from po_releases por, po_headers poh
9979: where poh.po_header_id = por.po_header_id
9980: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
9981: -- fix for bug 2809177 commented above line and wrote the below one
9982: and poh.po_header_id = l_po_header_id

Line 9995: from po_lines pol, po_headers poh

9991: INTO l_po_rel_is_consistent_flag
9992: FROM po_line_locations
9993: WHERE po_line_id = (
9994: select po_line_id
9995: from po_lines pol, po_headers poh
9996: where poh.po_header_id = pol.po_header_id
9997: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
9998: -- and poh.segment1 = nvl(p_invoice_lines_rec.po_number, poh.segment1)
9999: -- fix for bug 2809177 commented above two lines and wrote the below one

Line 10006: from po_releases por, po_headers poh

10002: and pol.po_line_id = nvl(l_po_line_id, pol.po_line_id)
10003: and pol.line_num = p_invoice_lines_rec.po_line_number )
10004: AND po_release_id = (
10005: select po_release_id
10006: from po_releases por, po_headers poh
10007: where poh.po_header_id = por.po_header_id
10008: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
10009: -- and poh.segment1 = nvl(p_invoice_lines_rec.po_number, poh.segment1)
10010: -- fix for bug 2809177 commented above two line and wrote the below one

Line 11507: FROM po_headers

11503: END IF;
11504:
11505: SELECT segment1
11506: INTO l_po_number
11507: FROM po_headers
11508: WHERE po_header_id = l_po_header_id
11509: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
11510: EXCEPTION
11511: WHEN NO_DATA_FOUND THEN

Line 11538: FROM po_headers ph,

11534: SELECT pl.po_header_id,
11535: ph.segment1
11536: INTO l_po_header_id,
11537: l_po_number
11538: FROM po_headers ph,
11539: po_lines pl
11540: WHERE pl.po_line_id = l_po_line_id
11541: AND pl.po_header_id = ph.po_header_id;
11542:

Line 11568: FROM po_headers ph,

11564: SELECT pr.po_header_id,
11565: ph.segment1
11566: INTO l_po_header_id,
11567: l_po_number
11568: FROM po_headers ph,
11569: po_releases pr
11570: WHERE pr.po_release_id = l_po_release_id
11571: AND pr.po_header_id = ph.po_header_id;
11572: EXCEPTION

Line 11603: FROM po_headers ph,

11599: SELECT pll.po_header_id,
11600: ph.segment1
11601: INTO l_po_header_id,
11602: l_po_number
11603: FROM po_headers ph,
11604: po_line_locations pll
11605: WHERE pll.line_location_id = l_po_line_location_id
11606: AND pll.po_header_id = ph.po_header_id;
11607: EXCEPTION

Line 11638: FROM po_headers ph,

11634: SELECT pd.po_header_id,
11635: ph.segment1
11636: INTO l_po_header_id,
11637: l_po_number
11638: FROM po_headers ph,
11639: po_distributions pd
11640: WHERE pd.po_distribution_id = l_po_distribution_id
11641: AND pd.po_header_id = ph.po_header_id
11642: AND pd.line_location_id IS NOT NULL; /* BUG 3253594 */

Line 11669: FROM po_headers

11665: END IF;
11666: --bug2268553 to differentiate PO from RFQ and Quotation
11667: SELECT po_header_id
11668: INTO l_po_header_id
11669: FROM po_headers
11670: WHERE segment1 = l_po_number
11671: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
11672:
11673: END IF; -- Step 30: po_number is not null but po_header_id is null

Line 12011: from po_headers

12007: l_blanket varchar2(10);
12008: begin
12009: select type_lookup_code, vendor_id -- Bug 5448579
12010: into l_blanket, l_vendor_id
12011: from po_headers
12012: where po_header_id=l_po_header_id;
12013: --end of select for 5292782
12014:
12015: IF (l_blanket<>'BLANKET') THEN /* Bug10103888 */

Line 12097: FROM po_headers

12093: END IF;
12094: -- Bug 5448579. L_vendor_id is already derived
12095: /* SELECT vendor_id
12096: INTO l_vendor_id
12097: FROM po_headers
12098: WHERE po_header_id = l_po_header_id; */
12099:
12100: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
12101: AP_IMPORT_UTILITIES_PKG.Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

Line 12183: FROM po_headers

12179: END IF;
12180:
12181: SELECT 'Y'
12182: INTO l_po_is_not_blanket
12183: FROM po_headers
12184: WHERE po_header_id = l_po_header_id
12185: AND type_lookup_code <> l_blanket; --4019310
12186:
12187: EXCEPTION

Line 12285: FROM po_headers

12281: END IF;
12282:
12283: SELECT 'Y'
12284: INTO l_po_inv_curr_is_consis_flag
12285: FROM po_headers
12286: WHERE po_header_id = l_po_header_id
12287: AND currency_code = p_invoice_rec.invoice_currency_code;
12288: EXCEPTION
12289: WHEN NO_DATA_FOUND THEN

Line 12300: FROM po_headers

12296: -- Reject
12297: IF ( AP_IMPORT_INVOICES_PKG.g_source = 'XML GATEWAY') THEN
12298: SELECT currency_code
12299: INTO l_po_currency_code
12300: FROM po_headers
12301: WHERE po_header_id = l_po_header_id ;
12302:
12303: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
12304: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table,

Line 13379: FROM po_headers

13375: If ( l_po_line_location_id is null) and (l_po_number is not null) and ( p_invoice_lines_rec.po_shipment_num is not null) then
13376: BEGIN
13377: SELECT po_header_id
13378: INTO l_po_header_id
13379: FROM po_headers
13380: WHERE segment1 = l_po_number
13381: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
13382: EXCEPTION
13383: when NO_DATA_FOUND then

Line 16079: po_headers_all PH ,

16075: SELECT nvl(sum(nvl(RT.quantity_billed,0)),0)
16076: INTO l_qty_billed_sum
16077: FROM rcv_transactions RT ,
16078: rcv_shipment_headers SH ,
16079: po_headers_all PH ,
16080: po_line_locations_all PS ,
16081: po_releases_all PR ,
16082: per_all_people_f BU
16083: WHERE RT.po_line_location_id = p_invoice_lines_rec.po_line_location_id

Line 21819: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;

21815: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
21816: l_ref_doc_trx_id zx_transaction_lines_gt.ref_doc_trx_id%TYPE;
21817: l_product_org_id zx_transaction_lines_gt.product_org_id%TYPE;
21818:
21819: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
21820: l_uom_code mtl_units_of_measure.uom_code%TYPE;
21821:
21822: l_error_code VARCHAR2(500);
21823: l_inv_hdr_org_id ap_invoices_interface.org_id%TYPE;

Line 23444: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;

23440: l_ref_doc_application_id zx_transaction_lines_gt.ref_doc_application_id%TYPE;
23441: l_ref_doc_entity_code zx_transaction_lines_gt.ref_doc_entity_code%TYPE;
23442: l_ref_doc_event_class_code zx_transaction_lines_gt.ref_doc_event_class_code%TYPE;
23443: l_ref_doc_line_quantity zx_transaction_lines_gt.ref_doc_line_quantity%TYPE;
23444: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;
23445: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
23446: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
23447: l_uom_code mtl_units_of_measure.uom_code%TYPE;
23448: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;

Line 23446: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;

23442: l_ref_doc_event_class_code zx_transaction_lines_gt.ref_doc_event_class_code%TYPE;
23443: l_ref_doc_line_quantity zx_transaction_lines_gt.ref_doc_line_quantity%TYPE;
23444: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;
23445: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
23446: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
23447: l_uom_code mtl_units_of_measure.uom_code%TYPE;
23448: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;
23449: l_error_code varchar2(2000);
23450: current_calling_sequence VARCHAR2(2000);

Line 23448: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;

23444: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;
23445: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
23446: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
23447: l_uom_code mtl_units_of_measure.uom_code%TYPE;
23448: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;
23449: l_error_code varchar2(2000);
23450: current_calling_sequence VARCHAR2(2000);
23451: l_success boolean;
23452: l_intended_use zx_lines_det_factors.line_intended_use%type;