DBA Data[Home] [Help]

APPS.PO_INTERFACE_S dependencies on PO_HEADERS

Line 44: -- been modified to point to PO_HEADERS_ALL type.

40: (vendor_id number := null,
41: ship_to_location_id number := null,
42: bill_to_location_id number := null,
43: -- Bug# 4546121:All columns that referred to the obsolete columns in po_vendors have
44: -- been modified to point to PO_HEADERS_ALL type.
45: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%type := null,
46: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%type := null,
47: pay_on_code varchar2(25) := null,
48: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%type := null,

Line 45: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%type := null,

41: ship_to_location_id number := null,
42: bill_to_location_id number := null,
43: -- Bug# 4546121:All columns that referred to the obsolete columns in po_vendors have
44: -- been modified to point to PO_HEADERS_ALL type.
45: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%type := null,
46: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%type := null,
47: pay_on_code varchar2(25) := null,
48: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%type := null,
49: terms_id number := null,

Line 46: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%type := null,

42: bill_to_location_id number := null,
43: -- Bug# 4546121:All columns that referred to the obsolete columns in po_vendors have
44: -- been modified to point to PO_HEADERS_ALL type.
45: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%type := null,
46: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%type := null,
47: pay_on_code varchar2(25) := null,
48: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%type := null,
49: terms_id number := null,
50: type_1099 po_vendors.type_1099%type := null,

Line 48: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%type := null,

44: -- been modified to point to PO_HEADERS_ALL type.
45: ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%type := null,
46: fob_lookup_code PO_HEADERS_ALL.fob_lookup_code%type := null,
47: pay_on_code varchar2(25) := null,
48: freight_terms_lookup_code PO_HEADERS_ALL.freight_terms_lookup_code%type := null,
49: terms_id number := null,
50: type_1099 po_vendors.type_1099%type := null,
51: hold_flag po_vendors.hold_flag%type := null,
52: invoice_currency_code po_vendors.invoice_currency_code%type := null,

Line 312: FROM po_headers_interface phi,

308: , pli.ip_category_id ip_category_id
309: , pli.supplier_part_auxid supplier_part_auxid
310: , pli.catalog_name catalog_name
311: --
312: FROM po_headers_interface phi,
313: po_lines_interface pli,
314: po_distributions_interface pdi
315: WHERE phi.interface_header_id = pli.interface_header_id
316: AND pli.interface_line_id = pdi.interface_line_id

Line 344: g_mode po_headers_interface.action%type := null;

340: g_sourcing_errorcode number;
341: g_interface_source_code varchar2(25);
342: --
343:
344: g_mode po_headers_interface.action%type := null;
345: g_group_code po_headers_interface.group_code%type := null;
346: g_document_subtype po_headers_interface.document_subtype%type := null;
347: g_po_release_id number := null;
348: g_document_type varchar2(25) := null;

Line 345: g_group_code po_headers_interface.group_code%type := null;

341: g_interface_source_code varchar2(25);
342: --
343:
344: g_mode po_headers_interface.action%type := null;
345: g_group_code po_headers_interface.group_code%type := null;
346: g_document_subtype po_headers_interface.document_subtype%type := null;
347: g_po_release_id number := null;
348: g_document_type varchar2(25) := null;
349: g_number_records_processed number;

Line 346: g_document_subtype po_headers_interface.document_subtype%type := null;

342: --
343:
344: g_mode po_headers_interface.action%type := null;
345: g_group_code po_headers_interface.group_code%type := null;
346: g_document_subtype po_headers_interface.document_subtype%type := null;
347: g_po_release_id number := null;
348: g_document_type varchar2(25) := null;
349: g_number_records_processed number;
350: g_purchasing_ou_id PO_HEADERS_ALL.org_id%TYPE; --

Line 350: g_purchasing_ou_id PO_HEADERS_ALL.org_id%TYPE; --

346: g_document_subtype po_headers_interface.document_subtype%type := null;
347: g_po_release_id number := null;
348: g_document_type varchar2(25) := null;
349: g_number_records_processed number;
350: g_purchasing_ou_id PO_HEADERS_ALL.org_id%TYPE; --
351: g_hdr_requesting_ou_id PO_HEADERS_ALL.org_id%TYPE; --
352: g_rate_for_req_fields NUMBER; --
353: g_line_requesting_ou_id PO_REQUISITION_LINES_ALL.org_id%TYPE; --
354:

Line 351: g_hdr_requesting_ou_id PO_HEADERS_ALL.org_id%TYPE; --

347: g_po_release_id number := null;
348: g_document_type varchar2(25) := null;
349: g_number_records_processed number;
350: g_purchasing_ou_id PO_HEADERS_ALL.org_id%TYPE; --
351: g_hdr_requesting_ou_id PO_HEADERS_ALL.org_id%TYPE; --
352: g_rate_for_req_fields NUMBER; --
353: g_line_requesting_ou_id PO_REQUISITION_LINES_ALL.org_id%TYPE; --
354:
355: /* Global variable to hold number of req lines

Line 512: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE

508:
509: --
510:
511: FUNCTION validate_interface_records (
512: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE
513: ) RETURN BOOLEAN;
514:
515: FUNCTION validate_config_id (
516: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE

Line 516: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE

512: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE
513: ) RETURN BOOLEAN;
514:
515: FUNCTION validate_config_id (
516: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE
517: ) RETURN BOOLEAN;
518:
519: --
520:

Line 561: x_document_number po_headers.segment1%type;

557: x_number_lines IN OUT NOCOPY number,
558: p_document_creation_method IN VARCHAR2, --
559: p_orig_org_id IN NUMBER DEFAULT NULL --
560: ) IS
561: x_document_number po_headers.segment1%type;
562: x_errorcode number;
563: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
564: l_api_name VARCHAR2(30) := 'create_documents(wrapper1)'; --< Bug 3210331 >
565: BEGIN

Line 599: DESC: Create/Add to document from requisition data in the PO_HEADERS,LINES

595: --
596:
597: /*============================================================================
598: Name: CREATE_DOCUMENTS
599: DESC: Create/Add to document from requisition data in the PO_HEADERS,LINES
600: and DISTRIBUTION interface tables.
601: ARGS: IN : x_batch_id IN number
602: --
603: IN: p_sourcing_k_doc_type IN VARCHAR2 - The document type that Sourcing

Line 856: FROM po_headers_interface

852:
853: /* For now a batch has only one header, so get the document header id */
854: SELECT min(interface_header_id)
855: INTO x_interface_header_id
856: FROM po_headers_interface
857: WHERE batch_id = p_batch_id; --
858:
859: l_progress:='040';
860: --

Line 866: FROM po_headers_interface

862: --
863: --Modified the select statement to select document_subtype as well.
864: SELECT document_type_code,document_subtype,nvl(interface_source_code,'NOCODE')
865: INTO g_document_type,g_document_subtype,g_interface_source_code
866: FROM po_headers_interface
867: WHERE interface_header_id = x_interface_header_id;
868:
869: -- Populate global variable to indicate whether
870: -- tax is calculated for this document type

Line 1038: from po_headers_all --

1034: ELSE
1035: l_progress:= '140';
1036: select segment1
1037: into x_document_number
1038: from po_headers_all --
1039: where po_header_id=x_document_id;
1040:
1041: END IF;
1042: /* CONSIGNED FPI end */

Line 1083: from po_headers_all

1079: -- Need to populate document number for autocreate success message
1080: IF g_document_subtype = 'STANDARD' THEN
1081: select segment1
1082: into x_document_number
1083: from po_headers_all
1084: where po_header_id = x_document_id;
1085: END IF;
1086: --
1087: else

Line 1112: update po_headers_all

1108:
1109: IF g_document_subtype = 'STANDARD' THEN
1110:
1111: l_progress:= '160';
1112: update po_headers_all
1113: set authorization_status = 'APPROVED',
1114: approved_date = sysdate,
1115: approved_flag = 'Y'
1116: where po_header_id = x_document_id;

Line 1205: DESC: Create/Add to PO from requisition data in the PO_HEADERS,LINES

1201: /*===========================================================================*/
1202:
1203: /* ============================================================================
1204: NAME: CREATE_PO
1205: DESC: Create/Add to PO from requisition data in the PO_HEADERS,LINES
1206: and DISTRIBUTION interface tables.
1207: ARGS: IN : x_interface_header_id IN number
1208: --
1209: IN: p_sourcing_k_doc_type IN VARCHAR2 - The document type that Sourcing

Line 1235: x_document_num po_headers.segment1%type:=null; -- Bug 1093645

1231:
1232: X_line_found varchar2(1) := 'N';
1233: x_release_num number;
1234:
1235: x_document_num po_headers.segment1%type:=null; -- Bug 1093645
1236:
1237: l_api_name CONSTANT VARCHAR2(30) := 'create_po';
1238:
1239: x_org_id number;

Line 1241: x_valid_ship_to po_headers.ship_to_location_id%TYPE;

1237: l_api_name CONSTANT VARCHAR2(30) := 'create_po';
1238:
1239: x_org_id number;
1240: /*bug # 2997337 */
1241: x_valid_ship_to po_headers.ship_to_location_id%TYPE;
1242: x_valid_bill_to po_headers.bill_to_location_id%TYPE;
1243: x_is_valid VARCHAR(1) := 'N';
1244: /*bug # 2997337 */
1245:

Line 1242: x_valid_bill_to po_headers.bill_to_location_id%TYPE;

1238:
1239: x_org_id number;
1240: /*bug # 2997337 */
1241: x_valid_ship_to po_headers.ship_to_location_id%TYPE;
1242: x_valid_bill_to po_headers.bill_to_location_id%TYPE;
1243: x_is_valid VARCHAR(1) := 'N';
1244: /*bug # 2997337 */
1245:
1246: --

Line 1262: l_document_creation_method po_headers_all.document_creation_method%type := p_document_creation_method; --

1258: l_contracts_call_exception Exception;
1259: --For using %type, dependence on OKC tables. Consider for refactor
1260: l_contract_doc_type VARCHAR2(150);
1261: --
1262: l_document_creation_method po_headers_all.document_creation_method%type := p_document_creation_method; --
1263: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
1264:
1265: l_terms_id PO_HEADERS.terms_id%TYPE;
1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

Line 1265: l_terms_id PO_HEADERS.terms_id%TYPE;

1261: --
1262: l_document_creation_method po_headers_all.document_creation_method%type := p_document_creation_method; --
1263: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
1264:
1265: l_terms_id PO_HEADERS.terms_id%TYPE;
1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;

Line 1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

1262: l_document_creation_method po_headers_all.document_creation_method%type := p_document_creation_method; --
1263: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
1264:
1265: l_terms_id PO_HEADERS.terms_id%TYPE;
1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

Line 1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

1263: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
1264:
1265: l_terms_id PO_HEADERS.terms_id%TYPE;
1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1271: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

Line 1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

1264:
1265: l_terms_id PO_HEADERS.terms_id%TYPE;
1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1271: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1272: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

Line 1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;

1265: l_terms_id PO_HEADERS.terms_id%TYPE;
1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1271: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1272: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1273:

Line 1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;

1266: l_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1271: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1272: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1273:
1274: l_is_complex_work_po BOOLEAN := FALSE; --

Line 1271: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;

1267: l_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1271: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1272: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1273:
1274: l_is_complex_work_po BOOLEAN := FALSE; --
1275: l_style_id NUMBER; --

Line 1272: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;

1268: l_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1269: l_vs_terms_id PO_HEADERS.terms_id%TYPE;
1270: l_vs_fob_lookup_code PO_HEADERS.fob_lookup_code%TYPE;
1271: l_vs_freight_lookup_code PO_HEADERS.freight_terms_lookup_code%TYPE;
1272: l_vs_ship_via_lookup_code PO_HEADERS_ALL.ship_via_lookup_code%TYPE;
1273:
1274: l_is_complex_work_po BOOLEAN := FALSE; --
1275: l_style_id NUMBER; --
1276: tax_document_id NUMBER;

Line 1298: FROM po_headers_interface phi

1294:
1295: --
1296: SELECT phi.style_id
1297: INTO l_style_id
1298: FROM po_headers_interface phi
1299: WHERE phi.interface_header_id = x_interface_header_id;
1300:
1301: IF (l_style_id IS NOT NULL) THEN
1302: l_is_complex_work_po := PO_COMPLEX_WORK_PVT.is_complex_work_style(

Line 1592: FROM po_headers_archive_all poha --

1588: ** revision on the PO by one.
1589: */
1590: SELECT max(revision_num)
1591: INTO x_max_revision_num
1592: FROM po_headers_archive_all poha --
1593: WHERE poha.po_header_id = interface.po_header_id;
1594:
1595: /* Bug 493106 ecso 9/24/97
1596: * Revised date should be updated

Line 1599: * Use same format as in po_headers_pkg2.check_new_revision

1595: /* Bug 493106 ecso 9/24/97
1596: * Revised date should be updated
1597: * the same time revision is incremented.
1598: * Database field revised_date is defined as varchar(25).
1599: * Use same format as in po_headers_pkg2.check_new_revision
1600: x_new_revised_date := to_char(interface.last_update_date,
1601: 'DD-MON-YY HH24:MI');
1602: */
1603:

Line 1608: p_message => 'Update PO_Headers Doc subtype is Std or planned');

1604: l_progress:='110';
1605: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
1606: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1607: p_token => l_progress,
1608: p_message => 'Update PO_Headers Doc subtype is Std or planned');
1609: END IF;
1610: --Bug 2295672 jbalakri : added 'REJECTED' case in decode statement.
1611:
1612: UPDATE po_headers_all --

