DBA Data[Home] [Help]

APPS.WIP_AUTOLOTPROC_PRIV dependencies on FND_API

Line 135: x_returnStatus := fnd_api.g_ret_sts_success;

131: l_errMsg VARCHAR2(80);
132: l_entryType NUMBER;
133: l_logLevel NUMBER := to_number(fnd_log.g_current_runtime_level);
134: begin
135: x_returnStatus := fnd_api.g_ret_sts_success;
136: if (l_logLevel <= wip_constants.trace_logging) then
137: l_params(1).paramName := 'p_orgID';
138: l_params(1).paramValue := p_orgID;
139: l_params(2).paramName := 'p_wipEntityID';

Line 146: if(fnd_api.to_boolean(p_initMsgList)) then

142: p_params => l_params,
143: x_returnStatus => x_returnStatus);
144: end if;
145:
146: if(fnd_api.to_boolean(p_initMsgList)) then
147: fnd_msg_pub.initialize;
148: end if;
149:
150: select backflush_lot_entry_type

Line 157: x_returnStatus := fnd_api.g_ret_sts_success; --assume we will be able to derive everything

153: where organization_id = p_orgID;
154:
155:
156: x_compLots.reset;
157: x_returnStatus := fnd_api.g_ret_sts_success; --assume we will be able to derive everything
158: loop
159: if(x_compLots.getCurrentItem(l_curItem)) then
160: if(l_curItem.wip_supply_type not in (wip_constants.push, wip_constants.op_pull, wip_constants.assy_pull)) then
161: goto END_OF_LOOP;

Line 168: if(fnd_api.to_boolean(p_destroyTrees)) then

164: if(l_treeID is not null
165: and l_prevItem <> l_curItem.inventory_item_id) then
166: --if destroy trees is true, free the tree. otherwise, we just
167: --need to reset the l_treeID variable
168: if(fnd_api.to_boolean(p_destroyTrees)) then
169: inv_quantity_tree_pvt.free_tree(p_api_version_number => 1.0,
170: p_init_msg_lst => fnd_api.g_false,
171: p_tree_id => l_treeID,
172: x_return_status => l_returnStatus,

Line 170: p_init_msg_lst => fnd_api.g_false,

166: --if destroy trees is true, free the tree. otherwise, we just
167: --need to reset the l_treeID variable
168: if(fnd_api.to_boolean(p_destroyTrees)) then
169: inv_quantity_tree_pvt.free_tree(p_api_version_number => 1.0,
170: p_init_msg_lst => fnd_api.g_false,
171: p_tree_id => l_treeID,
172: x_return_status => l_returnStatus,
173: x_msg_count => l_msgCount,
174: x_msg_data => l_msgData);

Line 187: if(l_returnStatus = fnd_api.g_ret_sts_unexp_error) then

183: p_treeSrcName => p_treeSrcName,
184: x_treeID => l_treeID,
185: x_compLots => x_compLots,
186: x_returnStatus => l_returnStatus);
187: if(l_returnStatus = fnd_api.g_ret_sts_unexp_error) then
188: l_errMsg := 'deriveSingleItem failed';
189: raise fnd_api.g_exc_unexpected_error;
190: elsif(l_returnStatus = fnd_api.g_ret_sts_error) then
191: x_returnStatus := fnd_api.g_ret_sts_error;

Line 189: raise fnd_api.g_exc_unexpected_error;

185: x_compLots => x_compLots,
186: x_returnStatus => l_returnStatus);
187: if(l_returnStatus = fnd_api.g_ret_sts_unexp_error) then
188: l_errMsg := 'deriveSingleItem failed';
189: raise fnd_api.g_exc_unexpected_error;
190: elsif(l_returnStatus = fnd_api.g_ret_sts_error) then
191: x_returnStatus := fnd_api.g_ret_sts_error;
192: end if;
193:

Line 190: elsif(l_returnStatus = fnd_api.g_ret_sts_error) then

186: x_returnStatus => l_returnStatus);
187: if(l_returnStatus = fnd_api.g_ret_sts_unexp_error) then
188: l_errMsg := 'deriveSingleItem failed';
189: raise fnd_api.g_exc_unexpected_error;
190: elsif(l_returnStatus = fnd_api.g_ret_sts_error) then
191: x_returnStatus := fnd_api.g_ret_sts_error;
192: end if;
193:
194: --set up data for the next iteration of the loop

Line 191: x_returnStatus := fnd_api.g_ret_sts_error;

187: if(l_returnStatus = fnd_api.g_ret_sts_unexp_error) then
188: l_errMsg := 'deriveSingleItem failed';
189: raise fnd_api.g_exc_unexpected_error;
190: elsif(l_returnStatus = fnd_api.g_ret_sts_error) then
191: x_returnStatus := fnd_api.g_ret_sts_error;
192: end if;
193:
194: --set up data for the next iteration of the loop
195: l_prevItem := l_curItem.inventory_item_id;

Line 203: fnd_api.to_boolean(p_destroyTrees)) then

199: end loop;
200:
201: --destroy the last tree if the user has not requested it persist
202: if(l_treeID is not null and
203: fnd_api.to_boolean(p_destroyTrees)) then
204: inv_quantity_tree_pvt.free_tree(p_api_version_number => 1.0,
205: p_init_msg_lst => fnd_api.g_false,
206: p_tree_id => l_treeID,
207: x_return_status => l_returnStatus,

Line 205: p_init_msg_lst => fnd_api.g_false,

201: --destroy the last tree if the user has not requested it persist
202: if(l_treeID is not null and
203: fnd_api.to_boolean(p_destroyTrees)) then
204: inv_quantity_tree_pvt.free_tree(p_api_version_number => 1.0,
205: p_init_msg_lst => fnd_api.g_false,
206: p_tree_id => l_treeID,
207: x_return_status => l_returnStatus,
208: x_msg_count => l_msgCount,
209: x_msg_data => l_msgData);

Line 219: if(fnd_api.to_boolean(p_endDebug)) then

215: p_procReturnStatus => x_returnStatus,
216: p_msg => 'procedure success',
217: x_returnStatus => l_returnStatus); --discard logging return status
218: end if;
219: if(fnd_api.to_boolean(p_endDebug)) then
220: wip_logger.cleanup(x_returnStatus => l_returnStatus);
221: end if;
222: exception
223: when fnd_api.g_exc_unexpected_error then

Line 223: when fnd_api.g_exc_unexpected_error then

219: if(fnd_api.to_boolean(p_endDebug)) then
220: wip_logger.cleanup(x_returnStatus => l_returnStatus);
221: end if;
222: exception
223: when fnd_api.g_exc_unexpected_error then
224: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
225: if (l_logLevel <= wip_constants.trace_logging) then
226: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveLots',
227: p_procReturnStatus => x_returnStatus,

Line 224: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

220: wip_logger.cleanup(x_returnStatus => l_returnStatus);
221: end if;
222: exception
223: when fnd_api.g_exc_unexpected_error then
224: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
225: if (l_logLevel <= wip_constants.trace_logging) then
226: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveLots',
227: p_procReturnStatus => x_returnStatus,
228: p_msg => l_errMsg,

Line 231: if(fnd_api.to_boolean(p_endDebug)) then

227: p_procReturnStatus => x_returnStatus,
228: p_msg => l_errMsg,
229: x_returnStatus => l_returnStatus); --discard logging return status
230: end if;
231: if(fnd_api.to_boolean(p_endDebug)) then
232: wip_logger.cleanup(x_returnStatus => l_returnStatus);
233: end if;
234: when others then
235: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 235: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

