DBA Data[Home] [Help]

APPS.MSC_BAL_UTILS dependencies on MSC_BAL_UTILS

Line 1: PACKAGE BODY MSC_BAL_UTILS AS

1: PACKAGE BODY MSC_BAL_UTILS AS
2: /* $Header: MSCUBALB.pls 120.8 2007/12/14 07:31:47 sbnaik ship $ */
3: PG_DEBUG varchar2(1) := NVL(FND_PROFILE.value('MSC_ATP_DEBUG'), 'N');
4:
5: PROCEDURE extend( p_nodes IN OUT NoCopy mrp_bal_utils.mrp_oe_rec , extend_amount NUMBER );

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 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 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 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 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 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 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 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 979: PROCEDURE update_schedule_qties(p_atp_qty_ordered_temp IN MSC_BAL_UTILS.ATP_QTY_ORDERED_TYP,

975:
976: END reschedule ;
977:
978:
979: PROCEDURE update_schedule_qties(p_atp_qty_ordered_temp IN MSC_BAL_UTILS.ATP_QTY_ORDERED_TYP,
980: p_return_status out nocopy VARCHAR2,
981: p_error_message out nocopy VARCHAR2) IS
982: l_count NUMBER :=0;
983: BEGIN

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 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 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 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 1159: msc_bal_utils.call_oe_api(p_session_id ,

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 ,
1162: x_return_status
1163: );

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 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 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 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 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 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 1906: END MSC_BAL_UTILS;

1902: END update_seq;
1903:
1904:
1905:
1906: END MSC_BAL_UTILS;