14: p_endDate in date,
15: x_serStartOp out nocopy number,
16: x_returnStatus out nocopy varchar2,
17: x_errorMsg out nocopy varchar2) is
18: l_params wip_logger.param_tbl_t;
19: l_procName varchar2(30) := 'explodeRouting';
20: l_logLevel number := to_number(fnd_log.g_current_runtime_level);
21: l_retStatus varchar2(1);
22: l_msg varchar2(240);
55: l_params(8).paramName := 'p_startDate';
56: l_params(8).paramValue := p_startDate;
57: l_params(9).paramName := 'p_endDate';
58: l_params(9).paramValue := p_endDate;
59: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
60: p_params => l_params,
61: x_returnStatus => x_returnStatus);
62: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
63: raise fnd_api.g_exc_unexpected_error;
76: and nvl(cfm_routing_flag, 2) = 2;
77: exception
78: when NO_DATA_FOUND then
79: if(l_logLevel <= wip_constants.trace_logging) then
80: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
81: p_procReturnStatus => 'true',
82: p_msg => 'this item does not have a routing',
83: x_returnStatus => l_retStatus);
84: wip_logger.cleanup(l_retStatus);
80: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
81: p_procReturnStatus => 'true',
82: p_msg => 'this item does not have a routing',
83: x_returnStatus => l_retStatus);
84: wip_logger.cleanup(l_retStatus);
85: end if;
86: return;
87: end;
88:
88:
89: l_excludeECO := fnd_profile.value('WIP_RELEASED_REVS');
90:
91: if ( l_logLevel <= wip_constants.full_logging ) then
92: wip_logger.log('exclude ECO is: ' || l_excludeECO, l_retStatus);
93: wip_logger.log('RoutingSeqID is: ' || l_routingSeqID, l_retStatus);
94: end if;
95:
96: insert into wip_operations
89: l_excludeECO := fnd_profile.value('WIP_RELEASED_REVS');
90:
91: if ( l_logLevel <= wip_constants.full_logging ) then
92: wip_logger.log('exclude ECO is: ' || l_excludeECO, l_retStatus);
93: wip_logger.log('RoutingSeqID is: ' || l_routingSeqID, l_retStatus);
94: end if;
95:
96: insert into wip_operations
97: (wip_entity_id,
238: where wo.wip_entity_id = p_wipEntityID
239: and wo.organization_id = p_orgID;
240:
241: if ( l_logLevel <= wip_constants.full_logging ) then
242: wip_logger.log('begin to load resources', l_retStatus);
243: end if;
244:
245:
246: insert into wip_operation_resources
367: and ((eng.status_type in (4, 7) and l_excludeECO = 1) or
368: (eng.status_type in (1, 4, 7) and l_excludeECO = 2)))));
369:
370: if ( l_logLevel <= wip_constants.full_logging ) then
371: wip_logger.log('begin to load substitute resources', l_retStatus);
372: end if;
373:
374: select max(resource_seq_num)
375: into l_maxSeq
483: and bsor.resource_id = br.resource_id
484: and nvl(bsor.acd_type, 0) <> 3;
485:
486: if ( l_logLevel <= wip_constants.full_logging ) then
487: wip_logger.log('begin to load attachment', l_retStatus);
488: end if;
489:
490:
491: FOR op_attach IN op_attachments(p_orgID, p_wipEntityID) LOOP
504: END LOOP;
505:
506: /* Added for 12.1.1 Skills Validation project.*/
507: if ( l_logLevel <= wip_constants.full_logging ) then
508: wip_logger.log('begin to load competence', l_retStatus);
509: end if;
510:
511: DELETE FROM WIP_OPERATION_COMPETENCIES
512: WHERE WIP_ENTITY_ID = p_wipEntityID
538: AND BOS.OPERATION_SEQUENCE_ID = WO.OPERATION_SEQUENCE_ID
539: AND BOS.LEVEL_ID = 2;
540:
541: if (l_logLevel <= wip_constants.trace_logging) then
542: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
543: p_procReturnStatus => x_returnStatus,
544: p_msg => 'success',
545: x_returnStatus => l_retStatus);
546: end if;
546: end if;
547: exception
548: when others then
549: if(l_logLevel <= wip_constants.trace_logging) then
550: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
551: p_procReturnStatus => x_returnStatus,
552: p_msg => 'unexp error:' || SQLERRM,
553: x_returnStatus => l_retStatus);
554: end if;
577: p_unitNumber in varchar2 DEFAULT '', /* added for bug 5332615 */
578: x_returnStatus out nocopy varchar2,
579: x_errorMsg out nocopy varchar2) is
580: l_procName varchar2(30) := 'explodeBOM';
581: l_params wip_logger.param_tbl_t;
582: l_logLevel number := to_number(fnd_log.g_current_runtime_level);
583: l_retStatus varchar2(1);
584: l_msg varchar2(240);
585:
636: l_params(12).paramName := 'p_projectID';
637: l_params(12).paramValue := p_projectID;
638: l_params(13).paramName := 'p_taskID';
639: l_params(13).paramValue := p_taskID;
640: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
641: p_params => l_params,
642: x_returnStatus => x_returnStatus);
643: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
644: raise fnd_api.g_exc_unexpected_error;
776: x_returnStatus := fnd_api.g_ret_sts_error;
777: fnd_message.set_name('WIP', 'WIP_COMP_DUP_OP_ONE');
778: fnd_msg_pub.add;
779: if (l_logLevel <= wip_constants.full_logging) then
780: wip_logger.log(p_msg => 'Item ' || l_compTbl(l_count).inventory_item_id ||
781: ' has duplicates in op 1, failed explosion!',
782: x_returnStatus => x_returnStatus);
783:
784:
874: x_msg_data => x_errorMsg );
875:
876: if (x_returnStatus <> fnd_api.g_ret_sts_success) then
877: if (l_logLevel <= wip_constants.full_logging) then
878: wip_logger.log(p_msg => 'Post_Explosion_Cleanup failed for wip_entity_id '||p_wipEntityID,
879: x_returnStatus => x_returnStatus);
880: end if;
881: return;
882: end if;
982: and nvl(wro.repetitive_schedule_id, -1) = nvl(p_repSchedID, -1)
983: and wro.organization_id = p_orgID;
984:
985: if (l_logLevel <= wip_constants.trace_logging) then
986: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
987: p_procReturnStatus => x_returnStatus,
988: p_msg => 'success',
989: x_returnStatus => l_retStatus);
990: end if;
990: end if;
991: exception
992: when fnd_api.g_exc_unexpected_error then
993: if (l_logLevel <= wip_constants.trace_logging) then
994: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
995: p_procReturnStatus => x_returnStatus,
996: p_msg => 'failed at exploding requirements',
997: x_returnStatus => l_retStatus); --discard logging return status
998: end if;
997: x_returnStatus => l_retStatus); --discard logging return status
998: end if;
999: when others then
1000: if(l_logLevel <= wip_constants.trace_logging) then
1001: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
1002: p_procReturnStatus => x_returnStatus,
1003: p_msg => 'unexp error:' || SQLERRM,
1004: x_returnStatus => l_retStatus);
1005: end if;
1016: p_wipEntityID in number,
1017: p_qty in number,
1018: x_returnStatus out nocopy varchar2,
1019: x_errorMsg out nocopy varchar2) is
1020: l_params wip_logger.param_tbl_t;
1021: l_procName varchar2(30) := 'adjustQtyChange';
1022: l_logLevel number := to_number(fnd_log.g_current_runtime_level);
1023: l_msg varchar2(240);
1024: l_retStatus varchar2(1);
1035: l_params(2).paramName := 'p_wipEntityID';
1036: l_params(2).paramValue := p_wipEntityID;
1037: l_params(3).paramName := 'p_qty';
1038: l_params(3).paramValue := p_qty;
1039: wip_logger.entryPoint(p_procName => g_pkgName || '.' || l_procName,
1040: p_params => l_params,
1041: x_returnStatus => x_returnStatus);
1042: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1043: raise fnd_api.g_exc_unexpected_error;
1058: wip_constants.released,
1059: wip_constants.comp_chrg,
1060: wip_constants.hold) ) then
1061: if(l_logLevel <= wip_constants.trace_logging) then
1062: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
1063: p_procReturnStatus => x_returnStatus,
1064: p_msg => 'no qty change or job status is not right',
1065: x_returnStatus => l_retStatus);
1066: end if;
1076: and wip_entity_id = p_wipEntityID;
1077:
1078: if ( l_minOp = fnd_api.g_miss_num ) then
1079: if(l_logLevel <= wip_constants.trace_logging) then
1080: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
1081: p_procReturnStatus => x_returnStatus,
1082: p_msg => 'no operation exist',
1083: x_returnStatus => l_retStatus);
1084: end if;
1116: where organization_id = p_orgID
1117: and wip_entity_id = p_wipEntityID;
1118:
1119: if (l_logLevel <= wip_constants.trace_logging) then
1120: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
1121: p_procReturnStatus => x_returnStatus,
1122: p_msg => 'success',
1123: x_returnStatus => l_retStatus);
1124: end if;
1125:
1126: exception
1127: when others then
1128: if(l_logLevel <= wip_constants.trace_logging) then
1129: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
1130: p_procReturnStatus => x_returnStatus,
1131: p_msg => 'unexp error:' || SQLERRM,
1132: x_returnStatus => l_retStatus);
1133: end if;