DBA Data[Home] [Help]

APPS.OE_SPLIT_UTIL dependencies on OE_GLOBALS

Line 9: G_BINARY_LIMIT CONSTANT NUMBER := OE_GLOBALS.G_BINARY_LIMIT; -- 8706868

5: G_max_model NUMBER;
6: g_over_shipment boolean := false;
7: g_remnant_only Boolean := FALSE;
8: g_qry_out_rec OE_ORDER_PUB.Line_rec_Type := OE_ORDER_PUB.G_MISS_LINE_REC;
9: G_BINARY_LIMIT CONSTANT NUMBER := OE_GLOBALS.G_BINARY_LIMIT; -- 8706868
10: Procedure Create_Line_Set_For_Options(p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type ) IS
11: --
12: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
13: --

Line 20: p_x_line_tbl(I).operation = oe_globals.g_opr_update THEN

16: oe_debug_pub.add( 'ENTER CREATE LINE SET FOR OPTIONS:' ) ;
17: END IF;
18: FOR I in 1..p_x_line_tbl.count LOOP
19: IF p_x_line_tbl(I).line_set_id is null AND
20: p_x_line_tbl(I).operation = oe_globals.g_opr_update THEN
21: IF l_debug_level > 0 THEN
22: oe_debug_pub.add( 'BEFORE CREATING SET : ' ||P_X_LINE_TBL ( I ) .LINE_ID ) ;
23: END IF;
24: IF l_debug_level > 0 THEN

Line 31: p_x_line_tbl(J).operation = oe_globals.g_opr_create THEN

27: Oe_Set_Util.Create_Line_Set(p_x_line_rec => p_x_line_tbl(I));
28: END IF;
29: FOR J in 1..p_x_line_tbl.count LOOP
30: IF p_x_line_tbl(J).split_from_line_id = p_x_line_tbl(I).line_id AND
31: p_x_line_tbl(J).operation = oe_globals.g_opr_create THEN
32: IF l_debug_level > 0 THEN
33: oe_debug_pub.add( 'ADDING INTO SET:' ) ;
34: END IF;
35: p_x_line_tbl(J).line_Set_id := p_x_line_tbl(I).line_set_id;