Line 1612: UPDATE po_headers_all --

1608: p_message => 'Update PO_Headers Doc subtype is Std or planned');
1609: END IF;
1610: --Bug 2295672 jbalakri : added 'REJECTED' case in decode statement.
1611:
1612: UPDATE po_headers_all --
1613: SET approved_flag =
1614: decode(nvl(approved_flag,'N'),'N','N','F','F','R'),
1615: authorization_status =
1616: decode(nvl(authorization_status,'INCOMPLETE'),

Line 1647: p_message => 'Update PO_Headers Doc subtype is Release');

1643: l_progress:='120';
1644: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
1645: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1646: p_token => l_progress,
1647: p_message => 'Update PO_Headers Doc subtype is Release');
1648: END IF;
1649:
1650: UPDATE po_headers_all --
1651: SET closed_code = 'OPEN',

Line 1650: UPDATE po_headers_all --

1646: p_token => l_progress,
1647: p_message => 'Update PO_Headers Doc subtype is Release');
1648: END IF;
1649:
1650: UPDATE po_headers_all --
1651: SET closed_code = 'OPEN',
1652: closed_date = NULL,
1653: last_update_date = interface.last_update_date,
1654: last_updated_by = interface.last_updated_by ,

Line 1765: --For more comments please refer to update po_headers_interface phi

