DBA Data[Home] [Help]

APPS.MSC_BAL_UTILS dependencies on MSC_SCH_WB

Line 190: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' );

186: -- MOAC changes
187: mo_global.init('ONT');
188:
189: IF PG_DEBUG in ('Y', 'C') THEN
190: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' );
191: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
192: into l_time
193: from dual;
194: msc_sch_wb.atp_debug( 'POPULATE_TEMP_TABLE: BEGIN ' || l_time);

Line 194: msc_sch_wb.atp_debug( 'POPULATE_TEMP_TABLE: BEGIN ' || l_time);

190: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' );
191: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
192: into l_time
193: from dual;
194: msc_sch_wb.atp_debug( 'POPULATE_TEMP_TABLE: BEGIN ' || l_time);
195: END IF;
196:
197: open check_oe('PLANNING_PRIORITY');
198: fetch check_oe into l_column_exist;

Line 207: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' ||

203:
204:
205: if l_column_exist = 1 then
206: IF PG_DEBUG in ('Y', 'C') THEN
207: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' ||
208: 'new column Planning_priority exsits' );
209:
210: END IF;
211:

Line 255: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table: new column Planning_priority DOES NOT exsits' );

251: oe_mrp_open_demands_v omodv
252: WHERE 1=1 ';
253: else
254: IF PG_DEBUG in ('Y', 'C') THEN
255: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table: new column Planning_priority DOES NOT exsits' );
256: msc_sch_wb.atp_debug(' You are trying to sequece lines on planning_priority of a line , however dependency patches are not applied' );
257: msc_sch_wb.atp_debug(' OM dependency patch #3898070 is not applied correctly ');
258: END IF;
259: l_stmt := ' INSERT into mrp_atp_schedule_temp

Line 256: msc_sch_wb.atp_debug(' You are trying to sequece lines on planning_priority of a line , however dependency patches are not applied' );

