DBA Data[Home] [Help]

APPS.WIP_INFINITE_SCHEDULER_PVT dependencies on WIP_CONSTANTS

Line 86: if (l_logLevel <= wip_constants.trace_logging) then

82: l_maxSchedSeqNum NUMBER;
83: l_schedMethod NUMBER;
84: begin
85: savepoint wipiscdb0;
86: if (l_logLevel <= wip_constants.trace_logging) then
87: l_params(1).paramName := 'p_orgID';
88: l_params(1).paramValue := p_orgID;
89: l_params(2).paramName := 'p_wipEntityID';
90: l_params(2).paramValue := p_wipEntityID;

Line 121: if (l_logLevel <= wip_constants.full_logging) then

117: if(fnd_api.to_boolean(nvl(p_initMsgList, fnd_api.g_true))) then
118: fnd_msg_pub.initialize;
119: end if;
120:
121: if (l_logLevel <= wip_constants.full_logging) then
122: wip_logger.log('reading job/schedule...', l_retStatus);
123: end if;
124: if(p_midPntMethod is not null) then
125: l_schedMethod := p_midPntMethod;

Line 127: l_schedMethod := wip_constants.midpoint;

123: end if;
124: if(p_midPntMethod is not null) then
125: l_schedMethod := p_midPntMethod;
126: elsif(p_opSeqNum is not null) then
127: l_schedMethod := wip_constants.midpoint;
128: elsif(p_startDate is not null) then
129: l_schedMethod := wip_constants.forwards;
130: else
131: l_schedMethod := wip_constants.backwards;

Line 129: l_schedMethod := wip_constants.forwards;

125: l_schedMethod := p_midPntMethod;
126: elsif(p_opSeqNum is not null) then
127: l_schedMethod := wip_constants.midpoint;
128: elsif(p_startDate is not null) then
129: l_schedMethod := wip_constants.forwards;
130: else
131: l_schedMethod := wip_constants.backwards;
132: end if;
133:

Line 131: l_schedMethod := wip_constants.backwards;

127: l_schedMethod := wip_constants.midpoint;
128: elsif(p_startDate is not null) then
129: l_schedMethod := wip_constants.forwards;
130: else
131: l_schedMethod := wip_constants.backwards;
132: end if;
133:
134: getMidPointInfo(p_midPntOpSeqNum => p_opSeqNum,
135: p_midPntResSeqNum => p_resSeqNum,

Line 170: if (l_logLevel <= wip_constants.full_logging) then

166: from wip_repetitive_schedules
167: where repetitive_schedule_id = p_repSchedID;
168: end if;
169: */
170: if (l_logLevel <= wip_constants.full_logging) then
171: wip_logger.log('scheduling job/schedule...', l_retStatus);
172: end if;
173:
174: wip_infResSched_grp.schedule(p_orgID => p_orgID,

Line 187: if (l_logLevel <= wip_constants.full_logging) then

183: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
184: raise fnd_api.g_exc_unexpected_error;
185: end if;
186:
187: if (l_logLevel <= wip_constants.full_logging) then
188: wip_logger.log('writing job/schedule...', l_retStatus);
189: end if;
190:
191: writeJobSchedule(p_wipEntityID => p_wipEntityID,

Line 208: if (l_logLevel <= wip_constants.trace_logging) then

204: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
205: raise fnd_api.g_exc_unexpected_error;
206: end if;
207:
208: if (l_logLevel <= wip_constants.trace_logging) then
209: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.schedule',
210: p_procReturnStatus => x_returnStatus,
211: p_msg => 'success',
212: x_returnStatus => l_retStatus);

Line 223: if (l_logLevel <= wip_constants.trace_logging) then

219: rollback to wipiscdb0;
220: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
221: wip_utilities.get_message_stack(p_msg => x_errorMsg,
222: p_delete_stack => fnd_api.g_false);
223: if (l_logLevel <= wip_constants.trace_logging) then
224: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.schedule',
225: p_procReturnStatus => x_returnStatus,
226: p_msg => 'error: ' || x_errorMsg,
227: x_returnStatus => l_retStatus);

Line 241: if (l_logLevel <= wip_constants.trace_logging) then

237: p_procedure_name => 'schedule',
238: p_error_text => SQLERRM);
239: wip_utilities.get_message_stack(p_msg => x_errorMsg,
240: p_delete_stack => fnd_api.g_false);
241: if (l_logLevel <= wip_constants.trace_logging) then
242: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.schedule',
243: p_procReturnStatus => x_returnStatus,
244: p_msg => 'unexp error: ' || x_errorMsg,
245: x_returnStatus => l_retStatus);