231: if(fnd_api.to_boolean(p_endDebug)) then
232: wip_logger.cleanup(x_returnStatus => l_returnStatus);
233: end if;
234: when others then
235: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
236: if (l_logLevel <= wip_constants.trace_logging) then
237: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveLots',
238: p_procReturnStatus => x_returnStatus,
239: p_msg => 'unexpected error:' || SQLERRM,

Line 245: if(fnd_api.to_boolean(p_endDebug)) then

241: end if;
242: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_autoLotProc_priv',
243: p_procedure_name => 'deriveLots',
244: p_error_text => SQLERRM);
245: if(fnd_api.to_boolean(p_endDebug)) then
246: wip_logger.cleanup(x_returnStatus => l_returnStatus);
247: end if;
248: end deriveLots;
249: /*

Line 357: x_returnStatus := fnd_api.g_ret_sts_success;

353: mmtt.revision
354: order by mmtt.inventory_item_id, mmtt.transaction_temp_id;
355: begin
356: savepoint wiplotpb_10;
357: x_returnStatus := fnd_api.g_ret_sts_success;
358:
359: if (l_logLevel <= wip_constants.trace_logging) then
360: l_params(1).paramName := 'p_cplTxnID';
361: l_params(1).paramValue := p_cplTxnID;

Line 373: if(fnd_api.to_boolean(p_initMsgList)) then

369: p_params => l_params,
370: x_returnStatus => x_returnStatus);
371: end if;
372:
373: if(fnd_api.to_boolean(p_initMsgList)) then
374: fnd_msg_pub.initialize;
375: end if;
376:
377: if(p_cplTxnID is not null) then

Line 439: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

435: p_txnActionID => l_itemRec.txnActionID,
436: p_serControlCode => l_itemRec.serialControlCode,
437: x_serialReturnStatus => l_tempReturnStatus,
438: x_returnStatus => x_returnStatus);
439: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
440: l_errMsg := 'check serial failed';
441: raise fnd_api.g_exc_unexpected_error;
442: end if;
443: l_serialReturnStatus := worstReturnStatus(l_serialReturnStatus, l_tempReturnStatus);

Line 441: raise fnd_api.g_exc_unexpected_error;

437: x_serialReturnStatus => l_tempReturnStatus,
438: x_returnStatus => x_returnStatus);
439: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
440: l_errMsg := 'check serial failed';
441: raise fnd_api.g_exc_unexpected_error;
442: end if;
443: l_serialReturnStatus := worstReturnStatus(l_serialReturnStatus, l_tempReturnStatus);
444: end if;
445: end if;

Line 451: p_initMsgList => fnd_api.g_false,

447: end loop;
448: deriveLots(x_compLots => l_compObj,
449: p_orgID => p_orgID,
450: p_wipEntityID => p_wipEntityID,
451: p_initMsgList => fnd_api.g_false,
452: p_endDebug => fnd_api.g_false,
453: p_destroyTrees => fnd_api.g_true,
454: p_treeMode => inv_quantity_tree_pvt.g_reservation_mode,
455: p_treeSrcName => null,

Line 452: p_endDebug => fnd_api.g_false,

448: deriveLots(x_compLots => l_compObj,
449: p_orgID => p_orgID,
450: p_wipEntityID => p_wipEntityID,
451: p_initMsgList => fnd_api.g_false,
452: p_endDebug => fnd_api.g_false,
453: p_destroyTrees => fnd_api.g_true,
454: p_treeMode => inv_quantity_tree_pvt.g_reservation_mode,
455: p_treeSrcName => null,
456: x_returnStatus => l_lotReturnStatus);

Line 453: p_destroyTrees => fnd_api.g_true,

449: p_orgID => p_orgID,
450: p_wipEntityID => p_wipEntityID,
451: p_initMsgList => fnd_api.g_false,
452: p_endDebug => fnd_api.g_false,
453: p_destroyTrees => fnd_api.g_true,
454: p_treeMode => inv_quantity_tree_pvt.g_reservation_mode,
455: p_treeSrcName => null,
456: x_returnStatus => l_lotReturnStatus);
457:

Line 459: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then

455: p_treeSrcName => null,
456: x_returnStatus => l_lotReturnStatus);
457:
458: x_returnStatus := worstReturnStatus(l_serialReturnStatus, l_lotReturnStatus);
459: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then
460: l_errMsg := 'derive lots failed';
461: raise fnd_api.g_exc_unexpected_error;
462: end if;
463: --otherwise we at least derived some lot info

Line 461: raise fnd_api.g_exc_unexpected_error;

457:
458: x_returnStatus := worstReturnStatus(l_serialReturnStatus, l_lotReturnStatus);
459: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then
460: l_errMsg := 'derive lots failed';
461: raise fnd_api.g_exc_unexpected_error;
462: end if;
463: --otherwise we at least derived some lot info
464: if(p_cplTxnID is not null) then
465: open c_cplItems;

Line 503: raise fnd_api.g_exc_unexpected_error;

499: end if;
500: if(l_compObj.setNextItem) then
501: if(not l_compObj.getCurrentItem(l_item)) then
502: l_errMsg := 'object error';
503: raise fnd_api.g_exc_unexpected_error;
504: end if;
505: if (l_logLevel <= wip_constants.full_logging) then
506: wip_logger.log('found item: ' || l_item.inventory_item_id, l_returnStatus);
507: end if;

Line 580: if(fnd_api.to_boolean(p_endDebug)) then

576: p_procReturnStatus => x_returnStatus,
577: p_msg => 'procedure success',
578: x_returnStatus => l_returnStatus); --discard logging return status
579: end if;
580: if(fnd_api.to_boolean(p_endDebug)) then
581: wip_logger.cleanup(x_returnStatus => l_returnStatus);
582: end if;
583: exception
584: when fnd_api.g_exc_unexpected_error then

Line 584: when fnd_api.g_exc_unexpected_error then

580: if(fnd_api.to_boolean(p_endDebug)) then
581: wip_logger.cleanup(x_returnStatus => l_returnStatus);
582: end if;
583: exception
584: when fnd_api.g_exc_unexpected_error then
585: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
586: rollback to wiplotpb_10;
587: if (l_logLevel <= wip_constants.trace_logging) then
588: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveLotsFromMMTT',

Line 585: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

581: wip_logger.cleanup(x_returnStatus => l_returnStatus);
582: end if;
583: exception
584: when fnd_api.g_exc_unexpected_error then
585: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
586: rollback to wiplotpb_10;
587: if (l_logLevel <= wip_constants.trace_logging) then
588: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveLotsFromMMTT',
589: p_procReturnStatus => x_returnStatus,

Line 593: if(fnd_api.to_boolean(p_endDebug)) then

589: p_procReturnStatus => x_returnStatus,
590: p_msg => l_errMsg,
591: x_returnStatus => l_returnStatus); --discard logging return status
592: end if;
593: if(fnd_api.to_boolean(p_endDebug)) then
594: wip_logger.cleanup(x_returnStatus => l_returnStatus);
595: end if;
596: when others then
597: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 597: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

593: if(fnd_api.to_boolean(p_endDebug)) then
594: wip_logger.cleanup(x_returnStatus => l_returnStatus);
595: end if;
596: when others then
597: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
598: rollback to wiplotpb_10;
599: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_autoLotProc_priv',
600: p_procedure_name => 'deriveLotsFromMMTT',
601: p_error_text => SQLERRM);

Line 608: if(fnd_api.to_boolean(p_endDebug)) then

604: p_procReturnStatus => x_returnStatus,
605: p_msg => 'unexpected error:' || SQLERRM,
606: x_returnStatus => l_returnStatus); --discard logging return status
607: end if;
608: if(fnd_api.to_boolean(p_endDebug)) then
609: wip_logger.cleanup(x_returnStatus => l_returnStatus);
610: end if;
611: end deriveLotsFromMMTT;
612: */