252: WHERE 1=1 ';
253: else
254: IF PG_DEBUG in ('Y', 'C') THEN
255: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table: new column Planning_priority DOES NOT exsits' );
256: msc_sch_wb.atp_debug(' You are trying to sequece lines on planning_priority of a line , however dependency patches are not applied' );
257: msc_sch_wb.atp_debug(' OM dependency patch #3898070 is not applied correctly ');
258: END IF;
259: l_stmt := ' INSERT into mrp_atp_schedule_temp
260: (order_line_id,

Line 257: msc_sch_wb.atp_debug(' OM dependency patch #3898070 is not applied correctly ');

253: else
254: IF PG_DEBUG in ('Y', 'C') THEN
255: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table: new column Planning_priority DOES NOT exsits' );
256: msc_sch_wb.atp_debug(' You are trying to sequece lines on planning_priority of a line , however dependency patches are not applied' );
257: msc_sch_wb.atp_debug(' OM dependency patch #3898070 is not applied correctly ');
258: END IF;
259: l_stmt := ' INSERT into mrp_atp_schedule_temp
260: (order_line_id,
261: order_header_id,

Line 303: msc_sch_wb.atp_debug('p_exclude_picked is ' || p_exclude_picked);

299: l_stmt := l_stmt || p_where;
300:
301:
302: IF PG_DEBUG in ('Y', 'C') THEN
303: msc_sch_wb.atp_debug('p_exclude_picked is ' || p_exclude_picked);
304: END IF;
305:
306: IF p_exclude_picked = 1 THEN
307:

Line 321: msc_sch_wb.atp_debug(' POPULATE_TEMP_TABLE - constructed sql is '||l_stmt);

317: END IF;
318:
319:
320: IF PG_DEBUG in ('Y', 'C') THEN
321: msc_sch_wb.atp_debug(' POPULATE_TEMP_TABLE - constructed sql is '||l_stmt);
322: END IF;
323:
324: execute immediate l_stmt;
325: IF PG_DEBUG in ('Y', 'C') THEN

Line 326: msc_sch_wb.atp_debug(' INSERTED into mrp table '|| SQL%ROWCOUNT);

322: END IF;
323:
324: execute immediate l_stmt;
325: IF PG_DEBUG in ('Y', 'C') THEN
326: msc_sch_wb.atp_debug(' INSERTED into mrp table '|| SQL%ROWCOUNT);
327: END IF;
328:
329: IF l_column_exist = 1 THEN
330: l_stmt:= 'select distinct

Line 411: msc_sch_wb.atp_debug(' POPULATE_TEMP_TABLE - second constructed sql is '||l_stmt);

407:
408:
409:
410: IF PG_DEBUG in ('Y', 'C') THEN
411: msc_sch_wb.atp_debug(' POPULATE_TEMP_TABLE - second constructed sql is '||l_stmt);
412: END IF;
413:
414: j := 0;
415: OPEN cv FOR l_stmt;

Line 418: -- msc_sch_wb.atp_debug(' j '||j);

414: j := 0;
415: OPEN cv FOR l_stmt;
416: LOOP
417: j := j + 1;
418: -- msc_sch_wb.atp_debug(' j '||j);
419: extend(filter_mrp_oe_rec,1);
420: FETCH cv
421: INTO filter_mrp_oe_rec.line_id(j),
422: filter_mrp_oe_rec.ship_set_id(j),

Line 444: msc_sch_wb.atp_debug('POPULATE_TEMP_TABLE : ' || ' Num of order lines selected '||num_of_lines);

440: CLOSE cv;
441: num_of_lines := j-1;
442:
443: IF PG_DEBUG in ('Y', 'C') THEN
444: msc_sch_wb.atp_debug('POPULATE_TEMP_TABLE : ' || ' Num of order lines selected '||num_of_lines);
445: END IF;
446:
447:
448: -- Set the line_id to -9999 for the recrds which we want to get rid of later

Line 520: msc_sch_wb.atp_debug( 'end of loop l_mrp_oe_rec.line_id.count is ' ||

516: END IF;
517: END LOOP;
518:
519: IF PG_DEBUG in ('Y', 'C') THEN
520: msc_sch_wb.atp_debug( 'end of loop l_mrp_oe_rec.line_id.count is ' ||
521: l_mrp_oe_rec.line_id.count);
522: END IF;
523:
524: num_of_lines := l_mrp_oe_rec.line_id.count;

Line 551: msc_sch_wb.atp_debug('POPULATE_TEMP_TABLE: ' || ' line_id '

547:
548:
549: FOR k IN 1..num_of_lines LOOP
550: IF PG_DEBUG in ('Y', 'C') THEN
551: msc_sch_wb.atp_debug('POPULATE_TEMP_TABLE: ' || ' line_id '
552: ||l_mrp_oe_rec.line_id(k)
553: || 'item_type_code '
554: || l_mrp_oe_rec.item_type_code(k)
555: ||' seq '||l_mrp_oe_rec.seq_num(k));

Line 611: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' );

607: -- close cursor
608: dbms_sql.close_cursor(cur_hdl);
609:
610: IF PG_DEBUG in ('Y', 'C') THEN
611: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' );
612: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
613: into l_time
614: from dual;
615: msc_sch_wb.atp_debug( 'POPULATE_TEMP_TABLE: END ' || l_time);

Line 615: msc_sch_wb.atp_debug( 'POPULATE_TEMP_TABLE: END ' || l_time);

611: msc_sch_wb.atp_debug('MSC_BAL_UTILS.populate_temp_table ' );
612: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
613: into l_time
614: from dual;
615: msc_sch_wb.atp_debug( 'POPULATE_TEMP_TABLE: END ' || l_time);
616:
617: msc_sch_wb.atp_debug(' Calculate supply/demand profile_value is ' || l_profile_value );
618:
619: END IF;

Line 617: msc_sch_wb.atp_debug(' Calculate supply/demand profile_value is ' || l_profile_value );

613: into l_time
614: from dual;
615: msc_sch_wb.atp_debug( 'POPULATE_TEMP_TABLE: END ' || l_time);
616:
617: msc_sch_wb.atp_debug(' Calculate supply/demand profile_value is ' || l_profile_value );
618:
619: END IF;
620:
621: commit;

Line 626: msc_sch_wb.atp_debug('extend: ' || ' Excp in populate temp table '||Substr(Sqlerrm, 1,100));

622:
623: EXCEPTION
624: WHEN OTHERS THEN
625: IF PG_DEBUG in ('Y', 'C') THEN
626: msc_sch_wb.atp_debug('extend: ' || ' Excp in populate temp table '||Substr(Sqlerrm, 1,100));
627: END IF;
628: END populate_temp_table;
629:
630: PROCEDURE undemand_orders (p_session_id NUMBER,

Line 648: msc_sch_wb.atp_debug('UNDEMAND_ORDERS ');

644: l_session_id NUMBER := p_session_id;
645:
646: BEGIN
647: IF PG_DEBUG in ('Y', 'C') THEN
648: msc_sch_wb.atp_debug('UNDEMAND_ORDERS ');
649: END IF;
650:
651: SELECT
652: Rowidtochar(a.ROWID),

Line 821: msc_sch_wb.atp_debug('UNDEMAND_ORDERS: '

817: order by a.sequence_number;
818:
819: IF x_atp_rec.inventory_item_id.count > 0 THEN
820: IF PG_DEBUG in ('Y', 'C') THEN
821: msc_sch_wb.atp_debug('UNDEMAND_ORDERS: '
822: || ' Before calling scheduling '
823: ||x_atp_rec.inventory_item_id.COUNT);
824: END IF;
825:

Line 831: msc_sch_wb.atp_debug('GET_ATP_RESULT: after new_extend_atp'||

827: x_atp_rec.inventory_item_id.count,
828: x_return_status);
829:
830: IF PG_DEBUG in ('Y', 'C') THEN
831: msc_sch_wb.atp_debug('GET_ATP_RESULT: after new_extend_atp'||
832: x_return_status);
833: END IF;
834:
835: IF x_return_status <> 'E' THEN

Line 852: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '

848:
849: END IF;
850:
851: IF PG_DEBUG in ('Y', 'C') THEN
852: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
853: || 'After calling Scheduling '
854: || x_return_status||' $ '
855: ||x_msg_data||' $ '
856: ||x_atp_rec_out.inventory_item_id.count);

Line 861: msc_sch_wb. atp_debug('UNDEMAND_ORDERS '

857: END IF;
858:
859: IF x_return_status = 'E' then
860: IF PG_DEBUG in ('Y', 'C') THEN
861: msc_sch_wb. atp_debug('UNDEMAND_ORDERS '
862: || ' err '
863: ||x_msg_data||' '
864: ||x_msg_count);
865: END IF;

Line 870: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '

866: end if;
867:
868: if x_atp_rec_out.inventory_item_id.count > 0 then
869: IF PG_DEBUG in ('Y', 'C') THEN
870: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
871: || ' sched date '
872: ||x_atp_rec_out.ship_date.count);
873: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
874: || ' SD '||x_atp_supply_demand.level.count);

Line 873: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '

869: IF PG_DEBUG in ('Y', 'C') THEN
870: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
871: || ' sched date '
872: ||x_atp_rec_out.ship_date.count);
873: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
874: || ' SD '||x_atp_supply_demand.level.count);
875: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
876: || ' period '||x_atp_period.level.count);
877: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '

Line 875: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '

871: || ' sched date '
872: ||x_atp_rec_out.ship_date.count);
873: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
874: || ' SD '||x_atp_supply_demand.level.count);
875: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
876: || ' period '||x_atp_period.level.count);
877: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
878: || ' details '||x_atp_details.level.count)
879: ;

Line 877: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '

873: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
874: || ' SD '||x_atp_supply_demand.level.count);
875: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
876: || ' period '||x_atp_period.level.count);
877: msc_sch_wb.atp_debug('UNDEMAND_ORDERS '
878: || ' details '||x_atp_details.level.count)
879: ;
880: END IF;
881: end if;

Line 886: msc_sch_wb.atp_debug(' Exception in undemand_orders '

882:
883: EXCEPTION
884: WHEN OTHERS THEN
885: IF PG_DEBUG in ('Y', 'C') THEN
886: msc_sch_wb.atp_debug(' Exception in undemand_orders '
887: ||Substr(Sqlerrm,1,100));
888: END IF;
889: x_return_status := 'E';
890: x_msg_data := Substr(Sqlerrm,1,100);

Line 913: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );

909: BEGIN
910: order_sch_wb.debug_session_id := p_session_id;
911: -- need to remember the original qty ordered before undemanding
912: IF PG_DEBUG in ('Y', 'C') THEN
913: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
914: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
915: into l_time
916: from dual;
917: msc_sch_wb.atp_debug( 'RESCHEDULE: BEGIN ' || l_time);

Line 917: msc_sch_wb.atp_debug( 'RESCHEDULE: BEGIN ' || l_time);

913: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
914: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
915: into l_time
916: from dual;
917: msc_sch_wb.atp_debug( 'RESCHEDULE: BEGIN ' || l_time);
918: END IF;
919:
920:
921: select quantity_ordered, order_line_id, session_id

Line 931: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );

927: where session_id = p_session_id
928: and status_flag =1 ;
929:
930: IF PG_DEBUG in ('Y', 'C') THEN
931: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
932: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
933: into l_time
934: from dual;
935: msc_sch_wb.atp_debug( 'RESCHEDULE: b4 undemand_orders ' || l_time);

Line 935: msc_sch_wb.atp_debug( 'RESCHEDULE: b4 undemand_orders ' || l_time);

931: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
932: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
933: into l_time
934: from dual;
935: msc_sch_wb.atp_debug( 'RESCHEDULE: b4 undemand_orders ' || l_time);
936: END IF;
937:
938: undemand_orders(p_session_id, x_msg_count, x_msg_data, x_return_status);
939:

Line 941: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );

937:
938: undemand_orders(p_session_id, x_msg_count, x_msg_data, x_return_status);
939:
940: IF PG_DEBUG in ('Y', 'C') THEN
941: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
942: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
943: into l_time
944: from dual;
945: msc_sch_wb.atp_debug( 'RESCHEDULE: after undemand_orders ' || l_time);

Line 945: msc_sch_wb.atp_debug( 'RESCHEDULE: after undemand_orders ' || l_time);

941: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
942: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
943: into l_time
944: from dual;
945: msc_sch_wb.atp_debug( 'RESCHEDULE: after undemand_orders ' || l_time);
946: END IF;
947: update_schedule_qties(p_atp_qty_ordered_temp,
948: l_return_status,
949: l_error_message);

Line 953: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );

949: l_error_message);
950:
951: IF l_return_status <> 'E' THEN
952: IF PG_DEBUG in ('Y', 'C') THEN
953: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
954: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
955: into l_time
956: from dual;
957: msc_sch_wb.atp_debug( 'RESCHEDULE: b4 schedule_orders ' || l_time);

Line 957: msc_sch_wb.atp_debug( 'RESCHEDULE: b4 schedule_orders ' || l_time);

953: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
954: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
955: into l_time
956: from dual;
957: msc_sch_wb.atp_debug( 'RESCHEDULE: b4 schedule_orders ' || l_time);
958: END IF;
959:
960: schedule_orders(p_session_id, x_msg_count, x_msg_data, x_return_status);
961:

Line 963: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );

959:
960: schedule_orders(p_session_id, x_msg_count, x_msg_data, x_return_status);
961:
962: IF PG_DEBUG in ('Y', 'C') THEN
963: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
964: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
965: into l_time
966: from dual;
967: msc_sch_wb.atp_debug( 'RESCHEDULE: after schedule_orders ' || l_time);

Line 967: msc_sch_wb.atp_debug( 'RESCHEDULE: after schedule_orders ' || l_time);

963: msc_sch_wb.atp_debug('MSC_BAL_UTILS.reschedule ' );
964: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
965: into l_time
966: from dual;
967: msc_sch_wb.atp_debug( 'RESCHEDULE: after schedule_orders ' || l_time);
968: END IF;
969: ELSE
970: IF PG_DEBUG in ('Y', 'C') THEN
971: msc_sch_wb.atp_debug('RESCHEDULE: ' || ' error is update_qty '|| l_error_message);

Line 971: msc_sch_wb.atp_debug('RESCHEDULE: ' || ' error is update_qty '|| l_error_message);

967: msc_sch_wb.atp_debug( 'RESCHEDULE: after schedule_orders ' || l_time);
968: END IF;
969: ELSE
970: IF PG_DEBUG in ('Y', 'C') THEN
971: msc_sch_wb.atp_debug('RESCHEDULE: ' || ' error is update_qty '|| l_error_message);
972: END IF;
973: END IF;
974:
975:

Line 992: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties status_flag = 1 rec are '|| l_count);

988: INTO l_count
989: from mrp_atp_schedule_temp
990: where session_id = p_atp_qty_ordered_temp.session_id(1)
991: and status_flag = 1;
992: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties status_flag = 1 rec are '|| l_count);
993:
994: l_count := 0;
995: select count(*)
996: INTO l_count

Line 1000: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties status_flag = 2 rec are '|| l_count);

996: INTO l_count
997: from mrp_atp_schedule_temp
998: where session_id = p_atp_qty_ordered_temp.session_id(1)
999: and status_flag = 2;
1000: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties status_flag = 2 rec are '|| l_count);
1001:
1002: l_count := 0;
1003: select count(*)
1004: INTO l_count

Line 1007: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties TOTAL rec are '|| l_count);

1003: select count(*)
1004: INTO l_count
1005: from mrp_atp_schedule_temp
1006: where session_id = p_atp_qty_ordered_temp.session_id(1);
1007: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties TOTAL rec are '|| l_count);
1008:
1009: END IF;
1010:
1011: FORALL lCounter IN 1 .. p_atp_qty_ordered_temp.order_line_id.COUNT

Line 1020: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties ' ||p_atp_qty_ordered_temp.order_line_id.COUNT);

1016: and order_line_id = p_atp_qty_ordered_temp.order_line_id(lCounter)
1017: and status_flag = 2 ;
1018:
1019: IF PG_DEBUG in ('Y', 'C') THEN
1020: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties ' ||p_atp_qty_ordered_temp.order_line_id.COUNT);
1021: l_count := 0;
1022: select count(*)
1023: INTO l_count
1024: from mrp_atp_schedule_temp

Line 1026: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties TOTAL rec are '|| l_count);

1022: select count(*)
1023: INTO l_count
1024: from mrp_atp_schedule_temp
1025: where session_id = p_atp_qty_ordered_temp.session_id(1);
1026: msc_sch_wb.atp_debug('MSC_BAL_UTILS.update_schedule_qties TOTAL rec are '|| l_count);
1027: END IF;
1028:
1029:
1030: EXCEPTION

