DBA Data[Home] [Help]

APPS.OE_LINE_UTIL dependencies on OE_ORDER_LINES

Line 91: l_hook_pricing_uom OE_ORDER_LINES_ALL.PRICING_QUANTITY_UOM%TYPE;

87: RETURN VARCHAR2
88: IS
89:
90: l_item_rec OE_ORDER_CACHE.ITEM_REC_TYPE;
91: l_hook_pricing_uom OE_ORDER_LINES_ALL.PRICING_QUANTITY_UOM%TYPE;
92: l_primary_catch_weight VARCHAR2(1) := NULL;
93: l_secondary_catch_weight VARCHAR2(1) := NULL;
94: l_ref_line_rec OE_ORDER_PUB.LINE_REC_TYPE;
95: TYPE uom_class_tbl IS TABLE of MTL_UNITS_OF_MEASURE.UOM_CLASS%TYPE index by MTL_UNITS_OF_MEASURE.UOM_CODE%TYPE;

Line 369: from oe_order_lines_all

365:
366: begin
367: select header_id
368: into l_header_id
369: from oe_order_lines_all
370: where line_id = p_line_id;
371: exception when no_data_found then
372: null;
373: end;

Line 3732: FROM OE_ORDER_LINES_ALL

3728: THEN
3729: BEGIN
3730: SELECT calculate_price_flag
3731: INTO l_orig_line_calc_price_flag
3732: FROM OE_ORDER_LINES_ALL
3733: WHERE LINE_ID = p_x_line_rec.split_from_line_id;
3734: EXCEPTION
3735: WHEN OTHERS THEN
3736: l_orig_line_calc_price_flag := NULL;

Line 4145: FROM oe_order_lines

4141: BEGIN
4142:
4143: Select 'Y'
4144: INTO l_is_model
4145: FROM oe_order_lines
4146: WHERE line_id = p_x_line_rec.service_reference_line_id
4147: AND item_type_code in ('INCLUDED', 'MODEL', 'CLASS', 'OPTION', 'KIT') ; -- Included KIT Item Type Code for bug 2938790
4148:
4149: EXCEPTION

Line 4165: FROM oe_order_lines l