Line 266: if (l_logLevel <= wip_constants.trace_logging) then

262: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
263: l_params wip_logger.param_tbl_t;
264: l_retStatus VARCHAR2(1);
265: begin
266: if (l_logLevel <= wip_constants.trace_logging) then
267: l_params(1).paramName := 'p_midPntOpSeqNum';
268: l_params(1).paramValue := p_midPntOpSeqNum;
269: l_params(2).paramName := 'p_midPntResSeqNum';
270: l_params(2).paramValue := p_midPntResSeqNum;

Line 284: if(p_schedMethod in (wip_constants.forwards,

280: p_params => l_params,
281: x_returnStatus => l_retStatus);
282: end if;
283:
284: if(p_schedMethod in (wip_constants.forwards,
285: wip_constants.backwards,
286: wip_constants.midpoint)) then
287:
288: if(l_logLevel <= wip_constants.full_logging) then

Line 285: wip_constants.backwards,

281: x_returnStatus => l_retStatus);
282: end if;
283:
284: if(p_schedMethod in (wip_constants.forwards,
285: wip_constants.backwards,
286: wip_constants.midpoint)) then
287:
288: if(l_logLevel <= wip_constants.full_logging) then
289: wip_logger.log('entire job reschedule', l_retStatus);

Line 286: wip_constants.midpoint)) then

282: end if;
283:
284: if(p_schedMethod in (wip_constants.forwards,
285: wip_constants.backwards,
286: wip_constants.midpoint)) then
287:
288: if(l_logLevel <= wip_constants.full_logging) then
289: wip_logger.log('entire job reschedule', l_retStatus);
290: end if;

Line 288: if(l_logLevel <= wip_constants.full_logging) then

284: if(p_schedMethod in (wip_constants.forwards,
285: wip_constants.backwards,
286: wip_constants.midpoint)) then
287:
288: if(l_logLevel <= wip_constants.full_logging) then
289: wip_logger.log('entire job reschedule', l_retStatus);
290: end if;
291:
292: select min(operation_seq_num),

Line 300: elsif(p_schedMethod = wip_constants.midpoint_forwards) then

296: from wip_operations
297: where wip_entity_id = p_wipEntityID
298: and organization_id = p_orgID;
299:
300: elsif(p_schedMethod = wip_constants.midpoint_forwards) then
301:
302: if(l_logLevel <= wip_constants.full_logging) then
303: wip_logger.log('midpoint forward', l_retStatus);
304: end if;

Line 302: if(l_logLevel <= wip_constants.full_logging) then

298: and organization_id = p_orgID;
299:
300: elsif(p_schedMethod = wip_constants.midpoint_forwards) then
301:
302: if(l_logLevel <= wip_constants.full_logging) then
303: wip_logger.log('midpoint forward', l_retStatus);
304: end if;
305:
306: x_minOpSeqNum := p_midPntOpSeqNum;

Line 334: elsif(p_schedMethod = wip_constants.midpoint_backwards) then

330: where wip_entity_id = p_wipEntityID
331: and organization_id = p_orgID
332: and operation_seq_num = x_maxOpSeqNum;
333:
334: elsif(p_schedMethod = wip_constants.midpoint_backwards) then
335: x_maxOpSeqNum := p_midPntOpSeqNum;
336:
337: if (p_midPntOpSeqNum is not null AND
338: p_midPntResSeqNum is not null) then

Line 350: if(l_logLevel <= wip_constants.full_logging) then

346: else
347: x_maxSchedSeqNum := null;
348: end if;
349:
350: if(l_logLevel <= wip_constants.full_logging) then
351: wip_logger.log('midpoint backward', l_retStatus);
352: end if;
353:
354: select min(operation_seq_num)

Line 366: elsif(p_schedMethod = wip_constants.current_op) then

362: from wip_operation_resources
363: where wip_entity_id = p_wipEntityID
364: and organization_id = p_orgID
365: and operation_seq_num = x_minOpSeqNum;
366: elsif(p_schedMethod = wip_constants.current_op) then
367:
368: if(l_logLevel <= wip_constants.full_logging) then
369: wip_logger.log('current op', l_retStatus);
370: end if;

Line 368: if(l_logLevel <= wip_constants.full_logging) then

364: and organization_id = p_orgID
365: and operation_seq_num = x_minOpSeqNum;
366: elsif(p_schedMethod = wip_constants.current_op) then
367:
368: if(l_logLevel <= wip_constants.full_logging) then
369: wip_logger.log('current op', l_retStatus);
370: end if;
371:
372: x_minOpSeqNum := p_midPntOpSeqNum;

Line 380: elsif(p_schedMethod = wip_constants.current_sub_grp) then

376: from wip_operation_resources
377: where wip_entity_id = p_wipEntityID
378: and organization_id = p_orgID
379: and operation_seq_num = p_midPntOpSeqNum;
380: elsif(p_schedMethod = wip_constants.current_sub_grp) then
381:
382: if(l_logLevel <= wip_constants.full_logging) then
383: wip_logger.log('current sub grp', l_retStatus);
384: end if;

Line 382: if(l_logLevel <= wip_constants.full_logging) then

378: and organization_id = p_orgID
379: and operation_seq_num = p_midPntOpSeqNum;
380: elsif(p_schedMethod = wip_constants.current_sub_grp) then
381:
382: if(l_logLevel <= wip_constants.full_logging) then
383: wip_logger.log('current sub grp', l_retStatus);
384: end if;
385:
386: x_minOpSeqNum := p_midPntOpSeqNum;

Line 398: if(l_logLevel <= wip_constants.full_logging) then

394: and operation_seq_num = p_midPntOpSeqNum
395: and substitute_group_num = p_subGrpNum;
396: else --current op resource
397:
398: if(l_logLevel <= wip_constants.full_logging) then
399: wip_logger.log('current op res', l_retStatus);
400: end if;
401:
402: x_minOpSeqNum := p_midPntOpSeqNum;

Line 421: if(l_logLevel <= wip_constants.full_logging) then

417:
418: x_maxSchedSeqNum := x_minSchedSeqNum;
419: end if;
420:
421: if(l_logLevel <= wip_constants.full_logging) then
422: wip_logger.log('min op seq' || x_minOpSeqNum, l_retStatus);
423: wip_logger.log('min sched seq' || x_minSchedSeqNum, l_retStatus);
424: wip_logger.log('max op seq' || x_maxOpSeqNum, l_retStatus);
425: wip_logger.log('max sched seq' || x_maxSchedSeqNum, l_retStatus);

Line 428: if(l_logLevel <= wip_constants.trace_logging) then

424: wip_logger.log('max op seq' || x_maxOpSeqNum, l_retStatus);
425: wip_logger.log('max sched seq' || x_maxSchedSeqNum, l_retStatus);
426: end if;
427:
428: if(l_logLevel <= wip_constants.trace_logging) then
429: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.schedule',
430: p_procReturnStatus => 'N/A',
431: p_msg => 'success',
432: x_returnStatus => l_retStatus);

Line 538: if (l_logLevel <= wip_constants.trace_logging) then

534: and wori.resource_seq_num = wor.resource_seq_num
535: for update nowait;
536: begin
537:
538: if (l_logLevel <= wip_constants.trace_logging) then
539: l_params(1).paramName := 'p_wipEntityID';
540: l_params(1).paramValue := p_wipEntityID;
541: l_params(2).paramName := 'p_repSchedID';
542: l_params(2).paramValue := p_repSchedID;

Line 589: round((decode(wor.basis_type, wip_constants.per_lot, 1, decode(p_quantity,null,wdj.start_quantity,p_quantity)) *

585: bdr.available_24_hours_flag,
586: --l_hrVal * nvl(muc.conversion_rate,0) *
587: --Bug 4614036:Rounding of usage rate to next minute is handled.
588: /*
589: round((decode(wor.basis_type, wip_constants.per_lot, 1, decode(p_quantity,null,wdj.start_quantity,p_quantity)) *
590: inv_convert.inv_um_convert(0,
591: NULL,
592: wor.usage_rate_or_amount,
593: wor.UOM_CODE,

Line 602: wip_constants.yes, nvl(bdr.utilization, 1), 1) *

598: / (
599: -- 60*24 * least(wor.assigned_units, bdr.capacity_units) * --Fixed bug #5618787
600: 24 * least(wor.assigned_units, bdr.capacity_units) *
601: decode(wp.include_resource_utilization,
602: wip_constants.yes, nvl(bdr.utilization, 1), 1) *
603: decode(wp.include_resource_efficiency,
604: wip_constants.yes, nvl(bdr.efficiency, 1), 1)
605: ),
606: */

Line 604: wip_constants.yes, nvl(bdr.efficiency, 1), 1)

600: 24 * least(wor.assigned_units, bdr.capacity_units) *
601: decode(wp.include_resource_utilization,
602: wip_constants.yes, nvl(bdr.utilization, 1), 1) *
603: decode(wp.include_resource_efficiency,
604: wip_constants.yes, nvl(bdr.efficiency, 1), 1)
605: ),
606: */
607: -- Start of fix for Bug #5657612: Use ceil function to round up the usage rate to next minute
608: -- bug 6741020: pass a precision = 6 to inv_um_convert as resource usage form field

Line 611: ceil((decode(wor.basis_type, wip_constants.per_lot, 1, decode(p_quantity,null,wdj.start_quantity,p_quantity)) *

607: -- Start of fix for Bug #5657612: Use ceil function to round up the usage rate to next minute
608: -- bug 6741020: pass a precision = 6 to inv_um_convert as resource usage form field
609: -- supports 6 decimals. INV assumes a default of 5 decimals if null is passed. This causes
610: -- errors in calculation.
611: ceil((decode(wor.basis_type, wip_constants.per_lot, 1, decode(p_quantity,null,wdj.start_quantity,p_quantity)) *
612: inv_convert.inv_um_convert(0,
613: 6,
614: wor.usage_rate_or_amount,
615: wor.UOM_CODE,

Line 621: wip_constants.yes, nvl(bdr.utilization, 1), 1) *

617: NULL,
618: NULL )*60) /
619: ( least(wor.assigned_units, bdr.capacity_units) *
620: decode(wp.include_resource_utilization,
621: wip_constants.yes, nvl(bdr.utilization, 1), 1) *
622: decode(wp.include_resource_efficiency,
623: wip_constants.yes, nvl(bdr.efficiency, 1), 1) )
624: ) / (60 * 24),
625: -- End of fix for Bug #5657612

Line 623: wip_constants.yes, nvl(bdr.efficiency, 1), 1) )

619: ( least(wor.assigned_units, bdr.capacity_units) *
620: decode(wp.include_resource_utilization,
621: wip_constants.yes, nvl(bdr.utilization, 1), 1) *
622: decode(wp.include_resource_efficiency,
623: wip_constants.yes, nvl(bdr.efficiency, 1), 1) )
624: ) / (60 * 24),
625: -- End of fix for Bug #5657612
626: wor.assigned_units
627: bulk collect into x_resTbls.opSeqNum,

Line 694: if (l_logLevel <= wip_constants.trace_logging) then