Line 1069: msc_sch_wb.atp_debug(' Begin MSC_BAL_UTILS.commit_schedule session_id '

1065:
1066: BEGIN
1067: order_sch_wb.debug_session_id := p_session_id;
1068: IF PG_DEBUG in ('Y', 'C') THEN
1069: msc_sch_wb.atp_debug(' Begin MSC_BAL_UTILS.commit_schedule session_id '
1070: || p_session_id);
1071: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );
1072: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1073: into l_time

Line 1071: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );

1067: order_sch_wb.debug_session_id := p_session_id;
1068: IF PG_DEBUG in ('Y', 'C') THEN
1069: msc_sch_wb.atp_debug(' Begin MSC_BAL_UTILS.commit_schedule session_id '
1070: || p_session_id);
1071: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );
1072: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1073: into l_time
1074: from dual;
1075: msc_sch_wb.atp_debug( 'cmt_schedule begin ' || l_time);

Line 1075: msc_sch_wb.atp_debug( 'cmt_schedule begin ' || l_time);

1071: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );
1072: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1073: into l_time
1074: from dual;
1075: msc_sch_wb.atp_debug( 'cmt_schedule begin ' || l_time);
1076: END IF;
1077: open records_exist;
1078: fetch records_exist into l_records_exist;
1079: close records_exist;

Line 1105: msc_sch_wb.atp_debug('msc_bal_utils: In Commit_schedule: undemanding orders');

1101: end if;
1102:
1103: end if;
1104: IF PG_DEBUG in ('Y', 'C') THEN
1105: msc_sch_wb.atp_debug('msc_bal_utils: In Commit_schedule: undemanding orders');
1106: END IF;
1107:
1108: select quantity_ordered, order_line_id, session_id
1109: bulk collect into

Line 1123: msc_sch_wb.atp_debug('msc_bal_utils: In Commit_schedule ' ||

1119: l_error_message);
1120:
1121: IF l_return_status <> 'E' THEN
1122: IF PG_DEBUG in ('Y', 'C') THEN
1123: msc_sch_wb.atp_debug('msc_bal_utils: In Commit_schedule ' ||
1124: ' calling get_atp_result ');
1125: END IF;
1126: msc_sch_wb.get_atp_result(p_session_id, 2, 2,
1127: x_msg_count,x_msg_data,

Line 1126: msc_sch_wb.get_atp_result(p_session_id, 2, 2,

1122: IF PG_DEBUG in ('Y', 'C') THEN
1123: msc_sch_wb.atp_debug('msc_bal_utils: In Commit_schedule ' ||
1124: ' calling get_atp_result ');
1125: END IF;
1126: msc_sch_wb.get_atp_result(p_session_id, 2, 2,
1127: x_msg_count,x_msg_data,
1128: x_return_status);
1129: IF PG_DEBUG in ('Y', 'C') THEN
1130: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );

Line 1130: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );

1126: msc_sch_wb.get_atp_result(p_session_id, 2, 2,
1127: x_msg_count,x_msg_data,
1128: x_return_status);
1129: IF PG_DEBUG in ('Y', 'C') THEN
1130: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );
1131: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1132: into l_time
1133: from dual;
1134: msc_sch_wb.atp_debug( 'cmt_schedule: after call to atp ' || l_time);

Line 1134: msc_sch_wb.atp_debug( 'cmt_schedule: after call to atp ' || l_time);