Line 778: x_returnStatus := fnd_api.g_ret_sts_success;

774: mti.revision
775: order by mti.inventory_item_id, mti.transaction_temp_id;
776: */
777: begin
778: x_returnStatus := fnd_api.g_ret_sts_success;
779: savepoint wiplotpb_10;
780:
781: if (l_logLevel <= wip_constants.trace_logging) then
782: l_params(1).paramName := 'p_txnHdrID';

Line 797: if(fnd_api.to_boolean(p_initMsgList)) then

793: p_params => l_params,
794: x_returnStatus => x_returnStatus);
795: end if;
796:
797: if(fnd_api.to_boolean(p_initMsgList)) then
798: fnd_msg_pub.initialize;
799: end if;
800:
801: l_compObj := system.wip_lot_serial_obj_t(null,null,null,null,null,null);

Line 901: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

897: p_txnActionID => l_itemRecTbl.txnActionID(i),
898: p_serControlCode => l_itemRecTbl.serialControlCode(i),
899: x_serialReturnStatus => l_tempReturnStatus,
900: x_returnStatus => x_returnStatus);
901: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
902: l_errMsg := 'check serial failed';
903: raise fnd_api.g_exc_unexpected_error;
904: end if;
905: l_serialReturnStatus := worstReturnStatus(l_serialReturnStatus, l_tempReturnStatus);

Line 903: raise fnd_api.g_exc_unexpected_error;

899: x_serialReturnStatus => l_tempReturnStatus,
900: x_returnStatus => x_returnStatus);
901: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
902: l_errMsg := 'check serial failed';
903: raise fnd_api.g_exc_unexpected_error;
904: end if;
905: l_serialReturnStatus := worstReturnStatus(l_serialReturnStatus, l_tempReturnStatus);
906: end if;
907: end if;

Line 913: p_initMsgList => fnd_api.g_false,

909:
910: deriveLots(x_compLots => l_compObj,
911: p_orgID => p_orgID,
912: p_wipEntityID => p_wipEntityID,
913: p_initMsgList => fnd_api.g_false,
914: p_endDebug => fnd_api.g_false,
915: p_destroyTrees => fnd_api.g_true,
916: p_treeMode => inv_quantity_tree_pvt.g_reservation_mode,
917: p_treeSrcName => null,

Line 914: p_endDebug => fnd_api.g_false,

910: deriveLots(x_compLots => l_compObj,
911: p_orgID => p_orgID,
912: p_wipEntityID => p_wipEntityID,
913: p_initMsgList => fnd_api.g_false,
914: p_endDebug => fnd_api.g_false,
915: p_destroyTrees => fnd_api.g_true,
916: p_treeMode => inv_quantity_tree_pvt.g_reservation_mode,
917: p_treeSrcName => null,
918: x_returnStatus => l_lotReturnStatus);

Line 915: p_destroyTrees => fnd_api.g_true,

911: p_orgID => p_orgID,
912: p_wipEntityID => p_wipEntityID,
913: p_initMsgList => fnd_api.g_false,
914: p_endDebug => fnd_api.g_false,
915: p_destroyTrees => fnd_api.g_true,
916: p_treeMode => inv_quantity_tree_pvt.g_reservation_mode,
917: p_treeSrcName => null,
918: x_returnStatus => l_lotReturnStatus);
919:

Line 921: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then

917: p_treeSrcName => null,
918: x_returnStatus => l_lotReturnStatus);
919:
920: x_returnStatus := worstReturnStatus(l_serialReturnStatus, l_lotReturnStatus);
921: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then
922: l_errMsg := 'derive lots failed';
923: raise fnd_api.g_exc_unexpected_error;
924: end if;
925:

Line 923: raise fnd_api.g_exc_unexpected_error;

919:
920: x_returnStatus := worstReturnStatus(l_serialReturnStatus, l_lotReturnStatus);
921: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then
922: l_errMsg := 'derive lots failed';
923: raise fnd_api.g_exc_unexpected_error;
924: end if;
925:
926: --otherwise we at least derived some lot info
927: l_compObj.reset;

Line 945: raise fnd_api.g_exc_unexpected_error;

941: end if;
942: if(l_compObj.setNextItem) then
943: if(not l_compObj.getCurrentItem(l_item)) then
944: l_errMsg := 'object error';
945: raise fnd_api.g_exc_unexpected_error;
946: end if;
947: if (l_logLevel <= wip_constants.full_logging) then
948: wip_logger.log('found item: ' || l_item.inventory_item_id, l_returnStatus);
949: end if;

Line 1017: if(fnd_api.to_boolean(p_endDebug)) then

1013: p_procReturnStatus => x_returnStatus,
1014: p_msg => 'procedure success',
1015: x_returnStatus => l_returnStatus); --discard logging return status
1016: end if;
1017: if(fnd_api.to_boolean(p_endDebug)) then
1018: wip_logger.cleanup(x_returnStatus => l_returnStatus);
1019: end if;
1020: exception
1021: when fnd_api.g_exc_unexpected_error then

Line 1021: when fnd_api.g_exc_unexpected_error then

1017: if(fnd_api.to_boolean(p_endDebug)) then
1018: wip_logger.cleanup(x_returnStatus => l_returnStatus);
1019: end if;
1020: exception
1021: when fnd_api.g_exc_unexpected_error then
1022: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1023: rollback to wiplotpb_10;
1024: if (l_logLevel <= wip_constants.trace_logging) then
1025: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveLotsFromMTI',

Line 1022: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1018: wip_logger.cleanup(x_returnStatus => l_returnStatus);
1019: end if;
1020: exception
1021: when fnd_api.g_exc_unexpected_error then
1022: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1023: rollback to wiplotpb_10;
1024: if (l_logLevel <= wip_constants.trace_logging) then
1025: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveLotsFromMTI',
1026: p_procReturnStatus => x_returnStatus,

Line 1030: if(fnd_api.to_boolean(p_endDebug)) then

1026: p_procReturnStatus => x_returnStatus,
1027: p_msg => l_errMsg,
1028: x_returnStatus => l_returnStatus); --discard logging return status
1029: end if;
1030: if(fnd_api.to_boolean(p_endDebug)) then
1031: wip_logger.cleanup(x_returnStatus => l_returnStatus);
1032: end if;
1033: when others then
1034: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 1034: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1030: if(fnd_api.to_boolean(p_endDebug)) then
1031: wip_logger.cleanup(x_returnStatus => l_returnStatus);
1032: end if;
1033: when others then
1034: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1035: rollback to wiplotpb_10;
1036: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_autoLotProc_priv',
1037: p_procedure_name => 'deriveLotsFromMTI',
1038: p_error_text => SQLERRM);

Line 1045: if(fnd_api.to_boolean(p_endDebug)) then

1041: p_procReturnStatus => x_returnStatus,
1042: p_msg => 'unexpected error:' || SQLERRM,
1043: x_returnStatus => l_returnStatus); --discard logging return status
1044: end if;
1045: if(fnd_api.to_boolean(p_endDebug)) then
1046: wip_logger.cleanup(x_returnStatus => l_returnStatus);
1047: end if;
1048: end deriveLotsFromMTI;
1049:

Line 1118: x_returnStatus := fnd_api.g_ret_sts_success;

1114: l_returnStatus VARCHAR2(1);
1115: l_enabled VARCHAR2(1);
1116: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1117: begin
1118: x_returnStatus := fnd_api.g_ret_sts_success;
1119: l_cond := x_compLots.getCurrentItem(l_item);
1120:
1121: if (l_logLevel <= wip_constants.trace_logging) then
1122: l_params(1).paramName := 'p_orgID';

