64: -- All the completed operations will not be re-scheduled
65: --
66: -- Parameters:
67: -- + p_initMsgList: Clear the message stack before processing?
68: -- True (fnd_api.g_true) should be passed
69: -- unless relevant messages are being saved
70: -- on the stack. This value defaults to true.
71: --
72: -- + p_endDebug: Pass true (fnd_api.g_true) unless the
68: -- True (fnd_api.g_true) should be passed
69: -- unless relevant messages are being saved
70: -- on the stack. This value defaults to true.
71: --
72: -- + p_endDebug: Pass true (fnd_api.g_true) unless the
73: -- debug session will be ended at a later
74: -- point by the caller. This value defaults
75: -- to true
76: --
129: -- pass -JOB_OP_SEQ_NUM if it is the current op
130: --
131: -- + p_subGrpNum: This parameter is currently ignored
132: --
133: -- + x_returnStatus:fnd_api.g_ret_sts_success if the entity
134: -- was scheduled successfully.
135: --
136: -- + x_errorMsg: The error message. The error message will also
137: -- be left on the stack.
207: wip_logger.entryPoint(
208: p_procName => 'wsm_infinite_scheduler_pvt.schedule',
209: p_params => l_params,
210: x_returnStatus => x_returnStatus);
211: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
212: raise fnd_api.g_exc_unexpected_error;
213: end if;
214: end if;
215: x_returnStatus := fnd_api.g_ret_sts_success;
208: p_procName => 'wsm_infinite_scheduler_pvt.schedule',
209: p_params => l_params,
210: x_returnStatus => x_returnStatus);
211: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
212: raise fnd_api.g_exc_unexpected_error;
213: end if;
214: end if;
215: x_returnStatus := fnd_api.g_ret_sts_success;
216:
211: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
212: raise fnd_api.g_exc_unexpected_error;
213: end if;
214: end if;
215: x_returnStatus := fnd_api.g_ret_sts_success;
216:
217: if(fnd_api.to_boolean(nvl(p_initMsgList, fnd_api.g_true))) then
218: fnd_msg_pub.initialize;
219: end if;
213: end if;
214: end if;
215: x_returnStatus := fnd_api.g_ret_sts_success;
216:
217: if(fnd_api.to_boolean(nvl(p_initMsgList, fnd_api.g_true))) then
218: fnd_msg_pub.initialize;
219: end if;
220:
221: if (l_logLevel <= wip_constants.full_logging) then
410: x_opTbl => l_opTbl,
411: x_returnStatus => x_returnStatus,
412: x_returnCode => l_retCode,
413: p_new_job => p_new_job);
414: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
415: raise fnd_api.g_exc_unexpected_error;
416: end if;
417: -- BA: BUG3195950
418: if(l_retCode = 1) then
411: x_returnStatus => x_returnStatus,
412: x_returnCode => l_retCode,
413: p_new_job => p_new_job);
414: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
415: raise fnd_api.g_exc_unexpected_error;
416: end if;
417: -- BA: BUG3195950
418: if(l_retCode = 1) then
419: x_errorMsg := 'Skip infinite scheduling for this job, no quantity.';
434: p_startDate => p_startDate,
435: p_endDate => p_endDate,
436: p_opSeqNum => l_opSeqNum,
437: p_resSeqNum => l_resSeqNum,
438: p_endDebug => fnd_api.g_false,
439: x_resTbls => l_resTbls,
440: x_returnStatus => x_returnStatus);
441: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
442: raise fnd_api.g_exc_unexpected_error;
437: p_resSeqNum => l_resSeqNum,
438: p_endDebug => fnd_api.g_false,
439: x_resTbls => l_resTbls,
440: x_returnStatus => x_returnStatus);
441: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
442: raise fnd_api.g_exc_unexpected_error;
443: end if;
444:
445: if (l_logLevel <= wip_constants.full_logging) then
438: p_endDebug => fnd_api.g_false,
439: x_resTbls => l_resTbls,
440: x_returnStatus => x_returnStatus);
441: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
442: raise fnd_api.g_exc_unexpected_error;
443: end if;
444:
445: if (l_logLevel <= wip_constants.full_logging) then
446: wip_logger.log('writing lot based job...', l_retStatus);
463: p_assignedUnits => l_assignedUnits,
464: x_resTbls => l_resTbls,
465: x_returnStatus => x_returnStatus,
466: x_returnCode => l_retCode );
467: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
468: raise fnd_api.g_exc_unexpected_error;
469: end if;
470:
471: l_stmt_num := 70;
464: x_resTbls => l_resTbls,
465: x_returnStatus => x_returnStatus,
466: x_returnCode => l_retCode );
467: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
468: raise fnd_api.g_exc_unexpected_error;
469: end if;
470:
471: l_stmt_num := 70;
472: if (l_logLevel <= wip_constants.trace_logging) then
474: p_procName => 'wsm_infinite_scheduler_pvt.schedule',
475: p_procReturnStatus => x_returnStatus,
476: p_msg => 'success',
477: x_returnStatus => l_retStatus);
478: if(fnd_api.to_boolean(nvl(p_endDebug, fnd_api.g_true))) then
479: wip_logger.cleanup(l_retStatus);
480: end if;
481: end if;
482:
483: exception
484:
485: when e_wsm_error then
486: rollback to SP_WSMIFS_0;
487: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
488: if(mrp_debug = 'Y') then
489: x_errorMsg := x_errorMsg || ' (# ' || l_stmt_num || ')';
490: end if;
491:
495: if(mrp_debug = 'Y') then
496: x_errorMsg := x_errorMsg || ' (# ' || l_stmt_num || ')';
497: end if;
498:
499: when fnd_api.g_exc_unexpected_error then
500: rollback to SP_WSMIFS_0;
501: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
502: wip_utilities.get_message_stack(
503: p_msg => x_errorMsg,
497: end if;
498:
499: when fnd_api.g_exc_unexpected_error then
500: rollback to SP_WSMIFS_0;
501: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
502: wip_utilities.get_message_stack(
503: p_msg => x_errorMsg,
504: p_delete_stack => fnd_api.g_false);
505: if (l_logLevel <= wip_constants.trace_logging) then
500: rollback to SP_WSMIFS_0;
501: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
502: wip_utilities.get_message_stack(
503: p_msg => x_errorMsg,
504: p_delete_stack => fnd_api.g_false);
505: if (l_logLevel <= wip_constants.trace_logging) then
506: wip_logger.exitPoint(
507: p_procName => 'wsm_infinite_scheduler_pvt.schedule',
508: p_procReturnStatus => x_returnStatus,
507: p_procName => 'wsm_infinite_scheduler_pvt.schedule',
508: p_procReturnStatus => x_returnStatus,
509: p_msg => 'error: ' || x_errorMsg,
510: x_returnStatus => l_retStatus);
511: if(fnd_api.to_boolean(nvl(p_endDebug, fnd_api.g_true))) then
512: wip_logger.cleanup(l_retStatus);
513: end if;
514: end if;
515: if(mrp_debug = 'Y') then
517: end if;
518:
519: when others then
520: rollback to SP_WSMIFS_0;
521: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
522: fnd_msg_pub.add_exc_msg(
523: p_pkg_name => 'wsm_infinite_scheduler_pvt',
524: p_procedure_name => 'schedule',
525: p_error_text => SQLERRM);
524: p_procedure_name => 'schedule',
525: p_error_text => SQLERRM);
526: wip_utilities.get_message_stack(
527: p_msg => x_errorMsg,
528: p_delete_stack => fnd_api.g_false);
529: if (l_logLevel <= wip_constants.trace_logging) then
530: wip_logger.exitPoint(
531: p_procName => 'wsm_infinite_scheduler_pvt.schedule',
532: p_procReturnStatus => x_returnStatus,
531: p_procName => 'wsm_infinite_scheduler_pvt.schedule',
532: p_procReturnStatus => x_returnStatus,
533: p_msg => 'unexp error: ' || x_errorMsg,
534: x_returnStatus => l_retStatus);
535: if(fnd_api.to_boolean(nvl(p_endDebug, fnd_api.g_true))) then
536: wip_logger.cleanup(l_retStatus);
537: end if;
538: end if;
539: if(mrp_debug = 'Y') then
849: p_procName => 'wsm_infinite_scheduler_pvt.wsmJobReader',
850: p_params => l_params,
851: x_returnStatus => l_retStatus);
852: end if;
853: x_returnStatus := fnd_api.g_ret_sts_success;
854: x_returnCode := 0; -- ADD: BUG3195950
855:
856: l_stat_num := 20;
857: l_hrUOM := fnd_profile.value('BOM:HOUR_UOM_CODE');
1219: end if;
1220: x_returnCode := 1;
1221: -- EA: BUG3195950
1222: when others then
1223: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1224: fnd_msg_pub.add_exc_msg(
1225: p_pkg_name => 'wsm_infinite_scheduler_pvt',
1226: p_procedure_name => 'wsmJobReader',
1227: p_error_text => SQLERRM || ' (reader #' || l_stat_num || ')' );
1323: p_procName => 'wsm_infinite_scheduler_pvt.wsmJobWriter',
1324: p_params => l_params,
1325: x_returnStatus => l_retStatus);
1326: end if;
1327: x_returnStatus := fnd_api.g_ret_sts_success;
1328:
1329: l_stat_num := 20;
1330: -- get the current job start/end date
1331: select wdj.scheduled_start_date,
2221:
2222: exception
2223:
2224: when others then
2225: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2226: fnd_msg_pub.add_exc_msg(
2227: p_pkg_name => 'wsm_infinite_scheduler_pvt',
2228: p_procedure_name => 'wsmJobWriter',
2229: p_error_text => SQLERRM || ' (writer #' || l_stat_num || ')' );