DBA Data[Home] [Help]

APPS.OE_CONFIG_PVT dependencies on OE_ORDER_LINES

Line 222: UPDATE OE_ORDER_LINES_ALL

218: AND config_rev_nbr = p_config_rev_nbr
219: AND inventory_item_id = l_model_line_rec.inventory_item_id;
220:
221: -- Bug 6073974 Update the Configuration id for model line
222: UPDATE OE_ORDER_LINES_ALL
223: SET CONFIGURATION_ID = l_model_line_rec.configuration_id
224: WHERE inventory_item_id = l_model_line_rec.inventory_item_id
225: AND LINE_ID = l_model_line_rec.line_id;
226:

Line 347: -- If we successfully save the configuration in oe_order_lines then

343: ELSE
344: RAISE FND_API.G_EXC_ERROR;
345: END IF;
346: ELSE
347: -- If we successfully save the configuration in oe_order_lines then
348: -- Time to delete previous revisions from spc
349:
350: IF l_model_line_rec.config_header_id is not null AND
351: l_model_line_rec.config_rev_nbr is not null

Line 425: in oe_order_lines, we need to insert it.

421: /*------------------------------------------------------------------
422: PROCEDURE Handle_Inserts
423:
424: if a component is present in cz_config_details_v but not present
425: in oe_order_lines, we need to insert it.
426:
427: Change Record:
428: Bug 2181376: explode bill is not required since in this
429: procedure we will selecet all required data from cz_config_details_v

Line 474: FROM oe_order_lines l

470: WHERE c.config_hdr_id = p_config_hdr_id
471: AND c.config_rev_nbr = p_config_rev_nbr
472: AND NOT EXISTS
473: ( SELECT 'X'
474: FROM oe_order_lines l
475: WHERE l.top_model_line_id = p_model_line_rec.line_id
476: AND l.component_code = c.component_code
477: AND l.configuration_id = c.config_item_id
478: AND l.open_flag = 'Y')

Line 506: UPDATE oe_order_lines oe

502: END IF;
503:
504: BEGIN
505:
506: UPDATE oe_order_lines oe
507: SET ( configuration_id , sort_order ) =
508: (SELECT config_item_id , bom_sort_order --bug6628691
509: FROM cz_config_details_v
510: WHERE config_hdr_id = p_config_hdr_id

Line 529: UPDATE oe_order_lines oe

525: IF l_debug_level > 0 THEN
526: oe_debug_pub.add( 'CRM 1:CONFIGURATION_ID NOT UPDATED ' , 3 ) ;
527: END IF;
528:
529: UPDATE oe_order_lines oe
530: SET ( configuration_id , sort_order ) =
531: (SELECT config_item_id , bom_sort_order --bug6628691
532: FROM cz_config_details_v
533: WHERE config_hdr_id = p_config_hdr_id

Line 744: SELECT OE_ORDER_LINES_S.NEXTVAL

740: l_class_line_rec.inventory_item_id := config_rec.inventory_item_id;
741: l_class_line_rec.configuration_id := config_rec.config_item_id;
742: l_class_line_rec.ordered_item := l_concatenated_segments;
743:
744: SELECT OE_ORDER_LINES_S.NEXTVAL
745: INTO l_class_line_rec.line_id
746: FROM DUAL;
747:
748: l_class_line_rec.pricing_quantity_uom

Line 809: in oe_order_lines, we need to insert it.

805: /*------------------------------------------------------------
806: PROCEDURE Handle_Inserts_Old
807:
808: if a component is present in cz_config_details_v but not present
809: in oe_order_lines, we need to insert it.
810:
811: Change Record:
812: Bug 2181376: explode bill is not required since in this
813: procedure we will selecet all required data from cz_config_details_v

Line 842: FROM oe_order_lines l

838: WHERE c.config_hdr_id = p_config_hdr_id
839: AND c.config_rev_nbr = p_config_rev_nbr
840: AND NOT EXISTS
841: ( SELECT 'X'
842: FROM oe_order_lines l
843: WHERE l.top_model_line_id = p_model_line_rec.line_id
844: AND l.component_code = c.component_code
845: AND l.open_flag = 'Y')
846: ORDER BY c.component_code;

Line 925: SELECT OE_ORDER_LINES_S.NEXTVAL

921: l_class_line_rec.sort_order := config_rec.bom_sort_order;
922: l_class_line_rec.inventory_item_id := config_rec.inventory_item_id;
923: l_class_line_rec.ordered_item := l_concatenated_segments;
924:
925: SELECT OE_ORDER_LINES_S.NEXTVAL
926: INTO l_class_line_rec.line_id
927: FROM DUAL;
928:
929: l_class_line_rec.pricing_quantity_uom

Line 974: If quantity of a component is different in oe_order_lines and

970:
971: /*-----------------------------------------------------------
972: PROCEDURE Handle_Updates
973:
974: If quantity of a component is different in oe_order_lines and
975: cz_config_details_v, we need to update that component.
976:
977: for config UI only: if there is a constraint on qty change,
978: should we pass a hardcoded reason/comment, or should we fail?

Line 1005: FROM CZ_CONFIG_DETAILS_V c, oe_order_lines l

1001: ,l.cancelled_quantity -- 12695580
1002: ,l.item_type_code
1003: ,c.line_type
1004: ,c.bom_sort_order
1005: FROM CZ_CONFIG_DETAILS_V c, oe_order_lines l
1006: WHERE c.config_hdr_id = p_config_hdr_id
1007: AND c.config_rev_nbr = p_config_rev_nbr
1008: AND (c.quantity <> l.ordered_quantity OR
1009: c.line_type <> l.line_type_id OR

Line 1136: If quantity of a component is different in oe_order_lines and

1132:
1133: /*-----------------------------------------------------------
1134: PROCEDURE Handle_Updates_Old
1135:
1136: If quantity of a component is different in oe_order_lines and
1137: cz_config_details_v, we need to update that component.
1138:
1139: for config UI only: if there is a constraint on qty change,
1140: should we pass a hardcoded reason/comment, or should we fail?

Line 1160: FROM CZ_CONFIG_DETAILS_V c, oe_order_lines l

1156: ,c.component_code
1157: ,c.quantity
1158: ,l.ordered_quantity
1159: ,l.item_type_code
1160: FROM CZ_CONFIG_DETAILS_V c, oe_order_lines l
1161: WHERE c.config_hdr_id = p_config_hdr_id
1162: AND c.config_rev_nbr = p_config_rev_nbr
1163: AND c.quantity <> l.ordered_quantity
1164: AND l.top_model_line_id = p_model_line_rec.line_id

Line 1231: If a component exists in oe_order_lines, but does not exist

1227:
1228: /*---------------------------------------------------------
1229: PROCEDURE Handle_Deletes
1230:
1231: If a component exists in oe_order_lines, but does not exist
1232: in cz_config_details_v, we need to delete that component.
1233:
1234: Change Record:
1235:

Line 1246: oe_order_lines.

1242: 1) you can not enter reason and comment in configurator, so
1243: if cancellation constraint is on, delete will fail.
1244: 2) configuraor will take care of cascading change to
1245: child and parent lines, so we do not have to check in
1246: oe_order_lines.
1247: ----------------------------------------------------------*/
1248:
1249: PROCEDURE Handle_Deletes
1250: ( p_model_line_rec IN OE_Order_Pub.Line_rec_Type

Line 1261: FROM oe_order_lines l

1257: IS
1258: CURSOR config_del_cursor IS
1259: SELECT l.line_id, l.item_type_code, l.link_to_line_id,
1260: l.component_code, nvl(l.cancelled_flag, 'N') cancelled_flag
1261: FROM oe_order_lines l
1262: WHERE l.top_model_line_id = p_model_line_rec.line_id
1263: AND (l.item_type_code = OE_GLOBALS.G_ITEM_CLASS OR
1264: l.item_type_code = OE_GLOBALS.G_ITEM_OPTION OR
1265: l.item_type_code = OE_GLOBALS.G_ITEM_KIT)

Line 1420: If a component exists in oe_order_lines, but does not exist

1416:
1417: /*---------------------------------------------------------
1418: PROCEDURE Handle_Deletes_Old
1419:
1420: If a component exists in oe_order_lines, but does not exist
1421: in cz_config_details_v, we need to delete that component.
1422:
1423: Change Record:
1424:

Line 1435: oe_order_lines.

1431: 1) you can not enter reason and comment in configurator, so
1432: if cancellation constraint is on, delete will fail.
1433: 2) configuraor will take care of cascading change to
1434: child and parent lines, so we do not have to check in
1435: oe_order_lines.
1436: ----------------------------------------------------------*/
1437:
1438: PROCEDURE Handle_Deletes_Old
1439: ( p_model_line_rec IN OE_Order_Pub.Line_rec_Type

Line 1450: FROM oe_order_lines l

1446: IS
1447: CURSOR config_del_cursor IS
1448: SELECT l.line_id, l.item_type_code, l.link_to_line_id,
1449: l.component_code
1450: FROM oe_order_lines l
1451: WHERE l.top_model_line_id = p_model_line_rec.line_id
1452: AND (l.item_type_code = OE_GLOBALS.G_ITEM_CLASS OR
1453: l.item_type_code = OE_GLOBALS.G_ITEM_OPTION OR
1454: l.item_type_code = OE_GLOBALS.G_ITEM_KIT)

Line 1587: the lines from oe_order_lines and they will be closed instead.

1583: /*--------------------------------------------------------------------
1584: PROCEDURE Check_If_cancellation
1585: This procedure is used to see if the deletion of the option/class
1586: is actually a complete cancellation. If so, we will not delete
1587: the lines from oe_order_lines and they will be closed instead.
1588:
1589: Change Record:
1590: bug 2191666: the sqls and logic modified when a class gets
1591: cancelled as a result of cascading.

Line 1621: FROM oe_order_lines

1617:
1618: BEGIN
1619: SELECT ordered_quantity, open_flag, component_code
1620: INTO l_ordered_quantity, l_open_flag, l_component_code
1621: FROM oe_order_lines
1622: WHERE line_id = l_line_id;
1623:
1624: IF l_ordered_quantity = 0 THEN
1625: IF l_open_flag = 'N' THEN

Line 1674: FROM oe_order_lines

1670: END IF;
1671:
1672: SELECT link_to_line_id
1673: INTO l_parent_line_id
1674: FROM oe_order_lines
1675: WHERE line_id = l_line_id;
1676:
1677: IF l_debug_level > 0 THEN
1678: oe_debug_pub.add( 'CAME HERE '|| L_PARENT_LINE_ID , 3 ) ;

Line 1686: FROM oe_order_lines

1682: BEGIN
1683:
1684: SELECT open_flag
1685: INTO l_open_flag
1686: FROM oe_order_lines
1687: WHERE line_id = l_parent_line_id;
1688:
1689: EXCEPTION
1690: WHEN TOO_MANY_ROWS THEN

Line 1723: FROM oe_order_lines

1719: BEGIN
1720:
1721: SELECT count(*)
1722: INTO l_line_id
1723: FROM oe_order_lines
1724: WHERE top_model_line_id = p_top_model_line_id
1725: AND link_to_line_id = p_line_id
1726: AND open_flag = 'Y'
1727: AND item_type_code IN ('CLASS', 'OPTION', 'KIT');

Line 1731: FROM oe_order_lines

1727: AND item_type_code IN ('CLASS', 'OPTION', 'KIT');
1728:
1729: SELECT count(*)
1730: INTO l_parent_line_id
1731: FROM oe_order_lines
1732: WHERE top_model_line_id = p_top_model_line_id
1733: AND link_to_line_id = p_line_id
1734: AND item_type_code IN ('CLASS', 'OPTION', 'KIT');
1735:

Line 1756: FROM oe_order_lines

1752:
1753: BEGIN
1754: SELECT count(*)
1755: INTO l_line_id
1756: FROM oe_order_lines
1757: WHERE top_model_line_id = p_top_model_line_id
1758: AND component_code like (l_component_code || '%')
1759: AND open_flag = 'N'
1760: AND cancelled_flag = 'Y'

Line 2033: UPDATE oe_order_lines

2029: IF l_debug_level > 0 THEN
2030: oe_debug_pub.add('UPDATE: ' || L_LINE_REC.LINE_ID , 1 ) ;
2031: END IF;
2032:
2033: UPDATE oe_order_lines
2034: SET ordered_quantity = l_line_rec.ordered_quantity
2035: WHERE line_id = l_line_rec.line_id;
2036:
2037: ELSIF l_line_rec.operation = OE_GLOBALS.G_OPR_DELETE THEN

Line 2042: DELETE FROM oe_order_lines

2038: IF l_debug_level > 0 THEN
2039: oe_debug_pub.add('DELETE: ' || L_LINE_REC.LINE_ID , 1 ) ;
2040: END IF;
2041:
2042: DELETE FROM oe_order_lines
2043: WHERE line_id = l_line_rec.line_id;
2044:
2045: ELSE
2046: IF l_debug_level > 0 THEN

Line 2214: FROM oe_order_lines

2210: CURSOR option_nbr IS
2211: SELECT line_id, link_to_line_id, item_type_code,ordered_quantity,
2212: ato_line_id,inventory_item_id,ordered_item
2213: ,split_from_line_id ,sort_order--bug12758138
2214: FROM oe_order_lines
2215: WHERE top_model_line_id = p_top_model_line_id
2216: AND line_id <> p_top_model_line_id
2217: AND service_reference_line_id is null
2218: AND item_type_code <> OE_GLOBALS.G_ITEM_INCLUDED

Line 2235: FROM oe_order_lines

2231: nvl(model_remnant_flag, 'N')
2232: INTO l_model_item_type_code , l_model_ato_line_id,
2233: l_prev_config_header_id, l_prev_config_rev_nbr,
2234: l_remnant_flag
2235: FROM oe_order_lines
2236: WHERE line_id = p_top_model_line_id;
2237: EXCEPTION
2238: WHEN OTHERS THEN
2239: IF l_debug_level > 0 THEN

Line 2255: UPDATE oe_order_lines

2251: IF l_debug_level > 0 THEN
2252: oe_debug_pub.add('OPTIONS WINDOW , CONFIGURATION ID' , 1 ) ;
2253: END IF;
2254:
2255: UPDATE oe_order_lines
2256: SET configuration_id = nvl(configuration_id, 0) + 1,
2257: lock_control = lock_control + 1
2258: WHERE top_model_line_id = p_top_model_line_id
2259: AND item_type_code IN ('MODEL', 'CLASS', 'OPTION', 'KIT');

Line 2268: UPDATE oe_order_lines

2264: oe_debug_pub.add( L_PREV_CONFIG_HEADER_ID
2265: ||' '||L_PREV_CONFIG_REV_NBR , 1 ) ;
2266: END IF;
2267:
2268: UPDATE oe_order_lines
2269: SET config_header_id = p_config_hdr_id,
2270: config_rev_nbr = p_config_rev_nbr,
2271: lock_control = lock_control + 1
2272: WHERE top_model_line_id = p_top_model_line_id

Line 2291: UPDATE oe_order_lines

2287: ,p_ui_flag => p_ui_flag
2288: ,p_config_hdr_id => p_config_hdr_id);
2289:
2290: --## bug fix 1643546, added new and condition ##1820608
2291: UPDATE oe_order_lines
2292: SET shippable_flag = 'N'
2293: WHERE top_model_line_id = p_top_model_line_id
2294: AND ato_line_id is NOT NULL
2295: AND item_type_code <> OE_GLOBALS.G_ITEM_CONFIG

Line 2317: oe_debug_pub.add('UPDATING OPTION_NUMBER IN OE_ORDER_LINES' , 1 ) ;

2313:
2314: --/************* update option_number *****************/
2315:
2316: IF l_debug_level > 0 THEN
2317: oe_debug_pub.add('UPDATING OPTION_NUMBER IN OE_ORDER_LINES' , 1 ) ;
2318: END IF;
2319:
2320: OPEN option_nbr;
2321: LOOP

Line 2342: from oe_order_lines

2338: IF l_split_from_line_id IS NOT NULL THEN
2339:
2340: Select option_number
2341: into l_option_number
2342: from oe_order_lines
2343: where split_from_line_id = l_split_from_line_id
2344: and model_remnant_flag = 'Y'
2345: and option_number is not null
2346: -- and ato_line_id is not null

Line 2372: UPDATE oe_order_lines

2368:
2369:
2370: IF (l_option_number IS NOT NULL) THEN
2371:
2372: UPDATE oe_order_lines
2373: SET option_number = l_option_number,
2374: lock_control = lock_control + 1
2375: WHERE line_id = l_line_id;
2376:

Line 2388: UPDATE oe_order_lines

2384: --end bug12758138
2385:
2386: l_option_nbr := l_option_nbr + 1;
2387:
2388: UPDATE oe_order_lines
2389: SET option_number = l_option_nbr,
2390: lock_control = lock_control + 1
2391: WHERE line_id = l_line_id;
2392: END if; --bug12758138

Line 2444: FROM OE_ORDER_LINES

2440: SELECT ordered_quantity,ordered_item,
2441: item_type_code,inventory_item_id
2442: INTO l_parent_ordered_quantity,l_parent_ordered_item,
2443: l_parent_item_type_code, l_parent_inv_item_id
2444: FROM OE_ORDER_LINES
2445: WHERE line_id = l_link;
2446:
2447: IF mod(l_child_ordered_quantity,l_parent_ordered_quantity) <> 0
2448: THEN

Line 2474: UPDATE oe_order_lines

2470: (l_item_type_code = OE_GLOBALS.G_ITEM_CLASS OR
2471: l_item_type_code = OE_GLOBALS.G_ITEM_KIT)
2472: THEN
2473: BEGIN
2474: UPDATE oe_order_lines
2475: SET option_number = l_option_nbr,
2476: lock_control = lock_control + 1
2477: WHERE top_model_line_id = p_top_model_line_id
2478: AND link_to_line_id = l_line_id

Line 2489: UPDATE oe_order_lines

2485: END IF;
2486: END;
2487:
2488: BEGIN
2489: UPDATE oe_order_lines
2490: -- SET option_number = l_option_nbr, ---commented for bug12758138
2491: SET option_number = NVL(l_option_number,l_option_nbr), ---bug12758138
2492: lock_control = lock_control + 1
2493: WHERE top_model_line_id = p_top_model_line_id

Line 2511: UPDATE oe_order_lines o

2507: CLOSE option_nbr;
2508:
2509: IF l_model_ato_line_id is NULL THEN
2510:
2511: UPDATE oe_order_lines o
2512: SET ordered_quantity =
2513: (SELECT ordered_quantity
2514: FROM oe_order_lines
2515: WHERE line_id = o.link_to_line_id)

Line 2514: FROM oe_order_lines

2510:
2511: UPDATE oe_order_lines o
2512: SET ordered_quantity =
2513: (SELECT ordered_quantity
2514: FROM oe_order_lines
2515: WHERE line_id = o.link_to_line_id)
2516: WHERE top_model_line_id = p_top_model_line_id
2517: AND item_type_code = OE_GLOBALS.G_ITEM_CONFIG
2518: AND nvl(model_remnant_flag, 'N') = 'N';

Line 2520: UPDATE oe_order_lines

2516: WHERE top_model_line_id = p_top_model_line_id
2517: AND item_type_code = OE_GLOBALS.G_ITEM_CONFIG
2518: AND nvl(model_remnant_flag, 'N') = 'N';
2519:
2520: UPDATE oe_order_lines
2521: SET cancelled_flag = 'Y'
2522: WHERE top_model_line_id = p_top_model_line_id
2523: AND item_type_code = 'CONFIG'
2524: AND ordered_quantity = 0;

Line 2573: UPDATE oe_order_lines OEOPT

2569: oe_debug_pub.add('1 LLID: PACK H NEW LOGIC FOR SPLIT ' , 1 ) ;
2570: END IF;
2571:
2572: BEGIN -- bug12758138
2573: UPDATE oe_order_lines OEOPT
2574: SET link_to_line_id =
2575: (SELECT line_id
2576: FROM oe_order_lines oe1
2577: WHERE split_from_line_id =

Line 2576: FROM oe_order_lines oe1

2572: BEGIN -- bug12758138
2573: UPDATE oe_order_lines OEOPT
2574: SET link_to_line_id =
2575: (SELECT line_id
2576: FROM oe_order_lines oe1
2577: WHERE split_from_line_id =
2578: (SELECT link_to_line_id
2579: FROM oe_order_lines oe2
2580: WHERE line_id = OEOPT.split_from_line_id

Line 2579: FROM oe_order_lines oe2

2575: (SELECT line_id
2576: FROM oe_order_lines oe1
2577: WHERE split_from_line_id =
2578: (SELECT link_to_line_id
2579: FROM oe_order_lines oe2
2580: WHERE line_id = OEOPT.split_from_line_id
2581: AND oe2.open_flag = 'Y')
2582: AND oe1.top_model_line_id = p_top_model_line_id
2583: AND oe1.open_flag = 'Y' )

Line 2602: UPDATE oe_order_lines OEOPT

2598: IF l_debug_level > 0 THEN
2599: oe_debug_pub.add('update_link_to_line_id: May be Due to bug 12758138',1 ) ;
2600: END IF;
2601:
2602: UPDATE oe_order_lines OEOPT
2603: SET link_to_line_id =
2604: (SELECT line_id
2605: FROM oe_order_lines oe1
2606: WHERE split_from_line_id =

Line 2605: FROM oe_order_lines oe1

2601:
2602: UPDATE oe_order_lines OEOPT
2603: SET link_to_line_id =
2604: (SELECT line_id
2605: FROM oe_order_lines oe1
2606: WHERE split_from_line_id =
2607: (SELECT link_to_line_id
2608: FROM oe_order_lines oe2
2609: WHERE line_id = OEOPT.split_from_line_id

Line 2608: FROM oe_order_lines oe2

2604: (SELECT line_id
2605: FROM oe_order_lines oe1
2606: WHERE split_from_line_id =
2607: (SELECT link_to_line_id
2608: FROM oe_order_lines oe2
2609: WHERE line_id = OEOPT.split_from_line_id
2610: AND oe2.open_flag = 'Y')
2611: AND oe1.top_model_line_id = p_top_model_line_id
2612: AND oe1.open_flag = 'Y'

Line 2632: UPDATE oe_order_lines OEOPT

2628: IF l_debug_level > 0 THEN
2629: oe_debug_pub.add('update_link_to_line_id: In errors block at 2',1 ) ;
2630: END IF;
2631:
2632: UPDATE oe_order_lines OEOPT
2633: SET link_to_line_id =
2634: (SELECT line_id
2635: FROM oe_order_lines oe1
2636: WHERE split_from_line_id =

Line 2635: FROM oe_order_lines oe1

2631:
2632: UPDATE oe_order_lines OEOPT
2633: SET link_to_line_id =
2634: (SELECT line_id
2635: FROM oe_order_lines oe1
2636: WHERE split_from_line_id =
2637: (SELECT link_to_line_id
2638: FROM oe_order_lines oe2
2639: WHERE line_id = OEOPT.split_from_line_id

Line 2638: FROM oe_order_lines oe2

2634: (SELECT line_id
2635: FROM oe_order_lines oe1
2636: WHERE split_from_line_id =
2637: (SELECT link_to_line_id
2638: FROM oe_order_lines oe2
2639: WHERE line_id = OEOPT.split_from_line_id
2640: AND oe2.open_flag = 'Y')
2641: AND oe1.top_model_line_id = p_top_model_line_id
2642: AND oe1.open_flag = 'Y'

Line 2663: UPDATE oe_order_lines OEOPT

2659: IF l_debug_level > 0 THEN
2660: oe_debug_pub.add('update_link_to_line_id: In errors block at 3 llid',1 ) ;
2661: END IF;
2662:
2663: UPDATE oe_order_lines OEOPT
2664: SET link_to_line_id =
2665: (SELECT line_id
2666: FROM oe_order_lines oe1
2667: WHERE split_from_line_id =

Line 2666: FROM oe_order_lines oe1

2662:
2663: UPDATE oe_order_lines OEOPT
2664: SET link_to_line_id =
2665: (SELECT line_id
2666: FROM oe_order_lines oe1
2667: WHERE split_from_line_id =
2668: (SELECT link_to_line_id
2669: FROM oe_order_lines oe2
2670: WHERE line_id = OEOPT.split_from_line_id

Line 2669: FROM oe_order_lines oe2

2665: (SELECT line_id
2666: FROM oe_order_lines oe1
2667: WHERE split_from_line_id =
2668: (SELECT link_to_line_id
2669: FROM oe_order_lines oe2
2670: WHERE line_id = OEOPT.split_from_line_id
2671: AND oe2.open_flag = 'Y')
2672: AND oe1.top_model_line_id = p_top_model_line_id
2673: AND oe1.open_flag = 'Y'

Line 2699: UPDATE oe_order_lines OEOPT

2695: IF l_debug_level > 0 THEN
2696: oe_debug_pub.add('2 LLID: PACK H NEW LOGIC MI '|| P_REMNANT_FLAG , 1 ) ;
2697: END IF;
2698:
2699: UPDATE oe_order_lines OEOPT
2700: SET link_to_line_id =
2701: ( SELECT line_id
2702: FROM oe_order_lines OELNK
2703: WHERE OELNK.top_model_line_id = OEOPT.top_model_line_id

Line 2702: FROM oe_order_lines OELNK

2698:
2699: UPDATE oe_order_lines OEOPT
2700: SET link_to_line_id =
2701: ( SELECT line_id
2702: FROM oe_order_lines OELNK
2703: WHERE OELNK.top_model_line_id = OEOPT.top_model_line_id
2704: AND OELNK.configuration_id =
2705: ( SELECT parent_config_item_id
2706: FROM cz_config_details_v

Line 2730: UPDATE oe_order_lines OEOPT

2726: oe_debug_pub.add('LLID OPTIONS WINDOW OR OLD LOGIC ' , 3 ) ;
2727: END IF;
2728:
2729: BEGIN --bug12758138
2730: UPDATE oe_order_lines OEOPT
2731: SET link_to_line_id =
2732: ( SELECT OELNK.line_id
2733: FROM oe_order_lines OELNK
2734: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR

Line 2733: FROM oe_order_lines OELNK

2729: BEGIN --bug12758138
2730: UPDATE oe_order_lines OEOPT
2731: SET link_to_line_id =
2732: ( SELECT OELNK.line_id
2733: FROM oe_order_lines OELNK
2734: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR
2735: OELNK.top_model_line_id = OEOPT.top_model_line_id ))
2736: AND (OELNK.component_code = SUBSTR( OEOPT.component_code,1,
2737: LENGTH( RTRIM( OEOPT.component_code,'0123456789' )) - 1)

Line 2759: UPDATE oe_order_lines OEOPT

2755: IF l_debug_level > 0 THEN
2756: oe_debug_pub.add('update_link_to_line_id2 at error ' || SQLERRM ) ;
2757: END IF;
2758:
2759: UPDATE oe_order_lines OEOPT
2760: SET link_to_line_id =
2761: ( SELECT OELNK.line_id
2762: FROM oe_order_lines OELNK
2763: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR

Line 2762: FROM oe_order_lines OELNK

2758:
2759: UPDATE oe_order_lines OEOPT
2760: SET link_to_line_id =
2761: ( SELECT OELNK.line_id
2762: FROM oe_order_lines OELNK
2763: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR
2764: OELNK.top_model_line_id = OEOPT.top_model_line_id ))
2765: AND (OELNK.component_code = SUBSTR( OEOPT.component_code,1,
2766: LENGTH( RTRIM( OEOPT.component_code,'0123456789' )) - 1)

Line 2789: UPDATE oe_order_lines OEOPT

2785: oe_debug_pub.add('update_link_to_line_id2 at A' ) ;
2786: END IF;
2787:
2788:
2789: UPDATE oe_order_lines OEOPT
2790: SET link_to_line_id =
2791: ( SELECT OELNK.line_id
2792: FROM oe_order_lines OELNK
2793: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR

Line 2792: FROM oe_order_lines OELNK

2788:
2789: UPDATE oe_order_lines OEOPT
2790: SET link_to_line_id =
2791: ( SELECT OELNK.line_id
2792: FROM oe_order_lines OELNK
2793: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR
2794: OELNK.top_model_line_id = OEOPT.top_model_line_id ))
2795: AND (OELNK.component_code = SUBSTR( OEOPT.component_code,1,
2796: LENGTH( RTRIM( OEOPT.component_code,'0123456789' )) - 1)

Line 2819: UPDATE oe_order_lines OEOPT

2815: oe_debug_pub.add('update_link_to_line_id2 at B' ) ;
2816: END IF;
2817:
2818:
2819: UPDATE oe_order_lines OEOPT
2820: SET link_to_line_id =
2821: ( SELECT OELNK.line_id
2822: FROM oe_order_lines OELNK
2823: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR

Line 2822: FROM oe_order_lines OELNK

2818:
2819: UPDATE oe_order_lines OEOPT
2820: SET link_to_line_id =
2821: ( SELECT OELNK.line_id
2822: FROM oe_order_lines OELNK
2823: WHERE (( OELNK.line_id = oeopt.top_model_line_id OR
2824: OELNK.top_model_line_id = OEOPT.top_model_line_id ))
2825: AND (OELNK.component_code = SUBSTR( OEOPT.component_code,1,
2826: LENGTH( RTRIM( OEOPT.component_code,'0123456789' )) - 1)

Line 2850: UPDATE oe_order_lines OEOPT

2846: END;--bug12758138 end
2847:
2848: -- only in a post split situation.
2849:
2850: UPDATE oe_order_lines OEOPT
2851: SET link_to_line_id =
2852: (SELECT line_id
2853: FROM oe_order_lines oe1
2854: WHERE split_from_line_id =

Line 2853: FROM oe_order_lines oe1

2849:
2850: UPDATE oe_order_lines OEOPT
2851: SET link_to_line_id =
2852: (SELECT line_id
2853: FROM oe_order_lines oe1
2854: WHERE split_from_line_id =
2855: (SELECT link_to_line_id
2856: FROM oe_order_lines oe2
2857: WHERE line_id = OEOPT.split_from_line_id

Line 2856: FROM oe_order_lines oe2

2852: (SELECT line_id
2853: FROM oe_order_lines oe1
2854: WHERE split_from_line_id =
2855: (SELECT link_to_line_id
2856: FROM oe_order_lines oe2
2857: WHERE line_id = OEOPT.split_from_line_id
2858: AND oe2.open_flag = 'Y')
2859: AND oe1.top_model_line_id = p_top_model_line_id
2860: AND oe1.open_flag = 'Y' )

Line 2877: oe_debug_pub.add('UPDATED LINK_TO_LINE_ID IN OE_ORDER_LINES' , 2 ) ;

2873:
2874: END IF;
2875:
2876: IF l_debug_level > 0 THEN
2877: oe_debug_pub.add('UPDATED LINK_TO_LINE_ID IN OE_ORDER_LINES' , 2 ) ;
2878: END IF;
2879:
2880: EXCEPTION
2881: WHEN OTHERS THEN

Line 2934: FROM oe_order_lines_all

2930: -- cursor modified, ## 1820608
2931:
2932: CURSOR ATO_MODELS IS
2933: SELECT unique(ato_line_id)
2934: FROM oe_order_lines_all
2935: WHERE top_model_line_id = p_top_model_line_id
2936: AND ato_line_id is not null
2937: AND item_type_code = OE_GLOBALS.G_ITEM_CLASS
2938: AND open_flag = 'Y'; -- ato subconfigs

Line 2943: FROM oe_order_lines_all opt, oe_order_lines_all ato_model

2939:
2940: CURSOR ATO_OPTIONS(p_ato_line_id IN NUMBER)
2941: IS
2942: SELECT opt.line_id
2943: FROM oe_order_lines_all opt, oe_order_lines_all ato_model
2944: WHERE opt.top_model_line_id = p_top_model_line_id AND
2945: ato_model.top_model_line_id = p_top_model_line_id AND
2946: ato_model.line_id = p_ato_line_id AND
2947: opt.open_flag = 'Y' AND

Line 2997: UPDATE oe_order_lines OEOPT

2993: IF l_debug_level > 0 THEN
2994: oe_debug_pub.add('UPDATE_ATO: PACK H NEW LOGIC MI' , 1 ) ;
2995: END IF;
2996:
2997: UPDATE oe_order_lines OEOPT
2998: SET ato_line_id =
2999: ( SELECT line_id
3000: FROM oe_order_lines OEATO
3001: WHERE OEOPT.top_model_line_id = OEATO.top_model_line_id

Line 3000: FROM oe_order_lines OEATO

2996:
2997: UPDATE oe_order_lines OEOPT
2998: SET ato_line_id =
2999: ( SELECT line_id
3000: FROM oe_order_lines OEATO
3001: WHERE OEOPT.top_model_line_id = OEATO.top_model_line_id
3002: AND OEATO.configuration_id =
3003: (SELECT ato_config_item_id
3004: FROM cz_config_details_v

Line 3035: UPDATE oe_order_lines OEOPT

3031:
3032: -- note that the CONFIG line needs ato_line_id after
3033: -- proportional split.
3034:
3035: UPDATE oe_order_lines OEOPT
3036: SET ato_line_id =
3037: (SELECT line_id
3038: FROM oe_order_lines oe1
3039: WHERE split_from_line_id =

Line 3038: FROM oe_order_lines oe1

3034:
3035: UPDATE oe_order_lines OEOPT
3036: SET ato_line_id =
3037: (SELECT line_id
3038: FROM oe_order_lines oe1
3039: WHERE split_from_line_id =
3040: (SELECT ato_line_id
3041: FROM oe_order_lines oe2
3042: WHERE line_id = OEOPT.split_from_line_id

Line 3041: FROM oe_order_lines oe2

3037: (SELECT line_id
3038: FROM oe_order_lines oe1
3039: WHERE split_from_line_id =
3040: (SELECT ato_line_id
3041: FROM oe_order_lines oe2
3042: WHERE line_id = OEOPT.split_from_line_id
3043: AND oe2.open_flag = 'Y')
3044: AND oe1.top_model_line_id = p_top_model_line_id
3045: AND oe1.open_flag = 'Y' )

Line 3066: UPDATE oe_order_lines OEOPT

3062: -- or none. we do not have choice here, even options window
3063: -- will have this change.
3064:
3065: BEGIN --for bug 12758138
3066: UPDATE oe_order_lines OEOPT
3067: SET ato_line_id =
3068: (SELECT line_id
3069: FROM oe_order_lines oe1
3070: WHERE split_from_line_id =

Line 3069: FROM oe_order_lines oe1

3065: BEGIN --for bug 12758138
3066: UPDATE oe_order_lines OEOPT
3067: SET ato_line_id =
3068: (SELECT line_id
3069: FROM oe_order_lines oe1
3070: WHERE split_from_line_id =
3071: (SELECT ato_line_id
3072: FROM oe_order_lines oe2
3073: WHERE line_id = OEOPT.split_from_line_id

Line 3072: FROM oe_order_lines oe2

3068: (SELECT line_id
3069: FROM oe_order_lines oe1
3070: WHERE split_from_line_id =
3071: (SELECT ato_line_id
3072: FROM oe_order_lines oe2
3073: WHERE line_id = OEOPT.split_from_line_id
3074: AND oe2.open_flag = 'Y')
3075: AND oe1.top_model_line_id = p_top_model_line_id
3076: AND oe1.open_flag = 'Y' )

Line 3102: UPDATE oe_order_lines OEOPT

3098:
3099: IF l_debug_level > 0 THEN
3100: oe_debug_pub.add('DUE TO MI: inside error block at a',1 ) ;
3101: END IF;
3102: UPDATE oe_order_lines OEOPT
3103: SET ato_line_id =
3104: (SELECT line_id
3105: FROM oe_order_lines oe1
3106: WHERE split_from_line_id =

Line 3105: FROM oe_order_lines oe1

3101: END IF;
3102: UPDATE oe_order_lines OEOPT
3103: SET ato_line_id =
3104: (SELECT line_id
3105: FROM oe_order_lines oe1
3106: WHERE split_from_line_id =
3107: (SELECT ato_line_id
3108: FROM oe_order_lines oe2
3109: WHERE line_id = OEOPT.split_from_line_id

Line 3108: FROM oe_order_lines oe2

3104: (SELECT line_id
3105: FROM oe_order_lines oe1
3106: WHERE split_from_line_id =
3107: (SELECT ato_line_id
3108: FROM oe_order_lines oe2
3109: WHERE line_id = OEOPT.split_from_line_id
3110: AND oe2.open_flag = 'Y')
3111: AND oe1.top_model_line_id = p_top_model_line_id
3112: AND oe1.open_flag = 'Y'

Line 3139: UPDATE oe_order_lines OEOPT

3135: IF l_debug_level > 0 THEN
3136: oe_debug_pub.add('DUE TO MI: inside error block at b',1 ) ;
3137: END IF;
3138:
3139: UPDATE oe_order_lines OEOPT
3140: SET ato_line_id =
3141: (SELECT line_id
3142: FROM oe_order_lines oe1
3143: WHERE split_from_line_id =

Line 3142: FROM oe_order_lines oe1

3138:
3139: UPDATE oe_order_lines OEOPT
3140: SET ato_line_id =
3141: (SELECT line_id
3142: FROM oe_order_lines oe1
3143: WHERE split_from_line_id =
3144: (SELECT ato_line_id
3145: FROM oe_order_lines oe2
3146: WHERE line_id = OEOPT.split_from_line_id

Line 3145: FROM oe_order_lines oe2

3141: (SELECT line_id
3142: FROM oe_order_lines oe1
3143: WHERE split_from_line_id =
3144: (SELECT ato_line_id
3145: FROM oe_order_lines oe2
3146: WHERE line_id = OEOPT.split_from_line_id
3147: AND oe2.open_flag = 'Y')
3148: AND oe1.top_model_line_id = p_top_model_line_id
3149: AND oe1.open_flag = 'Y'

Line 3178: UPDATE oe_order_lines OEOPT

3174: IF l_debug_level > 0 THEN
3175: oe_debug_pub.add('DUE TO MI: inside error block at c',1 ) ;
3176: END IF;
3177:
3178: UPDATE oe_order_lines OEOPT
3179: SET ato_line_id =
3180: (SELECT line_id
3181: FROM oe_order_lines oe1
3182: WHERE split_from_line_id =

Line 3181: FROM oe_order_lines oe1

3177:
3178: UPDATE oe_order_lines OEOPT
3179: SET ato_line_id =
3180: (SELECT line_id
3181: FROM oe_order_lines oe1
3182: WHERE split_from_line_id =
3183: (SELECT ato_line_id
3184: FROM oe_order_lines oe2
3185: WHERE line_id = OEOPT.split_from_line_id

Line 3184: FROM oe_order_lines oe2

3180: (SELECT line_id
3181: FROM oe_order_lines oe1
3182: WHERE split_from_line_id =
3183: (SELECT ato_line_id
3184: FROM oe_order_lines oe2
3185: WHERE line_id = OEOPT.split_from_line_id
3186: AND oe2.open_flag = 'Y')
3187: AND oe1.top_model_line_id = p_top_model_line_id
3188: AND oe1.open_flag = 'Y'

Line 3224: UPDATE OE_ORDER_LINES_ALL OEOPT

3220: IF l_debug_level > 0 THEN
3221: oe_debug_pub.add('OLD ATO_LINE_ID / NOT SPLIT' , 1 ) ;
3222: END IF;
3223:
3224: UPDATE OE_ORDER_LINES_ALL OEOPT
3225: SET ATO_LINE_ID =
3226: ( SELECT OEATO.LINE_ID
3227: FROM OE_ORDER_LINES_ALL OEATO
3228: WHERE OEATO.TOP_MODEL_LINE_ID =

Line 3227: FROM OE_ORDER_LINES_ALL OEATO

3223:
3224: UPDATE OE_ORDER_LINES_ALL OEOPT
3225: SET ATO_LINE_ID =
3226: ( SELECT OEATO.LINE_ID
3227: FROM OE_ORDER_LINES_ALL OEATO
3228: WHERE OEATO.TOP_MODEL_LINE_ID =
3229: OEOPT.TOP_MODEL_LINE_ID
3230: AND ITEM_TYPE_CODE = 'CLASS'
3231: AND OEATO.COMPONENT_CODE =

Line 3246: FROM OE_ORDER_LINES_ALL OEMIN

3242: AND replenish_to_order_flag = 'Y'
3243: )
3244: AND OEATO.COMPONENT_CODE =
3245: ( SELECT MIN( OEMIN.COMPONENT_CODE )
3246: FROM OE_ORDER_LINES_ALL OEMIN
3247: WHERE OEMIN.TOP_MODEL_LINE_ID
3248: = OEOPT.TOP_MODEL_LINE_ID
3249: AND OEMIN.COMPONENT_CODE =
3250: SUBSTR( OEOPT.COMPONENT_CODE, 1,

Line 3584: UPDATE oe_order_lines

3580: ELSE
3581:
3582: FORALL I IN l_new_item_id_tbl.FIRST..l_new_item_id_tbl.LAST
3583:
3584: UPDATE oe_order_lines
3585: SET configuration_id = l_new_item_id_tbl(I)
3586: WHERE top_model_line_id = p_top_model_line_id
3587: AND configuration_id = l_orig_item_id_tbl(I);
3588:

Line 3603: UPDATE oe_order_lines

3599: IF l_debug_level > 0 THEN
3600: oe_debug_pub.add('NULL CONFIG_HEADER_ID TO COPY_CONFIG , OR REMNANT SET' , 1 ) ;
3601: END IF;
3602:
3603: UPDATE oe_order_lines
3604: SET configuration_id = null,
3605: config_header_id = null,
3606: config_rev_nbr = null
3607: WHERE top_model_line_id = p_top_model_line_id;

Line 3624: UPDATE oe_order_lines

3620: IF l_debug_level > 0 THEN
3621: oe_debug_pub.add('1 COPY CONFIG: PACK H NEW LOGIC MI' , 1 ) ;
3622: END IF;
3623:
3624: UPDATE oe_order_lines
3625: SET link_to_line_id = NULL
3626: WHERE top_model_line_id = p_top_model_line_id
3627: AND split_from_line_id is not NULL;
3628:

Line 3631: UPDATE oe_order_lines

3627: AND split_from_line_id is not NULL;
3628:
3629: ELSE
3630:
3631: UPDATE oe_order_lines
3632: SET link_to_line_id = NULL
3633: WHERE top_model_line_id = p_top_model_line_id;
3634:
3635: END IF;

Line 3649: FROM oe_order_lines

3645: */
3646:
3647: SELECT ato_line_id ,booked_flag, item_type_code
3648: INTO l_ato_line_id, l_booked_flag, l_error_message
3649: FROM oe_order_lines
3650: WHERE line_id = p_top_model_line_id;
3651:
3652:
3653: -- if ato model, do not clear ato_line_id. also for ato_item

Line 3662: UPDATE oe_order_lines

3658: IF l_debug_level > 0 THEN
3659: oe_debug_pub.add('NULLING ATO_LINE_ID FOR ATO SUB' , 4 ) ;
3660: END IF;
3661:
3662: UPDATE oe_order_lines
3663: SET ato_line_id = NULL
3664: WHERE top_model_line_id = p_top_model_line_id
3665: AND NOT (item_type_code = OE_GLOBALS.G_ITEM_OPTION AND
3666: ato_line_id = line_id)

Line 3764: FROM oe_order_lines

3760: l_holds_tbl(1).line_id := p_line_id;
3761:
3762: SELECT line_number || '.'|| shipment_number
3763: INTO l_line_number
3764: FROM oe_order_lines
3765: WHERE line_id = p_line_id;
3766:
3767: IF l_debug_level > 0 THEN
3768: oe_debug_pub.add('OE_CONFIG_PVT , BEFORE CHECK_HOLDS ON MODEL' , 1 ) ;

Line 4045: UPDATE oe_order_lines

4041: oe_debug_pub.add('TOP_BILL_SEQ_ID SELECTED FROM BOM_bill_of_mat' ) ;
4042: END IF;
4043:
4044: IF p_do_update THEN
4045: UPDATE oe_order_lines
4046: SET component_sequence_id = p_model_line_rec.component_sequence_id
4047: ,sort_order = p_model_line_rec.sort_order
4048: ,component_code = p_model_line_rec.component_code
4049: ,lock_control = lock_control + 1

Line 4123: FROM oe_order_lines

4119: CURSOR inc_items(p_link_to_line_id NUMBER,
4120: p_top_model_line_id NUMBER)
4121: IS
4122: SELECT line_id, ordered_quantity
4123: FROM oe_order_lines
4124: WHERE top_model_line_id = p_top_model_line_id
4125: AND link_to_line_id = p_link_to_line_id
4126: AND item_type_code = OE_GLOBALS.G_ITEM_INCLUDED;
4127:

Line 4282: FROM oe_order_lines

4278: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
4279:
4280: CURSOR included_items IS
4281: SELECT line_id, component_code, link_to_line_id, ordered_quantity
4282: FROM oe_order_lines
4283: WHERE item_type_code = 'INCLUDED'
4284: AND link_to_line_id <> top_model_line_id
4285: AND top_model_line_id = p_top_model_line_id;
4286:

Line 4308: FROM oe_order_lines

4304: IF l_component_sequence_id is NULL THEN
4305:
4306: SELECT component_sequence_id, creation_date
4307: INTO l_component_sequence_id, l_creation_date
4308: FROM oe_order_lines
4309: WHERE line_id = p_top_model_line_id;
4310: END IF;
4311:
4312: l_found := FALSE;

Line 4355: FROM oe_order_lines

4351: -- already updated/deleted and batch validation logged.
4352: BEGIN
4353: SELECT ordered_quantity
4354: INTO l_ordered_qty
4355: FROM oe_order_lines
4356: WHERE top_model_line_id = p_top_model_line_id
4357: AND line_id = l_rec.link_to_line_id;
4358:
4359: l_line_rec := OE_Order_Pub.G_Miss_Line_Rec;