Line 1147: raise fnd_api.g_exc_unexpected_error;

1143: end if;
1144:
1145: if (not l_cond) then
1146: l_errMsg := 'current item not set';
1147: raise fnd_api.g_exc_unexpected_error;
1148: end if;
1149:
1150: l_rmnQty := abs(l_item.primary_quantity);
1151:

Line 1208: raise fnd_api.g_exc_error;

1204: end if;
1205:
1206: if(l_rmnQty <> 0) then
1207: l_errMsg := 'could not derive all qty. ' || l_rmnQty || ' remaining.';
1208: raise fnd_api.g_exc_error;
1209: end if;
1210:
1211: if (l_logLevel <= wip_constants.trace_logging) then
1212: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveTxnLots',

Line 1219: when fnd_api.g_exc_error then

1215: x_returnStatus => l_returnStatus); --discard logging return status
1216: end if;
1217:
1218: exception
1219: when fnd_api.g_exc_error then
1220: x_returnStatus:= fnd_api.g_ret_sts_error; --let caller know item was not fully derived
1221: if (l_logLevel <= wip_constants.trace_logging) then
1222: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveTxnLots',
1223: p_procReturnStatus => x_returnStatus,

Line 1220: x_returnStatus:= fnd_api.g_ret_sts_error; --let caller know item was not fully derived

1216: end if;
1217:
1218: exception
1219: when fnd_api.g_exc_error then
1220: x_returnStatus:= fnd_api.g_ret_sts_error; --let caller know item was not fully derived
1221: if (l_logLevel <= wip_constants.trace_logging) then
1222: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveTxnLots',
1223: p_procReturnStatus => x_returnStatus,
1224: p_msg => l_errMsg,

Line 1227: when fnd_api.g_exc_unexpected_error then

1223: p_procReturnStatus => x_returnStatus,
1224: p_msg => l_errMsg,
1225: x_returnStatus => l_returnStatus); --discard logging return status
1226: end if;
1227: when fnd_api.g_exc_unexpected_error then
1228: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1229: if (l_logLevel <= wip_constants.trace_logging) then
1230: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveTxnLots',
1231: p_procReturnStatus => x_returnStatus,

Line 1228: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1224: p_msg => l_errMsg,
1225: x_returnStatus => l_returnStatus); --discard logging return status
1226: end if;
1227: when fnd_api.g_exc_unexpected_error then
1228: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1229: if (l_logLevel <= wip_constants.trace_logging) then
1230: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveTxnLots',
1231: p_procReturnStatus => x_returnStatus,
1232: p_msg => 'error: ' || l_errMsg,

Line 1236: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1232: p_msg => 'error: ' || l_errMsg,
1233: x_returnStatus => l_returnStatus); --discard logging return status
1234: end if;
1235: when others then
1236: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1237: if(c_retTxnBasedLots%ISOPEN) then
1238: close c_retTxnBasedLots;
1239: elsif(c_retTxnBasedLots%ISOPEN) then
1240: close c_negRetTxnBasedLots;

Line 1366: x_returnStatus := fnd_api.g_ret_sts_success;

1362: and nvl(mln.expiration_date, sysdate + 1) > sysdate
1363: group by tln.lot_number
1364: order by tln.lot_number ;
1365: begin
1366: x_returnStatus := fnd_api.g_ret_sts_success;
1367: l_cond := x_compLots.getCurrentItem(l_item);
1368:
1369: if (l_logLevel <= wip_constants.trace_logging) then
1370: l_params(1).paramName := 'p_orgID';

Line 1404: p_init_msg_lst => fnd_api.g_false,

1400: end if;
1401:
1402: if(x_treeID is null) then
1403: inv_quantity_tree_pvt.create_tree(p_api_version_number => 1.0,
1404: p_init_msg_lst => fnd_api.g_false,
1405: p_organization_id => p_orgID,
1406: p_inventory_item_id => l_item.inventory_item_id,
1407: p_tree_mode => p_treeMode,
1408: p_is_revision_control => (l_item.revision is not null),

Line 1425: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

1421: x_msg_data => l_msgData,
1422: x_tree_id => x_treeID);
1423: end if;
1424:
1425: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1426: l_errMsg := 'tree creation failed';
1427: raise fnd_api.g_exc_unexpected_error;
1428: end if;
1429:

Line 1427: raise fnd_api.g_exc_unexpected_error;

1423: end if;
1424:
1425: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1426: l_errMsg := 'tree creation failed';
1427: raise fnd_api.g_exc_unexpected_error;
1428: end if;
1429:
1430: if(p_entryType in (wip_constants.recdate_full, wip_constants.recdate_exc)) then
1431: open c_receiptOrderedLots(v_itemID => l_item.inventory_item_id,

Line 1465: raise fnd_api.g_exc_error; --manual selection.

1461: end if ;
1462: /* End of addition for Wilson Greatbatch Enhancement */
1463: else
1464: l_errMsg := 'manual entry';
1465: raise fnd_api.g_exc_error; --manual selection.
1466: end if;
1467:
1468: loop
1469: if(p_entryType in (wip_constants.recdate_full, wip_constants.recdate_exc)) then

Line 1511: p_init_msg_lst => fnd_api.g_false,

1507: goto END_OF_LOOP;
1508: end if;
1509:
1510: inv_quantity_tree_pvt.query_tree(p_api_version_number => 1.0,
1511: p_init_msg_lst => fnd_api.g_false,
1512: p_tree_id => x_treeID,
1513: p_revision => l_item.revision,
1514: p_lot_number => l_lotNumber,
1515: p_subinventory_code => l_item.supply_subinventory,

Line 1532: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

1528: x_att => l_qtyAvailToTxt,
1529: x_atr => l_qtyAvailToRsv);
1530:
1531:
1532: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1533: l_errMsg := 'qty tree query failed';
1534: raise fnd_api.g_exc_unexpected_error;
1535: end if;
1536:

Line 1534: raise fnd_api.g_exc_unexpected_error;

1530:
1531:
1532: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1533: l_errMsg := 'qty tree query failed';
1534: raise fnd_api.g_exc_unexpected_error;
1535: end if;
1536:
1537: -- Check if Lot is already entered into MTLI and populate into l_lot_qty_selected
1538: -- If Lot Number is not found then l_lot_qty_selected will be populated as zero Qty.

Line 1572: p_init_msg_lst => fnd_api.g_false,

1568: p_attributes => null);
1569:
1570:
1571: inv_quantity_tree_pvt.update_quantities(p_api_version_number => 1.0,
1572: p_init_msg_lst => fnd_api.g_false,
1573: p_tree_id => x_treeID,
1574: p_revision => l_item.revision,
1575: p_lot_number => l_lotNumber,
1576: p_subinventory_code => l_item.supply_subinventory,

Line 1594: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

1590: x_qr => l_qtyRsved2,
1591: x_qs => l_qtySuggested2,
1592: x_att => l_qtyAvailToTxt2,
1593: x_atr => l_qtyAvailToRsv2);
1594: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1595: l_errMsg := 'qty tree update failed';
1596: raise fnd_api.g_exc_unexpected_error;
1597: end if;
1598:

Line 1596: raise fnd_api.g_exc_unexpected_error;

1592: x_att => l_qtyAvailToTxt2,
1593: x_atr => l_qtyAvailToRsv2);
1594: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1595: l_errMsg := 'qty tree update failed';
1596: raise fnd_api.g_exc_unexpected_error;
1597: end if;
1598:
1599: if (l_logLevel <= wip_constants.full_logging) then
1600: wip_logger.log('updating treeID' || x_treeID, l_returnStatus);