4161: end if;
4162: BEGIN
4163: Select 'Y'
4164: INTO l_is_model
4165: FROM oe_order_lines l
4166: WHERE top_model_line_id = p_x_line_rec.service_reference_line_id
4167: AND item_type_code = 'INCLUDED'
4168: AND exists (select null from mtl_system_items mtl where
4169: mtl.inventory_item_id = l.inventory_item_id and

Line 4298: from oe_order_lines

4294: IF l_serviceable_item = 'Y' THEN
4295: BEGIN
4296: select distinct 'Y'
4297: into l_serviced_model
4298: from oe_order_lines
4299: where item_type_code = 'SERVICE'
4300: and service_reference_line_id = p_x_line_rec.top_model_line_id
4301: and service_reference_type_code = 'ORDER';
4302:

Line 5233: FROM oe_order_lines

5229: BEGIN
5230:
5231: Select 'Y'
5232: INTO l_is_model
5233: FROM oe_order_lines
5234: WHERE line_id = p_x_line_rec.service_reference_line_id
5235: AND item_type_code in ('INCLUDED', 'MODEL', 'CLASS', 'OPTION') ;
5236:
5237: EXCEPTION

Line 9393: FROM oe_order_lines

9389: --Commented for MOAC end
9390:
9391: SELECT lock_control
9392: INTO l_lock_control
9393: FROM oe_order_lines
9394: WHERE line_id = p_line_rec.line_id;
9395:
9396: l_lock_control := l_lock_control + 1;
9397:

Line 9434: UPDATE OE_ORDER_LINES

9430: oe_debug_pub.add('shipset-'||to_char(p_line_rec.ship_set_id), 1);
9431: end if;
9432: -- OPM 02/JUN/00 - Include process columns
9433: -- (ordered_quantity2,ordered_quantity_uom2,preferred_grade)
9434: UPDATE OE_ORDER_LINES
9435: SET ACCOUNTING_RULE_ID = p_line_rec.accounting_rule_id
9436: , ACCOUNTING_RULE_DURATION = p_line_rec.accounting_rule_duration
9437: , CALCULATE_PRICE_FLAG = p_line_rec.calculate_price_flag
9438: , ACTUAL_ARRIVAL_DATE = p_line_rec.actual_arrival_date

Line 9913: INSERT INTO OE_ORDER_LINES

9909:
9910: -- OPM 02/JUN/00 - Include process columns
9911: -- (ordered_quantity2,ordered_quantity_uom2,preferred_grade)
9912: -- =======================================================================
9913: INSERT INTO OE_ORDER_LINES
9914: ( ACCOUNTING_RULE_ID
9915: , ACCOUNTING_RULE_DURATION
9916: , ACTUAL_ARRIVAL_DATE
9917: , ACTUAL_SHIPMENT_DATE

Line 10762: FROM OE_ORDER_LINES

10758: line_category_code, schedule_status_code,
10759: shipping_interfaced_flag,
10760: ordered_quantity, price_request_code
10761: ,transaction_phase_code
10762: FROM OE_ORDER_LINES
10763: WHERE HEADER_ID = p_header_id;
10764: /*AND NVL(ORG_ID,NVL(l_org_id,0))= NVL(l_org_id,0);*/
10765:
10766: -- added for notification framework

Line 10771: FROM OE_ORDER_LINES

10767: l_new_line_rec OE_Order_PUB.Line_Rec_Type;
10768: l_index NUMBER;
10769: CURSOR svc_line IS
10770: SELECT line_id, item_type_code
10771: FROM OE_ORDER_LINES
10772: WHERE service_reference_line_id = p_line_id
10773: AND service_reference_type_code = 'ORDER'; --bug 3056313
10774:
10775: BEGIN

Line 10855: DELETE FROM OE_ORDER_LINES_HISTORY

10851:
10852: END LOOP; -- all the lines in a header.
10853:
10854: /* Start Audit Trail */
10855: DELETE FROM OE_ORDER_LINES_HISTORY
10856: WHERE HEADER_ID = p_header_id;
10857: /* End Audit Trail */
10858:
10859: DELETE FROM OE_ORDER_LINES

Line 10859: DELETE FROM OE_ORDER_LINES

10855: DELETE FROM OE_ORDER_LINES_HISTORY
10856: WHERE HEADER_ID = p_header_id;
10857: /* End Audit Trail */
10858:
10859: DELETE FROM OE_ORDER_LINES
10860: WHERE HEADER_ID = p_header_id;
10861: /* AND NVL(ORG_ID,NVL(l_org_id,0))= NVL(l_org_id,0);*/
10862:
10863: ELSE -- header_id is missing.

Line 10882: from oe_order_lines

10878: lsqlstmt := 'Select line_id, item_type_code, line_category_code,
10879: config_header_id, config_rev_nbr,
10880: schedule_status_code, shipping_interfaced_flag,
10881: ordered_quantity, price_request_code
10882: from oe_order_lines
10883: where top_model_line_id = :x and
10884: line_id <> :y';
10885:
10886:

Line 10935: from oe_order_lines

10931: lsqlstmt := 'Select line_id, item_type_code, line_category_code,
10932: config_header_id, config_rev_nbr,
10933: schedule_status_code, shipping_interfaced_flag,
10934: ordered_quantity, price_request_code
10935: from oe_order_lines
10936: where service_reference_type_code = ' || '''' || 'ORDER' || ''' ' ||
10937: 'AND service_reference_line_id = :x'; --bug 3056313
10938:
10939: OPEN llinetbl_svc

Line 10970: DELETE FROM OE_ORDER_LINES

10966: END LOOP; -- loop of the service lines.
10967:
10968: CLOSE llinetbl_svc;
10969:
10970: DELETE FROM OE_ORDER_LINES
10971: WHERE SERVICE_REFERENCE_LINE_ID = l_tmp_line_id
10972: AND SERVICE_REFERENCE_TYPE_CODE = 'ORDER'; -- bug 3056313
10973:
10974: END IF; -- if service lines exist, for bug 2408321

Line 10983: 'Delete oe_order_lines where top_model_line_id = :x

10979: CLOSE llinetbl;
10980:
10981: IF lvariable1 = 'TOP_MODEL' THEN
10982: EXECUTE IMMEDIATE
10983: 'Delete oe_order_lines where top_model_line_id = :x
10984: and line_id <> :y'
10985: USING
10986: p_line_id,
10987: p_line_id;

Line 11031: from oe_order_lines

11027: lsqlstmt := 'Select line_id, item_type_code, line_category_code,
11028: config_header_id, config_rev_nbr,
11029: schedule_status_code, shipping_interfaced_flag,
11030: ordered_quantity,price_request_code
11031: from oe_order_lines
11032: where service_reference_type_code = ' || '''' || 'ORDER' || ''' ' ||
11033: 'and service_reference_line_id = :x'; -- bug 3056313
11034:
11035: OPEN llinetbl

Line 11070: DELETE FROM OE_ORDER_LINES_HISTORY

11066:
11067: END IF; -- if service lines exist
11068:
11069: /* Start Audit Trail (modified for 11.5.10) */
11070: DELETE FROM OE_ORDER_LINES_HISTORY
11071: WHERE LINE_ID = p_line_id
11072: AND NVL(AUDIT_FLAG, 'Y') = 'Y'
11073: AND NVL(VERSION_FLAG, 'N') = 'N'
11074: AND NVL(PHASE_CHANGE_FLAG, 'N') = 'N';

Line 11076: UPDATE OE_ORDER_LINES_HISTORY

11072: AND NVL(AUDIT_FLAG, 'Y') = 'Y'
11073: AND NVL(VERSION_FLAG, 'N') = 'N'
11074: AND NVL(PHASE_CHANGE_FLAG, 'N') = 'N';
11075:
11076: UPDATE OE_ORDER_LINES_HISTORY
11077: SET AUDIT_FLAG = 'N'
11078: WHERE LINE_ID = p_line_id
11079: AND NVL(AUDIT_FLAG, 'Y') = 'Y'
11080: AND (NVL(VERSION_FLAG, 'N') = 'Y'

Line 11113: DELETE FROM OE_ORDER_LINES

11109: END IF; /*code_release_level*/
11110: -- notification framework end
11111:
11112:
11113: DELETE FROM OE_ORDER_LINES
11114: WHERE LINE_ID = p_line_id;
11115: /* AND NVL(ORG_ID,NVL(l_org_id,0))= NVL(l_org_id,0);*/
11116:
11117:

Line 11148: DELETE FROM OE_ORDER_LINES

11144: END IF; /*code_release_level*/
11145: -- notification framework end
11146:
11147: -- For the Multiple service for Standard Line
11148: DELETE FROM OE_ORDER_LINES
11149: WHERE SERVICE_REFERENCE_LINE_ID = p_line_id
11150: AND SERVICE_REFERENCE_TYPE_CODE = 'ORDER'; -- bug 3056313
11151: /* AND NVL(ORG_ID,NVL(l_org_id,0))= NVL(l_org_id,0);*/
11152:

Line 11622: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622

11618: , SERVICE_FIRST_PERIOD_AMOUNT
11619: , SERVICE_FIRST_PERIOD_ENDDATE
11620: -- sol_ord_er #16014165 end
11621: , FULFILLMENT_BASE--ER#14763609
11622: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622
11623: WHERE LINE_ID = p_line_id;
11624:
11625: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
11626:

Line 12466: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622

12462: , SERVICE_FIRST_PERIOD_AMOUNT
12463: , SERVICE_FIRST_PERIOD_ENDDATE
12464: -- sol_ord_er #16014165
12465: ,FULFILLMENT_BASE --ER#14763609
12466: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622
12467: WHERE HEADER_ID = p_header_id
12468: ORDER BY LINE_NUMBER,SHIPMENT_NUMBER,OPN, CPN, SVN;
12469:
12470:

Line 12850: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622

12846: , SERVICE_FIRST_PERIOD_AMOUNT
12847: , SERVICE_FIRST_PERIOD_ENDDATE
12848: -- sol_ord_er #16014165 end
12849: ,FULFILLMENT_BASE --ER#14763609
12850: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622
12851: WHERE LINE_SET_ID = p_line_set_id
12852: ORDER BY LINE_NUMBER,SHIPMENT_NUMBER,OPN, CPN, SVN;
12853:
12854: l_OPN NUMBER;

Line 13771: FROM oe_order_lines_all

13767: /* bug 4344310 */
13768: CURSOR C_Lock (c_top_model_line_id NUMBER ,
13769: c_line_id NUMBER ) IS
13770: SELECT line_id ,lock_control
13771: FROM oe_order_lines_all
13772: WHERE line_id IN (c_top_model_line_id, c_line_id)
13773: FOR UPDATE NOWAIT ;
13774: --
13775: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

Line 13820: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622

13816: /* IF p_line_id <> FND_API.G_MISS_NUM THEN
13817:
13818: SELECT top_model_line_id
13819: INTO l_top_model_line_id
13820: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622
13821: WHERE line_id = l_line_id;
13822: ELSE
13823: l_top_model_line_id := p_x_line_rec.top_model_line_id;
13824: END IF; */

Line 13835: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622

13831: END IF ;
13832: ELSE
13833: SELECT top_model_line_id
13834: INTO l_top_model_line_id
13835: FROM OE_ORDER_LINES_ALL -- Fix for FP bug 3391622
13836: WHERE line_id = l_line_id;
13837:
13838: IF l_debug_level > 0 THEN
13839: oe_debug_pub.add('get top_model_line_id from the query' );

Line 13861: FROM oe_order_lines_all

13857:
13858: -- changes for bug 4344310
13859: /* SELECT line_id
13860: INTO l_dummy
13861: FROM oe_order_lines_all
13862: WHERE line_id = l_top_model_line_id
13863: FOR UPDATE NOWAIT; */
13864:
13865: FOR I IN c_lock(l_top_model_line_id ,l_line_id ) LOOP

Line 13875: FROM oe_order_lines_all

13871:
13872: ELSE
13873: SELECT line_id,lock_control
13874: INTO l_line_id,l_db_lock_control
13875: FROM oe_order_lines_all
13876: WHERE line_id = l_line_id
13877: FOR UPDATE NOWAIT;
13878: END IF;
13879: --end bug 4344310

Line 13920: FROM oe_order_lines_all

13916:
13917: --commented out for bug 4344310
13918: /*SELECT line_id,lock_control
13919: INTO l_line_id,l_db_lock_control
13920: FROM oe_order_lines_all
13921: WHERE line_id = l_line_id
13922: FOR UPDATE NOWAIT; */
13923:
13924: IF l_debug_level > 0 THEN

Line 14087: FROM oe_order_lines_all

14083: )
14084: IS
14085: CURSOR lock_lines(p_header_id NUMBER) IS
14086: SELECT line_id
14087: FROM oe_order_lines_all
14088: WHERE header_id = p_header_id
14089: FOR UPDATE NOWAIT;
14090:
14091: l_line_id NUMBER;

Line 14118: FROM OE_ORDER_LINES_ALL

14114: IF p_line_id <> FND_API.G_MISS_NUM THEN
14115:
14116: SELECT line_id
14117: INTO l_line_id
14118: FROM OE_ORDER_LINES_ALL
14119: WHERE line_id = p_line_id
14120: FOR UPDATE NOWAIT;
14121:
14122: END IF;

Line 15865: FROM OE_ORDER_LINES

15861: ELSIF p_x_line_rec.operation = OE_GLOBALS.G_OPR_UPDATE THEN
15862:
15863: SELECT SOLD_TO_ORG_ID
15864: INTO l_sold_to_org_id
15865: FROM OE_ORDER_LINES
15866: WHERE LINE_ID = p_x_line_rec.line_id;
15867:
15868: END IF;
15869:

Line 16030: FROM OE_ORDER_LINES

16026: THEN
16027:
16028: SELECT SHIP_TO_ORG_ID, INVOICE_TO_ORG_ID, DELIVER_TO_ORG_ID
16029: INTO l_sold_to_org_id, l_invoice_to_org_id, l_deliver_to_org_id
16030: FROM OE_ORDER_LINES
16031: WHERE LINE_ID = p_x_line_rec.line_id;
16032:
16033: IF p_x_line_rec.ship_to_org_id <> FND_API.G_MISS_NUM THEN
16034: l_ship_to_org_id := p_x_line_rec.ship_to_org_id;

Line 16468: from oe_order_lines

16464: )IS
16465: BEGIN
16466:
16467: Select header_id into x_header_id
16468: from oe_order_lines
16469: where line_id = p_line_id;
16470: IF sql%notfound then
16471: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16472: END IF;

Line 16537: From oe_order_lines_all

16533: -- Start 2346233
16534: BEGIN
16535: Select order_quantity_uom, inventory_item_id
16536: Into l_order_quantity_uom, l_inventory_item_id
16537: From oe_order_lines_all
16538: Where line_id = p_line_id;
16539:
16540: EXCEPTION
16541: WHEN OTHERS THEN

Line 16657: From oe_order_lines_all

16653: -- Start 2346233
16654: BEGIN
16655: Select order_quantity_uom, inventory_item_id
16656: Into l_order_quantity_uom, l_inventory_item_id
16657: From oe_order_lines_all
16658: Where line_id = p_line_id;
16659:
16660: EXCEPTION
16661: WHEN OTHERS THEN

Line 16840: From oe_order_lines_all

16836: BEGIN
16837:
16838: Select order_quantity_uom, inventory_item_id
16839: Into l_order_quantity_uom, l_inventory_item_id
16840: From oe_order_lines_all
16841: Where line_id = p_line_id;
16842:
16843: EXCEPTION
16844: WHEN OTHERS THEN

Line 16953: from oe_order_lines

16949: **
16950: IF p_line_rec.reference_line_id is not null THEN
16951:
16952: select nvl(upgraded_flag,'-') into l_upgraded_flag
16953: from oe_order_lines
16954: where line_id = p_line_rec.reference_line_id;
16955:
16956: IF l_upgraded_flag in ('Y','P') THEN
16957: return FALSE;

Line 16981: oe_order_lines b

16977: IF C2.line_set_id is not null THEN
16978: select distinct reference_line_id
16979: into l_ref_line_id
16980: from oe_line_sets a,
16981: oe_order_lines b
16982: where a.set_id = C2.line_set_id
16983: and a.line_id = b.line_id
16984: and b.booked_flag = 'Y'
16985: and b.line_id <> p_line_rec.line_id

Line 16990: from oe_order_lines

16986: and b.cancelled_flag <> 'Y';
16987: ELSE
16988: select reference_line_id
16989: into l_ref_line_id
16990: from oe_order_lines
16991: where line_id = C2.line_id
16992: and line_id <> p_line_rec.line_id
16993: and booked_flag = 'Y'
16994: and cancelled_flag <> 'Y';

Line 17005: FROM oe_order_lines

17001:
17002: oe_debug_pub.ADD('Before checking the total for the Outbound line',1);
17003: SELECT sum(nvl(ordered_quantity, 0))
17004: INTO l_total
17005: FROM oe_order_lines
17006: WHERE reference_line_id = p_line_rec.reference_line_id
17007: AND ((booked_flag = 'Y' and header_id <> p_line_rec.header_id)
17008: OR (header_id = p_line_rec.header_id))
17009: AND cancelled_flag <> 'Y'

Line 17020: FROM oe_order_lines

17016: -- bug# 6617423 : Start -----------
17017: /*
17018: SELECT nvl(ordered_quantity, 0)
17019: INTO l_orig_quantity
17020: FROM oe_order_lines
17021: WHERE line_id = p_line_rec.reference_line_id;
17022: */
17023:
17024: oe_debug_pub.add( ' p_line_rec.org_id = '|| p_line_rec.org_id, 5 ) ;

Line 17036: FROM oe_order_lines

17032:
17033: IF l_overship_invoice_basis = 'SHIPPED' then
17034: SELECT nvl(shipped_quantity, ordered_quantity) --- get from ord_qty if original line not shipped/invoiced....
17035: INTO l_orig_quantity
17036: FROM oe_order_lines
17037: WHERE line_id = p_line_rec.reference_line_id;
17038: ELSE
17039: SELECT nvl(ordered_quantity, 0)
17040: INTO l_orig_quantity

Line 17041: FROM oe_order_lines

17037: WHERE line_id = p_line_rec.reference_line_id;
17038: ELSE
17039: SELECT nvl(ordered_quantity, 0)
17040: INTO l_orig_quantity
17041: FROM oe_order_lines
17042: WHERE line_id = p_line_rec.reference_line_id;
17043: end if;
17044: -- bug# 6617423: End -------
17045:

Line 17560: from oe_order_lines_all

17556:
17557: begin
17558: select source_document_type_id
17559: into l_parent_document_type_id
17560: from oe_order_lines_all
17561: where line_id = p_x_line_rec.top_model_line_id;
17562:
17563: exception
17564: when NO_DATA_FOUND then NULL;

Line 18263: FROM oe_order_lines

18259:
18260: BEGIN
18261: SELECT ship_to_org_id
18262: INTO l_ship_to_org_id
18263: FROM oe_order_lines
18264: WHERE line_id = p_x_line_rec.split_from_line_id;
18265:
18266: EXCEPTION
18267: WHEN OTHERS THEN

Line 18910: from oe_order_lines a

18906: --lchen rewrite cursor standard_line_number to fix performance bug 1869179
18907:
18908: CURSOR STANDARD_LINE_NUMBER IS
18909: select /*MOAC_SQL_CHANGES*/ a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18910: from oe_order_lines a
18911: where a.service_reference_line_id= p_line_id
18912: UNION
18913: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18914: from oe_order_lines a

Line 18914: from oe_order_lines a

18910: from oe_order_lines a
18911: where a.service_reference_line_id= p_line_id
18912: UNION
18913: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18914: from oe_order_lines a
18915: where a.line_set_id = p_line_set_id
18916: UNION
18917: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18918: from oe_order_lines a

Line 18918: from oe_order_lines a

18914: from oe_order_lines a
18915: where a.line_set_id = p_line_set_id
18916: UNION
18917: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18918: from oe_order_lines a
18919: where exists
18920: (select 'x'
18921: from oe_order_lines_all b
18922: where a.service_reference_line_id=b.line_id

Line 18921: from oe_order_lines_all b

18917: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18918: from oe_order_lines a
18919: where exists
18920: (select 'x'
18921: from oe_order_lines_all b
18922: where a.service_reference_line_id=b.line_id
18923: and b.line_set_id = p_line_set_id)
18924: and a.line_Id <> p_line_id;
18925:

Line 18933: FROM oe_order_lines

18929:
18930: CURSOR MODEL_LINE_NUMBER IS
18931: SELECT /*MOAC_SQL_CHANGES*/ line_id, header_id,line_number,shipment_number,
18932: option_number,service_number
18933: FROM oe_order_lines
18934: WHERE (top_model_line_id = p_line_id
18935: OR line_set_id = p_line_set_id
18936: OR top_model_line_id in (SELECT line_id
18937: FROM oe_order_lines_all

Line 18937: FROM oe_order_lines_all

18933: FROM oe_order_lines
18934: WHERE (top_model_line_id = p_line_id
18935: OR line_set_id = p_line_set_id
18936: OR top_model_line_id in (SELECT line_id
18937: FROM oe_order_lines_all
18938: WHERE header_id = p_header_id
18939: AND line_set_id = p_line_set_id))
18940: AND line_id <> p_line_id
18941: AND header_id = p_header_id

Line 18952: from oe_order_lines a, oe_order_lines_all b

18948: --lchen rewrite cursor service_line_number to fix performance bug 1869179
18949:
18950: CURSOR SERVICE_LINE_NUMBER IS
18951: select /*MOAC_SQL_CHANGES*/ a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18952: from oe_order_lines a, oe_order_lines_all b
18953: where a.service_reference_line_id=b.line_id
18954: and b.line_set_id = p_line_set_id
18955: UNION
18956: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number

Line 18957: from oe_order_lines a, oe_order_lines_all b

18953: where a.service_reference_line_id=b.line_id
18954: and b.line_set_id = p_line_set_id
18955: UNION
18956: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18957: from oe_order_lines a, oe_order_lines_all b
18958: Where a.service_reference_line_id=b.line_id
18959: and b.top_model_line_id= p_line_id
18960: UNION
18961: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number

Line 18962: from oe_order_lines a, oe_order_lines_all b

18958: Where a.service_reference_line_id=b.line_id
18959: and b.top_model_line_id= p_line_id
18960: UNION
18961: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18962: from oe_order_lines a, oe_order_lines_all b
18963: Where a.service_reference_line_id=b.line_id
18964: and EXISTS (select 'X'
18965: from oe_order_lines_all c
18966: where line_set_id = p_line_set_id

Line 18965: from oe_order_lines_all c

18961: select a.line_id, a.header_id, a.line_number, a.shipment_number, a.option_number, a.service_number
18962: from oe_order_lines a, oe_order_lines_all b
18963: Where a.service_reference_line_id=b.line_id
18964: and EXISTS (select 'X'
18965: from oe_order_lines_all c
18966: where line_set_id = p_line_set_id
18967: and c.line_id = b.top_model_line_id);
18968:
18969:

Line 19002: FROM oe_order_lines

18998:
18999: BEGIN
19000: SELECT line_id
19001: INTO l_dummy
19002: FROM oe_order_lines
19003: WHERE line_id=l_line_id
19004: FOR UPDATE OF line_number NOWAIT;
19005: EXCEPTION
19006: WHEN OTHERS THEN

Line 19013: UPDATE oe_order_lines

19009:
19010: oe_debug_pub.add('l_line_id= ' || l_line_id);
19011: oe_debug_pub.add('In the loop of standard_line_number, update child service line numbers');
19012:
19013: UPDATE oe_order_lines
19014: Set line_number = p_line_number,
19015: lock_control = lock_control + 1
19016: WHERE line_id=l_line_id;
19017:

Line 19056: UPDATE oe_order_lines

19052:
19053: oe_debug_pub.add('l_cursor_flag= ' ||l_cursor_flag );
19054: -- Update line number on the child option/service/class lines
19055:
19056: UPDATE oe_order_lines
19057: Set line_number = p_line_number,
19058: lock_control = lock_control + 1
19059: WHERE (top_model_line_id = p_line_id
19060: OR line_set_id = p_line_set_id

Line 19062: FROM oe_order_lines

19058: lock_control = lock_control + 1
19059: WHERE (top_model_line_id = p_line_id
19060: OR line_set_id = p_line_set_id
19061: OR top_model_line_id in (SELECT line_id
19062: FROM oe_order_lines
19063: WHERE header_id = p_header_id
19064: AND line_set_id = p_line_set_id))
19065: AND line_id <> p_line_id
19066: AND header_id = p_header_id; -- 2508099

Line 19114: FROM oe_order_lines

19110:
19111: BEGIN
19112: SELECT line_id
19113: INTO l_dummy
19114: FROM oe_order_lines
19115: WHERE line_id=l_line_id
19116: FOR UPDATE OF line_number NOWAIT;
19117: EXCEPTION
19118: WHEN OTHERS THEN

Line 19125: UPDATE oe_order_lines

19121:
19122: oe_debug_pub.add('l_line_id = ' ||l_dummy);
19123: oe_debug_pub.add('in service_line_number loop, update service line number');
19124:
19125: UPDATE oe_order_lines
19126: Set line_number = p_line_number,
19127: lock_control = lock_control + 1
19128: WHERE line_id=l_line_id;
19129: END LOOP;

Line 19383: -- imported and records are posted to OE_Order_Lines_All table

19379: -- Bug 11928288 : End
19380: OR p_x_line_rec.item_type_code = OE_GLOBALS.G_ITEM_CLASS ) THEN
19381: -- Importing Pre Exploded Kit.
19382: -- Log a delayed request for its execution after the whole Kit is
19383: -- imported and records are posted to OE_Order_Lines_All table
19384: -- This request will be logged for Kit model line
19385:
19386: oe_debug_pub.add(' Logging G_PRE_EXPLODED_KIT delayed requests');
19387: OE_delayed_requests_Pvt.log_request(

Line 20024: FROM oe_order_lines

20020: oe_debug_pub.add('cancel or delete, call smc shipping', 1);
20021:
20022: SELECT count(*)
20023: INTO l_count
20024: FROM oe_order_lines
20025: WHERE top_model_line_id = p_x_line_tbl(I).top_model_line_id
20026: AND shipping_interfaced_flag = 'Y';
20027:
20028: IF l_count = 0 THEN

Line 20060: FROM oe_order_lines L

20056: BEGIN
20057:
20058: SELECT 'N'
20059: INTO l_valid_line_number
20060: FROM oe_order_lines L
20061: WHERE L.line_number = p_x_line_tbl(I).line_number
20062: AND L.header_id = p_x_line_tbl(I).header_id
20063: AND L.line_id <> p_x_line_tbl(I).line_id
20064: AND ( L.item_type_code = 'STANDARD'

Line 20083: FROM oe_order_lines L

20079:
20080: BEGIN
20081: SELECT 'N'
20082: INTO l_valid_line_number
20083: FROM oe_order_lines L
20084: WHERE L.line_number = p_x_line_tbl(I).line_number
20085: AND L.header_id = p_x_line_tbl(I).header_id
20086: AND L.line_id <> p_x_line_tbl(I).line_id
20087: AND nvl(L.line_set_id,-9999) <>nvl( p_x_line_tbl(I).line_set_id,-9999) -- bug 10414075

Line 20261: FROM oe_order_lines

20257: and p_line_rec.reference_line_id is not null THEN
20258:
20259: SELECT item_type_code
20260: INTO l_item_type_code
20261: FROM oe_order_lines
20262: WHERE line_id = p_line_rec.reference_line_id;
20263:
20264: RETURN l_item_type_code;
20265: ELSE

Line 21212: from oe_order_lines_all

21208: IF p_x_line_rec.split_from_line_id is not null then
21209: --bug 6196000
21210: begin
21211: select shipping_quantity_uom INTO l_shipping_uom
21212: from oe_order_lines_all
21213: where line_id = p_x_line_rec.split_from_line_id;
21214: exception
21215: when no_data_found then
21216: oe_debug_pub.add('setting the uom to null');

Line 21395: FROM oe_order_lines

21391:
21392: BEGIN
21393: SELECT line_id
21394: INTO l_num
21395: FROM oe_order_lines
21396: WHERE ato_line_id = p_x_line_rec.ato_line_id
21397: AND top_model_line_id = p_x_line_rec.top_model_line_id
21398: AND item_type_code = OE_GLOBALS.G_ITEM_CONFIG;
21399:

Line 21727: FROM oe_order_lines

21723:
21724: BEGIN
21725: SELECT 1
21726: INTO l_num
21727: FROM oe_order_lines
21728: WHERE line_id = p_x_line_rec.top_model_line_id
21729: AND top_model_line_id = nvl(ato_line_id, -1);
21730:
21731: EXCEPTION

Line 21816: FROM oe_order_lines

21812:
21813: BEGIN
21814: SELECT 1
21815: INTO l_num
21816: FROM oe_order_lines
21817: WHERE line_id = p_x_line_rec.split_from_line_id
21818: AND ato_line_id = line_id
21819: AND item_type_code = 'CLASS';
21820:

Line 21879: FROM oe_order_lines

21875: IF OE_Code_Control.Code_Release_Level < '110510' THEN
21876: BEGIN
21877: SELECT line_id
21878: INTO l_num
21879: FROM oe_order_lines
21880: WHERE top_model_line_id = p_x_line_rec.top_model_line_id
21881: AND item_type_code = OE_GLOBALS.G_ITEM_CONFIG;
21882:
21883: l_flag := TRUE;

Line 22009: FROM oe_order_lines

22005:
22006: BEGIN
22007: SELECT config_header_id, config_rev_nbr, configuration_id
22008: INTO l_config_header_id,l_config_rev_nbr, l_configuration_id
22009: FROM oe_order_lines
22010: WHERE line_id = p_x_line_rec.split_from_line_id;
22011: EXCEPTION
22012: WHEN no_data_found THEN
22013: if l_debug_level > 0 then

Line 22054: FROM oe_order_lines

22050:
22051: IF p_x_line_rec.line_id <> p_x_line_rec.top_model_line_id THEN
22052: SELECT open_flag, ordered_item, fulfilled_flag
22053: INTO l_model_open_flag, l_model_item, l_fulfilled_flag
22054: FROM oe_order_lines
22055: WHERE line_id = p_x_line_rec.top_model_line_id;
22056: END IF;
22057:
22058: ---------------------- deletes ----------------------------------

Line 22742: FROM oe_order_lines

22738:
22739: BEGIN
22740: SELECT 1
22741: INTO l_num
22742: FROM oe_order_lines
22743: WHERE top_model_line_id = p_x_line_rec.top_model_line_id
22744: AND link_to_line_id = p_x_line_rec.line_id
22745: AND item_type_code = OE_GLOBALS.G_ITEM_INCLUDED
22746: AND rownum = 1;

Line 24438: FROM oe_order_lines Line,

24434: END IF;
24435:
24436: SELECT nvl(bic.required_for_revenue, 0)
24437: INTO l_is_rfr
24438: FROM oe_order_lines Line,
24439: bom_inventory_components bic
24440: WHERE Line.line_id = p_line_id
24441: AND Line.open_flag = 'N'
24442: AND bic.component_sequence_id = Line.component_sequence_id

Line 24452: FROM oe_order_lines Line,

24448: END IF;
24449:
24450: SELECT count(1)
24451: INTO l_open_rfr_lines
24452: FROM oe_order_lines Line,
24453: bom_inventory_components bic
24454: WHERE Line.line_id <> p_line_id
24455: AND Line.top_model_line_id = p_top_model_line_id
24456: AND Line.link_to_line_id = p_link_to_line_id

Line 24508: Update oe_order_lines

24504: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
24505: IF l_debug_level > 0 THEN
24506: oe_debug_pub.add( 'Updating Line Flow Status and pushing WF ');
24507: END IF;
24508: Update oe_order_lines
24509: Set flow_status_code = 'INVOICED'
24510: Where line_id = p_link_to_line_id;
24511:
24512: BEGIN

Line 24616: from oe_order_lines_all

24612:
24613: BEGIN
24614: select NVL(sold_to_org_id,p_x_line_tbl(l_index).sold_to_org_id)
24615: into l_sold_to_org_id
24616: from oe_order_lines_all
24617: where line_id = p_x_line_tbl(l_index).line_id;
24618:
24619: EXCEPTION
24620: WHEN OTHERS THEN

Line 24797: from oe_order_lines_all

24793: oe_debug_pub.add('Entering Is_Subscription_Service_Line p_line_id = '||p_line_id);
24794: End If;
24795: select subscription_enable_flag
24796: into l_subscription_enable_flag
24797: from oe_order_lines_all
24798: where line_id = p_line_id;
24799: If NVL(l_subscription_enable_flag,'N') = 'Y' THEN
24800: -- Subscription Servcie Line
24801: If l_debug_level > 0 THEN

Line 24838: oe_order_lines_all l,

24834: SELECT a.price_adjustment_id,a.rltd_price_adj_id,prg.list_line_id,p.list_line_id
24835: INTO l_orig_pr_adjustment_id,l_or_rltd_padj_id,l_prg_list_line_id,l_assoc_list_line_id
24836: FROM oe_price_adj_assocs a,
24837: oe_price_adjustments p,
24838: oe_order_lines_all l,
24839: oe_price_adjustments prg
24840: WHERE l.line_id = p.line_id AND p.price_adjustment_id = a.rltd_price_adj_id
24841: AND l.item_type_code = 'SERVICE' AND l.SUBSCRIPTION_ENABLE_FLAG <> 'Y'
24842: AND l.line_id = p_line_id AND prg.price_adjustment_id = a.price_adjustment_id