1761: end if;
1762:
1763: --
1764: --The following insert is modified to take care of defaulting for sourcing
1765: --For more comments please refer to update po_headers_interface phi
1766: --in setup_interface_tables procedure.
1767: /* Bug 2816396
1768: Use the interface table value for pay_on_code when inserting into po_headers.pay_on_code
1769: */

Line 1768: Use the interface table value for pay_on_code when inserting into po_headers.pay_on_code

1764: --The following insert is modified to take care of defaulting for sourcing
1765: --For more comments please refer to update po_headers_interface phi
1766: --in setup_interface_tables procedure.
1767: /* Bug 2816396
1768: Use the interface table value for pay_on_code when inserting into po_headers.pay_on_code
1769: */
1770:
1771:
1772: /*bug #2997337

Line 1774: active or inactive before inserting into the PO_HEADERS table. If any of them

1770:
1771:
1772: /*bug #2997337
1773: validating the ship_to and bill_to locations to check whether they are
1774: active or inactive before inserting into the PO_HEADERS table. If any of them
1775: is found inactive then a null value is inserted in the table in the respective
1776: column*/
1777:
1778: if (g_interface_source_code = 'SOURCING') then

Line 1857: p_message => 'Before Insert into PO_headers');

1853: l_progress:= '210';
1854: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
1855: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
1856: p_token => l_progress,
1857: p_message => 'Before Insert into PO_headers');
1858: END IF;
1859:
1860: INSERT INTO po_headers_all --
1861: (po_header_id,

Line 1860: INSERT INTO po_headers_all --

1856: p_token => l_progress,
1857: p_message => 'Before Insert into PO_headers');
1858: END IF;
1859:
1860: INSERT INTO po_headers_all --
1861: (po_header_id,
1862: last_update_date,
1863: last_updated_by,
1864: segment1,

Line 2023: p_message => 'After Insert into PO_headers');

2019: l_progress:= '220';
2020: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
2021: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,
2022: p_token => l_progress,
2023: p_message => 'After Insert into PO_headers');
2024: END IF;
2025:
2026: --Bug#5024876: Removed the dangling 'END IF' left by Bug#4886821
2027:

Line 2028: -- After insert into po_headers, insert a row into org_assignments for a global agreement

2024: END IF;
2025:
2026: --Bug#5024876: Removed the dangling 'END IF' left by Bug#4886821
2027:
2028: -- After insert into po_headers, insert a row into org_assignments for a global agreement
2029: IF nvl(interface.global_agreement_flag, 'N') = 'Y' then
2030: l_progress:= '240';
2031: select org_id
2032: into x_org_id

Line 2033: from po_headers_all

2029: IF nvl(interface.global_agreement_flag, 'N') = 'Y' then
2030: l_progress:= '240';
2031: select org_id
2032: into x_org_id
2033: from po_headers_all
2034: where po_header_id = interface.po_header_id;
2035:
2036: --
2037: --Replaced the INSERT statement with call to Row Handler.

Line 2079: 'PO_HEADERS',

2075: null,
2076: null,
2077: null,
2078: null,
2079: 'PO_HEADERS',
2080: interface.po_header_id,
2081: null,
2082: null,
2083: null,

Line 2099: 'PO_HEADERS',

2095: interface.auction_header_id,
2096: interface.auction_line_number,
2097: interface.bid_number,
2098: interface.bid_line_number,
2099: 'PO_HEADERS',
2100: interface.po_header_id,
2101: interface.created_by,
2102: interface.last_update_login ,
2103: null,

Line 2115: 'PO_HEADERS',

2111: interface.auction_header_id,
2112: NULL,
2113: interface.bid_number,
2114: NULL,
2115: 'PO_HEADERS',
2116: interface.po_header_id,
2117: interface.created_by,
2118: interface.last_update_login ,
2119: null,

Line 2321: In case of automatic, we populate a dummy value in segment1(in po_headers)

