DBA Data[Home] [Help]

APPS.PO_INTERFACE_S dependencies on PO_LINES_ALL

Line 136: TYPE po_line_id_tbl IS TABLE OF PO_LINES_ALL.po_line_id%TYPE INDEX BY PLS_INTEGER;

132: period_name gl_period_statuses.period_name%type,
133: acceptance_required_flag po_system_parameters.acceptance_required_flag%type); /* Bug 7518967 : Default Acceptance Required Check ER */
134:
135: --
136: TYPE po_line_id_tbl IS TABLE OF PO_LINES_ALL.po_line_id%TYPE INDEX BY PLS_INTEGER;
137: TYPE interface_header_id_tbl IS TABLE OF PO_ATTR_VALUES_INTERFACE.interface_header_id%TYPE INDEX BY PLS_INTEGER;
138: TYPE interface_line_id_tbl IS TABLE OF PO_ATTR_VALUES_INTERFACE.interface_line_id%TYPE INDEX BY PLS_INTEGER;
139: --
140:

Line 2780: l_negotiated_by_preparer_flag po_lines_all.negotiated_by_preparer_flag%type; --

2776: l_outside_operation_flag PO_LINE_TYPES_B.outside_operation_flag%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

Line 2799: l_manual_price_change_flag po_lines_all.manual_price_change_flag%TYPE := NULL; --bug 3495772

2795:
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;

Line 2949: FROM PO_LINES_ALL --

2945: x_po_unit_price,
2946: x_po_transaction_reason_code,
2947: x_price_break_lookup_code,
2948: l_manual_price_change_flag --bug 3495772
2949: FROM PO_LINES_ALL --
2950: WHERE PO_HEADER_ID = interface.po_header_id
2951: AND LINE_NUM = interface.line_num
2952: FOR UPDATE OF quantity;
2953:

Line 2972: FROM po_lines_all --

2968: /* Bug 2534534 Reverting the fix done in 1951084 */
2969: -- BEGIN
2970: SELECT po_line_id
2971: INTO x_po_line_id
2972: FROM po_lines_all --
2973: WHERE po_header_id = interface.po_header_id
2974: AND line_num = interface.line_num
2975: FOR UPDATE OF quantity;
2976:

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 3856: FROM po_lines_all

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';
3855: SELECT negotiated_by_preparer_flag into l_negotiated_by_preparer_flag
3856: FROM po_lines_all
3857: WHERE po_line_id=interface.from_line_id;
3858: --if the source document is quotation.
3859: ELSIF l_type_lookup_code='QUOTATION' THEN
3860: l_negotiated_by_preparer_flag := 'Y';

Line 3959: INSERT INTO po_lines_all --

3955: -- bug 4887900 END
3956:
3957: -- Added note_to_vendor - iali 08/26/99
3958: /*Bug 1391523 . Added market price to the INSERT statement */
3959: INSERT INTO po_lines_all --
3960: ( po_line_id,
3961: last_update_date,
3962: last_updated_by,
3963: po_header_id,

Line 4509: from po_lines_all pl --

4505: l_progress := '540';
4506: begin
4507: select pl.quantity
4508: into l_db_quantity
4509: from po_lines_all pl --
4510: where pl.po_line_id = x_po_line_id;
4511: exception
4512: when others then
4513: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >

Line 4610: UPDATE po_lines_all

4606:
4607: -- Bug 2879460 Update the price on the PO only with the price
4608: -- from the pricing API and not with the interface price
4609:
4610: UPDATE po_lines_all
4611: -- Bug 3417479
4612: -- SET unit_price = x_unit_price,
4613: -- base_unit_price = l_base_unit_price,
4614: SET unit_price = nvl(x_unit_price, unit_price),

Line 4647: UPDATE po_lines_all --

4643: with the default conversion based on the PO lines quantity **/
4644:
4645: -- update secondary quantity/uom to null
4646:
4647: UPDATE po_lines_all --
4648: SET quantity = (nvl(quantity,0) + nvl(x_quantity,0)),
4649: last_update_date = interface.last_update_date,
4650: last_updated_by = interface.last_updated_by,
4651: last_update_login = interface.last_update_login,

Line 4674: UPDATE po_lines_all

4670: interface.item_id,
4671: x_secondary_unit_def,
4672: x_secondary_quantity_def) ;
4673:
4674: UPDATE po_lines_all
4675: SET secondary_quantity = x_secondary_quantity_def,
4676: secondary_unit_of_measure = x_secondary_unit_def
4677: WHERE po_line_id = x_po_line_id ;
4678:

Line 5398: from po_lines_all pol , --

5394: IF (g_document_subtype='RELEASE') THEN -- Bug 2735840
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;

Line 5408: FROM po_lines_all

5404: ELSE -- Autocreating a PO that references a GA
5405: l_progress := '030';
5406: SELECT unit_meas_lookup_code
5407: INTO x_po_uom
5408: FROM po_lines_all
5409: WHERE po_line_id = interface.from_line_id;
5410: END IF; -- g_document_subtype
5411: -- Bug 2735840 END
5412: EXCEPTION

Line 5481: po_lines_all pol --

5477: BEGIN
5478: SELECT poll.line_location_id,poll.secondary_unit_of_measure --
5479: INTO x_line_location_id,x_secondary_unit_of_measure
5480: FROM po_line_locations_all poll, --
5481: po_lines_all pol --
5482: WHERE poll.po_header_id = interface.po_header_id
5483: AND poll.po_line_id = pol.po_line_id
5484: AND poll.shipment_num = interface.shipment_num
5485: AND pol.line_num = interface.line_num

Line 5515: po_lines_all pol, --

5511: INTO x_line_location_id,
5512: l_manual_price_change_flag, --bug 3495772
5513: x_secondary_unit_of_measure
5514: FROM po_line_locations_all poll, --
5515: po_lines_all pol, --
5516: po_releases_all por --
5517: WHERE poll.po_header_id = interface.po_header_id
5518: AND poll.po_line_id = pol.po_line_id
5519: AND poll.shipment_num = interface.shipment_num

Line 5553: FROM po_lines_all --

5549:
5550: -- Find out if the line is using cumulative or non-cumlative pricing
5551: SELECT decode(price_break_lookup_code, 'CUMULATIVE', 'Y', 'N')
5552: INTO x_price_break_type
5553: FROM po_lines_all --
5554: WHERE po_line_id = x_po_line_id;
5555:
5556: IF (x_price_break_type = 'Y') THEN
5557: x_cumulative_flag := TRUE;

Line 5626: FROM po_lines_all --

5622: l_progress := '110';
5623: begin
5624: SELECT unit_price
5625: INTO x_price
5626: FROM po_lines_all --
5627: WHERE po_line_id=x_po_line_id;
5628: exception
5629: when others then
5630: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >

Line 6732: from po_lines_all pol , --

6728: IF (g_document_subtype='RELEASE') THEN -- Bug 2735840
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;

Line 6742: FROM po_lines_all

6738: ELSE -- Autocreating a PO that references a GA
6739: l_progress := '100';
6740: SELECT unit_meas_lookup_code
6741: INTO x_po_uom
6742: FROM po_lines_all
6743: WHERE po_line_id = interface.from_line_id;
6744: END IF; -- g_document_subtype
6745: -- Bug 2735840 END
6746:

Line 7955: l_po_func_unit_price PO_LINES_ALL.unit_price%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
7959:

Line 9242: po_lines_all pol --

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
9244: AND pli.interface_header_id = phi.interface_header_id
9245: AND phi.interface_header_id = x_interface_header_id
9246: AND pli.requisition_line_id = prl.requisition_line_id(+)

Line 9917: l_contract_id PO_LINES_ALL.contract_id%TYPE; --

9913: x_consigned_flag VARCHAR2(1) := 'N'; --CONSIGNED FPI
9914: x_create_new_line VARCHAR2(1) := 'N'; --GA FPI
9915: l_supplier_ref_number PO_LINES_INTERFACE.supplier_ref_number%TYPE; --
9916:
9917: l_contract_id PO_LINES_ALL.contract_id%TYPE; --
9918:
9919: /* Bug 3201308 start */
9920: l_needby_prf varchar2(1);
9921: l_shipto_prf varchar2(1);