Line 56: IF (p_line_tbl(I).operation = oe_globals.g_opr_create AND

52: BEGIN
53:
54: FOR I in 1..p_line_tbl.count LOOP
55: BEGIN
56: IF (p_line_tbl(I).operation = oe_globals.g_opr_create AND
57: p_line_tbl(I).split_from_line_id IS NOT NULL AND
58: p_line_tbl(I).source_type_code = 'EXTERNAL' ) THEN
59: UPDATE oe_drop_ship_sources
60: SET line_id = p_line_tbl(I).line_id

Line 98: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_UPDATE THEN

94: OE_DEBUG_PUB.add('#5112495, select service reference type code ORDER only',1);
95: END IF;
96: x_line_tbl := p_line_tbl;
97: FOR I in 1 .. p_line_tbl.count LOOP
98: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_UPDATE THEN
99: l_line_id := p_line_tbl(I).line_id;
100: ELSE
101: l_line_id := p_line_tbl(I).split_from_line_id;
102: END IF;

Line 108: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_CREATE THEN

104: l_service_count := l_service_count + 1;
105: l_ser_line_tbl(l_service_count).line_id := ser_rec.line_id;
106: oe_line_util.query_row(ser_rec.line_id,x_line_rec => l_ser_line_rec);
107: l_ser_line_tbl(l_service_count) := l_ser_line_rec;
108: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_CREATE THEN
109: l_ser_line_tbl(l_service_count).line_id := fnd_api.g_miss_num;
110: l_ser_line_tbl(l_service_count).split_from_line_id := l_ser_line_rec.line_id; --9111247
111: END IF;
112: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_UPDATE THEN

Line 112: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_UPDATE THEN

108: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_CREATE THEN
109: l_ser_line_tbl(l_service_count).line_id := fnd_api.g_miss_num;
110: l_ser_line_tbl(l_service_count).split_from_line_id := l_ser_line_rec.line_id; --9111247
111: END IF;
112: IF p_line_tbl(I).operation = OE_GLOBALS.G_OPR_UPDATE THEN
113: l_ser_line_tbl(l_service_count).split_action_code := 'SPLIT';
114: /* Start Audit Trail */
115: l_ser_line_tbl(l_service_count).change_reason := 'SYSTEM';
116: /* End Audit Trail */

Line 360: l_ser_line_tbl(l_service_count).operation := oe_globals.g_opr_update;

356: /* End Audit Trail */
357: l_ser_line_tbl(l_service_count).line_id := ser_rec.line_id;
358: l_ser_line_tbl(l_service_count).header_id := ser_rec.header_id;
359: l_ser_line_tbl(l_service_count).ordered_quantity := g_split_line_tbl(1).quantity;
360: l_ser_line_tbl(l_service_count).operation := oe_globals.g_opr_update;
361: l_ser_line_tbl(l_service_count).split_action_code := 'SPLIT';
362: l_service_count := l_service_count + 1;
363: FOR I in 2..g_split_line_tbl.count LOOP
364: l_ser_line_tbl(l_service_count) := l_ser_rec;

Line 367: l_ser_line_tbl(l_service_count).operation := oe_globals.g_opr_create;

363: FOR I in 2..g_split_line_tbl.count LOOP
364: l_ser_line_tbl(l_service_count) := l_ser_rec;
365: l_ser_line_tbl(l_service_count).line_id := fnd_api.g_miss_num;
366: l_ser_line_tbl(l_service_count).split_from_line_id := l_ser_rec.line_id;
367: l_ser_line_tbl(l_service_count).operation := oe_globals.g_opr_create;
368: g_qry_out_rec := l_ser_line_tbl(l_service_count) ;
369: OE_Split_Util.Default_Attributes(
370: p_x_line_rec =>g_qry_out_rec
371: , p_old_line_rec => l_ser_line_tbl(l_service_count)

Line 377: l_ser_line_tbl(l_service_count).operation := oe_globals.g_opr_create;

373: l_ser_line_tbl(l_service_count) := g_qry_out_rec;
374: l_ser_line_tbl(l_service_count).header_id := ser_rec.header_id;
375: l_ser_line_tbl(l_service_count).service_reference_line_id := g_split_line_tbl(I).line_id;
376: l_ser_line_tbl(l_service_count).ordered_quantity := g_split_line_tbl(I).quantity;
377: l_ser_line_tbl(l_service_count).operation := oe_globals.g_opr_create;
378: l_ser_line_tbl(l_service_count).item_type_code:='SERVICE';
379: l_service_count := l_service_count + 1;
380: END LOOP;
381: END LOOP;

Line 502: l_parent_line.operation := oe_globals.g_opr_update;

498: IF g_max_model > 0 THEN
499: l_parent_line := l_line_rec;
500: l_parent_line.ordered_quantity := g_max_model;
501: l_parent_line.shipped_quantity := g_max_model;
502: l_parent_line.operation := oe_globals.g_opr_update;
503: l_parent_line.split_action_code := 'SPLIT';
504: l_parent_line.split_by := 'SYSTEM';
505: --l_option_count := l_option_count + 1;
506: IF l_parent_line.line_set_id IS NULL THEN

Line 522: x_line_tbl(I).operation := oe_globals.g_opr_update;

518: IF l_debug_level > 0 THEN
519: oe_debug_pub.add( X_LINE_TBL ( I ) .ORDERED_QUANTITY ) ;
520: END IF;
521: x_line_tbl(I).ordered_quantity := g_max_model * l_model_ratio;
522: x_line_tbl(I).operation := oe_globals.g_opr_update;
523: x_line_tbl(I).shipped_quantity := x_line_tbl(I).ordered_quantity;
524: option_updated := TRUE;
525: IF l_debug_level > 0 THEN
526: oe_debug_pub.add( 'ORD QTY' ||X_LINE_TBL ( I ) .ORDERED_QUANTITY ) ;

Line 538: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;

534: l_option_line_tbl(l_option_count).ordered_quantity := g_max_model * l_model_ratio;
535: /* Start Audit Trail */
536: l_option_line_tbl(l_option_count).change_reason := 'SYSTEM';
537: /* End Audit Trail */
538: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;
539: l_option_line_tbl(l_option_count).split_action_code := 'SPLIT';
540: l_option_line_tbl(l_option_count).split_by := 'SYSTEM' ;
541: l_option_line_tbl(l_option_count).shipped_quantity := l_option_line_tbl(l_option_count).ordered_quantity;
542: END IF; -- Option not updated

Line 564: l_parent_line.operation := oe_globals.g_opr_create;

560: END IF;
561: IF g_min_Model > 0 THEN
562: l_parent_line := l_line_rec;
563: l_parent_line.ordered_quantity := g_min_model;
564: l_parent_line.operation := oe_globals.g_opr_create;
565: l_parent_line.split_by := 'SYSTEM';
566: l_parent_line.split_from_line_id := l_parent_line.line_id;
567: IF l_debug_level > 0 THEN
568: oe_debug_pub.add('Line set id is : '||l_set_id,5) ;

Line 591: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

587: l_option_line_tbl(l_option_count) := l_option_line;
588: l_option_line_tbl(l_option_count).split_from_line_id := optionrec.line_id;
589: l_option_line_tbl(l_option_count).split_by:='SYSTEM';
590: l_option_line_tbl(l_option_count).line_id := fnd_api.g_miss_num;
591: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
592: l_option_line_tbl(l_option_count).orig_sys_line_ref := fnd_api.g_miss_char; --Bug5207907
593: g_qry_out_rec := l_option_line_tbl(l_option_count) ;
594: OE_Split_Util.Default_Attributes
595: ( p_x_line_rec => g_qry_out_rec

Line 648: l_parent_line.operation := oe_globals.g_opr_update;

644: ELSIF l_set_id is not null then
645: l_parent_line.line_set_id := l_set_id;
646: END IF;
647: l_rem_top_model_line_id := l_parent_line.line_id;
648: l_parent_line.operation := oe_globals.g_opr_update;
649: l_parent_line.split_action_code := 'SPLIT';
650: l_parent_line.split_by := 'SYSTEM';
651: ELSE -- g_max_model
652: l_parent_line.operation := oe_globals.g_opr_create;

Line 652: l_parent_line.operation := oe_globals.g_opr_create;

648: l_parent_line.operation := oe_globals.g_opr_update;
649: l_parent_line.split_action_code := 'SPLIT';
650: l_parent_line.split_by := 'SYSTEM';
651: ELSE -- g_max_model
652: l_parent_line.operation := oe_globals.g_opr_create;
653: l_parent_line.split_by := 'SYSTEM';
654: l_parent_line.split_from_line_id := l_parent_line.line_id;
655: l_parent_line.line_id := fnd_api.g_miss_num;
656: l_parent_line.config_header_id := NULL;

Line 700: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

696: l_option_count := l_option_count + 1;
697: l_option_line_tbl(l_option_count) := l_option_line;
698: l_option_line_tbl(l_option_count).line_id := fnd_api.g_miss_num;
699: l_option_line_tbl(l_option_count).split_from_line_id := optionrec.line_id;
700: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
701: l_option_line_tbl(l_option_count).split_by := 'SYSTEM';
702: l_option_line_tbl(l_option_count).orig_sys_line_ref := fnd_api.g_miss_char; --Bug5207907
703: g_qry_out_rec := l_option_line_tbl(l_option_count) ;
704: OE_Split_Util.Default_Attributes

Line 766: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

762: l_option_count := l_option_count + 1;
763: l_option_line_tbl(l_option_count) := l_option_line;
764: l_option_line_tbl(l_option_count).line_id := fnd_api.g_miss_num;
765: l_option_line_tbl(l_option_count).split_from_line_id := configrec.line_id;
766: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
767: l_option_line_tbl(l_option_count).split_by := 'SYSTEM';
768: IF l_debug_level > 0 THEN
769: oe_debug_pub.add('adding for ato model in procedure Get_non_Model_Configuration',5) ;
770: END IF;

Line 830: l_parent_line.operation := oe_globals.g_opr_create;

826: oe_debug_pub.add('This line ordered quantity ' || l_line_rec.ordered_quantity);
827: oe_debug_pub.add('Ordered quantity on the table ' || x_line_tbl(1).ordered_quantity);
828: END IF;
829: IF l_parent_line.ordered_quantity <> 0 THEN
830: l_parent_line.operation := oe_globals.g_opr_create;
831: l_parent_line.split_by := 'SYSTEM';
832: l_parent_line.split_from_line_id := l_parent_line.line_id;
833: l_parent_line.line_id := fnd_api.g_miss_num;
834: l_parent_line.orig_sys_line_ref := fnd_api.g_miss_char; --Bug5207907

Line 887: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;

883: IF l_update_quantity > 0 THEN
884: l_option_count := l_option_count + 1;
885: IF NOT option_updated AND g_max_model = 0 THEN
886: l_option_line_tbl(l_option_count) := l_option_line;
887: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;
888: l_option_line_tbl(l_option_count).split_action_code := 'SPLIT';
889: l_option_line_tbl(l_option_count).split_by := 'SYSTEM';
890: l_option_line_tbl(l_option_count).ship_set_id := null;
891: l_option_line_tbl(l_option_count).arrival_Set_id := null;

Line 897: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

893: l_option_line_tbl(l_option_count).split_by := 'SYSTEM';
894: l_option_line_tbl(l_option_count) := l_option_line;
895: l_option_line_tbl(l_option_count).split_from_line_id := optionrec.line_id;
896: l_option_line_tbl(l_option_count).line_id := fnd_api.g_miss_num;
897: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
898: l_option_line_tbl(l_option_count).orig_sys_line_ref := fnd_api.g_miss_char; --Bug5207907
899: g_qry_out_rec := l_option_line_tbl(l_option_count) ;
900: OE_Split_Util.Default_Attributes
901: ( p_x_line_rec => g_qry_out_rec

Line 1044: l_parent_line.operation := oe_globals.g_opr_update;

1040: IF g_max_model > 0 THEN
1041: l_parent_line := l_line_rec;
1042: l_parent_line.ordered_quantity := g_max_model;
1043: l_parent_line.shipped_quantity := g_max_model;
1044: l_parent_line.operation := oe_globals.g_opr_update;
1045: l_parent_line.split_action_code := 'SPLIT';
1046: l_parent_line.split_by := 'SYSTEM';
1047: --l_option_count := l_option_count + 1;
1048: IF l_parent_line.line_set_id IS NULL THEN

Line 1062: x_line_tbl(I).operation := OE_GLOBALS.g_opr_update;

1058: option_updated := FALSE;
1059: FOR I in 1..P_line_tbl.count LOOP
1060: IF p_line_tbl(I).line_id = optionrec.line_id THEN
1061: x_line_tbl(I).ordered_quantity := g_max_model * l_model_ratio;
1062: x_line_tbl(I).operation := OE_GLOBALS.g_opr_update;
1063: x_line_tbl(I).shipped_quantity := x_line_tbl(I).ordered_quantity;
1064: option_updated := TRUE;
1065: EXIT;
1066: END IF;

Line 1075: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;

1071: l_option_line_tbl(l_option_count).ordered_quantity := g_max_model * l_model_ratio;
1072: /* Start Audit Trail */
1073: l_option_line_tbl(l_option_count).change_reason := 'SYSTEM';
1074: /* End Audit Trail */
1075: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;
1076: l_option_line_tbl(l_option_count).split_action_code := 'SPLIT';
1077: l_option_line_tbl(l_option_count).split_by := 'SYSTEM' ;
1078: l_option_line_tbl(l_option_count).shipped_quantity :=l_option_line_tbl(l_option_count).ordered_quantity;
1079: END IF; -- Option not updated

Line 1098: l_parent_line.operation := oe_globals.g_opr_create;

1094: -- Get Complete shippable Model if any
1095: IF g_min_Model > 0 THEN
1096: l_parent_line := l_line_rec;
1097: l_parent_line.ordered_quantity := g_min_model;
1098: l_parent_line.operation := oe_globals.g_opr_create;
1099: l_parent_line.split_by := 'SYSTEM';
1100: l_parent_line.split_from_line_id := l_parent_line.line_id;
1101: IF l_debug_level > 0 THEN
1102: oe_debug_pub.add( 'LINE SET IS-'||L_SET_ID ) ;

Line 1125: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

1121: l_option_count := l_option_count + 1;
1122: l_option_line_tbl(l_option_count) := l_option_line;
1123: l_option_line_tbl(l_option_count).split_from_line_id := optionrec.line_id;
1124: l_option_line_tbl(l_option_count).line_id := fnd_api.g_miss_num;
1125: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
1126: l_option_line_tbl(l_option_count).orig_sys_line_ref := fnd_api.g_miss_char; --Bug5207907
1127: g_qry_out_rec := l_option_line_tbl(l_option_count) ;
1128: OE_Split_Util.Default_Attributes
1129: (p_x_line_rec => g_qry_out_rec

Line 1177: l_parent_line.operation := oe_globals.g_opr_create;

1173: IF l_debug_level > 0 THEN
1174: oe_debug_pub.add( 'PARENT ORDERED QUANTITY : ' || L_PARENT_LINE.ORDERED_QUANTITY ) ;
1175: END IF;
1176: IF l_parent_line.ordered_quantity > 0 THEN
1177: l_parent_line.operation := oe_globals.g_opr_create;
1178: l_parent_line.split_by := 'SYSTEM';
1179: l_parent_line.split_from_line_id := l_parent_line.line_id;
1180: l_parent_line.line_id := fnd_api.g_miss_num;
1181: l_parent_line.config_header_id := NULL;

Line 1211: l_parent_line.operation := oe_globals.g_opr_create;

1207: oe_debug_pub.add('This line unshipped qty 2 : ' || L_LINE_REC.ORDERED_QUANTITY ) ;
1208: oe_debug_pub.add('unshipped qty 3 : ' || X_LINE_TBL ( 1 ) .ORDERED_QUANTITY ) ;
1209: END IF;
1210: IF l_parent_line.ordered_quantity > 0 THEN
1211: l_parent_line.operation := oe_globals.g_opr_create;
1212: l_parent_line.split_by := 'SYSTEM';
1213: l_parent_line.split_from_line_id := l_parent_line.line_id;
1214: l_parent_line.line_id := fnd_api.g_miss_num;
1215: OE_Split_Util.Default_Attributes

Line 1257: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

1253: l_option_count := l_option_count + 1;
1254: l_option_line_tbl(l_option_count) := l_option_line;
1255: l_option_line_tbl(l_option_count).line_id := fnd_api.g_miss_num;
1256: l_option_line_tbl(l_option_count).split_from_line_id := optionrec.line_id;
1257: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
1258: g_qry_out_rec := l_option_line_tbl(l_option_count) ;
1259: OE_Split_Util.Default_Attributes
1260: (p_x_line_rec => g_qry_out_rec
1261: , p_old_line_rec => l_option_line_tbl(l_option_count));

Line 1318: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;

1314: IF l_update_quantity > 0 THEN
1315: l_option_count := l_option_count + 1;
1316: IF NOT option_updated AND g_max_model = 0 THEN
1317: l_option_line_tbl(l_option_count) := l_option_line;
1318: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;
1319: l_option_line_tbl(l_option_count).split_action_code := 'SPLIT';
1320: l_option_line_tbl(l_option_count).split_by := 'SYSTEM';
1321: l_option_line_tbl(l_option_count).ship_set_id := null;
1322: l_option_line_tbl(l_option_count).arrival_Set_id := null;

Line 1328: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

1324: ELSE
1325: l_option_line_tbl(l_option_count) := l_option_line;
1326: l_option_line_tbl(l_option_count).split_from_line_id := optionrec.line_id;
1327: l_option_line_tbl(l_option_count).line_id := fnd_api.g_miss_num;
1328: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
1329: l_option_line_tbl(l_option_count).orig_sys_line_ref := fnd_api.g_miss_char; --Bug5207907
1330: g_qry_out_rec := l_option_line_tbl(l_option_count) ;
1331: OE_Split_Util.Default_Attributes
1332: ( p_x_line_rec => g_qry_out_rec

Line 1471: --AND NOT OE_GLOBALS.EQUAL(p_x_line_rec.request_date

1467: l_option_line.SPLIT_SHIP_TO := P_LINE_TBL ( P_INDEX ) .SPLIT_SHIP_TO;
1468: IF l_option_line.Schedule_ship_date IS NOT NULL THEN
1469: IF NVL(l_option_line.SPLIT_REQUEST_DATE,'N') ='Y' THEN -- 10278858
1470: IF l_option_line.schedule_ship_date IS NOT NULL
1471: --AND NOT OE_GLOBALS.EQUAL(p_x_line_rec.request_date
1472: -- ,l_line_rec.request_date)
1473: AND NVL(OE_SYS_PARAMETERS.value('RESCHEDULE_REQUEST_DATE_FLAG'),'Y') = 'Y' THEN -- 12833832
1474: l_order_date_type_code := NVL(oe_schedule_util.Get_Date_Type(l_option_line.header_id),'SHIP');
1475: IF l_order_date_type_code = 'SHIP' THEN

Line 1501: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;

1497: oe_debug_pub.add( 'SPLIT SHIP FROM ' || P_LINE_TBL ( P_INDEX ) .SPLIT_SHIP_FROM) ;
1498: oe_debug_pub.add( 'SPLIT SHIP TO ' || P_LINE_TBL ( P_INDEX ) .SPLIT_SHIP_TO) ;
1499: --bug 13954474
1500: END IF;
1501: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_update;
1502: l_option_line_tbl(l_option_count).split_action_code := 'SPLIT';
1503: l_option_line_tbl(l_option_count).split_by := p_line_tbl(p_index).split_by;
1504:
1505: /* Populate Line set id if set id is not already populated bug - 2103004 */

Line 1525: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;

1521: l_option_line_tbl(l_option_count).ordered_quantity := g_split_line_tbl(I).quantity * l_model_ratio;
1522: IF l_debug_level > 0 THEN
1523: oe_debug_pub.add( 'RATIO 3 : ' || G_SPLIT_LINE_TBL ( I ) .QUANTITY , 1 ) ;
1524: END IF;
1525: l_option_line_tbl(l_option_count).operation := oe_globals.g_opr_create;
1526: l_option_line_tbl(l_option_count).split_from_line_id := optionrec.line_id;
1527: l_option_line_tbl(l_option_count).split_by := p_line_tbl(p_index).split_by;
1528: g_qry_out_rec := l_option_line_tbl(l_option_count) ;
1529: g_qry_out_rec.orig_sys_line_ref :=fnd_api.g_miss_char; --bug5207907

Line 1560: l_line_scredit_temp_tbl(l_scredit_count).Operation := OE_GLOBALS.G_OPR_CREATE;

1556: FOR SCRD_REC IN 1..l_line_Scredit_tbl.count LOOP
1557: l_scredit_count := l_scredit_count + 1;
1558: l_line_scredit_temp_tbl(l_scredit_count) := l_line_scredit_tbl(SCRD_REC);
1559: l_line_scredit_temp_tbl(l_scredit_count).sales_credit_id := FND_API.G_MISS_NUM;
1560: l_line_scredit_temp_tbl(l_scredit_count).Operation := OE_GLOBALS.G_OPR_CREATE;
1561: l_line_scredit_temp_tbl(l_scredit_count).line_id := l_option_line_tbl(l_option_count).line_id;
1562: END LOOP;
1563: IF l_debug_level > 0 THEN
1564: oe_debug_pub.add( 'DONE COPYING SALES CREDITS TO NEW OPTION ' , 1 ) ;

Line 1590: IF X_LINE_TBL(I).OPERATION = OE_GLOBALS.G_OPR_CREATE

1586: -- 8706868 Deriving Link to Line_id for components with CREATE operation
1587: Begin
1588: FOR I in 1..x_line_tbl.count LOOP
1589: L_FOUND := FALSE;
1590: IF X_LINE_TBL(I).OPERATION = OE_GLOBALS.G_OPR_CREATE
1591: AND X_LINE_TBL(I).LINE_ID <> X_LINE_TBL(I).TOP_MODEL_LINE_ID
1592: AND X_LINE_TBL(I).TOP_MODEL_LINE_ID IS NOT NULL THEN
1593: FOR J in 1..x_line_tbl.count LOOP
1594: IF X_LINE_TBL(J).OPERATION = OE_GLOBALS.G_OPR_UPDATE THEN

Line 1594: IF X_LINE_TBL(J).OPERATION = OE_GLOBALS.G_OPR_UPDATE THEN

1590: IF X_LINE_TBL(I).OPERATION = OE_GLOBALS.G_OPR_CREATE
1591: AND X_LINE_TBL(I).LINE_ID <> X_LINE_TBL(I).TOP_MODEL_LINE_ID
1592: AND X_LINE_TBL(I).TOP_MODEL_LINE_ID IS NOT NULL THEN
1593: FOR J in 1..x_line_tbl.count LOOP
1594: IF X_LINE_TBL(J).OPERATION = OE_GLOBALS.G_OPR_UPDATE THEN
1595: IF X_LINE_TBL(J).LINE_ID = X_LINE_TBL(I).SPLIT_FROM_LINE_ID THEN
1596: FOR K in 1..x_line_tbl.count LOOP
1597: IF X_LINE_TBL(J).LINK_TO_LINE_ID = X_LINE_TBL(K).SPLIT_FROM_LINE_ID AND
1598: X_LINE_TBL(I).TOP_MODEL_LINE_ID = X_LINE_TBL(K).TOP_MODEL_LINE_ID THEN

Line 1699: IF (p_x_line_rec.operation = oe_globals.g_opr_create and

1695: oe_debug_pub.add( 'REQUEST DATE FLAG:'||P_X_LINE_REC.SPLIT_REQUEST_DATE ) ;
1696: oe_debug_pub.add( 'SHIP FROM FLAG:'||P_X_LINE_REC.SPLIT_SHIP_FROM ) ;
1697: oe_debug_pub.add( 'SHIP TO FLAG:'||P_X_LINE_REC.SPLIT_SHIP_TO ) ;
1698: END IF;
1699: IF (p_x_line_rec.operation = oe_globals.g_opr_create and
1700: (p_x_line_rec.split_from_line_id IS NOT NULL AND
1701: p_x_line_rec.split_from_line_id <> FND_API.G_MISS_NUM) AND
1702: (p_x_line_rec.line_id IS NULL OR
1703: p_x_line_rec.line_id = FND_API.G_MISS_NUM)) THEN

Line 1768: AND NOT OE_GLOBALS.EQUAL(p_x_line_rec.request_date

1764: NVL(P_X_LINE_REC.SPLIT_REQUEST_DATE,'N') ='Y' THEN -- 10278858
1765:
1766: IF l_line_rec.schedule_ship_date IS NOT NULL
1767: /*bug 13954474
1768: AND NOT OE_GLOBALS.EQUAL(p_x_line_rec.request_date
1769: ,l_line_rec.request_date)
1770: bug 13954474*/
1771: AND NVL(OE_SYS_PARAMETERS.value('RESCHEDULE_REQUEST_DATE_FLAG'),'Y') = 'Y' THEN -- 12833832
1772: l_order_date_type_code := NVL(oe_schedule_util.Get_Date_Type(l_line_rec.header_id),'SHIP');

Line 1849: l_line_rec.operation := oe_globals.g_opr_create;

1845: l_line_rec.schedule_action_code := OE_ORDER_SCH_UTIL.OESCH_ACT_DEMAND;
1846: l_line_rec.schedule_status_code := NULL;
1847: END IF;*/
1848: oe_line_util.convert_miss_to_null(p_x_line_rec => l_line_rec);
1849: l_line_rec.operation := oe_globals.g_opr_create;
1850: p_x_line_rec := l_line_rec;
1851: ELSIF (l_line_rec.line_id IS NOT NULL AND
1852: l_line_rec.line_id <> FND_API.G_MISS_NUM AND
1853: l_line_rec.operation = oe_globals.g_opr_create) THEN

Line 1853: l_line_rec.operation = oe_globals.g_opr_create) THEN

1849: l_line_rec.operation := oe_globals.g_opr_create;
1850: p_x_line_rec := l_line_rec;
1851: ELSIF (l_line_rec.line_id IS NOT NULL AND
1852: l_line_rec.line_id <> FND_API.G_MISS_NUM AND
1853: l_line_rec.operation = oe_globals.g_opr_create) THEN
1854: IF l_debug_level > 0 THEN
1855: oe_debug_pub.add( 'LINE ID :'||P_X_LINE_REC.LINE_ID ) ;
1856: oe_debug_pub.add( 'SPLIT FROM LINE ID :'||P_X_LINE_REC.SPLIT_FROM_LINE_ID ) ;
1857: oe_debug_pub.add( 'TOP MODEL LINE ID : '||P_X_LINE_REC.TOP_MODEL_LINE_ID ) ;

Line 1983: l_line_tbl(I).operation = OE_GLOBALS.G_OPR_UPDATE

1979: oe_debug_pub.add('OUT side the LOOP ORD QTY IS :'|| l_line_tbl(I).ordered_quantity || ' Count : '
1980: ||I ||' Operation : '||l_line_tbl(I).operation);
1981: end if;
1982: IF l_line_tbl(I).split_action_code = 'SPLIT' AND
1983: l_line_tbl(I).operation = OE_GLOBALS.G_OPR_UPDATE
1984: THEN
1985: /* Added this condition to spuress the spliting of the line with zero quantiy.
1986: Bug: 3318920
1987: By: Srini

Line 2050: IF NOT OE_GLOBALS.EQUAL(l_line_rec.ship_from_org_id, l_line_tbl(I).ship_from_org_id) AND

2046: l_sch_count := l_sch_count + 1;
2047: l_sch_tbl(l_sch_count) := l_line_tbl(I);
2048: --8706868
2049: -- Unreserve the line if warehouse being chabged and reservation is there.
2050: IF NOT OE_GLOBALS.EQUAL(l_line_rec.ship_from_org_id, l_line_tbl(I).ship_from_org_id) AND
2051: l_line_rec.schedule_ship_date is NOT NULL AND
2052: NVL(l_line_tbl(I).SPLIT_SHIP_FROM,'N') ='Y' THEN -- 10338643
2053: l_sales_order_id := OE_SCHEDULE_UTIL.Get_mtl_sales_order_id(l_line_rec.HEADER_ID);
2054: OE_LINE_UTIL.Get_Reserved_Quantities(p_header_id => l_sales_order_id

Line 2073: NOT OE_GLOBALS.EQUAL(l_line_rec.request_date, l_line_tbl(I).request_date) AND

2069: END IF;
2070:
2071: END IF;
2072: IF l_line_rec.schedule_ship_date is NOT NULL AND
2073: NOT OE_GLOBALS.EQUAL(l_line_rec.request_date, l_line_tbl(I).request_date) AND
2074: NVL(l_line_tbl(I).SPLIT_REQUEST_DATE,'N') ='Y' AND -- 10338643
2075: NVL(OE_SYS_PARAMETERS.value('RESCHEDULE_REQUEST_DATE_FLAG'),'Y') = 'Y' THEN -- 12833832
2076: l_order_date_type_code := NVL(oe_schedule_util.Get_Date_Type(l_line_rec.header_id),'SHIP');
2077: IF l_order_date_type_code = 'SHIP' THEN

Line 2101: l_line_tbl(J).operation = OE_GLOBALS.G_OPR_CREATE )

2097: oe_debug_pub.add('OUT side the LOOP ORD QTY IS :'|| l_line_tbl(J).ordered_quantity || ' Count : '
2098: ||J ||' Operation : '||l_line_tbl(J).operation);
2099: END if;
2100: IF (l_Line_Tbl(J).split_from_line_id = l_line_tbl(I).Line_Id AND
2101: l_line_tbl(J).operation = OE_GLOBALS.G_OPR_CREATE )
2102: THEN
2103: /* Added this condition to spuress the spliting of the line with zero quantiy.
2104: Bug: 3318920
2105: By: Srini

Line 2143: l_line_scredit_temp_tbl(l_scredit_count).Operation := OE_GLOBALS.G_OPR_CREATE;

2139: FOR SCRD_REC IN 1..L_line_Scredit_tbl.count LOOP
2140: l_scredit_count := l_scredit_count + 1;
2141: l_line_scredit_temp_tbl(l_scredit_count):= L_line_scredit_tbl(SCRD_REC);
2142: l_line_scredit_temp_tbl(l_scredit_count).sales_credit_id:= FND_API.G_MISS_NUM;
2143: l_line_scredit_temp_tbl(l_scredit_count).Operation := OE_GLOBALS.G_OPR_CREATE;
2144: l_line_scredit_temp_tbl(l_scredit_count).line_id := l_line_tbl(J).line_id;
2145: END LOOP;
2146: END IF; -- IF split from line id and operation create
2147: --j:= l_line_tbl.next(j);

Line 2293: l_control_rec OE_GLOBALS.Control_Rec_Type;

2289:
2290: Procedure Cascade_non_proportional_Split(p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.line_tbl_type,
2291: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2) IS
2292: l_line_id NUMBER;
2293: l_control_rec OE_GLOBALS.Control_Rec_Type;
2294: l_api_name CONSTANT VARCHAR2(30) := 'Cascade Non Proportonal splits';
2295: l_return_status VARCHAR2(30);
2296: l_old_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
2297: l_old_Line_Scredit_tbl OE_Order_PUB.Line_Scredit_Tbl_Type;

Line 2452: IF l_line_tbl(I).operation = OE_GLOBALS.G_OPR_CREATE THEN

2448: END IF;
2449: END LOOP;
2450: -- Get Sales Credits
2451: FOR I in 1 .. l_line_tbl.count LOOP
2452: IF l_line_tbl(I).operation = OE_GLOBALS.G_OPR_CREATE THEN
2453: -- 13913678
2454: l_line_scredit_temp_tbl.delete;
2455: oe_line_scredit_util.query_rows( p_line_id => l_line_tbl(I).split_from_line_id,
2456: x_line_scredit_tbl => l_line_scredit_temp_tbl);

Line 2463: l_line_scredit_tbl(l_scredit_count).operation := OE_GLOBALS.G_OPR_CREATE;

2459: FOR Scr IN 1 .. l_line_scredit_temp_tbl.count LOOP
2460: --13913678
2461: l_scredit_count := l_scredit_count+1;
2462: l_line_scredit_tbl(l_scredit_count) := l_line_scredit_temp_tbl(Scr);
2463: l_line_scredit_tbl(l_scredit_count).operation := OE_GLOBALS.G_OPR_CREATE;
2464: l_line_scredit_tbl(l_scredit_count).line_id := l_line_tbl(I).line_id;
2465: l_line_scredit_tbl(l_scredit_count).sales_credit_id := fnd_api.g_miss_num;
2466: END LOOP;
2467: END IF;

Line 2641: l_control_rec OE_GLOBALS.Control_Rec_Type;

2637: l_x_Line_Adj_Att_tbl OE_Order_PUB.Line_Adj_Att_Tbl_Type;
2638: l_x_Line_Adj_Assoc_tbl OE_Order_PUB.Line_Adj_Assoc_Tbl_Type;
2639: l_x_Header_Payment_tbl OE_Order_PUB.Header_Payment_Tbl_Type;
2640: l_x_Line_Payment_tbl OE_Order_PUB.Line_Payment_Tbl_Type;
2641: l_control_rec OE_GLOBALS.Control_Rec_Type;
2642: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2643: l_line_conc_rec OE_Split_Util.Split_Line_Rec_Type;
2644: l_line_conc_tbl OE_Split_Util.Split_Line_Tbl_Type;
2645: l_rec_count number;

Line 2684: OE_GLOBALS.Set_Context();

2680: from oe_order_lines_all
2681: where line_id=l_init_line_id;
2682:
2683: MO_GLOBAL.set_policy_context('S',l_org_id);
2684: OE_GLOBALS.Set_Context();
2685:
2686:
2687: Retcode := 0;
2688: Errbuf := NULL;

Line 2784: l_x_line_tbl(i).operation := OE_GLOBALS.G_OPR_UPDATE;

2780: ELSE
2781: l_x_line_tbl(i).split_by := 'USER';
2782: l_x_line_tbl(i).request_id := FND_GLOBAL.CONC_REQUEST_ID;
2783: END IF;
2784: l_x_line_tbl(i).operation := OE_GLOBALS.G_OPR_UPDATE;
2785: IF l_debug_level > 0 THEN
2786: OE_DEBUG_PUB.add('Audit Trail Reason Code being passed as '||
2787: l_line_conc_tbl(i).change_reason_code,1);
2788: END IF;

Line 2795: l_x_line_tbl(i).operation := OE_GLOBALS.G_OPR_CREATE;

2791: ELSE
2792: IF l_line_id is not null then
2793: l_x_line_tbl(i).split_from_line_id := l_line_id;
2794: END IF;
2795: l_x_line_tbl(i).operation := OE_GLOBALS.G_OPR_CREATE;
2796: IF l_line_conc_tbl(i).split_by = 'SCHEDULER' THEN
2797: l_x_line_tbl(i).split_by := 'SYSTEM';
2798: l_x_line_tbl(i).request_id := FND_GLOBAL.CONC_REQUEST_ID;
2799: ELSE

Line 2905: l_line_tbl(i).operation := OE_GLOBALS.G_OPR_UPDATE;

2901: l_process_add_attributes := TRUE;
2902: END IF;
2903: END IF;
2904:
2905: l_line_tbl(i).operation := OE_GLOBALS.G_OPR_UPDATE;
2906: oe_debug_pub.add('Reason code being passed : '||l_line_tbl(i).change_reason,1);
2907:
2908: l_line_tbl(i).change_reason := l_line_conc_tbl(i).change_reason_code;
2909: l_line_tbl(i).change_comments := l_line_conc_tbl(i).change_reason_comment;

Line 2996: l_line_tbl(l_rec_count).operation := OE_GLOBALS.G_OPR_UPDATE;

2992: l_process_add_attributes := TRUE;
2993: END IF;
2994: END IF;
2995:
2996: l_line_tbl(l_rec_count).operation := OE_GLOBALS.G_OPR_UPDATE;
2997: oe_debug_pub.add('Reason code being passed : '||
2998: l_line_tbl(l_rec_count).change_reason,1);
2999: l_line_tbl(l_rec_count).change_reason :=
3000: l_line_conc_tbl(k).change_reason_code;