2317: /* Bug 1183082
2318: If emergency po number is mentioned then the interface document number
2319: will have that value and it can be alphanumeric though the po num code
2320: is automatic.
2321: In case of automatic, we populate a dummy value in segment1(in po_headers)
2322: which is negative of po_header_id.
2323: We should be populating the segment1 from unique identifier control
2324: table only if the segment1 is negative of po_header id and
2325: hence the following logic.

Line 2336: ( p_table_name => 'PO_HEADERS',

2332: -- bug5174177
2333: -- Call Centralized API to get the next po number
2334: x_document_num :=
2335: PO_CORE_SV1.default_po_unique_identifier
2336: ( p_table_name => 'PO_HEADERS',
2337: p_org_id => g_purchasing_ou_id
2338: );
2339:
2340: IF g_debug_stmt THEN

Line 2348: UPDATE po_headers_all --

2344: END IF;
2345:
2346: l_progress := '325';
2347:
2348: UPDATE po_headers_all --
2349: set segment1=x_document_num
2350: where po_header_id=x_document_id;
2351:
2352: END IF;

Line 2781: l_type_lookup_code po_headers_all.type_lookup_code%type; --

2777: l_receiving_flag PO_LINE_TYPES_B.receiving_flag%TYPE;
2778: l_receive_close_tolerance PO_LINE_TYPES_B.receive_close_tolerance%TYPE;
2779: --
2780: l_negotiated_by_preparer_flag po_lines_all.negotiated_by_preparer_flag%type; --
2781: l_type_lookup_code po_headers_all.type_lookup_code%type; --
2782: l_global_agreement_flag po_headers_all.global_agreement_flag%type; --
2783:
2784: -- oneoff 3201308 start
2785: l_needby_prf varchar2(1);

Line 2782: l_global_agreement_flag po_headers_all.global_agreement_flag%type; --

2778: l_receive_close_tolerance PO_LINE_TYPES_B.receive_close_tolerance%TYPE;
2779: --
2780: l_negotiated_by_preparer_flag po_lines_all.negotiated_by_preparer_flag%type; --
2781: l_type_lookup_code po_headers_all.type_lookup_code%type; --
2782: l_global_agreement_flag po_headers_all.global_agreement_flag%type; --
2783:
2784: -- oneoff 3201308 start
2785: l_needby_prf varchar2(1);
2786: l_shipto_prf varchar2(1);

Line 2800: l_from_type_lookup_code PO_HEADERS.type_lookup_code%type;--bug#3612701

2796: l_routing_name RCV_ROUTING_HEADERS.routing_name%TYPE; --
2797:
2798: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
2799: l_manual_price_change_flag po_lines_all.manual_price_change_flag%TYPE := NULL; --bug 3495772
2800: l_from_type_lookup_code PO_HEADERS.type_lookup_code%type;--bug#3612701
2801:
2802: --
2803: x_secondary_unit_def MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;
2804: x_secondary_uom MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;

Line 3125: FROM po_lines_all pol,po_headers_all poh

3121: --bug#3612701 modified the sql to fetch type lookup code
3122: --of the source document as well.
3123: SELECT pol.unit_meas_lookup_code,poh.type_lookup_code
3124: INTO l_ga_uom,l_from_type_lookup_code
3125: FROM po_lines_all pol,po_headers_all poh
3126: WHERE pol.po_line_id = interface.from_line_id
3127: and poh.po_header_id=interface.from_header_id
3128: and poh.po_header_id=pol.po_header_id;
3129: --bug#3612701

Line 3850: FROM po_headers_all

3846: l_negotiated_by_preparer_flag := 'Y';
3847: ELSIF interface.from_header_id is not null THEN
3848: l_progress := '390';
3849: SELECT type_lookup_code,global_agreement_flag into l_type_lookup_code,l_global_agreement_flag
3850: FROM po_headers_all
3851: WHERE po_header_id=interface.from_header_id;
3852: -- if the source document is global agreement.
3853: IF l_type_lookup_code='BLANKET' and l_global_agreement_flag='Y' THEN
3854: l_progress := '395';

Line 5292: l_from_type_lookup_code po_headers_all.type_lookup_code%TYPE;

5288: l_progress VARCHAR2(3) := '000'; --< Bug 3210331 >
5289: l_manual_price_change_flag po_line_locations_all.manual_price_change_flag%TYPE := NULL; --bug 3495772
5290:
5291: -- Bug 5208159
5292: l_from_type_lookup_code po_headers_all.type_lookup_code%TYPE;
5293:
5294: --
5295: x_shipment_uom MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;
5296: x_secondary_unit_of_measure MTL_UNITS_OF_MEASURE.UNIT_OF_MEASURE%TYPE;

Line 5351: FROM po_headers_all poh

5347: BEGIN
5348:
5349: SELECT poh.type_lookup_code
5350: INTO l_from_type_lookup_code
5351: FROM po_headers_all poh
5352: WHERE poh.po_header_id=interface.from_header_id ;
5353:
5354: IF g_debug_stmt THEN
5355: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,

Line 5399: po_headers_all poh --

5395: l_progress := '020';
5396: select unit_meas_lookup_code
5397: into x_po_uom
5398: from po_lines_all pol , --
5399: po_headers_all poh --
5400: where pol.po_header_id = poh.po_header_id
5401: and pol.po_header_id = interface.po_header_id
5402: and pol.line_num = interface.line_num;
5403: -- Bug 2735840 START

Line 6505: l_currency_conversion_rate PO_HEADERS_ALL.rate%TYPE := 1;

6501: -- Bug 7661419 end
6502: --
6503: --
6504: l_uom_conversion_rate MTL_UOM_CONVERSIONS.conversion_rate%TYPE := 1;
6505: l_currency_conversion_rate PO_HEADERS_ALL.rate%TYPE := 1;
6506: --
6507: --
6508:
6509: /* Bug 1030123: cursor to get all the distributions based on the line id */

Line 6531: l_from_type_lookup_code po_headers_all.TYPE_LOOKUP_CODE%type;

6527:
6528: l_amount_ordered NUMBER; --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6529: l_drop_ship_flag po_line_locations.drop_ship_flag%type; --bug#3603067
6530: -- bug 5208159
6531: l_from_type_lookup_code po_headers_all.TYPE_LOOKUP_CODE%type;
6532:
6533: --introduced to hold the value of drop_ship_flag for shipments
6534: BEGIN
6535: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >

Line 6703: FROM po_headers_all poh

6699: BEGIN
6700:
6701: SELECT poh.type_lookup_code
6702: INTO l_from_type_lookup_code
6703: FROM po_headers_all poh
6704: WHERE poh.po_header_id=interface.from_header_id ;
6705:
6706: EXCEPTION
6707: WHEN OTHERS THEN

Line 6733: po_headers_all poh --

6729: l_progress := '090';
6730: select unit_meas_lookup_code
6731: into x_po_uom
6732: from po_lines_all pol , --
6733: po_headers_all poh --
6734: where pol.po_header_id = poh.po_header_id
6735: and pol.po_header_id = interface.po_header_id
6736: and pol.line_num = interface.line_num;
6737: -- Bug 2735840 START

Line 7382: DESC: Create/Add to RFQ from requisition data in the PO_HEADERS,LINES

7378:
7379:
7380: /* ============================================================================
7381: NAME: CREATE_RFQ
7382: DESC: Create/Add to RFQ from requisition data in the PO_HEADERS,LINES
7383: and DISTRIBUTION interface tables.
7384: ARGS: IN : x_interface_header_id IN number
7385: ALGR:
7386:

Line 7392: x_document_num po_headers.segment1%type:=null; -- Bug 1093645

7388: PROCEDURE create_rfq(x_interface_header_id IN number,
7389: x_document_id IN OUT NOCOPY number) IS
7390:
7391: x_quotation_class_code varchar2(25);
7392: x_document_num po_headers.segment1%type:=null; -- Bug 1093645
7393:
7394: l_api_name CONSTANT VARCHAR2(30) := 'create_documents';
7395:
7396: --

Line 7462: UPDATE po_headers_all --

7458:
7459: IF (g_mode = 'ADD') THEN
7460:
7461: l_progress := '040';
7462: UPDATE po_headers_all --
7463: SET last_update_date = interface.last_update_date,
7464: last_updated_by = interface.last_updated_by,
7465: last_update_login = interface.last_update_login,
7466: status_lookup_code = 'I'

Line 7479: * For inserting record into po_headers view, it used

7475: and document_subtype = interface.quote_type_lookup_code;
7476:
7477: l_progress := '060';
7478: /** Bug 881882, bgu, Apr. 29, 1999
7479: * For inserting record into po_headers view, it used
7480: * to_date(interface.h_rate_date, 'DD/MM/YYYY') for column rate_date.
7481: * But since the data type of interface.h_rate_date is already date,
7482: * this is unneccssary and causing problem when system date mask is
7483: * defined otherwise.

Line 7485: INSERT INTO po_headers_all --

7481: * But since the data type of interface.h_rate_date is already date,
7482: * this is unneccssary and causing problem when system date mask is
7483: * defined otherwise.
7484: */
7485: INSERT INTO po_headers_all --
7486: (po_header_id,
7487: last_update_date,
7488: last_updated_by,
7489: segment1,

Line 7624: ( p_table_name => 'PO_HEADERS_RFQ',

7620:
7621: -- bug5174177
7622: x_document_num :=
7623: PO_CORE_SV1.default_po_unique_identifier
7624: ( p_table_name => 'PO_HEADERS_RFQ',
7625: p_org_id => g_purchasing_ou_id
7626: );
7627:
7628: IF g_debug_stmt THEN

Line 7635: UPDATE po_headers set segment1=x_document_num

7631: p_message => 'new po num = ' || x_document_num);
7632: END IF;
7633:
7634: l_progress := '130';
7635: UPDATE po_headers set segment1=x_document_num
7636: where po_header_id=x_document_id;
7637:
7638: END IF;
7639: END IF;

Line 7902: l_destination_ou_id PO_HEADERS_ALL.org_id%TYPE;

7898: l_item_category_id PO_LINES_INTERFACE.category_id%TYPE;
7899: l_req_charge_account_id PO_DISTRIBUTIONS_INTERFACE.charge_account_id%TYPE;
7900: l_req_variance_account_id PO_DISTRIBUTIONS_INTERFACE.variance_account_id%TYPE;
7901: l_destination_organization_id PO_DISTRIBUTIONS_INTERFACE.destination_organization_id%TYPE;
7902: l_destination_ou_id PO_HEADERS_ALL.org_id%TYPE;
7903:
7904: l_item_id PO_LINES_INTERFACE.item_id%TYPE;
7905: l_category_id PO_LINES_INTERFACE.category_id%TYPE;
7906: l_destination_type_code PO_DISTRIBUTIONS_ALL.destination_type_code%TYPE;

Line 7912: l_agent_id PO_HEADERS.agent_id%TYPE;

7908: l_ship_to_location_id PO_DISTRIBUTIONS_INTERFACE.deliver_to_location_id%TYPE;
7909: l_deliver_to_person_id PO_DISTRIBUTIONS_INTERFACE.deliver_to_person_id%TYPE;
7910: l_line_type_id PO_LINES_INTERFACE.line_type_id%TYPE;
7911: l_vendor_id PO_VENDORS.vendor_id%TYPE;
7912: l_agent_id PO_HEADERS.agent_id%TYPE;
7913: l_expenditure_organization_id PO_DISTRIBUTIONS_INTERFACE.expenditure_organization_id%TYPE;
7914: l_project_id PO_DISTRIBUTIONS_INTERFACE.project_id%TYPE;
7915: l_task_id PO_DISTRIBUTIONS_INTERFACE.task_id%TYPE;
7916: l_bom_resource_id PO_DISTRIBUTIONS_INTERFACE.bom_resource_id%TYPE;

Line 7949: l_po_currency_code PO_HEADERS_INTERFACE.currency_code%TYPE;

7945: l_base_unit_price PO_LINES_INTERFACE.base_unit_price%TYPE;
7946: l_amount PO_LINES_INTERFACE.amount%TYPE;
7947: l_quantity_dummy PO_LINES_INTERFACE.quantity%TYPE;
7948: l_order_type_lookup_code PO_LINE_TYPES_B.order_type_lookup_code%TYPE;
7949: l_po_currency_code PO_HEADERS_INTERFACE.currency_code%TYPE;
7950: l_req_header_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;
7951: l_req_header_rate_date PO_HEADERS_INTERFACE.rate_date%TYPE;
7952: l_req_header_rate PO_HEADERS_INTERFACE.rate%TYPE;
7953: l_dist_rate PO_DISTRIBUTIONS_INTERFACE.rate%TYPE;

Line 7950: l_req_header_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;

7946: l_amount PO_LINES_INTERFACE.amount%TYPE;
7947: l_quantity_dummy PO_LINES_INTERFACE.quantity%TYPE;
7948: l_order_type_lookup_code PO_LINE_TYPES_B.order_type_lookup_code%TYPE;
7949: l_po_currency_code PO_HEADERS_INTERFACE.currency_code%TYPE;
7950: l_req_header_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;
7951: l_req_header_rate_date PO_HEADERS_INTERFACE.rate_date%TYPE;
7952: l_req_header_rate PO_HEADERS_INTERFACE.rate%TYPE;
7953: l_dist_rate PO_DISTRIBUTIONS_INTERFACE.rate%TYPE;
7954: l_rate_for_req_fields PO_HEADERS_INTERFACE.rate%TYPE;

Line 7951: l_req_header_rate_date PO_HEADERS_INTERFACE.rate_date%TYPE;

7947: l_quantity_dummy PO_LINES_INTERFACE.quantity%TYPE;
7948: l_order_type_lookup_code PO_LINE_TYPES_B.order_type_lookup_code%TYPE;
7949: l_po_currency_code PO_HEADERS_INTERFACE.currency_code%TYPE;
7950: l_req_header_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;
7951: l_req_header_rate_date PO_HEADERS_INTERFACE.rate_date%TYPE;
7952: l_req_header_rate PO_HEADERS_INTERFACE.rate%TYPE;
7953: l_dist_rate PO_DISTRIBUTIONS_INTERFACE.rate%TYPE;
7954: l_rate_for_req_fields PO_HEADERS_INTERFACE.rate%TYPE;
7955: l_po_func_unit_price PO_LINES_ALL.unit_price%TYPE;

Line 7952: l_req_header_rate PO_HEADERS_INTERFACE.rate%TYPE;

7948: l_order_type_lookup_code PO_LINE_TYPES_B.order_type_lookup_code%TYPE;
7949: l_po_currency_code PO_HEADERS_INTERFACE.currency_code%TYPE;
7950: l_req_header_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;
7951: l_req_header_rate_date PO_HEADERS_INTERFACE.rate_date%TYPE;
7952: l_req_header_rate PO_HEADERS_INTERFACE.rate%TYPE;
7953: l_dist_rate PO_DISTRIBUTIONS_INTERFACE.rate%TYPE;
7954: l_rate_for_req_fields PO_HEADERS_INTERFACE.rate%TYPE;
7955: l_po_func_unit_price PO_LINES_ALL.unit_price%TYPE;
7956: -- Bug 3463242 END

Line 7954: l_rate_for_req_fields PO_HEADERS_INTERFACE.rate%TYPE;

7950: l_req_header_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;
7951: l_req_header_rate_date PO_HEADERS_INTERFACE.rate_date%TYPE;
7952: l_req_header_rate PO_HEADERS_INTERFACE.rate%TYPE;
7953: l_dist_rate PO_DISTRIBUTIONS_INTERFACE.rate%TYPE;
7954: l_rate_for_req_fields PO_HEADERS_INTERFACE.rate%TYPE;
7955: l_po_func_unit_price PO_LINES_ALL.unit_price%TYPE;
7956: -- Bug 3463242 END
7957:
7958: l_item_in_linv_pou VARCHAR2(1):= 'Y'; -- Bug 3433867

Line 8009: PO_HEADERS_INTERFACE phi,

8005: pdi.rate
8006: -- Bug 3463242 END
8007: FROM PO_DISTRIBUTIONS_INTERFACE pdi,
8008: PO_LINES_INTERFACE pli,
8009: PO_HEADERS_INTERFACE phi,
8010: PO_REQUISITION_LINES_ALL prl, --
8011: MTL_PARAMETERS mp,
8012: HR_ORGANIZATION_INFORMATION hoi,
8013: PO_LINE_TYPES_B plt -- Bug 3463242

Line 8617: x_document_num po_headers.segment1%type:=null;

8613: )
8614: IS
8615:
8616: x_po_header_id number := null;
8617: x_document_num po_headers.segment1%type:=null;
8618: x_min_interface_line_id number:= null;
8619: x_order_type_lookup_code varchar2(25) := null;
8620: x_quotation_class_code varchar2(25) := null;
8621: x_count_dist number;