Line 10333: po_lines_all pl

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 =
10337: DECODE(g_document_type, 'RFQ', g_document_type, x_document_subtype)

Line 10740: FROM po_lines_all pol,

10736: SELECT pol.po_line_id,
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 =

Line 10872: FROM po_lines_all POL2

10868: SELECT line_num
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

Line 10888: FROM po_lines_all pol --

10884: --
10885: --
10886: AND pol2.line_num =
10887: (SELECT /*+ NO_UNNEST */ MIN(line_num)
10888: FROM po_lines_all pol --
10889: WHERE pol.po_header_id = poh.po_header_id
10890: AND NVL(CANCEL_FLAG,'N') = 'N'
10891: AND LINE_TYPE_ID = x_line_type_id
10892: AND nvl(pol.ITEM_ID, -1) = nvl(x_item_id, -1) -- bgu, For one time item

Line 10986: FROM po_lines_all POL2,

10982: SELECT line_num,
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) --

Line 10995: FROM PO_LINES_ALL pol

10991: AND POH.type_lookup_code = 'RFQ'
10992: AND pol2.line_num =
10993: (
10994: SELECT /*+ NO_UNNEST */ MIN(line_num)
10995: FROM PO_LINES_ALL pol
10996: WHERE pol.po_header_id = poh.po_header_id
10997: AND LINE_TYPE_ID = x_line_type_id
10998: AND nvl(pol.ITEM_ID, -1) = nvl(x_item_id, -1)
10999: AND nvl(pol.ITEM_DESCRIPTION,'null') =

Line 11357: po_lines_all pl

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)
11361: AND ph.type_lookup_code =

Line 11588: FROM po_lines_all pol,

11584: BEGIN
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

Line 12160: po_lines_all POL

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;
12164: ELSE

Line 12185: PO_LINES_ALL POL, --

12181: ,PLL.line_location_id
12182: INTO x_po_shipment_num,
12183: x_line_location_to_check
12184: FROM PO_LINE_LOCATIONS_ALL PLL, --
12185: PO_LINES_ALL POL, --
12186: PO_LINE_TYPES PLT --
12187: WHERE POL.PO_LINE_ID = l_po_line_id -- bug2788115
12188: AND POL.po_line_id = PLL.po_line_id --
12189: AND POL.line_type_id = PLT.line_type_id --

Line 12800: po_lines_all pl --

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); --
12804:

Line 13028: FROM po_lines_all pol,

13024: p_item_rev_control IN NUMBER,
13025: x_allow_different_uoms IN VARCHAR2 -- Bug 2707576
13026: ) IS
13027: SELECT MIN(pol.line_num)
13028: FROM po_lines_all pol,
13029: po_requisition_lines_all prl --
13030: WHERE pol.po_header_id = p_po_header_id
13031: AND prl.requisition_line_id = p_requisition_line_id
13032: AND NVL(pol.cancel_flag,'N') = 'N'

Line 13100: FROM po_lines_all pol,

13096: p_item_rev_control IN NUMBER,
13097: x_allow_different_uoms IN VARCHAR2 -- Bug 2707576
13098: ) IS
13099: SELECT MIN(pol.line_num)
13100: FROM po_lines_all pol,
13101: po_requisition_lines_all prl --
13102: WHERE pol.po_header_id = p_po_header_id
13103: AND prl.requisition_line_id = p_requisition_line_id
13104: AND NVL(pol.cancel_flag,'N') = 'N'

Line 13244: l_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE; --

13240: l_ship_org_id_line mtl_system_items.organization_id%type;
13241: l_ship_org_code varchar2(3);
13242: l_ship_org_name varchar2(60);
13243:
13244: l_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE; --
13245:
13246: BEGIN
13247: -- Standard start of API savepoint
13248: SAVEPOINT create_price_break_pvt;

Line 13295: FROM po_lines_all pol

13291: -- Get value basis from line
13292:
13293: SELECT pol.order_type_lookup_code
13294: INTO l_value_basis
13295: FROM po_lines_all pol
13296: WHERE pol.po_line_id = p_po_line_id;
13297:
13298: l_progress := '025';
13299:

Line 13983: -- p_po_line_id: id of the line in po_lines_all

13979: -- payitem. Also create DELIVERY and ADVANCE payitems as necessary.
13980: --Parameters:
13981: -- IN:
13982: -- p_interface_line_id: id of the line in po_lines_interface
13983: -- p_po_line_id: id of the line in po_lines_all
13984: -- p_precision: precision of the currency desired. Used to round amounts.
13985: -- p_ext_precision: extended precision of the currency desired.
13986: -- Used to round prices
13987: -- OUT:

Line 14010: l_po_header_id PO_LINES_ALL.po_header_id%TYPE;

14006:
14007: d_progress NUMBER;
14008: d_module VARCHAR2(70) := 'po.plsql.PO_INTERFACE_S.create_payitems';
14009:
14010: l_po_header_id PO_LINES_ALL.po_header_id%TYPE;
14011: l_line_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE;
14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;
14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;

Line 14011: l_line_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE;

14007: d_progress NUMBER;
14008: d_module VARCHAR2(70) := 'po.plsql.PO_INTERFACE_S.create_payitems';
14009:
14010: l_po_header_id PO_LINES_ALL.po_header_id%TYPE;
14011: l_line_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE;
14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;
14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;
14015: l_line_amount PO_LINES_ALL.amount%TYPE;

Line 14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;

14008: d_module VARCHAR2(70) := 'po.plsql.PO_INTERFACE_S.create_payitems';
14009:
14010: l_po_header_id PO_LINES_ALL.po_header_id%TYPE;
14011: l_line_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE;
14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;
14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;
14015: l_line_amount PO_LINES_ALL.amount%TYPE;
14016: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;

Line 14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;

14009:
14010: l_po_header_id PO_LINES_ALL.po_header_id%TYPE;
14011: l_line_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE;
14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;
14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;
14015: l_line_amount PO_LINES_ALL.amount%TYPE;
14016: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
14017:

Line 14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;

14010: l_po_header_id PO_LINES_ALL.po_header_id%TYPE;
14011: l_line_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE;
14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;
14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;
14015: l_line_amount PO_LINES_ALL.amount%TYPE;
14016: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
14017:
14018: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;

Line 14015: l_line_amount PO_LINES_ALL.amount%TYPE;

14011: l_line_value_basis PO_LINES_ALL.order_type_lookup_code%TYPE;
14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;
14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;
14015: l_line_amount PO_LINES_ALL.amount%TYPE;
14016: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
14017:
14018: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;
14019: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;

Line 14016: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;

14012: l_line_matching_basis PO_LINES_ALL.matching_basis%TYPE;
14013: l_line_unit_price PO_LINES_ALL.unit_price%TYPE;
14014: l_line_quantity PO_LINES_ALL.quantity%TYPE;
14015: l_line_amount PO_LINES_ALL.amount%TYPE;
14016: l_line_purchase_basis PO_LINES_ALL.purchase_basis%TYPE;
14017:
14018: l_payment_type PO_LINE_LOCATIONS_ALL.payment_type%TYPE;
14019: l_shipment_type PO_LINE_LOCATIONS_ALL.shipment_type%TYPE;
14020: l_payitem_quantity PO_LINE_LOCATIONS_ALL.quantity%TYPE;

Line 14106: FROM po_lines_all pol

14102: , l_line_unit_price
14103: , l_line_quantity
14104: , l_line_amount
14105: , l_line_purchase_basis
14106: FROM po_lines_all pol
14107: WHERE pol.po_line_id = p_po_line_id;
14108:
14109: d_progress := 20;
14110:

Line 14711: -- p_po_line_id: id of the line in po_lines_all

14707: --Parameters:
14708: -- IN:
14709: -- p_req_line_id: id of the requisition line that is the source of
14710: -- the po line; null if no backing req.
14711: -- p_po_line_id: id of the line in po_lines_all
14712: -- p_interface_line_id: id of the line in po_lines_interface
14713: -- p_precision: precision of the currency desired. Used to round amounts.
14714: -- p_ext_precision: extended precision of the currency desired.
14715: -- Used to round prices