690: --lock the resource instances
691: open c_resInsts;
692: close c_resInsts;
693:
694: if (l_logLevel <= wip_constants.trace_logging) then
695: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.readJobSchedule',
696: p_procReturnStatus => x_returnStatus,
697: p_msg => 'success',
698: x_returnStatus => l_retStatus);

Line 706: if (l_logLevel <= wip_constants.trace_logging) then

702: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
703: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_infinite_scheduler_pvt',
704: p_procedure_name => 'readJobSchedule',
705: p_error_text => SQLERRM);
706: if (l_logLevel <= wip_constants.trace_logging) then
707: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.readJobSchedule',
708: p_procReturnStatus => x_returnStatus,
709: p_msg => 'unexp error: ' || SQLERRM,
710: x_returnStatus => l_retStatus);

Line 752: if (l_logLevel <= wip_constants.trace_logging) then

748: l_params wip_logger.param_tbl_t;
749: l_retStatus VARCHAR2(1);
750: begin
751: savepoint wipiscdb100;
752: if (l_logLevel <= wip_constants.trace_logging) then
753: l_params(1).paramName := 'p_wipEntityID';
754: l_params(1).paramValue := p_wipEntityID;
755: l_params(2).paramName := 'p_repSchedID';
756: l_params(2).paramValue := p_repSchedID;

Line 798: if(l_logLevel <= wip_constants.full_logging) then

794: and organization_id = p_orgID
795: and operation_seq_num = x_resTbls.opSeqNum(i)
796: and resource_seq_num = x_resTbls.resSeqNum(i);
797:
798: if(l_logLevel <= wip_constants.full_logging) then
799: wip_logger.log('wrote resources', l_retStatus);
800: end if;
801:
802:

Line 815: if(l_logLevel <= wip_constants.full_logging) then

811: and organization_id = p_orgID
812: and operation_seq_num = x_resTbls.opSeqNum(i)
813: and resource_seq_num = x_resTbls.resSeqNum(i);
814:
815: if(l_logLevel <= wip_constants.full_logging) then
816: wip_logger.log('wrote resource instances', l_retStatus);
817: end if;
818:
819: delete wip_operation_resource_usage

Line 886: if(l_logLevel <= wip_constants.full_logging) then

882: l_progID,
883: l_sysdate);
884: end if;
885: end loop;
886: if(l_logLevel <= wip_constants.full_logging) then
887: wip_logger.log('wrote resource usages', l_retStatus);
888: end if;
889:
890: insert into wip_operation_resource_usage

Line 959: if(l_logLevel <= wip_constants.full_logging) then

955: and woru.operation_seq_num = wor.operation_seq_num
956: and woru.resource_seq_num = wor.resource_seq_num;
957:
958:
959: if(l_logLevel <= wip_constants.full_logging) then
960: wip_logger.log('wrote ' || SQL%ROWCOUNT || ' resource instance usages', l_retStatus);
961: end if;
962:
963: if(l_logLevel <= wip_constants.full_logging) then

Line 963: if(l_logLevel <= wip_constants.full_logging) then

959: if(l_logLevel <= wip_constants.full_logging) then
960: wip_logger.log('wrote ' || SQL%ROWCOUNT || ' resource instance usages', l_retStatus);
961: end if;
962:
963: if(l_logLevel <= wip_constants.full_logging) then
964: wip_logger.log('about to start op processing', l_retStatus);
965: end if;
966: --base operation dates off of op resource dates
967: select wo.operation_seq_num,

Line 997: and wip_constants.sched_yes = wor.scheduled_flag (+)

993: and wo.organization_id = p_orgID
994: and wo.wip_entity_id = wor.wip_entity_id (+)
995: and wo.organization_id = wor.organization_id (+)
996: and wo.operation_seq_num = wor.operation_seq_num (+)
997: and wip_constants.sched_yes = wor.scheduled_flag (+)
998: group by wo.operation_seq_num;
999:
1000: if(l_logLevel <= wip_constants.full_logging) then
1001: wip_logger.log('about to start op processing', l_retStatus);

Line 1000: if(l_logLevel <= wip_constants.full_logging) then

996: and wo.operation_seq_num = wor.operation_seq_num (+)
997: and wip_constants.sched_yes = wor.scheduled_flag (+)
998: group by wo.operation_seq_num;
999:
1000: if(l_logLevel <= wip_constants.full_logging) then
1001: wip_logger.log('about to start op processing', l_retStatus);
1002: end if;
1003:
1004: for i in 1..l_opTbls.opSeqNum.count loop

Line 1038: x_resTbls.schedFlag(j) = wip_constants.sched_prior) then

1034: l_opTbls.startDate(i) := p_anchorDate;
1035: l_opTbls.endDate(i) := p_anchorDate;
1036: for j in 1..x_resTbls.resID.count loop
1037: if(x_resTbls.opSeqNum(j) < l_opTbls.opSeqNum(i) and
1038: x_resTbls.schedFlag(j) = wip_constants.sched_prior) then
1039: l_opTbls.startDate(i) := x_resTbls.endDate(j);
1040: l_opTbls.endDate(i) := x_resTbls.endDate(j);
1041: else
1042: exit;

Line 1061: if(l_logLevel <= wip_constants.full_logging) then

1057: exit;
1058: end if;
1059: end loop;
1060:
1061: if(l_logLevel <= wip_constants.full_logging) then
1062: wip_logger.log('about to write ops', l_retStatus);
1063: end if;
1064:
1065: if(l_startOpIdx is not null) then

Line 1082: if(l_logLevel <= wip_constants.full_logging) then

1078: program_update_date = l_sysDate
1079: where wip_entity_id = p_wipEntityID
1080: and organization_id = p_orgID
1081: and operation_seq_num = l_opTbls.opSeqNum(i);
1082: if(l_logLevel <= wip_constants.full_logging) then
1083: wip_logger.log('wrote ops', l_retStatus);
1084: end if;
1085:
1086: --update mtl requirement dates if job has routing

Line 1116: if(l_logLevel <= wip_constants.full_logging) then

1112: and organization_id = p_orgID
1113: and operation_seq_num = 1;
1114: end if;
1115:
1116: if(l_logLevel <= wip_constants.full_logging) then
1117: wip_logger.log('wrote material requirements', l_retStatus);
1118: end if;
1119:
1120: --now update job dates

Line 1128: if(l_logLevel <= wip_constants.full_logging) then

1124: from wip_operation_resources
1125: where wip_entity_id = p_wipEntityID
1126: and organization_id = p_orgID;
1127:
1128: if(l_logLevel <= wip_constants.full_logging) then
1129: wip_logger.log('min res date:' || to_char(l_minResStartDate, g_logDateFmt), l_retStatus);
1130: wip_logger.log('max res date:' || to_char(l_maxResEndDate, g_logDateFmt), l_retStatus);
1131: end if;
1132: --if there are no resources, set the local variables to p_anchorDate

Line 1150: if (l_logLevel <= wip_constants.trace_logging) then

1146: program_update_date = l_sysDate
1147: where wip_entity_id = p_wipEntityID
1148: and organization_id = p_orgID;
1149:
1150: if (l_logLevel <= wip_constants.trace_logging) then
1151: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.writeJobSchedule',
1152: p_procReturnStatus => x_returnStatus,
1153: p_msg => 'success',
1154: x_returnStatus => l_retStatus);

Line 1163: if (l_logLevel <= wip_constants.trace_logging) then

1159: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1160: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_infinite_scheduler_pvt',
1161: p_procedure_name => 'writeJobSchedule',
1162: p_error_text => SQLERRM);
1163: if (l_logLevel <= wip_constants.trace_logging) then
1164: wip_logger.exitPoint(p_procName => 'wip_infinite_scheduler_pvt.writeJobSchedule',
1165: p_procReturnStatus => x_returnStatus,
1166: p_msg => 'unexp error: ' || SQLERRM,
1167: x_returnStatus => l_retStatus);