Line 1627: raise fnd_api.g_exc_error;

1623: end if;
1624:
1625: if(l_rmnQty > 0) then
1626: l_errMsg := 'could not derive all qty. ' || l_rmnQty || ' remaining.';
1627: raise fnd_api.g_exc_error;
1628: end if;
1629:
1630: if (l_logLevel <= wip_constants.trace_logging) then
1631: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveIssueLots',

Line 1638: when fnd_api.g_exc_error then

1634: x_returnStatus => l_returnStatus); --discard logging return status
1635: end if;
1636:
1637: exception
1638: when fnd_api.g_exc_error then
1639: x_returnStatus:= fnd_api.g_ret_sts_error; --let caller know item was not fully derived
1640: if (l_logLevel <= wip_constants.trace_logging) then
1641: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveIssueLots',
1642: p_procReturnStatus => x_returnStatus,

Line 1639: x_returnStatus:= fnd_api.g_ret_sts_error; --let caller know item was not fully derived

1635: end if;
1636:
1637: exception
1638: when fnd_api.g_exc_error then
1639: x_returnStatus:= fnd_api.g_ret_sts_error; --let caller know item was not fully derived
1640: if (l_logLevel <= wip_constants.trace_logging) then
1641: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveIssueLots',
1642: p_procReturnStatus => x_returnStatus,
1643: p_msg => l_errMsg,

Line 1646: when fnd_api.g_exc_unexpected_error then

1642: p_procReturnStatus => x_returnStatus,
1643: p_msg => l_errMsg,
1644: x_returnStatus => l_returnStatus); --discard logging return status
1645: end if;
1646: when fnd_api.g_exc_unexpected_error then
1647: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1648: if(c_receiptOrderedLots%ISOPEN) then
1649: close c_receiptOrderedLots;
1650: elsif(c_expDateOrderedLots%ISOPEN) then

Line 1647: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1643: p_msg => l_errMsg,
1644: x_returnStatus => l_returnStatus); --discard logging return status
1645: end if;
1646: when fnd_api.g_exc_unexpected_error then
1647: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1648: if(c_receiptOrderedLots%ISOPEN) then
1649: close c_receiptOrderedLots;
1650: elsif(c_expDateOrderedLots%ISOPEN) then
1651: close c_expDateOrderedLots;

Line 1660: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1656: p_msg => 'error: ' || l_errMsg,
1657: x_returnStatus => l_returnStatus); --discard logging return status
1658: end if;
1659: when others then
1660: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1661: if(c_receiptOrderedLots%ISOPEN) then
1662: close c_receiptOrderedLots;
1663: elsif(c_expDateOrderedLots%ISOPEN) then
1664: close c_expDateOrderedLots;

Line 1695: x_returnStatus := fnd_api.g_ret_sts_success;

1691: l_item system.wip_component_obj_t;
1692: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1693: begin
1694:
1695: x_returnStatus := fnd_api.g_ret_sts_success;
1696: if (l_logLevel <= wip_constants.trace_logging) then
1697: l_params(1).paramName := 'p_orgID';
1698: l_params(1).paramValue := p_orgID;
1699: l_params(2).paramName := 'p_wipEntityID';

Line 1717: raise fnd_api.g_exc_unexpected_error;

1713: savepoint wipbflpb40;
1714:
1715: if(not x_compLots.getCurrentItem(l_item)) then
1716: l_errMsg := 'unable to get current item';
1717: raise fnd_api.g_exc_unexpected_error;
1718: end if;
1719:
1720: select lot_control_code, serial_number_control_code
1721: into l_lotControlCode, l_serialControlCode

Line 1735: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

1731: p_qty => abs(l_item.primary_quantity),
1732: p_txnActionID => l_item.transaction_action_id,
1733: p_serControlCode => l_serialControlCode,
1734: x_returnStatus => x_returnStatus);
1735: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1736: l_errMsg := 'not enough serial #s';
1737: raise fnd_api.g_exc_unexpected_error;
1738: else
1739: l_errMsg := 'item under serial control';

Line 1737: raise fnd_api.g_exc_unexpected_error;

1733: p_serControlCode => l_serialControlCode,
1734: x_returnStatus => x_returnStatus);
1735: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
1736: l_errMsg := 'not enough serial #s';
1737: raise fnd_api.g_exc_unexpected_error;
1738: else
1739: l_errMsg := 'item under serial control';
1740: raise fnd_api.g_exc_error;
1741: end if;

Line 1740: raise fnd_api.g_exc_error;

1736: l_errMsg := 'not enough serial #s';
1737: raise fnd_api.g_exc_unexpected_error;
1738: else
1739: l_errMsg := 'item under serial control';
1740: raise fnd_api.g_exc_error;
1741: end if;
1742: end if;
1743:
1744: --if uncontrolled, return success (no derivation necessary)

Line 1746: x_returnStatus := fnd_api.g_ret_sts_success;

1742: end if;
1743:
1744: --if uncontrolled, return success (no derivation necessary)
1745: if(l_lotControlCode = wip_constants.no_lot) then
1746: x_returnStatus := fnd_api.g_ret_sts_success;
1747: if (l_logLevel <= wip_constants.trace_logging) then
1748: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveSingleItem',
1749: p_procReturnStatus => x_returnStatus,
1750: p_msg => 'procedure success (no derivation necessary)',

Line 1764: raise fnd_api.g_exc_error;

1760: if(l_item.transaction_action_id not in (wip_constants.isscomp_action,
1761: wip_constants.retcomp_action,
1762: wip_constants.retnegc_action)) then
1763: l_errMsg := 'non-derivable txn action:' || l_item.transaction_action_id;
1764: raise fnd_api.g_exc_error;
1765: end if;
1766:
1767:
1768: --for issues, check out all the lots in the specified location

Line 1788: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then

1784: p_entryType => p_entryType,
1785: x_compLots => x_compLots,
1786: x_returnStatus => x_returnStatus);
1787: end if;
1788: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then
1789: raise fnd_api.g_exc_unexpected_error;
1790: end if;
1791:
1792: if (l_logLevel <= wip_constants.trace_logging) then

Line 1789: raise fnd_api.g_exc_unexpected_error;

1785: x_compLots => x_compLots,
1786: x_returnStatus => x_returnStatus);
1787: end if;
1788: if(x_returnStatus = fnd_api.g_ret_sts_unexp_error) then
1789: raise fnd_api.g_exc_unexpected_error;
1790: end if;
1791:
1792: if (l_logLevel <= wip_constants.trace_logging) then
1793: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveSingleItem',

Line 1800: when fnd_api.g_exc_error then

1796: x_returnStatus => l_returnStatus); --discard logging return status
1797: end if;
1798:
1799: exception
1800: when fnd_api.g_exc_error then
1801: x_returnStatus := fnd_api.g_ret_sts_error;
1802: if (l_logLevel <= wip_constants.trace_logging) then
1803: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveSingleItem',
1804: p_procReturnStatus => x_returnStatus,

Line 1801: x_returnStatus := fnd_api.g_ret_sts_error;

1797: end if;
1798:
1799: exception
1800: when fnd_api.g_exc_error then
1801: x_returnStatus := fnd_api.g_ret_sts_error;
1802: if (l_logLevel <= wip_constants.trace_logging) then
1803: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveSingleItem',
1804: p_procReturnStatus => x_returnStatus,
1805: p_msg => 'error' || l_errMsg,

Line 1809: when fnd_api.g_exc_unexpected_error then

1805: p_msg => 'error' || l_errMsg,
1806: x_returnStatus => l_returnStatus); --discard logging return status
1807: end if;
1808: rollback to wipbflpb40;
1809: when fnd_api.g_exc_unexpected_error then
1810: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1811: if (l_logLevel <= wip_constants.trace_logging) then
1812: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveSingleItem',
1813: p_procReturnStatus => x_returnStatus,

Line 1810: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1806: x_returnStatus => l_returnStatus); --discard logging return status
1807: end if;
1808: rollback to wipbflpb40;
1809: when fnd_api.g_exc_unexpected_error then
1810: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1811: if (l_logLevel <= wip_constants.trace_logging) then
1812: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.deriveSingleItem',
1813: p_procReturnStatus => x_returnStatus,
1814: p_msg => 'unexp error raised:',

Line 1819: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1815: x_returnStatus => l_returnStatus); --discard logging return status
1816: end if;
1817: rollback to wipbflpb40;
1818: when others then
1819: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1820: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_autoLotProc_priv',
1821: p_procedure_name => 'deriveSingleItem',
1822: p_error_text => SQLERRM);
1823: if (l_logLevel <= wip_constants.trace_logging) then

Line 1836: if(fnd_api.to_boolean(p_isForwardTxn)) then

1832:
1833: function findTxnAction(p_isForwardTxn in VARCHAR2,
1834: p_qty in NUMBER) return number is
1835: begin
1836: if(fnd_api.to_boolean(p_isForwardTxn)) then
1837: if(p_qty > 0) then
1838: return wip_constants.isscomp_action;
1839: else
1840: return wip_constants.issnegc_action;

Line 1866: x_returnStatus := fnd_api.g_ret_sts_success;

1862: l_txnTypeID NUMBER;
1863: l_logLevel NUMBER := fnd_log.g_current_runtime_level;
1864: begin
1865:
1866: x_returnStatus := fnd_api.g_ret_sts_success;
1867: if (l_logLevel <= wip_constants.trace_logging) then
1868: l_params(1).paramName := 'p_itemID';
1869: l_params(1).paramValue := p_itemID;
1870: l_params(2).paramName := 'p_orgID';

Line 1890: raise fnd_api.g_exc_unexpected_error;

1886: l_errMsg := 'serial requirement not a whole #';
1887: fnd_message.set_name('WIP', 'COMP_INVALID_SER_QTY');
1888: fnd_message.set_token('ITEM', p_itemName);
1889: fnd_msg_pub.add;
1890: raise fnd_api.g_exc_unexpected_error;
1891: end if;
1892:
1893: l_txnTypeID := getTxnType(p_txnActionID);
1894:

Line 1940: x_returnStatus := fnd_api.g_ret_sts_success;

1936: group by revision;
1937:
1938: elsif(p_txnActionID = wip_constants.issnegc_action) then
1939: if(p_serControlCode = wip_constants.dyn_rcv_sn) then
1940: x_returnStatus := fnd_api.g_ret_sts_success;
1941: if (l_logLevel <= wip_constants.trace_logging) then
1942: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerialQuantity',
1943: p_procReturnStatus => x_returnStatus,
1944: p_msg => 'procedure success (neg issue and serial is dyn at recpt)',

Line 1978: raise fnd_api.g_exc_unexpected_error;

1974: fnd_message.set_name('WIP', 'NO_COMP_SERIAL_NUMBERS');
1975: fnd_message.set_token('ITEM', p_itemName);
1976: fnd_msg_pub.add;
1977: l_errMsg := 'error: not enough serials available';
1978: raise fnd_api.g_exc_unexpected_error;
1979: else
1980: x_returnStatus := fnd_api.g_ret_sts_success;
1981: end if;
1982: if (l_logLevel <= wip_constants.trace_logging) then

Line 1980: x_returnStatus := fnd_api.g_ret_sts_success;

1976: fnd_msg_pub.add;
1977: l_errMsg := 'error: not enough serials available';
1978: raise fnd_api.g_exc_unexpected_error;
1979: else
1980: x_returnStatus := fnd_api.g_ret_sts_success;
1981: end if;
1982: if (l_logLevel <= wip_constants.trace_logging) then
1983: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerialQuantity',
1984: p_procReturnStatus => x_returnStatus,

Line 1989: when fnd_api.g_exc_unexpected_error then

1985: p_msg => 'procedure success',
1986: x_returnStatus => l_returnStatus);
1987: end if;
1988: exception
1989: when fnd_api.g_exc_unexpected_error then
1990: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1991: if (l_logLevel <= wip_constants.trace_logging) then
1992: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerialQuantity',
1993: p_procReturnStatus => x_returnStatus,

Line 1990: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1986: x_returnStatus => l_returnStatus);
1987: end if;
1988: exception
1989: when fnd_api.g_exc_unexpected_error then
1990: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1991: if (l_logLevel <= wip_constants.trace_logging) then
1992: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerialQuantity',
1993: p_procReturnStatus => x_returnStatus,
1994: p_msg => l_errMsg,

Line 2001: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1997: when others then
1998: fnd_msg_pub.add_exc_msg(p_pkg_name => 'wip_autoLotProc_priv',
1999: p_procedure_name => 'checkSerialQuantity',
2000: p_error_text => SQLERRM);
2001: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2002: if (l_logLevel <= wip_constants.trace_logging) then
2003: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerialQuantity',
2004: p_procReturnStatus => x_returnStatus,
2005: p_msg => 'unexp error ' || SQLERRM,

Line 2048: x_returnStatus := fnd_api.g_ret_sts_success;

2044: to_serial_number toSerial
2045: from mtl_serial_numbers_interface
2046: where transaction_interface_id = p_txnIntID;
2047: begin
2048: x_returnStatus := fnd_api.g_ret_sts_success;
2049: if (l_logLevel <= wip_constants.trace_logging) then
2050: l_params(1).paramName := 'p_txnTmpID';
2051: l_params(1).paramValue := p_txnTmpID;
2052: l_params(2).paramName := 'p_txnIntID';

Line 2075: if(x_returnStatus <> fnd_api.g_ret_sts_success) then

2071: l_params(11).paramValue := p_serControlCode;
2072: wip_logger.entryPoint(p_procName => 'wip_autoLotProc_priv.checkSerial',
2073: p_params => l_params,
2074: x_returnStatus => x_returnStatus);
2075: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
2076: raise fnd_api.g_exc_unexpected_error;
2077: end if;
2078: end if;
2079:

Line 2076: raise fnd_api.g_exc_unexpected_error;

2072: wip_logger.entryPoint(p_procName => 'wip_autoLotProc_priv.checkSerial',
2073: p_params => l_params,
2074: x_returnStatus => x_returnStatus);
2075: if(x_returnStatus <> fnd_api.g_ret_sts_success) then
2076: raise fnd_api.g_exc_unexpected_error;
2077: end if;
2078: end if;
2079:
2080: if(p_txnTmpID is not null) then

Line 2104: raise fnd_api.g_exc_unexpected_error;

2100: x_errorcode => l_errCode)) then
2101: l_totalQty := l_totalQty + l_serQty;
2102: else
2103: l_errMsg := 'mtl_serial_check.inv_serial_info returned false';
2104: raise fnd_api.g_exc_unexpected_error;
2105: end if;
2106: end loop;
2107:
2108: if(c_tmpSerials%ISOPEN) then

Line 2122: if(x_serialReturnStatus = fnd_api.g_ret_sts_success) then --enough serial numbers exist to complete this transaction

2118: p_qty => abs(p_qty),
2119: p_txnActionID => p_txnActionID,
2120: p_serControlCode => p_serControlCode,
2121: x_returnStatus => x_serialReturnStatus);
2122: if(x_serialReturnStatus = fnd_api.g_ret_sts_success) then --enough serial numbers exist to complete this transaction
2123: raise fnd_api.g_exc_error;
2124: else
2125: raise fnd_api.g_exc_unexpected_error;
2126: end if;

Line 2123: raise fnd_api.g_exc_error;

2119: p_txnActionID => p_txnActionID,
2120: p_serControlCode => p_serControlCode,
2121: x_returnStatus => x_serialReturnStatus);
2122: if(x_serialReturnStatus = fnd_api.g_ret_sts_success) then --enough serial numbers exist to complete this transaction
2123: raise fnd_api.g_exc_error;
2124: else
2125: raise fnd_api.g_exc_unexpected_error;
2126: end if;
2127:

Line 2125: raise fnd_api.g_exc_unexpected_error;

2121: x_returnStatus => x_serialReturnStatus);
2122: if(x_serialReturnStatus = fnd_api.g_ret_sts_success) then --enough serial numbers exist to complete this transaction
2123: raise fnd_api.g_exc_error;
2124: else
2125: raise fnd_api.g_exc_unexpected_error;
2126: end if;
2127:
2128: end if;
2129:

Line 2137: when fnd_api.g_exc_error then

2133: p_msg => 'procedure success',
2134: x_returnStatus => l_returnStatus);
2135: end if;
2136: exception
2137: when fnd_api.g_exc_error then
2138: x_serialReturnStatus := fnd_api.g_ret_sts_error;
2139: x_returnStatus := fnd_api.g_ret_sts_success;
2140: if (l_logLevel <= wip_constants.trace_logging) then
2141: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerial',

Line 2138: x_serialReturnStatus := fnd_api.g_ret_sts_error;

2134: x_returnStatus => l_returnStatus);
2135: end if;
2136: exception
2137: when fnd_api.g_exc_error then
2138: x_serialReturnStatus := fnd_api.g_ret_sts_error;
2139: x_returnStatus := fnd_api.g_ret_sts_success;
2140: if (l_logLevel <= wip_constants.trace_logging) then
2141: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerial',
2142: p_procReturnStatus => x_returnStatus,

Line 2139: x_returnStatus := fnd_api.g_ret_sts_success;

2135: end if;
2136: exception
2137: when fnd_api.g_exc_error then
2138: x_serialReturnStatus := fnd_api.g_ret_sts_error;
2139: x_returnStatus := fnd_api.g_ret_sts_success;
2140: if (l_logLevel <= wip_constants.trace_logging) then
2141: wip_logger.exitPoint(p_procName => 'wip_autoLotProc_priv.checkSerial',
2142: p_procReturnStatus => x_returnStatus,
2143: p_msg => 'insufficient serial qty. only found ' || l_totalQty,

Line 2146: when fnd_api.g_exc_unexpected_error then

2142: p_procReturnStatus => x_returnStatus,
2143: p_msg => 'insufficient serial qty. only found ' || l_totalQty,
2144: x_returnStatus => l_returnStatus);
2145: end if;
2146: when fnd_api.g_exc_unexpected_error then
2147: x_serialReturnStatus := fnd_api.g_ret_sts_unexp_error;
2148: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2149: if(c_tmpSerials%ISOPEN) then
2150: close c_tmpSerials;

Line 2147: x_serialReturnStatus := fnd_api.g_ret_sts_unexp_error;

2143: p_msg => 'insufficient serial qty. only found ' || l_totalQty,
2144: x_returnStatus => l_returnStatus);
2145: end if;
2146: when fnd_api.g_exc_unexpected_error then
2147: x_serialReturnStatus := fnd_api.g_ret_sts_unexp_error;
2148: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2149: if(c_tmpSerials%ISOPEN) then
2150: close c_tmpSerials;
2151: elsif(c_intSerials%ISOPEN) then

Line 2148: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2144: x_returnStatus => l_returnStatus);
2145: end if;
2146: when fnd_api.g_exc_unexpected_error then
2147: x_serialReturnStatus := fnd_api.g_ret_sts_unexp_error;
2148: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2149: if(c_tmpSerials%ISOPEN) then
2150: close c_tmpSerials;
2151: elsif(c_intSerials%ISOPEN) then
2152: close c_intSerials;

Line 2161: x_serialReturnStatus := fnd_api.g_ret_sts_unexp_error;

2157: p_msg => l_errMsg,
2158: x_returnStatus => l_returnStatus);
2159: end if;
2160: when others then
2161: x_serialReturnStatus := fnd_api.g_ret_sts_unexp_error;
2162: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2163: if(c_tmpSerials%ISOPEN) then
2164: close c_tmpSerials;
2165: elsif(c_intSerials%ISOPEN) then

Line 2162: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2158: x_returnStatus => l_returnStatus);
2159: end if;
2160: when others then
2161: x_serialReturnStatus := fnd_api.g_ret_sts_unexp_error;
2162: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2163: if(c_tmpSerials%ISOPEN) then
2164: close c_tmpSerials;
2165: elsif(c_intSerials%ISOPEN) then
2166: close c_intSerials;

Line 2181: if(p_status1 = fnd_api.g_ret_sts_unexp_error or

2177: end checkSerial;
2178:
2179: function worstReturnStatus(p_status1 VARCHAR2, p_status2 VARCHAR2) return VARCHAR2 is
2180: begin
2181: if(p_status1 = fnd_api.g_ret_sts_unexp_error or
2182: p_status2 = fnd_api.g_ret_sts_unexp_error) then
2183: return fnd_api.g_ret_sts_unexp_error;
2184: elsif(p_status1 = fnd_api.g_ret_sts_error or
2185: p_status2 = fnd_api.g_ret_sts_error) then

Line 2182: p_status2 = fnd_api.g_ret_sts_unexp_error) then

2178:
2179: function worstReturnStatus(p_status1 VARCHAR2, p_status2 VARCHAR2) return VARCHAR2 is
2180: begin
2181: if(p_status1 = fnd_api.g_ret_sts_unexp_error or
2182: p_status2 = fnd_api.g_ret_sts_unexp_error) then
2183: return fnd_api.g_ret_sts_unexp_error;
2184: elsif(p_status1 = fnd_api.g_ret_sts_error or
2185: p_status2 = fnd_api.g_ret_sts_error) then
2186: return fnd_api.g_ret_sts_error;

Line 2183: return fnd_api.g_ret_sts_unexp_error;

2179: function worstReturnStatus(p_status1 VARCHAR2, p_status2 VARCHAR2) return VARCHAR2 is
2180: begin
2181: if(p_status1 = fnd_api.g_ret_sts_unexp_error or
2182: p_status2 = fnd_api.g_ret_sts_unexp_error) then
2183: return fnd_api.g_ret_sts_unexp_error;
2184: elsif(p_status1 = fnd_api.g_ret_sts_error or
2185: p_status2 = fnd_api.g_ret_sts_error) then
2186: return fnd_api.g_ret_sts_error;
2187: else

Line 2184: elsif(p_status1 = fnd_api.g_ret_sts_error or

2180: begin
2181: if(p_status1 = fnd_api.g_ret_sts_unexp_error or
2182: p_status2 = fnd_api.g_ret_sts_unexp_error) then
2183: return fnd_api.g_ret_sts_unexp_error;
2184: elsif(p_status1 = fnd_api.g_ret_sts_error or
2185: p_status2 = fnd_api.g_ret_sts_error) then
2186: return fnd_api.g_ret_sts_error;
2187: else
2188: return fnd_api.g_ret_sts_success;

Line 2185: p_status2 = fnd_api.g_ret_sts_error) then

2181: if(p_status1 = fnd_api.g_ret_sts_unexp_error or
2182: p_status2 = fnd_api.g_ret_sts_unexp_error) then
2183: return fnd_api.g_ret_sts_unexp_error;
2184: elsif(p_status1 = fnd_api.g_ret_sts_error or
2185: p_status2 = fnd_api.g_ret_sts_error) then
2186: return fnd_api.g_ret_sts_error;
2187: else
2188: return fnd_api.g_ret_sts_success;
2189: end if;

Line 2186: return fnd_api.g_ret_sts_error;

2182: p_status2 = fnd_api.g_ret_sts_unexp_error) then
2183: return fnd_api.g_ret_sts_unexp_error;
2184: elsif(p_status1 = fnd_api.g_ret_sts_error or
2185: p_status2 = fnd_api.g_ret_sts_error) then
2186: return fnd_api.g_ret_sts_error;
2187: else
2188: return fnd_api.g_ret_sts_success;
2189: end if;
2190: end worstReturnStatus;

Line 2188: return fnd_api.g_ret_sts_success;

2184: elsif(p_status1 = fnd_api.g_ret_sts_error or
2185: p_status2 = fnd_api.g_ret_sts_error) then
2186: return fnd_api.g_ret_sts_error;
2187: else
2188: return fnd_api.g_ret_sts_success;
2189: end if;
2190: end worstReturnStatus;
2191:
2192: function getTxnType(p_txnActionID IN NUMBER) return NUMBER is

Line 2224: x_returnStatus := fnd_api.g_ret_sts_success;

2220: begin
2221:
2222: l_qty := 0 ;
2223:
2224: x_returnStatus := fnd_api.g_ret_sts_success;
2225:
2226: if (l_logLevel <= wip_constants.trace_logging) then
2227: l_params(1).paramName := 'p_organization_id';
2228: l_params(1).paramValue := p_organization_id;

Line 2364: raise fnd_api.g_exc_unexpected_error;

2360: wip_logger.log('primary_quantity : ' || p_item.primary_quantity,
2361: l_returnStatus);
2362: wip_logger.log('derived_quantity : ' || l_derivedQty, l_returnStatus);
2363: l_errMsg := 'return quantity missmatch';
2364: raise fnd_api.g_exc_unexpected_error;
2365: END IF;
2366:
2367: IF (l_logLevel <= wip_constants.trace_logging) THEN
2368: wip_logger.exitPoint(

Line 2376: WHEN fnd_api.g_exc_unexpected_error THEN

2372: x_returnStatus => l_returnStatus); --discard return status
2373: END IF;
2374:
2375: EXCEPTION
2376: WHEN fnd_api.g_exc_unexpected_error THEN
2377: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2378: IF (l_logLevel <= wip_constants.trace_logging) THEN
2379: wip_logger.exitPoint(
2380: p_procName => 'wip_autoLotProc_priv.deriveSingleItemFromMOG',

Line 2377: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2373: END IF;
2374:
2375: EXCEPTION
2376: WHEN fnd_api.g_exc_unexpected_error THEN
2377: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2378: IF (l_logLevel <= wip_constants.trace_logging) THEN
2379: wip_logger.exitPoint(
2380: p_procName => 'wip_autoLotProc_priv.deriveSingleItemFromMOG',
2381: p_procReturnStatus => x_returnStatus,

Line 2391: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2387: fnd_message.set_token('ENTITY1', p_item.item_name);
2388: fnd_msg_pub.add;
2389:
2390: WHEN others THEN
2391: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2392: IF (l_logLevel <= wip_constants.trace_logging) THEN
2393: wip_logger.exitPoint(
2394: p_procName => 'wip_autoLotProc_priv.deriveSingleItemFromMOG',
2395: p_procReturnStatus => x_returnStatus,

Line 2486: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2482: IF(c_revisionComp%ISOPEN) THEN
2483: CLOSE c_revisionComp;
2484: END IF;
2485:
2486: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2487: IF (l_logLevel <= wip_constants.trace_logging) THEN
2488: wip_logger.exitPoint(
2489: p_procName => 'wip_autoLotProc_priv.setItemRevision',
2490: p_procReturnStatus => x_returnStatus,

Line 2524: IF(fnd_api.to_boolean(p_initMsgList)) THEN

2520: END IF;
2521:
2522: SAVEPOINT s_deriveLotsFromMOG;
2523:
2524: IF(fnd_api.to_boolean(p_initMsgList)) THEN
2525: fnd_msg_pub.initialize;
2526: END IF;
2527:
2528: x_compLots.reset;

Line 2530: x_returnStatus := fnd_api.g_ret_sts_success;

2526: END IF;
2527:
2528: x_compLots.reset;
2529: --assume we will be able to derive everything
2530: x_returnStatus := fnd_api.g_ret_sts_success;
2531:
2532: LOOP
2533: IF(x_compLots.getCurrentItem(l_curItem)) THEN
2534: IF(l_curItem.wip_supply_type NOT IN (WIP_CONSTANTS.PUSH,

Line 2555: IF(l_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN

2551: p_item => l_curItem,
2552: x_compLots => x_compLots,
2553: x_returnStatus => l_returnStatus);
2554:
2555: IF(l_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN
2556: l_errMsg := 'setItemRevision failed';
2557: raise fnd_api.g_exc_unexpected_error;
2558: END IF;
2559: END IF;

Line 2557: raise fnd_api.g_exc_unexpected_error;

2553: x_returnStatus => l_returnStatus);
2554:
2555: IF(l_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN
2556: l_errMsg := 'setItemRevision failed';
2557: raise fnd_api.g_exc_unexpected_error;
2558: END IF;
2559: END IF;
2560:
2561: deriveSingleItemFromMOG(p_parentObjID => p_objectID,

Line 2567: IF(l_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN

2563: p_item => l_curItem,
2564: x_compLots => x_compLots,
2565: x_returnStatus => l_returnStatus);
2566:
2567: IF(l_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN
2568: l_errMsg := 'deriveSingleItemFromMOG failed';
2569: raise fnd_api.g_exc_unexpected_error;
2570: END IF;
2571:

Line 2569: raise fnd_api.g_exc_unexpected_error;

2565: x_returnStatus => l_returnStatus);
2566:
2567: IF(l_returnStatus = fnd_api.g_ret_sts_unexp_error) THEN
2568: l_errMsg := 'deriveSingleItemFromMOG failed';
2569: raise fnd_api.g_exc_unexpected_error;
2570: END IF;
2571:
2572: END IF; -- x_compLots.getCurrentItem(l_curItem)
2573: <>

Line 2587: WHEN fnd_api.g_exc_unexpected_error THEN

2583: x_returnStatus => l_returnStatus);
2584: END IF;
2585:
2586: EXCEPTION
2587: WHEN fnd_api.g_exc_unexpected_error THEN
2588: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2589: IF (l_logLevel <= wip_constants.trace_logging) THEN
2590: wip_logger.exitPoint(
2591: p_procName => 'wip_autoLotProc_priv.deriveLotsFromMOG',

Line 2588: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2584: END IF;
2585:
2586: EXCEPTION
2587: WHEN fnd_api.g_exc_unexpected_error THEN
2588: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2589: IF (l_logLevel <= wip_constants.trace_logging) THEN
2590: wip_logger.exitPoint(
2591: p_procName => 'wip_autoLotProc_priv.deriveLotsFromMOG',
2592: p_procReturnStatus => x_returnStatus,

Line 2599: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2595: END IF;
2596: ROLLBACK TO s_deriveLotsFromMOG;
2597:
2598: WHEN others THEN
2599: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2600: IF (l_logLevel <= wip_constants.trace_logging) THEN
2601: wip_logger.exitPoint(
2602: p_procName => 'wip_autoLotProc_priv.deriveLotsFromMOG',
2603: p_procReturnStatus => x_returnStatus,