1130: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule ' );
1131: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1132: into l_time
1133: from dual;
1134: msc_sch_wb.atp_debug( 'cmt_schedule: after call to atp ' || l_time);
1135: END IF;
1136: IF x_return_status <>'S' THEN
1137: IF PG_DEBUG in ('Y', 'C') THEN
1138: msc_sch_wb.atp_debug('MSC_BAL_UTILS.commit_schedule ' ||

Line 1138: msc_sch_wb.atp_debug('MSC_BAL_UTILS.commit_schedule ' ||

1134: msc_sch_wb.atp_debug( 'cmt_schedule: after call to atp ' || l_time);
1135: END IF;
1136: IF x_return_status <>'S' THEN
1137: IF PG_DEBUG in ('Y', 'C') THEN
1138: msc_sch_wb.atp_debug('MSC_BAL_UTILS.commit_schedule ' ||
1139: ' sth wrong in get_atp_results'
1140: || x_msg_data);
1141: END IF;
1142: return; -- sth wrong with atp engine

Line 1153: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule: calling OE ' );

1149: p_appl_id);
1150: mo_global.init('ONT'); -- MOAC changes
1151:
1152: IF PG_DEBUG in ('Y', 'C') THEN
1153: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule: calling OE ' );
1154: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1155: into l_time
1156: from dual;
1157: msc_sch_wb.atp_debug( 'cmt_schedule: calling OM BEGIN ' || l_time);

Line 1157: msc_sch_wb.atp_debug( 'cmt_schedule: calling OM BEGIN ' || l_time);

1153: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule: calling OE ' );
1154: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1155: into l_time
1156: from dual;
1157: msc_sch_wb.atp_debug( 'cmt_schedule: calling OM BEGIN ' || l_time);
1158: END IF;
1159: msc_bal_utils.call_oe_api(p_session_id ,
1160: x_msg_count ,
1161: x_msg_data ,

Line 1165: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule: calling OE ' );

1161: x_msg_data ,
1162: x_return_status
1163: );
1164: IF PG_DEBUG in ('Y', 'C') THEN
1165: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule: calling OE ' );
1166: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1167: into l_time
1168: from dual;
1169: msc_sch_wb.atp_debug( 'cmt_schedule: calling OM DONE ' || l_time);

Line 1169: msc_sch_wb.atp_debug( 'cmt_schedule: calling OM DONE ' || l_time);

1165: msc_sch_wb.atp_debug('MSC_BAL_UTILS.cmt_schedule: calling OE ' );
1166: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1167: into l_time
1168: from dual;
1169: msc_sch_wb.atp_debug( 'cmt_schedule: calling OM DONE ' || l_time);
1170: msc_sch_wb.atp_debug( ' cmt_schedule : x_msg_data ' || x_msg_data);
1171: END IF;
1172: IF x_return_status <>'S' THEN -- from call_oe_api
1173: g_om_status := x_return_status;

Line 1170: msc_sch_wb.atp_debug( ' cmt_schedule : x_msg_data ' || x_msg_data);

1166: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1167: into l_time
1168: from dual;
1169: msc_sch_wb.atp_debug( 'cmt_schedule: calling OM DONE ' || l_time);
1170: msc_sch_wb.atp_debug( ' cmt_schedule : x_msg_data ' || x_msg_data);
1171: END IF;
1172: IF x_return_status <>'S' THEN -- from call_oe_api
1173: g_om_status := x_return_status;
1174: g_om_req_id := to_number(x_msg_data);

Line 1177: msc_sch_wb.atp_debug('MSC_BAL_UTILS.call_oe_api in cmt_schedule'||

1173: g_om_status := x_return_status;
1174: g_om_req_id := to_number(x_msg_data);
1175:
1176: IF PG_DEBUG in ('Y', 'C') THEN
1177: msc_sch_wb.atp_debug('MSC_BAL_UTILS.call_oe_api in cmt_schedule'||
1178: x_msg_data);
1179: END IF;
1180: -- we need to let forms know that OM failed
1181: if (p_tcf) then

Line 1183: msc_sch_wb.atp_debug(' tcf is on x_return_status ' || x_return_status);

1179: END IF;
1180: -- we need to let forms know that OM failed
1181: if (p_tcf) then
1182:
1183: msc_sch_wb.atp_debug(' tcf is on x_return_status ' || x_return_status);
1184: -- call pipe api to send a message that OM failed
1185: if x_return_status = 'OMERROR' then
1186: msc_sch_wb.pipe_utility(p_session_id,
1187: 'OMERROR',

Line 1186: msc_sch_wb.pipe_utility(p_session_id,

1182:
1183: msc_sch_wb.atp_debug(' tcf is on x_return_status ' || x_return_status);
1184: -- call pipe api to send a message that OM failed
1185: if x_return_status = 'OMERROR' then
1186: msc_sch_wb.pipe_utility(p_session_id,
1187: 'OMERROR',
1188: x_msg_data, -- this request_id
1189: pipe_msg_count,
1190: pipe_return_status,

Line 1197: msc_sch_wb.calc_exceptions(p_session_id,

1193: end if;
1194: MSC_ATPUI_UTIL.populate_mrp_atp_temp_tables(p_session_id,
1195: l_return_status,
1196: l_error_message);
1197: msc_sch_wb.calc_exceptions(p_session_id,
1198: x_return_status,
1199: x_msg_data,
1200: x_msg_count);
1201: commit; -- commit only for tcf because rollback of

Line 1215: msc_sch_wb.atp_debug('cmt_schedule: ' ||

1211: END IF; -- oe api returned success
1212: END IF; -- sth wrong with atp engine
1213: ELSE
1214: IF PG_DEBUG in ('Y', 'C') THEN
1215: msc_sch_wb.atp_debug('cmt_schedule: ' ||
1216: ' error in update_qty '|| l_error_message);
1217: END IF;
1218: END IF;
1219:

Line 1262: msc_sch_wb.atp_debug('msc_bal_utils.schedule_orders');

1258: l_error_message VARCHAR2(100);
1259:
1260: BEGIN
1261: IF PG_DEBUG in ('Y', 'C') THEN
1262: msc_sch_wb.atp_debug('msc_bal_utils.schedule_orders');
1263: END IF;
1264:
1265: msc_sch_wb.get_atp_result(p_session_id, 2, 2,
1266: x_msg_count,x_msg_data,

Line 1265: msc_sch_wb.get_atp_result(p_session_id, 2, 2,

1261: IF PG_DEBUG in ('Y', 'C') THEN
1262: msc_sch_wb.atp_debug('msc_bal_utils.schedule_orders');
1263: END IF;
1264:
1265: msc_sch_wb.get_atp_result(p_session_id, 2, 2,
1266: x_msg_count,x_msg_data,
1267: x_return_status);
1268: IF PG_DEBUG in ('Y', 'C') THEN
1269: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')

Line 1272: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders atp engine call END ' || l_time);

1268: IF PG_DEBUG in ('Y', 'C') THEN
1269: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1270: into l_time
1271: from dual;
1272: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders atp engine call END ' || l_time);
1273: msc_sch_wb.atp_debug( ' x_return_status ' || x_return_status);
1274: END IF;
1275:
1276: IF x_return_status <> 'S' THEN

Line 1273: msc_sch_wb.atp_debug( ' x_return_status ' || x_return_status);

1269: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1270: into l_time
1271: from dual;
1272: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders atp engine call END ' || l_time);
1273: msc_sch_wb.atp_debug( ' x_return_status ' || x_return_status);
1274: END IF;
1275:
1276: IF x_return_status <> 'S' THEN
1277: IF PG_DEBUG in ('Y', 'C') THEN

Line 1278: msc_sch_wb.atp_debug('extend: '

1274: END IF;
1275:
1276: IF x_return_status <> 'S' THEN
1277: IF PG_DEBUG in ('Y', 'C') THEN
1278: msc_sch_wb.atp_debug('extend: '
1279: || ' schedule_orders : call to get_atp_result returned error '||x_msg_data);
1280: END IF;
1281: RETURN;
1282: ELSE

Line 1291: msc_sch_wb.atp_debug('MSC_BAL_UTILS.schedule_orders '||

1287: -- this will insure that the data inserted by atp is rollbacked
1288: -- but temp table data stays for further usage, such as reports and etc...
1289: if ( (p_tcf) OR (NVL(fnd_profile.value('MRP_ATP_PERSIST'), 'N')) = 'Y' ) then
1290: IF PG_DEBUG in ('Y', 'C') THEN
1291: msc_sch_wb.atp_debug('MSC_BAL_UTILS.schedule_orders '||
1292: ' calling populate_mrp_atp_temp_tables ' ||
1293: ' tcf is used ');
1294:
1295: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')

Line 1298: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders b4 call to populate_mrp_atp_temp_tables ' || l_time);

1294:
1295: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1296: into l_time
1297: from dual;
1298: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders b4 call to populate_mrp_atp_temp_tables ' || l_time);
1299: END IF;
1300: MSC_ATPUI_UTIL.populate_mrp_atp_temp_tables(p_session_id,
1301: l_return_status,
1302: l_error_message);

Line 1307: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders after call to populate_mrp_atp_temp_tables ' || l_time);

1303: IF PG_DEBUG in ('Y', 'C') THEN
1304: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1305: into l_time
1306: from dual;
1307: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders after call to populate_mrp_atp_temp_tables ' || l_time);
1308: END IF;
1309:
1310: IF l_return_status <> 'S' THEN
1311: IF PG_DEBUG in ('Y', 'C') THEN

Line 1312: msc_sch_wb.atp_debug('MSC_BAL_UTILS.schedule_orders '||

1308: END IF;
1309:
1310: IF l_return_status <> 'S' THEN
1311: IF PG_DEBUG in ('Y', 'C') THEN
1312: msc_sch_wb.atp_debug('MSC_BAL_UTILS.schedule_orders '||
1313: 'sth wrong in populate_mrp_atp_temp_tables ' ||
1314: l_error_message);
1315: END IF;
1316: END IF;

Line 1324: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders b4 call to calc_exceptions ' || l_time);

1320: IF PG_DEBUG in ('Y', 'C') THEN
1321: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1322: into l_time
1323: from dual;
1324: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders b4 call to calc_exceptions ' || l_time);
1325: END IF;
1326: msc_sch_wb.calc_exceptions(p_session_id,
1327: x_return_status,
1328: x_msg_data,

Line 1326: msc_sch_wb.calc_exceptions(p_session_id,

1322: into l_time
1323: from dual;
1324: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders b4 call to calc_exceptions ' || l_time);
1325: END IF;
1326: msc_sch_wb.calc_exceptions(p_session_id,
1327: x_return_status,
1328: x_msg_data,
1329: x_msg_count);
1330: if ( (p_tcf) OR (NVL(fnd_profile.value('MRP_ATP_PERSIST'), 'N')) = 'Y' )then

Line 1338: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders after call to calc_exceptions ' || l_time);

1334: IF PG_DEBUG in ('Y', 'C') THEN
1335: select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS')
1336: into l_time
1337: from dual;
1338: msc_sch_wb.atp_debug( ' MSC_BAL_UTILS.schedule_orders after call to calc_exceptions ' || l_time);
1339: END IF;
1340:
1341: IF x_return_status <> 'S' THEN
1342: IF PG_DEBUG in ('Y', 'C') THEN

Line 1343: msc_sch_wb.atp_debug('extend: ' ||

1339: END IF;
1340:
1341: IF x_return_status <> 'S' THEN
1342: IF PG_DEBUG in ('Y', 'C') THEN
1343: msc_sch_wb.atp_debug('extend: ' ||
1344: ' schedule_orders : call to calc_exceptions returned error '||x_msg_data);
1345: END IF;
1346: ELSE
1347: if (p_tcf) then

Line 1386: msc_sch_wb.atp_debug('extend: ' || ' Exception in execute command '||substr(sqlerrm,1,100));

1382:
1383: EXCEPTION
1384: WHEN OTHERS THEN
1385: IF PG_DEBUG in ('Y', 'C') THEN
1386: msc_sch_wb.atp_debug('extend: ' || ' Exception in execute command '||substr(sqlerrm,1,100));
1387: END IF;
1388: x_return_status := 'E';
1389: x_msg_data := substr(sqlerrm,1,100);
1390: END execute_command;

Line 1483: msc_sch_wb.atp_debug(' call_oe_api: ' ||

1479: p_so_table(j).Shipping_Method_Code,
1480: p_so_table(j).Firm_Demand_Flag;
1481: EXIT WHEN mast_cursor%notfound;
1482: IF PG_DEBUG in ('Y', 'C') THEN
1483: msc_sch_wb.atp_debug(' call_oe_api: ' ||
1484: ' Fetching record to pass to OE: line_id '||p_so_table(j).line_id ||
1485: ' schedule_ship_date ' || p_so_table(j).Schedule_ship_date ||
1486: ' arrival_date ' || p_so_table(j).schedule_arrival_date||
1487: ' ship_from_org_id ' || p_so_table(j).ship_from_org_id ||

Line 1497: msc_sch_wb.atp_debug('call_oe_api: ' ||

1493:
1494: BEGIN
1495: -- setup OM debug file if ATP Debug is set to Yes
1496: IF PG_DEBUG in ('Y', 'C') THEN
1497: msc_sch_wb.atp_debug('call_oe_api: ' ||
1498: ' before calling Update_Scheduling_Results '
1499: ||p_so_table.count);
1500: msc_sch_wb.atp_debug( 'Initializing OM Debug file generation ');
1501:

Line 1500: msc_sch_wb.atp_debug( 'Initializing OM Debug file generation ');

1496: IF PG_DEBUG in ('Y', 'C') THEN
1497: msc_sch_wb.atp_debug('call_oe_api: ' ||
1498: ' before calling Update_Scheduling_Results '
1499: ||p_so_table.count);
1500: msc_sch_wb.atp_debug( 'Initializing OM Debug file generation ');
1501:
1502: select ltrim(rtrim(value))
1503: into l_dir
1504: from (select value from v$parameter2

Line 1515: msc_sch_wb.atp_debug( 'call_oe_api:OM debugging dir is ' || l_dir);

1511: from v$parameter
1512: where name = 'utl_file_dir';
1513: end if;
1514:
1515: msc_sch_wb.atp_debug( 'call_oe_api:OM debugging dir is ' || l_dir);
1516:
1517: fnd_profile.put('OE_DEBUG_LOG_DIRECTORY',l_dir);
1518: oe_debug_pub.debug_on;
1519: oe_debug_pub.initialize;

Line 1521: msc_sch_wb.atp_debug( 'call_oe_api:OM debugging done setdebuglevel');

1517: fnd_profile.put('OE_DEBUG_LOG_DIRECTORY',l_dir);
1518: oe_debug_pub.debug_on;
1519: oe_debug_pub.initialize;
1520: oe_debug_pub.setdebuglevel(5);
1521: msc_sch_wb.atp_debug( 'call_oe_api:OM debugging done setdebuglevel');
1522: l_file_val := OE_DEBUG_PUB.Set_Debug_Mode('FILE');
1523:
1524:
1525: msc_sch_wb.atp_debug('call_oe_api: ' ||

Line 1525: msc_sch_wb.atp_debug('call_oe_api: ' ||

1521: msc_sch_wb.atp_debug( 'call_oe_api:OM debugging done setdebuglevel');
1522: l_file_val := OE_DEBUG_PUB.Set_Debug_Mode('FILE');
1523:
1524:
1525: msc_sch_wb.atp_debug('call_oe_api: ' ||
1526: ' OM debugging l_file_val is ' || l_file_val);
1527: oe_debug_pub.add('CALLING FROM ATP',1);
1528:
1529:

Line 1532: msc_sch_wb.atp_debug( ' There is something wrong with OE debug

1528:
1529:
1530: END IF;
1531: EXCEPTION when others then
1532: msc_sch_wb.atp_debug( ' There is something wrong with OE debug
1533: file generation. No OM debug file will
1534: be created ');
1535: msc_sch_wb.atp_debug(' The error is '||Substr(Sqlerrm,1,100));
1536: END;

Line 1535: msc_sch_wb.atp_debug(' The error is '||Substr(Sqlerrm,1,100));

1531: EXCEPTION when others then
1532: msc_sch_wb.atp_debug( ' There is something wrong with OE debug
1533: file generation. No OM debug file will
1534: be created ');
1535: msc_sch_wb.atp_debug(' The error is '||Substr(Sqlerrm,1,100));
1536: END;
1537:
1538: SELECT oe_msg_request_id_s.nextval
1539: INTO l_request_id

Line 1548: msc_sch_wb.atp_debug('in call_oe_api: '

1544: l_request_id,
1545: x_return_status);
1546:
1547: IF PG_DEBUG in ('Y', 'C') THEN
1548: msc_sch_wb.atp_debug('in call_oe_api: '
1549: || ' after calling Update_Results_from_backlog_wb '
1550: ||x_return_status||' '|| x_return_status);
1551: END IF;
1552: IF x_return_status = fnd_api.G_RET_STS_SUCCESS THEN

Line 1554: msc_sch_wb.atp_debug('call_oe_api: ' ||

1550: ||x_return_status||' '|| x_return_status);
1551: END IF;
1552: IF x_return_status = fnd_api.G_RET_STS_SUCCESS THEN
1553: IF PG_DEBUG in ('Y', 'C') THEN
1554: msc_sch_wb.atp_debug('call_oe_api: ' ||
1555: ' Committing session after call to OE_API'
1556: ||x_return_status);
1557: END IF;
1558: COMMIT;

Line 1561: msc_sch_wb.atp_debug('in call_oe_api: '

1557: END IF;
1558: COMMIT;
1559: ELSE -- om failed
1560: IF PG_DEBUG in ('Y', 'C') THEN
1561: msc_sch_wb.atp_debug('in call_oe_api: '
1562: || ' call to OE_AP errored out x_return_status '
1563: ||x_return_status );
1564: END IF;
1565: -- if error status is W or E

Line 1584: msc_sch_wb.atp_debug(' excp in call_oe_api '||Substr(Sqlerrm,1,100));

1580: EXCEPTION
1581: WHEN OTHERS THEN
1582: x_return_status := 'E';
1583: IF PG_DEBUG in ('Y', 'C') THEN
1584: msc_sch_wb.atp_debug(' excp in call_oe_api '||Substr(Sqlerrm,1,100));
1585: END IF;
1586: END call_oe_api;
1587:
1588: PROCEDURE call_oe_api (p_atp_rec MRP_ATP_PUB.atp_rec_typ,

Line 1599: msc_sch_wb.atp_debug(' call_oe_api '||p_atp_rec.identifier(j)||' '||p_atp_rec.ship_date(j)||' '||

1595: BEGIN
1596:
1597: FOR j IN 1..p_atp_rec.inventory_item_id.COUNT LOOP
1598: IF PG_DEBUG in ('Y', 'C') THEN
1599: msc_sch_wb.atp_debug(' call_oe_api '||p_atp_rec.identifier(j)||' '||p_atp_rec.ship_date(j)||' '||
1600: p_atp_rec.source_organization_id(j)||' '||p_atp_rec.error_code(j));
1601: END IF;
1602:
1603: -- cnazarma bug #2605828 only need to select eligible lines

Line 1619: msc_sch_wb.atp_debug('call_oe_api: ' || ' Count of records to pass to OE = '||counter);

1615: END IF;
1616: END LOOP;
1617:
1618: IF PG_DEBUG in ('Y', 'C') THEN
1619: msc_sch_wb.atp_debug('call_oe_api: ' || ' Count of records to pass to OE = '||counter);
1620: END IF;
1621: IF counter > 0 THEN
1622: oe_order_sch_util.Update_Results_from_backlog_wb
1623: ( mast_table

Line 1629: msc_sch_wb.atp_debug('call_oe_api: ' || ' after calling Update_Results_from_backlog_wb II '

1625: , x_msg_data
1626: , x_return_status);
1627:
1628: IF PG_DEBUG in ('Y', 'C') THEN
1629: msc_sch_wb.atp_debug('call_oe_api: ' || ' after calling Update_Results_from_backlog_wb II '
1630: ||x_return_status||' '||x_msg_data);
1631: END IF;
1632:
1633: IF x_return_status = fnd_api.G_RET_STS_SUCCESS THEN

Line 1635: msc_sch_wb.atp_debug('call_oe_api: ' || ' Committing session after call to OE_API II '||x_return_status);

1631: END IF;
1632:
1633: IF x_return_status = fnd_api.G_RET_STS_SUCCESS THEN
1634: IF PG_DEBUG in ('Y', 'C') THEN
1635: msc_sch_wb.atp_debug('call_oe_api: ' || ' Committing session after call to OE_API II '||x_return_status);
1636: END IF;
1637: COMMIT;
1638: ELSE
1639: IF PG_DEBUG in ('Y', 'C') THEN

Line 1640: msc_sch_wb.atp_debug('call_oe_api: ' || ' rolling back session after call to OE_API II '||x_return_status);

1636: END IF;
1637: COMMIT;
1638: ELSE
1639: IF PG_DEBUG in ('Y', 'C') THEN
1640: msc_sch_wb.atp_debug('call_oe_api: ' || ' rolling back session after call to OE_API II '||x_return_status);
1641: END IF;
1642: x_return_status := 'E';
1643: x_msg_data := 'Unexpected error in oe_order_sch_util.Update_Results_from_backlog_wb II ';
1644: ROLLBACK;

Line 1651: msc_sch_wb.atp_debug(' excp in call_oe_api II '||Substr(Sqlerrm,1,100));

1647:
1648: EXCEPTION
1649: WHEN OTHERS THEN
1650: IF PG_DEBUG in ('Y', 'C') THEN
1651: msc_sch_wb.atp_debug(' excp in call_oe_api II '||Substr(Sqlerrm,1,100));
1652: END IF;
1653: END call_oe_api;
1654:
1655: PROCEDURE update_seq(p_session_id NUMBER,

Line 1682: msc_sch_wb.atp_debug(' entered update_seq '

1678:
1679:
1680: x_return_status := 'S';
1681: IF PG_DEBUG in ('Y', 'C') THEN
1682: msc_sch_wb.atp_debug(' entered update_seq '
1683: ||p_seq_alter.order_line_id.COUNT);
1684: END IF;
1685:
1686: FOR j IN 1..p_seq_alter.order_line_id.COUNT LOOP

Line 1723: msc_sch_wb.atp_debug(' order_line_id.COUNT is '

1719: where status_flag = -88
1720: and session_id = p_session_id;
1721:
1722: IF PG_DEBUG in ('Y', 'C') THEN
1723: msc_sch_wb.atp_debug(' order_line_id.COUNT is '
1724: || p_seq_alter.order_line_id.count ||
1725: ' and number of rec in table is '
1726: || l_num_rec );
1727: END IF;

Line 1741: msc_sch_wb.atp_debug('IN the new LOOP: and a is '|| a ||

1737: p_seq_alter.orig_seq_num(a),
1738: p_seq_alter.seq_diff(a);
1739:
1740: IF PG_DEBUG in ('Y', 'C') THEN
1741: msc_sch_wb.atp_debug('IN the new LOOP: and a is '|| a ||
1742: ' new_seq from chopa_table ' ||p_seq_alter.seq_num(a) ||
1743: 'order_line_id ' || p_seq_alter.order_line_id(a) ||
1744: ' orig_seq_num ' || p_seq_alter.orig_seq_num(a) ||
1745: ' diff ' || p_seq_alter.seq_diff(a));

Line 1779: msc_sch_wb.atp_debug(' record_firm_filter is ' || record_firm_filter.order_line_id.COUNT);

1775: END IF;
1776:
1777: END LOOP;
1778:
1779: msc_sch_wb.atp_debug(' record_firm_filter is ' || record_firm_filter.order_line_id.COUNT);
1780:
1781: FOR j IN 1..p_seq_alter.order_line_id.COUNT LOOP
1782: IF p_seq_alter.order_line_id(j) IS NOT NULL THEN
1783: select sequence_number, sequence_number + p_seq_alter.seq_diff(j)

Line 1806: msc_sch_wb.atp_debug('update_seq: ' || ' old seq '||l_old_seq||' new_seq '||l_new_seq);

1802: l_new_seq := l_max_seq;
1803: END IF;
1804:
1805: IF PG_DEBUG in ('Y', 'C') THEN
1806: msc_sch_wb.atp_debug('update_seq: ' || ' old seq '||l_old_seq||' new_seq '||l_new_seq);
1807: END IF;
1808:
1809:
1810:

Line 1820: msc_sch_wb.atp_debug('update_seq: ' || ' b4 update ');

1816: -- select all affected nodes including the changed node
1817: -- second decode. depening on the direction of change, update the
1818: -- affected nodes.
1819: IF PG_DEBUG in ('Y', 'C') THEN
1820: msc_sch_wb.atp_debug('update_seq: ' || ' b4 update ');
1821: END IF;
1822:
1823: update mrp_atp_schedule_temp mast
1824: set mast.sequence_number = p_seq_alter.seq_num(j)

Line 1863: msc_sch_wb.atp_debug('IN THE LOOP FOR FIRM: ' || ' 1 after update '||

1859: mast.session_id = p_session_id
1860: AND mast.order_line_id = record_firm_filter.order_line_id(b) ;
1861:
1862: IF PG_DEBUG in ('Y', 'C') THEN
1863: msc_sch_wb.atp_debug('IN THE LOOP FOR FIRM: ' || ' 1 after update '||
1864: ' seq num '||record_firm_filter.seq_num(b)||
1865: ' line_id ' || record_firm_filter.order_line_id(b) || ' ' ||SQL%ROWCOUNT);
1866: END IF;
1867:

Line 1879: msc_sch_wb.atp_debug('IN THE LOOP FOR FIRM: ' || ' 2 after update '||SQL%ROWCOUNT);

1875: and mast.order_line_id <> record_firm_filter.order_line_id(b)
1876: and mast.session_id = p_session_id;
1877:
1878: IF PG_DEBUG in ('Y', 'C') THEN
1879: msc_sch_wb.atp_debug('IN THE LOOP FOR FIRM: ' || ' 2 after update '||SQL%ROWCOUNT);
1880: END IF;
1881: END LOOP;
1882:
1883:

Line 1885: msc_sch_wb.atp_debug('update_seq: ' || ' after update '||SQL%ROWCOUNT);

1881: END LOOP;
1882:
1883:
1884: IF PG_DEBUG in ('Y', 'C') THEN
1885: msc_sch_wb.atp_debug('update_seq: ' || ' after update '||SQL%ROWCOUNT);
1886: END IF;
1887: END IF;
1888:
1889: END LOOP;

Line 1897: msc_sch_wb.atp_debug('Excp in update_seq '||Substr(Sqlerrm,1,80));

1893:
1894: EXCEPTION
1895: WHEN OTHERS THEN
1896: IF PG_DEBUG in ('Y', 'C') THEN
1897: msc_sch_wb.atp_debug('Excp in update_seq '||Substr(Sqlerrm,1,80));
1898: END IF;
1899: x_msg_data := 'Excp in update_seq '||Substr(Sqlerrm,1,80);
1900: x_return_status := 'E';
1901: