DBA Data[Home] [Help]

APPS.AP_IMPORT_VALIDATION_PKG dependencies on PO_HEADERS

Line 1357: FROM po_headers

1353:
1354: -- differentiate PO from RFQ and Quotation
1355: SELECT closed_date, vendor_id, vendor_site_id
1356: INTO l_closed_date ,l_vendor_id, l_vendor_site_id
1357: FROM po_headers
1358: WHERE segment1 = p_invoice_rec.po_number
1359: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
1360: /* BUG 2902452 added*/
1361: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS');--Bug5687122 --Added In Process condition

Line 4200: FROM po_headers

4196: END IF;
4197:
4198: SELECT terms_id
4199: INTO l_term_id
4200: FROM po_headers
4201: WHERE segment1 = p_invoice_rec.po_number
4202: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
4203: END IF;
4204:

Line 4216: FROM po_headers p, ap_invoice_lines_interface l

4212: END IF;
4213: BEGIN
4214: SELECT p.terms_id
4215: INTO l_term_id
4216: FROM po_headers p, ap_invoice_lines_interface l
4217: WHERE p.type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
4218: AND ((l.po_header_id = p.po_header_id) OR
4219: (l.po_number = p.segment1))
4220: AND l.invoice_id = p_invoice_rec.invoice_id

Line 4257: po_headers p,

4253: BEGIN
4254: SELECT p.terms_id
4255: INTO l_term_id
4256: FROM rcv_transactions r,
4257: po_headers p,
4258: ap_invoice_lines_interface l
4259: WHERE p.po_header_id = r.po_header_id
4260: AND r.transaction_id = l.rcv_transaction_id
4261: AND l.invoice_id = p_invoice_rec.invoice_id

Line 8394: FROM po_headers

8390:
8391: BEGIN
8392: SELECT 'Y', po_header_id
8393: INTO l_po_is_valid_flag, l_po_header_id
8394: FROM po_headers
8395: WHERE segment1 = p_invoice_rec.po_number
8396: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
8397: /* BUG 2902452 added*/
8398: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS');--Bug5687122 --Added In Process condition

Line 8441: FROM po_headers ph

8437: END IF;
8438: --
8439: SELECT 'Y'
8440: INTO l_po_is_valid_flag
8441: FROM po_headers ph
8442: WHERE ph.po_header_id = l_po_header_id
8443: AND ph.type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
8444: /* BUG 2902452 added */
8445: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS');--Bug5687122 --Added In Process condition

Line 8489: FROM po_headers ph

8485: END IF;
8486: --
8487: SELECT 'Y', ph.po_header_id
8488: INTO l_po_is_valid_flag, l_po_header_id
8489: FROM po_headers ph
8490: WHERE segment1 = p_invoice_lines_rec.po_number
8491: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD')
8492: /*BUG 2902452 added*/
8493: AND nvl(authorization_status,'INCOMPLETE') in ('APPROVED','REQUIRES REAPPROVAL','IN PROCESS');--Bug5687122 --Added In Process condition

Line 8538: FROM po_headers ph

8534: END IF;
8535: --
8536: SELECT 'Y'
8537: INTO l_po_is_consistent_flag
8538: FROM po_headers ph
8539: WHERE segment1 = p_invoice_lines_rec.po_number
8540: AND po_header_id = l_po_header_id;
8541:
8542: EXCEPTION

Line 8985: from po_lines pol, po_headers poh

8981: INTO l_po_rel_is_consistent_flag
8982: FROM po_line_locations
8983: WHERE po_line_id = (
8984: select po_line_id
8985: from po_lines pol, po_headers poh
8986: where poh.po_header_id = pol.po_header_id
8987: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
8988: -- fix for bug 2809177 commented above line and wrote the below one
8989: and poh.po_header_id = l_po_header_id

Line 8997: from po_releases por, po_headers poh

8993: and pol.po_line_id = nvl(l_po_line_id, pol.po_line_id)
8994: and pol.line_num = p_invoice_lines_rec.po_line_number )
8995: AND po_release_id = (
8996: select po_release_id
8997: from po_releases por, po_headers poh
8998: where poh.po_header_id = por.po_header_id
8999: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
9000: -- fix for bug 2809177 commented above line and wrote the below one
9001: and poh.po_header_id = l_po_header_id

Line 9014: from po_lines pol, po_headers poh

9010: INTO l_po_rel_is_consistent_flag
9011: FROM po_line_locations
9012: WHERE po_line_id = (
9013: select po_line_id
9014: from po_lines pol, po_headers poh
9015: where poh.po_header_id = pol.po_header_id
9016: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
9017: -- and poh.segment1 = nvl(p_invoice_lines_rec.po_number, poh.segment1)
9018: -- fix for bug 2809177 commented above two lines and wrote the below one

Line 9025: from po_releases por, po_headers poh

9021: and pol.po_line_id = nvl(l_po_line_id, pol.po_line_id)
9022: and pol.line_num = p_invoice_lines_rec.po_line_number )
9023: AND po_release_id = (
9024: select po_release_id
9025: from po_releases por, po_headers poh
9026: where poh.po_header_id = por.po_header_id
9027: -- and poh.po_header_id = nvl(l_po_header_id, poh.po_header_id)
9028: -- and poh.segment1 = nvl(p_invoice_lines_rec.po_number, poh.segment1)
9029: -- fix for bug 2809177 commented above two line and wrote the below one

Line 10418: FROM po_headers

10414: END IF;
10415:
10416: SELECT segment1
10417: INTO l_po_number
10418: FROM po_headers
10419: WHERE po_header_id = l_po_header_id
10420: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
10421: EXCEPTION
10422: WHEN NO_DATA_FOUND THEN

Line 10449: FROM po_headers ph,

10445: SELECT pl.po_header_id,
10446: ph.segment1
10447: INTO l_po_header_id,
10448: l_po_number
10449: FROM po_headers ph,
10450: po_lines pl
10451: WHERE pl.po_line_id = l_po_line_id
10452: AND pl.po_header_id = ph.po_header_id;
10453:

Line 10479: FROM po_headers ph,

10475: SELECT pr.po_header_id,
10476: ph.segment1
10477: INTO l_po_header_id,
10478: l_po_number
10479: FROM po_headers ph,
10480: po_releases pr
10481: WHERE pr.po_release_id = l_po_release_id
10482: AND pr.po_header_id = ph.po_header_id;
10483: EXCEPTION

Line 10514: FROM po_headers ph,

10510: SELECT pll.po_header_id,
10511: ph.segment1
10512: INTO l_po_header_id,
10513: l_po_number
10514: FROM po_headers ph,
10515: po_line_locations pll
10516: WHERE pll.line_location_id = l_po_line_location_id
10517: AND pll.po_header_id = ph.po_header_id;
10518: EXCEPTION

Line 10549: FROM po_headers ph,

10545: SELECT pd.po_header_id,
10546: ph.segment1
10547: INTO l_po_header_id,
10548: l_po_number
10549: FROM po_headers ph,
10550: po_distributions pd
10551: WHERE pd.po_distribution_id = l_po_distribution_id
10552: AND pd.po_header_id = ph.po_header_id
10553: AND pd.line_location_id IS NOT NULL; /* BUG 3253594 */

Line 10580: FROM po_headers

10576: END IF;
10577: --bug2268553 to differentiate PO from RFQ and Quotation
10578: SELECT po_header_id
10579: INTO l_po_header_id
10580: FROM po_headers
10581: WHERE segment1 = l_po_number
10582: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
10583:
10584: END IF; -- Step 30: po_number is not null but po_header_id is null

Line 10895: from po_headers

10891: l_blanket varchar2(10);
10892: begin
10893: select type_lookup_code, vendor_id -- Bug 5448579
10894: into l_blanket, l_vendor_id
10895: from po_headers
10896: where po_header_id=l_po_header_id;
10897: --end of select for 5292782
10898:
10899: SELECT COUNT(*)

Line 10979: FROM po_headers

10975: END IF;
10976: -- Bug 5448579. L_vendor_id is already derived
10977: /* SELECT vendor_id
10978: INTO l_vendor_id
10979: FROM po_headers
10980: WHERE po_header_id = l_po_header_id; */
10981:
10982: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
10983: AP_IMPORT_UTILITIES_PKG.Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

Line 11065: FROM po_headers

11061: END IF;
11062:
11063: SELECT 'Y'
11064: INTO l_po_is_not_blanket
11065: FROM po_headers
11066: WHERE po_header_id = l_po_header_id
11067: AND type_lookup_code <> l_blanket; --4019310
11068:
11069: EXCEPTION

Line 11167: FROM po_headers

11163: END IF;
11164:
11165: SELECT 'Y'
11166: INTO l_po_inv_curr_is_consis_flag
11167: FROM po_headers
11168: WHERE po_header_id = l_po_header_id
11169: AND currency_code = p_invoice_rec.invoice_currency_code;
11170: EXCEPTION
11171: WHEN NO_DATA_FOUND THEN

Line 11182: FROM po_headers

11178: -- Reject
11179: IF ( AP_IMPORT_INVOICES_PKG.g_source = 'XML GATEWAY') THEN
11180: SELECT currency_code
11181: INTO l_po_currency_code
11182: FROM po_headers
11183: WHERE po_header_id = l_po_header_id ;
11184:
11185: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
11186: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table,

Line 12135: FROM po_headers

12131: 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
12132: BEGIN
12133: SELECT po_header_id
12134: INTO l_po_header_id
12135: FROM po_headers
12136: WHERE segment1 = l_po_number
12137: AND type_lookup_code in ('BLANKET', 'PLANNED', 'STANDARD');
12138: EXCEPTION
12139: when NO_DATA_FOUND then

Line 14685: po_headers_all PH ,

14681: SELECT nvl(sum(nvl(RT.quantity_billed,0)),0)
14682: INTO l_qty_billed_sum
14683: FROM rcv_transactions RT ,
14684: rcv_shipment_headers SH ,
14685: po_headers_all PH ,
14686: po_line_locations_all PS ,
14687: po_releases_all PR ,
14688: per_all_people_f BU
14689: WHERE RT.po_line_location_id = p_invoice_lines_rec.po_line_location_id

Line 20014: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;

20010: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
20011: l_ref_doc_trx_id zx_transaction_lines_gt.ref_doc_trx_id%TYPE;
20012: l_product_org_id zx_transaction_lines_gt.product_org_id%TYPE;
20013:
20014: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
20015: l_uom_code mtl_units_of_measure.uom_code%TYPE;
20016:
20017: l_error_code VARCHAR2(500);
20018: l_inv_hdr_org_id ap_invoices_interface.org_id%TYPE;

Line 21585: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;

21581: l_ref_doc_application_id zx_transaction_lines_gt.ref_doc_application_id%TYPE;
21582: l_ref_doc_entity_code zx_transaction_lines_gt.ref_doc_entity_code%TYPE;
21583: l_ref_doc_event_class_code zx_transaction_lines_gt.ref_doc_event_class_code%TYPE;
21584: l_ref_doc_line_quantity zx_transaction_lines_gt.ref_doc_line_quantity%TYPE;
21585: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;
21586: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
21587: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
21588: l_uom_code mtl_units_of_measure.uom_code%TYPE;
21589: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;

Line 21587: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;

21583: l_ref_doc_event_class_code zx_transaction_lines_gt.ref_doc_event_class_code%TYPE;
21584: l_ref_doc_line_quantity zx_transaction_lines_gt.ref_doc_line_quantity%TYPE;
21585: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;
21586: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
21587: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
21588: l_uom_code mtl_units_of_measure.uom_code%TYPE;
21589: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;
21590: l_error_code varchar2(2000);
21591: current_calling_sequence VARCHAR2(2000);

Line 21589: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;

21585: l_po_header_curr_conv_rat po_headers_all.rate%TYPE;
21586: l_ref_doc_trx_level_type zx_transaction_lines_gt.ref_doc_trx_level_type%TYPE;
21587: l_po_header_curr_conv_rate po_headers_all.rate%TYPE;
21588: l_uom_code mtl_units_of_measure.uom_code%TYPE;
21589: l_ref_doc_trx_id po_headers_all.po_header_id%TYPE;
21590: l_error_code varchar2(2000);
21591: current_calling_sequence VARCHAR2(2000);
21592: l_success boolean;
21593: l_intended_use zx_lines_det_factors.line_intended_use%type;