Line 8632: x_old_document_num po_headers.segment1%type:=null; -- Bug 700513, lpo, 07/15/98

8628: x_vendor_product_num varchar2(240) := null;
8629: x_purchasing_uom varchar2(240) := null;
8630: x_pay_on_code varchar2(25) := null;
8631: x_uom_convert varchar2(2) := fnd_profile.value('PO_REQ_BPA_UOM_CONVERT');
8632: x_old_document_num po_headers.segment1%type:=null; -- Bug 700513, lpo, 07/15/98
8633:
8634: x_employee_id number;
8635: x_employee_name varchar2(240);
8636: x_requestor_location_id number;

Line 8648: po_headers_interface phi,

8644: phi.vendor_id,
8645: phi.vendor_site_id,
8646: pdi.destination_organization_id
8647: from po_lines_interface pli,
8648: po_headers_interface phi,
8649: po_distributions_interface pdi
8650: where phi.interface_header_id = x_interface_header_id
8651: and phi.interface_header_id = pli.interface_header_id
8652: and pdi.interface_distribution_id =

Line 8679: po_headers_interface phi,

8675: phi.rate_date,
8676: phi.document_subtype,
8677: pli.unit_price --
8678: FROM po_lines_interface pli,
8679: po_headers_interface phi,
8680: po_line_types plt
8681: WHERE phi.interface_header_id = x_interface_header_id
8682: AND phi.interface_header_id = pli.interface_header_id
8683: AND pli.requisition_line_id is null

Line 8716: UPDATE po_headers_interface

8712: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
8713: PO_DEBUG.debug_begin(p_log_head => g_log_head||l_api_name);
8714: END IF;
8715:
8716: UPDATE po_headers_interface
8717: SET process_code = 'IN PROCESS'
8718: WHERE interface_header_id = x_interface_header_id;
8719:
8720: l_progress := '010';

Line 8738: FROM po_headers_interface

8734: min(document_num)
8735: INTO g_mode,
8736: g_group_code,
8737: x_old_document_num
8738: FROM po_headers_interface
8739: WHERE interface_header_id = x_interface_header_id;
8740:
8741: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
8742: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,

Line 8758: UPDATE po_headers_interface phi

8754: */
8755:
8756: IF (g_document_type = 'RFQ') THEN
8757: l_progress:='030';
8758: UPDATE po_headers_interface phi
8759: SET po_header_id =
8760: (SELECT ph.po_header_id
8761: FROM po_headers_all ph --
8762: WHERE 'RFQ' = ph.type_lookup_code

Line 8761: FROM po_headers_all ph --

8757: l_progress:='030';
8758: UPDATE po_headers_interface phi
8759: SET po_header_id =
8760: (SELECT ph.po_header_id
8761: FROM po_headers_all ph --
8762: WHERE 'RFQ' = ph.type_lookup_code
8763: AND phi.document_num = ph.segment1
8764: AND NVL(ph.org_id, -99) = NVL(g_purchasing_ou_id, -99)) --
8765: WHERE interface_header_id = x_interface_header_id;

Line 8769: UPDATE po_headers_interface phi

8765: WHERE interface_header_id = x_interface_header_id;
8766:
8767: ELSE
8768: l_progress:='040';
8769: UPDATE po_headers_interface phi
8770: SET po_header_id =
8771: (SELECT ph.po_header_id
8772: FROM po_headers_all ph --
8773: WHERE decode(phi.document_subtype,

Line 8772: FROM po_headers_all ph --

8768: l_progress:='040';
8769: UPDATE po_headers_interface phi
8770: SET po_header_id =
8771: (SELECT ph.po_header_id
8772: FROM po_headers_all ph --
8773: WHERE decode(phi.document_subtype,
8774: 'RELEASE','BLANKET',
8775: phi.document_subtype) = ph.type_lookup_code
8776: AND phi.document_num = ph.segment1

Line 8799: UPDATE po_headers_interface phi

8795: /* Bug 482648 add currecny_code */
8796:
8797: /* Also get the pay_on_code from the document */
8798:
8799: UPDATE po_headers_interface phi
8800: SET (
8801: rate,
8802: rate_type_code,
8803: rate_date,

Line 8810: FROM po_headers_all ph --

8806: rate,
8807: rate_type,
8808: rate_date,
8809: currency_code
8810: FROM po_headers_all ph --
8811: WHERE ph.po_header_id = phi.po_header_id)
8812: WHERE interface_header_id = x_interface_header_id;
8813:
8814: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >

Line 8835: SELECT po_headers_s.nextval

8831: p_token => l_progress,
8832: p_message => 'In std/planned/rfq');
8833: END IF;
8834:
8835: SELECT po_headers_s.nextval
8836: INTO x_po_header_id
8837: FROM sys.dual;
8838:
8839:

Line 8856: ** should already be loaded into the po_headers_interface table.

8852:
8853: /* If we are using automatic numbering, get segment1
8854: ** from the po_unique_identifier_control table.
8855: ** If we are using manual numbering, segment1
8856: ** should already be loaded into the po_headers_interface table.
8857: ** The checks to verify that a manual po number is unique
8858: ** is done on the client side.
8859: */
8860: /* ecso 4/23/98 emergency requisition enhancement

Line 8864: ** and there exists a document_num on po_headers_interface

8860: /* ecso 4/23/98 emergency requisition enhancement
8861: ** For emergency requisitions, there is a reserved po num
8862: ** even though the document has not been created.
8863: ** Add the case where the document is NEW
8864: ** and there exists a document_num on po_headers_interface
8865: */
8866: --
8867: --modified the if condition to include PA
8868: IF (params.po_num_code='AUTOMATIC') AND

Line 8935: FROM po_headers_all ph, --

8931: ph.shipping_control --
8932: INTO x_po_header_id,
8933: x_pay_on_code,
8934: l_shipping_control --
8935: FROM po_headers_all ph, --
8936: po_headers_interface phi
8937: WHERE phi.interface_header_id = x_interface_header_id
8938: AND ph.segment1 = phi.document_num
8939: AND ph.type_lookup_code='BLANKET'

Line 8936: po_headers_interface phi

8932: INTO x_po_header_id,
8933: x_pay_on_code,
8934: l_shipping_control --
8935: FROM po_headers_all ph, --
8936: po_headers_interface phi
8937: WHERE phi.interface_header_id = x_interface_header_id
8938: AND ph.segment1 = phi.document_num
8939: AND ph.type_lookup_code='BLANKET'
8940: AND NVL(ph.org_id, -99) = NVL(g_purchasing_ou_id, -99); --

Line 8955: po_headers_interface phi

8951:
8952: SELECT min(interface_line_id)
8953: INTO x_min_interface_line_id
8954: FROM po_lines_interface pli,
8955: po_headers_interface phi
8956: WHERE phi.interface_header_id=pli.interface_header_id
8957: AND phi.interface_header_id = x_interface_header_id;
8958:
8959: l_progress:='100';

Line 8965: --interface tables. But po_headers_interface table would contain values

8961: --modify the following update to default the values for the blanket also.
8962: --track 'PA' for the changes. Also please note that we have added deocode
8963: --for all the terms and conditions.Existing autocreate would not values
8964: --for different terms n condition columns and shipto billto columns in the
8965: --interface tables. But po_headers_interface table would contain values
8966: --for these columns when called from sourcing. So we are not defaulting
8967: --these values from params here but would do this in create_po procedure
8968: --in the order of interface,vendor,params.
8969: /* Bug 2816396

Line 8978: UPDATE po_headers_interface phi

8974: p_token => l_progress,
8975: p_message => 'Sourcing to FPH-6 starts');
8976: END IF;
8977:
8978: UPDATE po_headers_interface phi
8979: SET (po_header_id,
8980: last_update_date,
8981: last_updated_by,
8982: document_num,

Line 9074: FROM po_headers_interface phi2,

9070: 'PA',nvl(phi.min_release_amount,params.min_rel_amount),
9071: null),
9072: phi.document_subtype,
9073: l_shipping_control --
9074: FROM po_headers_interface phi2,
9075: po_lines_interface pli
9076: WHERE phi2.interface_header_id = phi.interface_header_id
9077: AND pli.interface_header_id=phi2.interface_header_id
9078: AND pli.interface_line_id = x_min_interface_line_id)

Line 9095: from po_headers_interface

9091: IF (g_document_subtype = 'RELEASE') THEN
9092:
9093: select po_header_id
9094: into x_po_header_id
9095: from po_headers_interface
9096: where interface_header_id = x_interface_header_id;
9097:
9098: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
9099: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name,

Line 9239: po_headers_interface phi,

9235: -- end of 1548597
9236: prl.drop_ship_flag, --
9237: prl.vmi_flag -- VMI FPH
9238: FROM po_lines_interface pli,
9239: po_headers_interface phi,
9240: po_requisition_lines_all prl, --
9241: po_line_types plt,
9242: po_lines_all pol --
9243: WHERE pli.interface_line_id = pli2.interface_line_id

Line 9277: po_headers_interface phi

9273: x_po_header_id,
9274: nvl(pli.negotiated_by_preparer_flag,'N'),
9275: nvl(pli.firm_flag,'N')
9276: FROM po_lines_interface pli,
9277: po_headers_interface phi
9278: WHERE pli.interface_line_id = pli2.interface_line_id
9279: AND pli.interface_header_id = phi.interface_header_id
9280: AND phi.interface_header_id = x_interface_header_id);
9281:

Line 9434: po_headers_interface phi,

9430: nvl(pli.contractor_first_name, prl.candidate_first_name),
9431: nvl(pli.contractor_last_name, prl.candidate_last_name)
9432: --
9433: FROM po_lines_interface pli,
9434: po_headers_interface phi,
9435: po_requisition_lines_all prl, --
9436: po_line_types plt
9437: WHERE pli.interface_line_id = pli2.interface_line_id
9438: AND pli.interface_header_id = phi.interface_header_id

Line 9582: po_headers_interface phi

9578: prd.oke_contract_deliverable_id)
9579: FROM po_requisition_lines_all prl, --
9580: po_req_distributions_all prd, --
9581: po_lines_interface pli,
9582: po_headers_interface phi
9583: WHERE prd.requisition_line_id = prl.requisition_line_id
9584: AND prl.requisition_line_id = pli.requisition_line_id -- Bug:1563888
9585: AND pli.interface_header_id = phi.interface_header_id
9586: AND phi.interface_header_id = x_interface_header_id;

Line 9842: DELETE po_headers_interface

9838: DELETE po_lines_interface
9839: WHERE interface_header_id = x_interface_header_id;
9840:
9841:
9842: DELETE po_headers_interface
9843: WHERE interface_header_id = x_interface_header_id;
9844:
9845: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >
9846: PO_DEBUG.debug_end(p_log_head => g_log_head||'wrapup');

Line 10026: FROM po_headers_interface phi

10022: INTO x_document_num,
10023: x_document_type_code,
10024: x_document_subtype,
10025: x_release_num
10026: FROM po_headers_interface phi
10027: WHERE phi.interface_header_id = x_interface_header_id;
10028:
10029: IF (g_document_type = 'RFQ') THEN
10030: x_document_subtype := 'RFQ';

Line 10332: FROM po_headers_all ph,

10328: END IF;
10329:
10330: SELECT NVL(max(pl.line_num),0)
10331: INTO x_line_num
10332: FROM po_headers_all ph,
10333: po_lines_all pl
10334: WHERE pl.po_header_id = ph.po_header_id
10335: AND ph.segment1 = x_document_num
10336: AND ph.type_lookup_code =

Line 10524: FROM po_headers_all ph,

10520: END IF;
10521:
10522: SELECT nvl(max(poll.shipment_num),0)
10523: INTO x_shipment_num
10524: FROM po_headers_all ph,
10525: po_line_locations_all poll,
10526: po_releases_all pr
10527: WHERE ph.po_header_id = poll.po_header_id
10528: AND ph.segment1 = x_document_num

Line 10741: po_headers_all poh

10737: pol.line_num
10738: INTO x_po_line_id,
10739: x_po_line_num
10740: FROM po_lines_all pol,
10741: po_headers_all poh
10742: WHERE poh.segment1 = x_document_num
10743: AND pol.line_num = x_interface_line_num
10744: AND poh.type_lookup_code =
10745: DECODE(g_document_type, 'RFQ', g_document_type,x_document_subtype)

Line 10873: , po_headers_all POH

10869: , po_line_id
10870: INTO x_po_line_num
10871: , x_po_line_id
10872: FROM po_lines_all POL2
10873: , po_headers_all POH
10874: , po_line_types_b PLT --
10875: WHERE POH.segment1 = x_document_num
10876: AND POH.po_header_id = POL2.po_header_id
10877: AND NVL(poh.org_id, -99) = NVL(g_purchasing_ou_id, -99) --

Line 10987: po_headers_all POH

10983: po_line_id
10984: INTO x_po_line_num,
10985: x_po_line_id
10986: FROM po_lines_all POL2,
10987: po_headers_all POH
10988: WHERE POH.segment1 = x_document_num
10989: AND POH.po_header_id = POL2.po_header_id
10990: AND NVL(poh.org_id, -99) = NVL(g_purchasing_ou_id, -99) --
10991: AND POH.type_lookup_code = 'RFQ'

Line 11356: FROM po_headers_all ph,

11352: END IF;
11353:
11354: SELECT NVL(max(pl.line_num), 0)
11355: INTO x_line_num
11356: FROM po_headers_all ph,
11357: po_lines_all pl
11358: WHERE pl.po_header_id = ph.po_header_id
11359: AND ph.segment1 = x_document_num
11360: AND NVL(ph.org_id, -99) = NVL(g_purchasing_ou_id, -99)

Line 11589: po_headers_all poh,

11585:
11586: SELECT pol.po_line_id
11587: INTO x_po_line_id
11588: FROM po_lines_all pol,
11589: po_headers_all poh,
11590: po_lines_interface pli
11591: WHERE pol.po_header_id = poh.po_header_id
11592: AND poh.segment1 = x_document_num
11593: AND NVL(poh.org_id, -99) = NVL(g_purchasing_ou_id, -99)

Line 12118: po_headers_interface phi

12114:
12115: SELECT por.po_release_id
12116: INTO g_po_release_id
12117: FROM po_releases_all por, --
12118: po_headers_interface phi
12119: WHERE phi.interface_header_id = x_interface_header_id
12120: AND phi.release_num = por.release_num
12121: AND phi.po_header_id = por.po_header_id
12122: AND NVL(por.org_id, -99) = NVL(g_purchasing_ou_id, -99) --

Line 12159: FROM po_headers_interface PHI,

12155: );
12156:
12157: SELECT POL.po_line_id
12158: INTO l_po_line_id
12159: FROM po_headers_interface PHI,
12160: po_lines_all POL
12161: WHERE PHI.interface_header_id = x_interface_header_id
12162: AND PHI.po_header_id = POL.po_header_id
12163: AND POL.line_num = x_po_line_num;

Line 12300: po_headers_interface phi,

12296: 'INVENTORY', 'Y',
12297: 'SHOP FLOOR','Y')
12298: INTO x_receipt_required_flag
12299: FROM po_lines_interface pli,
12300: po_headers_interface phi,
12301: po_requisition_lines_all prl, --
12302: mtl_system_items msi,
12303: po_line_types plt,
12304: po_vendors pov,

Line 12370: PO_HEADERS_INTERFACE PHI

12366: PO_LINE_TYPES PLT ,
12367: PO_SYSTEM_PARAMETERS_ALL PSP , --
12368: FINANCIALS_SYSTEM_PARAMS_ALL FSP, --
12369: PO_VENDORS POV,
12370: PO_HEADERS_INTERFACE PHI
12371: WHERE PLI.LINE_NUM = x_po_line_num
12372: AND PLI.shipment_num is not null
12373: AND NVL(psp.org_id, -99) = NVL(g_purchasing_ou_id, -99) --
12374: AND NVL(fsp.org_id, -99) = NVL(g_purchasing_ou_id, -99) --

Line 12491: PO_HEADERS_INTERFACE PHI

12487: PO_LINE_TYPES PLT ,
12488: PO_SYSTEM_PARAMETERS_ALL PSP , --
12489: FINANCIALS_SYSTEM_PARAMS_ALL FSP, --
12490: PO_VENDORS POV,
12491: PO_HEADERS_INTERFACE PHI
12492: WHERE PLI.LINE_NUM = x_po_line_num
12493: AND PLI.shipment_num is not null
12494: AND PLI.item_id = MSI.inventory_item_id
12495: AND MSI.organization_id=

Line 12582: PO_HEADERS_INTERFACE

12578: l_progress:='180';
12579: SELECT document_subtype
12580: into x_check_doc_sub_type
12581: from
12582: PO_HEADERS_INTERFACE
12583: WHERE
12584: INTERFACE_HEADER_ID=x_interface_header_id;
12585: exception
12586: When others then

Line 12619: PO_HEADERS_INTERFACE PHI

12615: PO_LINE_TYPES PLT ,
12616: PO_SYSTEM_PARAMETERS_ALL PSP , --
12617: FINANCIALS_SYSTEM_PARAMS_ALL FSP, --
12618: PO_VENDORS POV,
12619: PO_HEADERS_INTERFACE PHI
12620: WHERE PLI.LINE_NUM = x_po_line_num
12621: AND PLI.shipment_num is not null
12622: AND NVL(psp.org_id, -99) = NVL(g_purchasing_ou_id, -99) --
12623: AND NVL(fsp.org_id, -99) = NVL(g_purchasing_ou_id, -99) --

Line 12799: from po_headers_all ph, --

12795:
12796: l_progress := '030';
12797: select nvl(max(line_num),0)
12798: into x_line_num
12799: from po_headers_all ph, --
12800: po_lines_all pl --
12801: where pl.po_header_id = ph.po_header_id
12802: and ph.segment1 = x_document_num
12803: AND NVL(ph.org_id, -99) = NVL(g_purchasing_ou_id, -99); --

Line 12860: from po_headers_all ph, --

12856: l_progress := '080';
12857:
12858: select nvl(max(shipment_num),0)
12859: into x_shipment_num
12860: from po_headers_all ph, --
12861: po_line_locations_all poll, --
12862: po_releases_all pr --
12863: where ph.po_header_id = poll.po_header_id
12864: and ph.segment1 = x_document_num

Line 13578: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE

13574: --End of Comments
13575: ----------------------------------------------------------------------------
13576:
13577: FUNCTION validate_interface_records (
13578: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE
13579: ) RETURN BOOLEAN IS
13580:
13581: l_api_name CONSTANT VARCHAR2(30) := 'validate_interface_records';
13582: l_pass_validations BOOLEAN;

Line 13616: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE

13612: --End of Comments
13613: ----------------------------------------------------------------------------
13614:
13615: FUNCTION validate_config_id (
13616: p_interface_header_id IN PO_HEADERS_INTERFACE.interface_header_id%TYPE
13617: ) RETURN BOOLEAN IS
13618:
13619: l_api_name CONSTANT VARCHAR2(30) := 'validate_config_id';
13620: l_num_config_id_lines NUMBER;

Line 13908: l_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;

13904: l_po_ou_sob_id GL_SETS_OF_BOOKS.set_of_books_id%TYPE;
13905: l_inverse_rate_display_flag VARCHAR2(1) := 'N';
13906: l_display_rate NUMBER;
13907: l_progress VARCHAR2(3) := '000';
13908: l_rate_type PO_HEADERS_INTERFACE.rate_type%TYPE;
13909: l_api_name CONSTANT VARCHAR2(30) := 'get_rate_for_req_price'; --< Bug 3210331 >
13910:
13911: BEGIN
13912: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >