DBA Data[Home] [Help]

APPS.WIP_MOVPROC_PRIV dependencies on FND_API

Line 229: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

225: x_lotSerRequired => l_ls_required,
226: x_bfRequired => l_bf_required,
227: x_returnStatus => l_returnStatus);
228:
229: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
230: raise fnd_api.g_exc_unexpected_error;
231: ELSE
232: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
233: -- If we need to gather more lot/serial, error out because

Line 230: raise fnd_api.g_exc_unexpected_error;

226: x_bfRequired => l_bf_required,
227: x_returnStatus => l_returnStatus);
228:
229: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
230: raise fnd_api.g_exc_unexpected_error;
231: ELSE
232: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
233: -- If we need to gather more lot/serial, error out because
234: -- we cannot gather lot/serial for background transaction.

Line 237: raise fnd_api.g_exc_unexpected_error;

233: -- If we need to gather more lot/serial, error out because
234: -- we cannot gather lot/serial for background transaction.
235: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
236: fnd_msg_pub.add;
237: raise fnd_api.g_exc_unexpected_error;
238: END IF;
239: END IF; -- check return status
240: END LOOP; -- repetitive schedule
241: ELSIF(p_entity_type = WIP_CONSTANTS.DISCRETE) THEN

Line 272: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

268: x_lotSerRequired => l_ls_required,
269: x_bfRequired => l_bf_required,
270: x_returnStatus => l_returnStatus);
271:
272: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
273: raise fnd_api.g_exc_unexpected_error;
274: ELSE
275: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
276: -- If we need to gather more lot/serial, error out because

Line 273: raise fnd_api.g_exc_unexpected_error;

269: x_bfRequired => l_bf_required,
270: x_returnStatus => l_returnStatus);
271:
272: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
273: raise fnd_api.g_exc_unexpected_error;
274: ELSE
275: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
276: -- If we need to gather more lot/serial, error out because
277: -- we cannot gather lot/serial for background transaction.

Line 280: raise fnd_api.g_exc_unexpected_error;

276: -- If we need to gather more lot/serial, error out because
277: -- we cannot gather lot/serial for background transaction.
278: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
279: fnd_msg_pub.add;
280: raise fnd_api.g_exc_unexpected_error;
281: END IF;
282: END IF; -- check return status
283: END LOOP; -- Discrete
284: ELSIF(p_entity_type = WIP_CONSTANTS.LOTBASED) THEN

Line 306: p_init_msg_list => fnd_api.g_true,

302: p_cplTxnID => l_OSFMAssembly.cpl_txn_id,
303: p_mtlTxnMode => p_gib.mtl_mode,
304: p_reasonID => l_OSFMAssembly.reason_id,
305: p_reference => l_OSFMAssembly.reference,
306: p_init_msg_list => fnd_api.g_true,
307: x_lotSerRequired => l_ls_required,
308: x_returnStatus => l_returnStatus,
309: x_error_msg => l_error_msg, -- throw away value
310: x_error_count => l_error_count); -- throw away value

Line 312: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

308: x_returnStatus => l_returnStatus,
309: x_error_msg => l_error_msg, -- throw away value
310: x_error_count => l_error_count); -- throw away value
311:
312: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
313: raise fnd_api.g_exc_unexpected_error;
314: ELSE
315: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
316: -- If we need to gather more lot/serial, error out because

Line 313: raise fnd_api.g_exc_unexpected_error;

309: x_error_msg => l_error_msg, -- throw away value
310: x_error_count => l_error_count); -- throw away value
311:
312: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
313: raise fnd_api.g_exc_unexpected_error;
314: ELSE
315: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
316: -- If we need to gather more lot/serial, error out because
317: -- we cannot gather lot/serial for background transaction.

Line 320: raise fnd_api.g_exc_unexpected_error;

316: -- If we need to gather more lot/serial, error out because
317: -- we cannot gather lot/serial for background transaction.
318: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
319: fnd_msg_pub.add;
320: raise fnd_api.g_exc_unexpected_error;
321: END IF;
322: END IF; -- check return status
323: END LOOP; -- OSFM
324: END IF; -- entity_type check

Line 404: l_returnStatus := fnd_api.g_ret_sts_success;

400: wip_logger.log(p_msg => l_msg,
401: x_returnStatus => l_returnStatus);
402: END IF;
403:
404: l_returnStatus := fnd_api.g_ret_sts_success;
405: IF (l_logLevel <= wip_constants.trace_logging) THEN
406: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.component_cleanup',
407: p_procReturnStatus => l_returnStatus,
408: p_msg => 'procedure complete',

Line 533: l_returnStatus := fnd_api.g_ret_sts_success;

529: wip_logger.log(p_msg => l_count || ' records inserted',
530: x_returnStatus => l_returnStatus);
531: END IF;
532:
533: l_returnStatus := fnd_api.g_ret_sts_success;
534: IF (l_logLevel <= wip_constants.trace_logging) THEN
535: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.write_mtl_errors',
536: p_procReturnStatus => l_returnStatus,
537: p_msg => 'procedure complete',

Line 542: l_returnStatus := fnd_api.g_ret_sts_unexp_error;

538: x_returnStatus => l_returnStatus);
539: END IF;
540: EXCEPTION
541: WHEN others THEN
542: l_returnStatus := fnd_api.g_ret_sts_unexp_error;
543: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
544:
545: IF (l_logLevel <= wip_constants.trace_logging) THEN
546: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.write_mtl_errors',

Line 616: x_returnStatus := fnd_api.g_ret_sts_success;

612:
613: IF(c_wipops%ISOPEN) THEN
614: CLOSE c_wipops;
615: END IF;
616: x_returnStatus := fnd_api.g_ret_sts_success;
617:
618: -- write to the log file
619: IF (l_logLevel <= wip_constants.trace_logging) THEN
620: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',

Line 631: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

627: WHEN wip_constants.records_locked THEN
628: IF(c_wipops%ISOPEN) THEN
629: CLOSE c_wipops;
630: END IF;
631: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
632: l_errMsg := 'Unable to lock the record in wip_operations';
633:
634: IF (l_logLevel <= wip_constants.trace_logging) THEN
635: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',

Line 647: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

643: WHEN others THEN
644: IF(c_wipops%ISOPEN) THEN
645: CLOSE c_wipops;
646: END IF;
647: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
648: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
649:
650: IF (l_logLevel <= wip_constants.trace_logging) THEN
651: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.lock_wipops',

Line 849: raise fnd_api.g_exc_unexpected_error;

845: -- fulfilled without needing overcompletion. In that case it must be
846: -- an error
847: x_proc_status := TVE_OVERCOMPLETION_MISMATCH;
848: l_errMsg := 'Overcompletion mismatch';
849: raise fnd_api.g_exc_unexpected_error;
850: END IF;
851:
852: -- for parent transaction, it always come here because the available
853: -- qty is not enough. Child transaction also come here

Line 858: raise fnd_api.g_exc_unexpected_error;

854: <>
855:
856: IF (l_recordFound = 0) THEN -- no schedule found
857: l_errMsg := 'No repetitive schedule found';
858: raise fnd_api.g_exc_unexpected_error;
859: ELSIF((p_oc_txn_type = WIP_CONSTANTS.parent_txn OR
860: (p_txnType = WIP_CONSTANTS.RET_TXN AND
861: p_fm_form = WIP_CONSTANTS.YES)) AND
862: l_quantity > 0) THEN

Line 897: raise fnd_api.g_exc_unexpected_error;

893: -- user insert incorrect value for normal transaction txn qty must
894: -- be less than or equal to available qty
895: x_proc_status := TVE_NO_MOVE_ALLOC;
896: l_errMsg := 'Not enough qty to move';
897: raise fnd_api.g_exc_unexpected_error;
898: END IF;
899: END IF;
900: END IF; -- no schedule found
901:

Line 905: x_returnStatus := fnd_api.g_ret_sts_success;

901:
902: IF(c_rsa%ISOPEN) THEN
903: CLOSE c_rsa;
904: END IF;
905: x_returnStatus := fnd_api.g_ret_sts_success;
906: x_proc_status := WIP_CONSTANTS.RUNNING;
907: -- write to the log file
908: IF (l_logLevel <= wip_constants.trace_logging) THEN
909: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',

Line 916: WHEN fnd_api.g_exc_unexpected_error THEN

912: x_returnStatus => l_returnStatus);
913: END IF;
914:
915: EXCEPTION
916: WHEN fnd_api.g_exc_unexpected_error THEN
917: IF(c_rsa%ISOPEN) THEN
918: CLOSE c_rsa;
919: END IF;
920: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 920: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

916: WHEN fnd_api.g_exc_unexpected_error THEN
917: IF(c_rsa%ISOPEN) THEN
918: CLOSE c_rsa;
919: END IF;
920: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
921:
922: IF (l_logLevel <= wip_constants.trace_logging) THEN
923: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.schedule_alloc',
924: p_procReturnStatus => x_returnStatus,

Line 938: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

934: WHEN others THEN
935: IF(c_rsa%ISOPEN) THEN
936: CLOSE c_rsa;
937: END IF;
938: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
939: x_proc_status := WIP_CONSTANTS.ERROR;
940: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
941:
942: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 1018: raise fnd_api.g_exc_unexpected_error;

1014: p_err_mesg => l_msgData);
1015:
1016: IF(p_gib.move_profile.child_txn_id IS NULL) THEN
1017: l_errMsg := 'WIP_OVERCOMPLETION.insert_child_move_txn failed';
1018: raise fnd_api.g_exc_unexpected_error;
1019: END IF;
1020:
1021: IF(l_first_op_seq_num IS NOT NULL) THEN
1022: x_oc_fm_op := l_first_op_seq_num;

Line 1025: raise fnd_api.g_exc_unexpected_error;

1021: IF(l_first_op_seq_num IS NOT NULL) THEN
1022: x_oc_fm_op := l_first_op_seq_num;
1023: ELSE
1024: l_errMsg := 'wip_operations_INFO.first_operation failed';
1025: raise fnd_api.g_exc_unexpected_error;
1026: END IF;
1027:
1028: IF(p_scheID > 0) THEN
1029: -- this is a repetitvie schedule, hence must insert allocation records

Line 1069: x_returnStatus := fnd_api.g_ret_sts_success;

1065: FROM wip_move_txn_allocations wmta1
1066: WHERE wmta1.transaction_id = wmta.transaction_id
1067: AND wmta1.organization_id = wmta.organization_id));
1068: END IF; -- p_scheID > 0
1069: x_returnStatus := fnd_api.g_ret_sts_success;
1070:
1071: -- write to the log file
1072: IF (l_logLevel <= wip_constants.trace_logging) THEN
1073: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',

Line 1080: WHEN fnd_api.g_exc_unexpected_error THEN

1076: x_returnStatus => l_returnStatus);
1077: END IF;
1078:
1079: EXCEPTION
1080: WHEN fnd_api.g_exc_unexpected_error THEN
1081:
1082: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1083:
1084: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 1082: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1078:
1079: EXCEPTION
1080: WHEN fnd_api.g_exc_unexpected_error THEN
1081:
1082: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1083:
1084: IF (l_logLevel <= wip_constants.trace_logging) THEN
1085: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',
1086: p_procReturnStatus => x_returnStatus,

Line 1096: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1092: fnd_message.set_token('MESSAGE', l_msgData);
1093: fnd_msg_pub.add;
1094:
1095: WHEN others THEN
1096: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1097: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1098:
1099: IF (l_logLevel <= wip_constants.trace_logging) THEN
1100: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_alloc_child',

Line 1286: x_returnStatus := fnd_api.g_ret_sts_success;

1282:
1283:
1284: END LOOP; -- END for loop
1285:
1286: x_returnStatus := fnd_api.g_ret_sts_success;
1287:
1288: -- write to the log file
1289: IF (l_logLevel <= wip_constants.trace_logging) THEN
1290: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_rs',

Line 1298: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1294: END IF;
1295:
1296: EXCEPTION
1297: WHEN others THEN
1298: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1299: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1300:
1301: IF (l_logLevel <= wip_constants.trace_logging) THEN
1302: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_rs',

Line 1398: x_returnStatus := fnd_api.g_ret_sts_success;

1394: -- Picked the row corresponding to the txn. 1 each for such txns
1395: -- Rowids can be duplicate because there might be 2 wmti records with
1396: -- the same fm_op
1397:
1398: x_returnStatus := fnd_api.g_ret_sts_success;
1399:
1400: -- write to the log file
1401: IF (l_logLevel <= wip_constants.trace_logging) THEN
1402: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wipops',

Line 1410: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1406: END IF;
1407:
1408: EXCEPTION
1409: WHEN OTHERS THEN
1410: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1411: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1412:
1413: IF (l_logLevel <= wip_constants.trace_logging) THEN
1414: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wipops',

Line 1591: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

1587: update_wipops(p_txn_id => l_rs_txn.txn_id,
1588: p_gib => p_gib,
1589: x_returnStatus => x_returnStatus);
1590:
1591: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1592: l_errMsg := 'wip_movProc_priv.update_wipops failed';
1593: raise fnd_api.g_exc_unexpected_error;
1594: END IF;
1595:

Line 1593: raise fnd_api.g_exc_unexpected_error;

1589: x_returnStatus => x_returnStatus);
1590:
1591: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1592: l_errMsg := 'wip_movProc_priv.update_wipops failed';
1593: raise fnd_api.g_exc_unexpected_error;
1594: END IF;
1595:
1596: END IF; -- child txns
1597:

Line 1609: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

1605: p_gib => p_gib,
1606: x_oc_fm_op => l_oc_fm_op,
1607: x_returnStatus => x_returnStatus);
1608:
1609: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1610:
1611: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1612: UPDATE wip_move_txn_interface
1613: SET process_status = WIP_CONSTANTS.PENDING,

Line 1621: raise fnd_api.g_exc_unexpected_error;

1617: AND group_id = p_gib.group_id;
1618: END IF; -- time out check
1619:
1620: l_errMsg := 'wip_movProc_priv.insert_alloc_child failed';
1621: raise fnd_api.g_exc_unexpected_error;
1622:
1623: ELSE -- insert child success
1624: -- insert assemblies in the queue of the first operation after
1625: -- the child record is inserted

Line 1630: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

1626: update_wipops(p_txn_id => p_gib.move_profile.child_txn_id,
1627: p_gib => p_gib,
1628: x_returnStatus => x_returnStatus);
1629:
1630: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1631: l_errMsg := 'wip_movProc_priv.update_wipops failed';
1632: raise fnd_api.g_exc_unexpected_error;
1633: END IF;
1634:

Line 1632: raise fnd_api.g_exc_unexpected_error;

1628: x_returnStatus => x_returnStatus);
1629:
1630: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1631: l_errMsg := 'wip_movProc_priv.update_wipops failed';
1632: raise fnd_api.g_exc_unexpected_error;
1633: END IF;
1634:
1635: -- prepare data before calling update_wo_rs
1636: l_update_rsa(1).scheID := l_rsa(l_sche_count).scheID;

Line 1656: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

1652: p_rsa_rec => l_update_rsa,
1653: p_txn_date => l_rs_txn.txn_date,
1654: x_returnStatus => x_returnStatus);
1655:
1656: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1657: l_errMsg := 'wip_movProc_priv.update_wo_rs failed';
1658: raise fnd_api.g_exc_unexpected_error;
1659: END IF;
1660: END IF; -- insert_alloc_child check

Line 1658: raise fnd_api.g_exc_unexpected_error;

1654: x_returnStatus => x_returnStatus);
1655:
1656: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1657: l_errMsg := 'wip_movProc_priv.update_wo_rs failed';
1658: raise fnd_api.g_exc_unexpected_error;
1659: END IF;
1660: END IF; -- insert_alloc_child check
1661:
1662: IF(l_rs_txn.oc_pri_qty <> 0 AND

Line 1683: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

1679: */
1680: p_fm_op => l_rs_txn.fm_op,
1681: x_return_status => x_returnStatus);
1682:
1683: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1684: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
1685: raise fnd_api.g_exc_unexpected_error;
1686: END IF; -- l_return_status
1687: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES

Line 1685: raise fnd_api.g_exc_unexpected_error;

1681: x_return_status => x_returnStatus);
1682:
1683: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1684: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
1685: raise fnd_api.g_exc_unexpected_error;
1686: END IF; -- l_return_status
1687: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES
1688: END IF; -- l_rs_txn.oc_pri_qty <> 0 and customer have PO FPJ
1689: END IF; -- IF parent_txn

Line 1714: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

1710: p_rsa_rec => l_update_rsa,
1711: p_txn_date => l_rs_txn.txn_date,
1712: x_returnStatus => x_returnStatus);
1713:
1714: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1715: l_errMsg := 'wip_movProc_priv.update_wo_rs failed';
1716: raise fnd_api.g_exc_unexpected_error;
1717: END IF;
1718:

Line 1716: raise fnd_api.g_exc_unexpected_error;

1712: x_returnStatus => x_returnStatus);
1713:
1714: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
1715: l_errMsg := 'wip_movProc_priv.update_wo_rs failed';
1716: raise fnd_api.g_exc_unexpected_error;
1717: END IF;
1718:
1719: ELSIF(l_proc_status = TVE_OVERCOMPLETION_MISMATCH OR
1720: l_proc_status = TVE_NO_MOVE_ALLOC) THEN

Line 1737: raise fnd_api.g_exc_unexpected_error;

1733: IF(l_proc_status = TVE_OVERCOMPLETION_MISMATCH) THEN
1734: fnd_message.set_name('WIP', 'WIP_OVERCOMPLETION_MISMATCH');
1735: fnd_msg_pub.add;
1736: l_errMsg := 'parent txn is not really overcompletion txn';
1737: raise fnd_api.g_exc_unexpected_error;
1738: ELSE
1739: fnd_message.set_name('WIP', 'WIP_LESS_OR_EQUAL');
1740: fnd_message.set_token('ENTITY1', 'transaction quantity');
1741: fnd_message.set_token('ENTITY2', 'quantity available to move');

Line 1744: raise fnd_api.g_exc_unexpected_error;

1740: fnd_message.set_token('ENTITY1', 'transaction quantity');
1741: fnd_message.set_token('ENTITY2', 'quantity available to move');
1742: fnd_msg_pub.add;
1743: l_errMsg := 'available qty is not enough to fullfill move txn';
1744: raise fnd_api.g_exc_unexpected_error;
1745: END IF;
1746:
1747: ELSIF(l_proc_status = WIP_CONSTANTS.ERROR) THEN
1748:

Line 1756: raise fnd_api.g_exc_unexpected_error;

1752: WHERE transaction_id = l_rs_txn.txn_id
1753: AND group_id = p_gib.group_id;
1754:
1755: l_errMsg := 'wip_movProc_priv.schedule_alloc failed';
1756: raise fnd_api.g_exc_unexpected_error;
1757:
1758: END IF; -- process_status
1759:
1760: END IF; -- c_rs_txn%NOTFOUND

Line 1767: WHEN fnd_api.g_exc_unexpected_error THEN

1763: p_gib.move_profile.child_txn_id := null;
1764: -- Fixed bug 4406536. We should error out only problematic record and
1765: -- continue to process next record.
1766: EXCEPTION
1767: WHEN fnd_api.g_exc_unexpected_error THEN
1768: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
1769: IF (l_rs_txn.past_timeout = 0) THEN -- not time out yet
1770: UPDATE wip_move_txn_interface
1771: SET process_status = WIP_CONSTANTS.PENDING,

Line 1822: raise fnd_api.g_exc_unexpected_error;

1818: AND wmti.group_id = p_gib.group_id;
1819: END IF; -- time out check
1820: ELSE--Online processing
1821: --Bug 5210073: Raise an exception to rollback the changes in online mode.
1822: raise fnd_api.g_exc_unexpected_error;
1823: END IF; -- background check
1824: END;
1825: END LOOP;
1826:

Line 1830: raise fnd_api.g_exc_unexpected_error;

1826:
1827: <>
1828: IF (l_rec_count = 0) THEN -- no record found
1829: l_errMsg := 'No reptitive move record found';
1830: raise fnd_api.g_exc_unexpected_error;
1831:
1832: ELSE
1833: IF(c_rs_txn%ISOPEN) THEN
1834: CLOSE c_rs_txn;

Line 1836: x_returnStatus := fnd_api.g_ret_sts_success;

1832: ELSE
1833: IF(c_rs_txn%ISOPEN) THEN
1834: CLOSE c_rs_txn;
1835: END IF;
1836: x_returnStatus := fnd_api.g_ret_sts_success;
1837:
1838: -- write to the log file
1839: IF (l_logLevel <= wip_constants.trace_logging) THEN
1840: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',

Line 1850: WHEN fnd_api.g_exc_unexpected_error THEN

1846: END IF;
1847:
1848: EXCEPTION
1849:
1850: WHEN fnd_api.g_exc_unexpected_error THEN
1851: IF(c_rs_txn%ISOPEN) THEN
1852: CLOSE c_rs_txn;
1853: END IF;
1854: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 1854: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1850: WHEN fnd_api.g_exc_unexpected_error THEN
1851: IF(c_rs_txn%ISOPEN) THEN
1852: CLOSE c_rs_txn;
1853: END IF;
1854: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1855:
1856: IF (l_logLevel <= wip_constants.trace_logging) THEN
1857: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',
1858: p_procReturnStatus => x_returnStatus,

Line 1866: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

1862: WHEN others THEN
1863: IF(c_rs_txn%ISOPEN) THEN
1864: CLOSE c_rs_txn;
1865: END IF;
1866: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
1867: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1868:
1869: IF (l_logLevel <= wip_constants.trace_logging) THEN
1870: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.rep_move_alloc',

Line 2064: x_returnStatus := fnd_api.g_ret_sts_success;

2060: WIP_CONSTANTS.SCRAP,p_fm_op,
2061: p_to_op));
2062: END IF;
2063:
2064: x_returnStatus := fnd_api.g_ret_sts_success;
2065:
2066: -- write to the log file
2067: IF (l_logLevel <= wip_constants.trace_logging) THEN
2068: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_dj',

Line 2076: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2072: END IF;
2073:
2074: EXCEPTION
2075: WHEN others THEN
2076: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2077: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2078:
2079: IF (l_logLevel <= wip_constants.trace_logging) THEN
2080: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wo_dj',

Line 2235: raise fnd_api.g_exc_unexpected_error;

2231: l_ser_loc.sn_step <> l_dj_txn.fm_step)) THEN
2232: fnd_message.set_name('WIP', 'WIP_SERIAL_LOCATION_MISSMATCH');
2233: fnd_msg_pub.add;
2234: l_errMsg := 'current serial location missmatch';
2235: raise fnd_api.g_exc_unexpected_error;
2236: ELSE -- serial location is valid to move
2237: -- If user move back to Queue of serialization start op, we clear
2238: -- operation_seq_num and intraoperation_step_type in MSNT
2239: IF (l_dj_txn.to_op = l_dj_txn.sn_start_op AND

Line 2259: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

2255: p_operation_seq_num => l_opSeq,
2256: p_intraoperation_step_type => l_step,
2257: x_return_status => l_returnStatus);
2258:
2259: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
2260: l_errMsg := 'wip_utilities.update_serial failed';
2261: raise fnd_api.g_exc_unexpected_error;
2262: END IF;
2263: END IF; -- IF(l_dj_txn.txn_type

Line 2261: raise fnd_api.g_exc_unexpected_error;

2257: x_return_status => l_returnStatus);
2258:
2259: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
2260: l_errMsg := 'wip_utilities.update_serial failed';
2261: raise fnd_api.g_exc_unexpected_error;
2262: END IF;
2263: END IF; -- IF(l_dj_txn.txn_type
2264: END LOOP; -- l_ser_loc IN c_ser_loc
2265: END IF; -- serialized move

Line 2288: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

2284: update_wipops(p_txn_id => l_dj_txn.txn_id,
2285: p_gib => p_gib,
2286: x_returnStatus => x_returnStatus);
2287:
2288: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2289: l_errMsg := 'wip_movProc_priv.update_wipops failed';
2290: raise fnd_api.g_exc_unexpected_error;
2291: END IF; -- check return status
2292:

Line 2290: raise fnd_api.g_exc_unexpected_error;

2286: x_returnStatus => x_returnStatus);
2287:
2288: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2289: l_errMsg := 'wip_movProc_priv.update_wipops failed';
2290: raise fnd_api.g_exc_unexpected_error;
2291: END IF; -- check return status
2292:
2293: ELSE -- IF it is parent or normal txn, validate qty
2294:

Line 2334: raise fnd_api.g_exc_unexpected_error;

2330: fnd_message.set_token('ENTITY1', 'transaction quantity');
2331: fnd_message.set_token('ENTITY2', 'quantity available to move');
2332: fnd_msg_pub.add;
2333: l_errMsg := 'available qty is not enough to fullfill move txn';
2334: raise fnd_api.g_exc_unexpected_error;
2335: ELSE -- enough qty to move
2336: IF(l_dj_txn.oc_txn_type = WIP_CONSTANTS.parent_txn) THEN
2337:
2338: -- all procedure in this loop is pretty much for child record

Line 2348: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

2344: p_gib => p_gib,
2345: x_oc_fm_op => l_oc_fm_op,
2346: x_returnStatus => x_returnStatus);
2347:
2348: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2349: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2350: UPDATE wip_move_txn_interface
2351: SET process_status = WIP_CONSTANTS.PENDING,
2352: group_id = NULL,

Line 2359: raise fnd_api.g_exc_unexpected_error;

2355: AND group_id = p_gib.group_id;
2356: END IF; -- time out check
2357:
2358: l_errMsg := 'wip_movProc_priv.insert_alloc_child failed';
2359: raise fnd_api.g_exc_unexpected_error;
2360:
2361: ELSE -- insert child success
2362: -- insert assemblies in the queue of the first operation after
2363: -- the child record is inserted

Line 2368: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

2364: update_wipops(p_txn_id => p_gib.move_profile.child_txn_id,
2365: p_gib => p_gib,
2366: x_returnStatus => x_returnStatus);
2367:
2368: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2369: l_errMsg := 'wip_movProc_priv.update_wipops failed';
2370: raise fnd_api.g_exc_unexpected_error;
2371: END IF;
2372:

Line 2370: raise fnd_api.g_exc_unexpected_error;

2366: x_returnStatus => x_returnStatus);
2367:
2368: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2369: l_errMsg := 'wip_movProc_priv.update_wipops failed';
2370: raise fnd_api.g_exc_unexpected_error;
2371: END IF;
2372:
2373: -- update wip_operations for child move txns
2374: update_wo_dj(p_gib => p_gib,

Line 2385: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

2381: p_wip_id => l_dj_txn.wip_id,
2382: p_txn_date => l_dj_txn.txn_date,
2383: x_returnStatus => x_returnStatus);
2384:
2385: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2386: l_errMsg := 'wip_movProc_priv.update_wo_dj failed';
2387: raise fnd_api.g_exc_unexpected_error;
2388: END IF;
2389: END IF; -- insert_alloc_child check

Line 2387: raise fnd_api.g_exc_unexpected_error;

2383: x_returnStatus => x_returnStatus);
2384:
2385: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2386: l_errMsg := 'wip_movProc_priv.update_wo_dj failed';
2387: raise fnd_api.g_exc_unexpected_error;
2388: END IF;
2389: END IF; -- insert_alloc_child check
2390:
2391: -- Increase PO/requisition quantity if overmove

Line 2412: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

2408: */
2409: p_fm_op => l_dj_txn.fm_op,
2410: x_return_status => x_returnStatus);
2411:
2412: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2413: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
2414: raise fnd_api.g_exc_unexpected_error;
2415: END IF; -- x_returnStatus
2416: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES

Line 2414: raise fnd_api.g_exc_unexpected_error;

2410: x_return_status => x_returnStatus);
2411:
2412: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2413: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
2414: raise fnd_api.g_exc_unexpected_error;
2415: END IF; -- x_returnStatus
2416: END IF; -- l_propagate_job_change_to_po = WIP_CONSTANTS.YES
2417: END IF; -- l_dj_txn.oc_pri_qty <> 0 and customer have PO FPJ
2418: END IF; -- IF parent_txn

Line 2432: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN

2428: p_wip_id => l_dj_txn.wip_id,
2429: p_txn_date => l_dj_txn.txn_date,
2430: x_returnStatus => x_returnStatus);
2431:
2432: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2433: l_errMsg := 'wip_movProc_priv.update_wo_dj failed';
2434: raise fnd_api.g_exc_unexpected_error;
2435: END IF;
2436:

Line 2434: raise fnd_api.g_exc_unexpected_error;

2430: x_returnStatus => x_returnStatus);
2431:
2432: IF (x_returnStatus <> fnd_api.g_ret_sts_success) THEN
2433: l_errMsg := 'wip_movProc_priv.update_wo_dj failed';
2434: raise fnd_api.g_exc_unexpected_error;
2435: END IF;
2436:
2437: END IF; -- check enough qty
2438:

Line 2446: WHEN fnd_api.g_exc_unexpected_error THEN

2442: p_gib.move_profile.child_txn_id := null;
2443: -- Fixed bug 4406536. We should error out only problematic record and
2444: -- continue to process next record.
2445: EXCEPTION
2446: WHEN fnd_api.g_exc_unexpected_error THEN
2447: IF(p_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
2448: IF (l_dj_txn.past_timeout = 0) THEN -- not time out yet
2449: UPDATE wip_move_txn_interface
2450: SET process_status = WIP_CONSTANTS.PENDING,

Line 2500: raise fnd_api.g_exc_unexpected_error;

2496: AND wmti.group_id = p_gib.group_id;
2497: END IF; -- time out check
2498: ELSE--Online processing
2499: --Bug 5210073: Raise an exception to rollback the changes in online mode.
2500: raise fnd_api.g_exc_unexpected_error;
2501: END IF; -- background check
2502: END;
2503: END LOOP; -- c_dj_txn
2504:

Line 2509: x_returnStatus := fnd_api.g_ret_sts_success;

2505: <>
2506: IF(c_dj_txn%ISOPEN) THEN
2507: CLOSE c_dj_txn;
2508: END IF;
2509: x_returnStatus := fnd_api.g_ret_sts_success;
2510:
2511: -- write to the log file
2512: IF (l_logLevel <= wip_constants.trace_logging) THEN
2513: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',

Line 2521: WHEN fnd_api.g_exc_unexpected_error THEN

2517: END IF;
2518:
2519: EXCEPTION
2520:
2521: WHEN fnd_api.g_exc_unexpected_error THEN
2522: IF(c_dj_txn%ISOPEN) THEN
2523: CLOSE c_dj_txn;
2524: END IF;
2525: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 2525: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2521: WHEN fnd_api.g_exc_unexpected_error THEN
2522: IF(c_dj_txn%ISOPEN) THEN
2523: CLOSE c_dj_txn;
2524: END IF;
2525: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2526:
2527: IF (l_logLevel <= wip_constants.trace_logging) THEN
2528: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',
2529: p_procReturnStatus => x_returnStatus,

Line 2538: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2534: WHEN others THEN
2535: IF(c_dj_txn%ISOPEN) THEN
2536: CLOSE c_dj_txn;
2537: END IF;
2538: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2539: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2540:
2541: IF (l_logLevel <= wip_constants.trace_logging) THEN
2542: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.check_qty_dj',

Line 2733: x_returnStatus := fnd_api.g_ret_sts_success;

2729:
2730: -- return move profile back
2731: p_gib.move_profile := l_move;
2732:
2733: x_returnStatus := fnd_api.g_ret_sts_success;
2734:
2735: -- write to the log file
2736: IF (l_logLevel <= wip_constants.trace_logging) THEN
2737: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.get_move_profile',

Line 2745: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

2741: END IF;
2742:
2743: EXCEPTION
2744: WHEN others THEN
2745: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
2746: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
2747:
2748: IF (l_logLevel <= wip_constants.trace_logging) THEN
2749: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.get_move_profile',

Line 3109: x_returnStatus := fnd_api.g_ret_sts_success;

3105: wip_logger.log(p_msg => l_msg,
3106: x_returnStatus => l_returnStatus);
3107: END IF;
3108:
3109: x_returnStatus := fnd_api.g_ret_sts_success;
3110:
3111: -- write to the log file
3112: IF (l_logLevel <= wip_constants.trace_logging) THEN
3113: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_history',

Line 3121: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

3117: END IF;
3118:
3119: EXCEPTION
3120: WHEN others THEN
3121: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3122: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
3123:
3124: IF (l_logLevel <= wip_constants.trace_logging) THEN
3125: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_history',

Line 3175: x_returnStatus := fnd_api.g_ret_sts_success;

3171: AND wmti.fm_intraoperation_step_type =
3172: wmti.to_intraoperation_step_type
3173: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE;
3174:
3175: x_returnStatus := fnd_api.g_ret_sts_success;
3176:
3177: -- write to the log file
3178: IF (l_logLevel <= wip_constants.trace_logging) THEN
3179: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.delete_child_txn',

Line 3187: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

3183: END IF;
3184:
3185: EXCEPTION
3186: WHEN others THEN
3187: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
3188: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
3189: IF (l_logLevel <= wip_constants.trace_logging) THEN
3190: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.delete_child_txn',
3191: p_procReturnStatus => x_returnStatus,

Line 4327: x_returnStatus := fnd_api.g_ret_sts_success;

4323: END IF;
4324:
4325: END IF; -- Per order basis type for repetitive
4326:
4327: x_returnStatus := fnd_api.g_ret_sts_success;
4328:
4329: -- write to the log file
4330: IF (l_logLevel <= wip_constants.trace_logging) THEN
4331: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_auto_resource',

Line 4339: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

4335: END IF;
4336:
4337: EXCEPTION
4338: WHEN others THEN
4339: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4340: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
4341:
4342: IF (l_logLevel <= wip_constants.trace_logging) THEN
4343: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_auto_resource',

Line 4467: x_returnStatus := fnd_api.g_ret_sts_success;

4463: wip_logger.log(p_msg => l_msg,
4464: x_returnStatus => l_returnStatus);
4465: END IF;
4466:
4467: x_returnStatus := fnd_api.g_ret_sts_success;
4468:
4469: -- write to the log file
4470: IF (l_logLevel <= wip_constants.trace_logging) THEN
4471: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_txn_alloc',

Line 4479: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

4475: END IF;
4476:
4477: EXCEPTION
4478: WHEN others THEN
4479: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
4480: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
4481:
4482: IF (l_logLevel <= wip_constants.trace_logging) THEN
4483: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_txn_alloc',

Line 5598: x_returnStatus := fnd_api.g_ret_sts_success;

5594: END IF;
5595:
5596: END IF; -- For repetitive
5597:
5598: x_returnStatus := fnd_api.g_ret_sts_success;
5599:
5600: -- write to the log file
5601: IF (l_logLevel <= wip_constants.trace_logging) THEN
5602: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_dept_overhead',

Line 5610: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

5606: END IF;
5607:
5608: EXCEPTION
5609: WHEN others THEN
5610: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
5611: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
5612:
5613: IF (l_logLevel <= wip_constants.trace_logging) THEN
5614: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_dept_overhead',

Line 5665: x_returnStatus := fnd_api.g_ret_sts_success;

5661: wip_logger.log(p_msg => l_msg,
5662: x_returnStatus => l_returnStatus);
5663: END IF;
5664:
5665: x_returnStatus := fnd_api.g_ret_sts_success;
5666:
5667: -- write to the log file
5668: IF (l_logLevel <= wip_constants.trace_logging) THEN
5669: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.release_cost_txn',

Line 5677: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

5673: END IF;
5674:
5675: EXCEPTION
5676: WHEN others THEN
5677: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
5678: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
5679:
5680: IF (l_logLevel <= wip_constants.trace_logging) THEN
5681: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.release_cost_txn',

Line 6704: x_returnStatus := fnd_api.g_ret_sts_success;

6700: IF(c_additional_reqs%ISOPEN) THEN
6701: CLOSE c_additional_reqs;
6702: END IF;
6703: END IF; -- check PO patchset
6704: x_returnStatus := fnd_api.g_ret_sts_success;
6705:
6706: -- write to the log file
6707: IF (l_logLevel <= wip_constants.trace_logging) THEN
6708: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.insert_po_req',

Line 6719: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

6715: WHEN others THEN
6716: IF(c_additional_reqs%ISOPEN) THEN
6717: CLOSE c_additional_reqs;
6718: END IF;
6719: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
6720: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
6721:
6722: IF (l_logLevel <= wip_constants.trace_logging) THEN
6723: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.insert_po_req',

Line 6900: x_returnStatus := fnd_api.g_ret_sts_success;

6896:
6897: IF(c_wmti_txn%ISOPEN) THEN
6898: CLOSE c_wmti_txn;
6899: END IF;
6900: x_returnStatus := fnd_api.g_ret_sts_success;
6901: -- write to the log file
6902: IF (l_logLevel <= wip_constants.trace_logging) THEN
6903: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.start_workflow',
6904: p_procReturnStatus => x_returnStatus,

Line 6915: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

6911: WHEN others THEN
6912: IF(c_wmti_txn%ISOPEN) THEN
6913: CLOSE c_wmti_txn;
6914: END IF;
6915: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
6916: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
6917:
6918: IF (l_logLevel <= wip_constants.trace_logging) THEN
6919: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.start_workflow',

Line 7113: x_returnStatus := fnd_api.g_ret_sts_success;

7109: wip_logger.log(p_msg => l_msg,
7110: x_returnStatus => l_returnStatus);
7111: END IF;
7112:
7113: x_returnStatus := fnd_api.g_ret_sts_success;
7114:
7115: -- write to the log file
7116: IF (l_logLevel <= wip_constants.trace_logging) THEN
7117: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_complete_qty',

Line 7125: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7121: END IF;
7122:
7123: EXCEPTION
7124: WHEN others THEN
7125: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7126: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7127:
7128: IF (l_logLevel <= wip_constants.trace_logging) THEN
7129: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_complete_qty',

Line 7171: raise fnd_api.g_exc_unexpected_error;

7167: err_code => l_errCode,
7168: err_msg => l_errMsg);
7169: IF(l_returnValue <> 1) THEN
7170: l_errMsg := 'CSTACOSN.op_snapshot failed';
7171: raise fnd_api.g_exc_unexpected_error;
7172: END IF;
7173:
7174: x_returnStatus := fnd_api.g_ret_sts_success;
7175:

Line 7174: x_returnStatus := fnd_api.g_ret_sts_success;

7170: l_errMsg := 'CSTACOSN.op_snapshot failed';
7171: raise fnd_api.g_exc_unexpected_error;
7172: END IF;
7173:
7174: x_returnStatus := fnd_api.g_ret_sts_success;
7175:
7176: -- write to the log file
7177: IF (l_logLevel <= wip_constants.trace_logging) THEN
7178: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.op_snapshot',

Line 7185: WHEN fnd_api.g_exc_unexpected_error THEN

7181: x_returnStatus => l_returnStatus);
7182: END IF;
7183:
7184: EXCEPTION
7185: WHEN fnd_api.g_exc_unexpected_error THEN
7186: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7187:
7188: IF (l_logLevel <= wip_constants.trace_logging) THEN
7189: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.op_snapshot',

Line 7186: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7182: END IF;
7183:
7184: EXCEPTION
7185: WHEN fnd_api.g_exc_unexpected_error THEN
7186: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7187:
7188: IF (l_logLevel <= wip_constants.trace_logging) THEN
7189: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.op_snapshot',
7190: p_procReturnStatus => x_returnStatus,

Line 7199: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7195: fnd_message.set_name('CST', l_errCode);
7196: fnd_msg_pub.add;
7197:
7198: WHEN others THEN
7199: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7200: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7201:
7202: IF (l_logLevel <= wip_constants.trace_logging) THEN
7203: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.op_snapshot',

Line 7298: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

7294: FOR l_mmtt IN c_mmtt LOOP
7295: op_snapshot(p_mtl_temp_id => l_mmtt.mtl_temp_id,
7296: x_returnStatus => x_returnStatus);
7297:
7298: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7299: l_errMsg := 'wip_movProc_priv.op_snapshot failed';
7300: raise fnd_api.g_exc_unexpected_error;
7301: END IF; -- check return status
7302: END LOOP; -- END for loop

Line 7300: raise fnd_api.g_exc_unexpected_error;

7296: x_returnStatus => x_returnStatus);
7297:
7298: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7299: l_errMsg := 'wip_movProc_priv.op_snapshot failed';
7300: raise fnd_api.g_exc_unexpected_error;
7301: END IF; -- check return status
7302: END LOOP; -- END for loop
7303: END IF;
7304:

Line 7305: x_returnStatus := fnd_api.g_ret_sts_success;

7301: END IF; -- check return status
7302: END LOOP; -- END for loop
7303: END IF;
7304:
7305: x_returnStatus := fnd_api.g_ret_sts_success;
7306:
7307: -- write to the log file
7308: IF (l_logLevel <= wip_constants.trace_logging) THEN
7309: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_online',

Line 7316: WHEN fnd_api.g_exc_unexpected_error THEN

7312: x_returnStatus => l_returnStatus);
7313: END IF;
7314:
7315: EXCEPTION
7316: WHEN fnd_api.g_exc_unexpected_error THEN
7317: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7318:
7319: IF (l_logLevel <= wip_constants.trace_logging) THEN
7320: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_online',

Line 7317: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7313: END IF;
7314:
7315: EXCEPTION
7316: WHEN fnd_api.g_exc_unexpected_error THEN
7317: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7318:
7319: IF (l_logLevel <= wip_constants.trace_logging) THEN
7320: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_online',
7321: p_procReturnStatus => x_returnStatus,

Line 7327: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7323: x_returnStatus => l_returnStatus);
7324: END IF;
7325:
7326: WHEN others THEN
7327: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7328: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7329:
7330: IF (l_logLevel <= wip_constants.trace_logging) THEN
7331: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.snapshot_online',

Line 7507: raise fnd_api.g_exc_unexpected_error;

7503: IF(l_returnValue <> 1) THEN
7504: fnd_message.set_name('CST', l_errCode);
7505: fnd_msg_pub.add;
7506: l_errMsg := 'CSTACOSN.validate_move_snap_to_temp failed';
7507: raise fnd_api.g_exc_unexpected_error;
7508: END IF; -- check return status
7509: ELSE
7510: op_snapshot(p_mtl_temp_id => l_txns.mtl_temp_id,
7511: x_returnStatus => x_returnStatus);

Line 7513: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

7509: ELSE
7510: op_snapshot(p_mtl_temp_id => l_txns.mtl_temp_id,
7511: x_returnStatus => x_returnStatus);
7512:
7513: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7514: l_errMsg := 'wip_movProc_priv.op_snapshot failed';
7515: raise fnd_api.g_exc_unexpected_error;
7516: END IF; -- check return status
7517: END IF; -- check load from interface and source code

Line 7515: raise fnd_api.g_exc_unexpected_error;

7511: x_returnStatus => x_returnStatus);
7512:
7513: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7514: l_errMsg := 'wip_movProc_priv.op_snapshot failed';
7515: raise fnd_api.g_exc_unexpected_error;
7516: END IF; -- check return status
7517: END IF; -- check load from interface and source code
7518: END LOOP;
7519:

Line 7521: x_returnStatus := fnd_api.g_ret_sts_success;

7517: END IF; -- check load from interface and source code
7518: END LOOP;
7519:
7520: <>
7521: x_returnStatus := fnd_api.g_ret_sts_success;
7522:
7523: -- write to the log file
7524: IF (l_logLevel <= wip_constants.trace_logging) THEN
7525: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.snapshot_background',

Line 7532: WHEN fnd_api.g_exc_unexpected_error THEN

7528: x_returnStatus => l_returnStatus);
7529: END IF;
7530:
7531: EXCEPTION
7532: WHEN fnd_api.g_exc_unexpected_error THEN
7533: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7534:
7535: IF (l_logLevel <= wip_constants.trace_logging) THEN
7536: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.snapshot_background',

Line 7533: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7529: END IF;
7530:
7531: EXCEPTION
7532: WHEN fnd_api.g_exc_unexpected_error THEN
7533: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7534:
7535: IF (l_logLevel <= wip_constants.trace_logging) THEN
7536: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.snapshot_background',
7537: p_procReturnStatus => x_returnStatus,

Line 7543: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7539: x_returnStatus => l_returnStatus);
7540: END IF;
7541:
7542: WHEN others THEN
7543: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7544: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7545:
7546: IF (l_logLevel <= wip_constants.trace_logging) THEN
7547: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.snapshot_background',

Line 7597: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

7593: update_complete_qty(p_gib => p_gib,
7594: p_txn_id => l_move_rec.txn_id,
7595: x_returnStatus => x_returnStatus);
7596:
7597: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7598: l_errMsg := 'wip_movProc_priv.update_complete_qty failed';
7599: raise fnd_api.g_exc_unexpected_error;
7600: END IF; -- check return status
7601:

Line 7599: raise fnd_api.g_exc_unexpected_error;

7595: x_returnStatus => x_returnStatus);
7596:
7597: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7598: l_errMsg := 'wip_movProc_priv.update_complete_qty failed';
7599: raise fnd_api.g_exc_unexpected_error;
7600: END IF; -- check return status
7601:
7602: snapshot_background(p_group_id => p_gib.group_id,
7603: p_txn_id => l_move_rec.txn_id,

Line 7607: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

7603: p_txn_id => l_move_rec.txn_id,
7604: p_txn_date => p_gib.txn_date,
7605: x_returnStatus => x_returnStatus);
7606:
7607: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7608: l_errMsg := 'wip_movProc_priv.snapshot_background failed';
7609: raise fnd_api.g_exc_unexpected_error;
7610: END IF; -- check return status
7611: END LOOP;

Line 7609: raise fnd_api.g_exc_unexpected_error;

7605: x_returnStatus => x_returnStatus);
7606:
7607: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7608: l_errMsg := 'wip_movProc_priv.snapshot_background failed';
7609: raise fnd_api.g_exc_unexpected_error;
7610: END IF; -- check return status
7611: END LOOP;
7612: ELSE
7613: -- update quantity_completed and take snapshot for the whole group

Line 7617: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

7613: -- update quantity_completed and take snapshot for the whole group
7614: update_complete_qty(p_gib => p_gib,
7615: x_returnStatus => x_returnStatus);
7616:
7617: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7618: l_errMsg := 'wip_movProc_priv.update_complete_qty failed';
7619: raise fnd_api.g_exc_unexpected_error;
7620: END IF; -- check return status
7621:

Line 7619: raise fnd_api.g_exc_unexpected_error;

7615: x_returnStatus => x_returnStatus);
7616:
7617: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7618: l_errMsg := 'wip_movProc_priv.update_complete_qty failed';
7619: raise fnd_api.g_exc_unexpected_error;
7620: END IF; -- check return status
7621:
7622: snapshot_background(p_group_id => p_gib.group_id,
7623: p_txn_date => p_gib.txn_date,

Line 7626: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

7622: snapshot_background(p_group_id => p_gib.group_id,
7623: p_txn_date => p_gib.txn_date,
7624: x_returnStatus => x_returnStatus);
7625:
7626: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7627: l_errMsg := 'wip_movProc_priv.snapshot_background failed';
7628: raise fnd_api.g_exc_unexpected_error;
7629: END IF; -- check return status
7630: END IF;

Line 7628: raise fnd_api.g_exc_unexpected_error;

7624: x_returnStatus => x_returnStatus);
7625:
7626: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
7627: l_errMsg := 'wip_movProc_priv.snapshot_background failed';
7628: raise fnd_api.g_exc_unexpected_error;
7629: END IF; -- check return status
7630: END IF;
7631:
7632: x_returnStatus := fnd_api.g_ret_sts_success;

Line 7632: x_returnStatus := fnd_api.g_ret_sts_success;

7628: raise fnd_api.g_exc_unexpected_error;
7629: END IF; -- check return status
7630: END IF;
7631:
7632: x_returnStatus := fnd_api.g_ret_sts_success;
7633: -- write to the log file
7634: IF (l_logLevel <= wip_constants.trace_logging) THEN
7635: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.update_wo_and_snapshot',
7636: p_procReturnStatus => x_returnStatus,

Line 7641: WHEN fnd_api.g_exc_unexpected_error THEN

7637: p_msg => 'procedure complete',
7638: x_returnStatus => l_returnStatus);
7639: END IF;
7640: EXCEPTION
7641: WHEN fnd_api.g_exc_unexpected_error THEN
7642: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7643: IF (l_logLevel <= wip_constants.trace_logging) THEN
7644: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.update_wo_and_snapshot',
7645: p_procReturnStatus => x_returnStatus,

Line 7642: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7638: x_returnStatus => l_returnStatus);
7639: END IF;
7640: EXCEPTION
7641: WHEN fnd_api.g_exc_unexpected_error THEN
7642: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7643: IF (l_logLevel <= wip_constants.trace_logging) THEN
7644: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.update_wo_and_snapshot',
7645: p_procReturnStatus => x_returnStatus,
7646: p_msg => l_errMsg,

Line 7651: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

7647: x_returnStatus => l_returnStatus);
7648: END IF;
7649:
7650: WHEN others THEN
7651: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
7652: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
7653:
7654: IF (l_logLevel <= wip_constants.trace_logging) THEN
7655: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_wo_and_snapshot',

Line 7826: IF (l_returnstatus <> fnd_api.g_ret_sts_success) THEN

7822: x_return_status => l_returnstatus,
7823: x_msg_count => l_msg_count,
7824: x_msg_data => l_msg_data
7825: );
7826: IF (l_returnstatus <> fnd_api.g_ret_sts_success) THEN
7827: IF (l_returnstatus = fnd_api.g_ret_sts_error) THEN
7828: fnd_msg_pub.count_and_get(
7829: p_encoded => fnd_api.g_false,
7830: p_count => l_msg_count,

Line 7827: IF (l_returnstatus = fnd_api.g_ret_sts_error) THEN

7823: x_msg_count => l_msg_count,
7824: x_msg_data => l_msg_data
7825: );
7826: IF (l_returnstatus <> fnd_api.g_ret_sts_success) THEN
7827: IF (l_returnstatus = fnd_api.g_ret_sts_error) THEN
7828: fnd_msg_pub.count_and_get(
7829: p_encoded => fnd_api.g_false,
7830: p_count => l_msg_count,
7831: p_data => l_errmsg);

Line 7829: p_encoded => fnd_api.g_false,

7825: );
7826: IF (l_returnstatus <> fnd_api.g_ret_sts_success) THEN
7827: IF (l_returnstatus = fnd_api.g_ret_sts_error) THEN
7828: fnd_msg_pub.count_and_get(
7829: p_encoded => fnd_api.g_false,
7830: p_count => l_msg_count,
7831: p_data => l_errmsg);
7832: RAISE fnd_api.g_exc_error;
7833: ELSE

Line 7832: RAISE fnd_api.g_exc_error;

7828: fnd_msg_pub.count_and_get(
7829: p_encoded => fnd_api.g_false,
7830: p_count => l_msg_count,
7831: p_data => l_errmsg);
7832: RAISE fnd_api.g_exc_error;
7833: ELSE
7834: fnd_msg_pub.count_and_get(
7835: p_encoded => fnd_api.g_false,
7836: p_count => l_msg_count,

Line 7835: p_encoded => fnd_api.g_false,

7831: p_data => l_errmsg);
7832: RAISE fnd_api.g_exc_error;
7833: ELSE
7834: fnd_msg_pub.count_and_get(
7835: p_encoded => fnd_api.g_false,
7836: p_count => l_msg_count,
7837: p_data => l_errmsg);
7838:
7839: RAISE fnd_api.g_exc_unexpected_error;

Line 7839: RAISE fnd_api.g_exc_unexpected_error;

7835: p_encoded => fnd_api.g_false,
7836: p_count => l_msg_count,
7837: p_data => l_errmsg);
7838:
7839: RAISE fnd_api.g_exc_unexpected_error;
7840: END IF;
7841: END IF;
7842:
7843:

Line 8310: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

8306: p_txn_type_id => WIP_CONSTANTS.SCRASSY_TYPE,
8307: p_txn_action_id => WIP_CONSTANTS.SCRASSY_ACTION,
8308: x_returnStatus => x_returnStatus);
8309:
8310: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8311: l_errMsg := 'wip_movProc_priv.snapshot_online failed';
8312: raise fnd_api.g_exc_unexpected_error;
8313: END IF; -- check return status
8314: END IF; -- move mode check

Line 8312: raise fnd_api.g_exc_unexpected_error;

8308: x_returnStatus => x_returnStatus);
8309:
8310: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8311: l_errMsg := 'wip_movProc_priv.snapshot_online failed';
8312: raise fnd_api.g_exc_unexpected_error;
8313: END IF; -- check return status
8314: END IF; -- move mode check
8315: END IF; -- IF job txns
8316: END IF; -- scrap transactions

Line 8332: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

8328: /* Fix for Bug#4734309 */
8329: p_is_scrap_txn => WIP_CONSTANTS.YES,
8330: x_return_status => x_returnStatus);
8331:
8332: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8333: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
8334: raise fnd_api.g_exc_unexpected_error;
8335: END IF;
8336: END LOOP;

Line 8334: raise fnd_api.g_exc_unexpected_error;

8330: x_return_status => x_returnStatus);
8331:
8332: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
8333: l_errMsg := 'wip_osp.updatePOReqQuantity failed';
8334: raise fnd_api.g_exc_unexpected_error;
8335: END IF;
8336: END LOOP;
8337: END IF; -- have PO patchset J onward
8338:

Line 8342: x_returnStatus := fnd_api.g_ret_sts_success;

8338:
8339:
8340: -- assign l_move back to move profile
8341: p_gib.move_profile := l_move;
8342: x_returnStatus := fnd_api.g_ret_sts_success;
8343:
8344: -- write to the log file
8345: IF (l_logLevel <= wip_constants.trace_logging) THEN
8346: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.scrap_txns',

Line 8353: WHEN fnd_api.g_exc_unexpected_error THEN

8349: x_returnStatus => l_returnStatus);
8350: END IF;
8351:
8352: EXCEPTION
8353: WHEN fnd_api.g_exc_unexpected_error THEN
8354: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
8355: IF (l_logLevel <= wip_constants.trace_logging) THEN
8356: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.scrap_txns',
8357: p_procReturnStatus => x_returnStatus,

Line 8354: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

8350: END IF;
8351:
8352: EXCEPTION
8353: WHEN fnd_api.g_exc_unexpected_error THEN
8354: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
8355: IF (l_logLevel <= wip_constants.trace_logging) THEN
8356: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.scrap_txns',
8357: p_procReturnStatus => x_returnStatus,
8358: p_msg => l_errMsg,

Line 8363: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

8359: x_returnStatus => l_returnStatus);
8360: END IF;
8361:
8362: WHEN others THEN
8363: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
8364: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
8365:
8366: IF (l_logLevel <= wip_constants.trace_logging) THEN
8367: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.scrap_txns',

Line 9073: l_addMsgToStack := fnd_api.g_true;

9069: END IF;
9070: END IF; -- Discrete or OSFM jobs
9071:
9072: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN
9073: l_addMsgToStack := fnd_api.g_true;
9074: ELSE
9075: -- Message stack is only useful for online transaction. For background,
9076: -- we never used message stack.
9077: l_addMsgToStack := fnd_api.g_false;

Line 9077: l_addMsgToStack := fnd_api.g_false;

9073: l_addMsgToStack := fnd_api.g_true;
9074: ELSE
9075: -- Message stack is only useful for online transaction. For background,
9076: -- we never used message stack.
9077: l_addMsgToStack := fnd_api.g_false;
9078: END IF;
9079: -- Move all assembly records from mti to mmtt
9080: wip_mtlTempProc_priv.validateInterfaceTxns(
9081: p_txnHdrID => p_gib.assy_header_id,

Line 9083: p_rollbackOnErr => fnd_api.g_false,

9079: -- Move all assembly records from mti to mmtt
9080: wip_mtlTempProc_priv.validateInterfaceTxns(
9081: p_txnHdrID => p_gib.assy_header_id,
9082: p_addMsgToStack => l_addMsgToStack,
9083: p_rollbackOnErr => fnd_api.g_false,
9084: x_returnStatus => x_returnStatus);
9085:
9086: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9087: --FP bug 5752485 (base bug 4128207) Added the IF condition below since write_mtl_errors

Line 9086: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9082: p_addMsgToStack => l_addMsgToStack,
9083: p_rollbackOnErr => fnd_api.g_false,
9084: x_returnStatus => x_returnStatus);
9085:
9086: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9087: --FP bug 5752485 (base bug 4128207) Added the IF condition below since write_mtl_errors
9088: --is not applicable for ONLINE completions. Otherwise the fnd_msg_pub stack is initialized
9089: --inside write_mtl_errors which suppresses messages to be shown to the user in the UI
9090: IF (l_transaction_mode <> WIP_CONSTANTS.ONLINE) THEN

Line 9096: raise fnd_api.g_exc_unexpected_error;

9092: write_mtl_errors(p_mtl_header_id => p_gib.assy_header_id);
9093: END IF;
9094: l_errMsg := 'wip_mtlTempProc_priv.validateInterfaceTxns failed' ||
9095: ' (assembly records)' ;
9096: raise fnd_api.g_exc_unexpected_error;
9097: END IF;
9098:
9099: FOR l_repAssembly IN c_repAssembly(p_header_id => p_gib.assy_header_id) LOOP
9100: -- Preallocate if repetitive schedule. This API will allocate primary

Line 9109: p_endDebug => fnd_api.g_false,

9105: p_txnActionID => l_repAssembly.txn_action_id,
9106: p_wipEntityID => l_repAssembly.txn_src_id,
9107: p_repLineID => l_repAssembly.rep_line_id,
9108: p_tblName => WIP_CONSTANTS.MMTT_TBL,
9109: p_endDebug => fnd_api.g_false,
9110: x_returnStatus => x_returnStatus);
9111:
9112: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9113: l_errMsg := 'wip_cplProc_priv.preAllocateSchedules failed' ;

Line 9112: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9108: p_tblName => WIP_CONSTANTS.MMTT_TBL,
9109: p_endDebug => fnd_api.g_false,
9110: x_returnStatus => x_returnStatus);
9111:
9112: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9113: l_errMsg := 'wip_cplProc_priv.preAllocateSchedules failed' ;
9114: raise fnd_api.g_exc_unexpected_error;
9115: END IF;
9116: END LOOP;

Line 9114: raise fnd_api.g_exc_unexpected_error;

9110: x_returnStatus => x_returnStatus);
9111:
9112: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9113: l_errMsg := 'wip_cplProc_priv.preAllocateSchedules failed' ;
9114: raise fnd_api.g_exc_unexpected_error;
9115: END IF;
9116: END LOOP;
9117:
9118: IF(p_gib.move_mode = WIP_CONSTANTS.ONLINE) THEN

Line 9126: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9122: p_txn_type_id => l_txn_type_id,
9123: p_txn_action_id => l_txn_action_id,
9124: x_returnStatus => x_returnStatus);
9125:
9126: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9127: l_errMsg := 'wip_movProc_priv.snapshot_online failed';
9128: raise fnd_api.g_exc_unexpected_error;
9129: END IF; -- check return status
9130: ELSE -- move is background

Line 9128: raise fnd_api.g_exc_unexpected_error;

9124: x_returnStatus => x_returnStatus);
9125:
9126: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9127: l_errMsg := 'wip_movProc_priv.snapshot_online failed';
9128: raise fnd_api.g_exc_unexpected_error;
9129: END IF; -- check return status
9130: ELSE -- move is background
9131: IF(p_txn_type = WIP_CONSTANTS.RET_TXN) THEN
9132: snapshot_background(p_group_id => p_gib.group_id,

Line 9136: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9132: snapshot_background(p_group_id => p_gib.group_id,
9133: p_txn_date => p_gib.txn_date,
9134: x_returnStatus => x_returnStatus);
9135:
9136: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9137: l_errMsg := 'wip_movProc_priv.snapshot_background failed';
9138: raise fnd_api.g_exc_unexpected_error;
9139: END IF; -- check return status
9140: END IF; -- return transaction

Line 9138: raise fnd_api.g_exc_unexpected_error;

9134: x_returnStatus => x_returnStatus);
9135:
9136: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9137: l_errMsg := 'wip_movProc_priv.snapshot_background failed';
9138: raise fnd_api.g_exc_unexpected_error;
9139: END IF; -- check return status
9140: END IF; -- return transaction
9141: END IF; -- move mode check
9142:

Line 9143: x_returnStatus := fnd_api.g_ret_sts_success;

9139: END IF; -- check return status
9140: END IF; -- return transaction
9141: END IF; -- move mode check
9142:
9143: x_returnStatus := fnd_api.g_ret_sts_success;
9144:
9145: -- write to the log file
9146: IF (l_logLevel <= wip_constants.trace_logging) THEN
9147: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.ez_completion',

Line 9154: WHEN fnd_api.g_exc_unexpected_error THEN

9150: x_returnStatus => l_returnStatus);
9151: END IF;
9152:
9153: EXCEPTION
9154: WHEN fnd_api.g_exc_unexpected_error THEN
9155: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9156: IF (l_logLevel <= wip_constants.trace_logging) THEN
9157: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.ez_completion',
9158: p_procReturnStatus => x_returnStatus,

Line 9155: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

9151: END IF;
9152:
9153: EXCEPTION
9154: WHEN fnd_api.g_exc_unexpected_error THEN
9155: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9156: IF (l_logLevel <= wip_constants.trace_logging) THEN
9157: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.ez_completion',
9158: p_procReturnStatus => x_returnStatus,
9159: p_msg => l_errMsg,

Line 9164: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

9160: x_returnStatus => l_returnStatus);
9161: END IF;
9162:
9163: WHEN others THEN
9164: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9165: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9166:
9167: IF (l_logLevel <= wip_constants.trace_logging) THEN
9168: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.ez_completion',

Line 9263: x_returnStatus := fnd_api.g_ret_sts_success;

9259: AND NVL(wma2.repetitive_schedule_id,0)
9260: = NVL(wro2.repetitive_schedule_id,0))
9261: AND nvl(wro.basis_type,1) <> WIP_CONSTANTS.LOT_BASED_MTL; /* LBM Project */
9262:
9263: x_returnStatus := fnd_api.g_ret_sts_success;
9264:
9265: -- write to the log file
9266: IF (l_logLevel <= wip_constants.trace_logging) THEN
9267: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.update_wro',

Line 9275: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

9271: END IF;
9272:
9273: EXCEPTION
9274: WHEN others THEN
9275: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9276: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9277:
9278: IF (l_logLevel <= wip_constants.trace_logging) THEN
9279: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.update_wro',

Line 9382: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9378: -- Lock record in WIP_OPERATIONS table
9379: lock_wipops(p_gib => p_gib,
9380: x_returnStatus => x_returnStatus);
9381:
9382: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9383: l_errMsg := 'wip_movProc_priv.lock_wipops failed';
9384: raise fnd_api.g_exc_unexpected_error;
9385: END IF; -- check return status
9386:

Line 9384: raise fnd_api.g_exc_unexpected_error;

9380: x_returnStatus => x_returnStatus);
9381:
9382: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9383: l_errMsg := 'wip_movProc_priv.lock_wipops failed';
9384: raise fnd_api.g_exc_unexpected_error;
9385: END IF; -- check return status
9386:
9387: -- Call repetitive allocatioin for repetitive schedule
9388: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN

Line 9392: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9388: IF(l_move.scheTxn = WIP_CONSTANTS.YES) THEN
9389: rep_move_alloc(p_gib => p_gib,
9390: x_returnStatus => x_returnStatus);
9391:
9392: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9393: l_errMsg := 'wip_movProc_priv.rep_move_alloc failed';
9394: raise fnd_api.g_exc_unexpected_error;
9395: END IF; -- check return status
9396: END IF; -- check repetitive schedules

Line 9394: raise fnd_api.g_exc_unexpected_error;

9390: x_returnStatus => x_returnStatus);
9391:
9392: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9393: l_errMsg := 'wip_movProc_priv.rep_move_alloc failed';
9394: raise fnd_api.g_exc_unexpected_error;
9395: END IF; -- check return status
9396: END IF; -- check repetitive schedules
9397:
9398: -- Check for the step unit quantities for discrete and OSFM jobs

Line 9403: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9399: IF(l_move.jobTxn = WIP_CONSTANTS.YES) THEN
9400: check_qty_dj(p_gib => p_gib,
9401: x_returnStatus => x_returnStatus);
9402:
9403: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9404: l_errMsg := 'wip_movProc_priv.check_qty_dj failed';
9405: raise fnd_api.g_exc_unexpected_error;
9406: END IF; -- check return status
9407: END IF; -- check discrete and OSFM jobs

Line 9405: raise fnd_api.g_exc_unexpected_error;

9401: x_returnStatus => x_returnStatus);
9402:
9403: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9404: l_errMsg := 'wip_movProc_priv.check_qty_dj failed';
9405: raise fnd_api.g_exc_unexpected_error;
9406: END IF; -- check return status
9407: END IF; -- check discrete and OSFM jobs
9408:
9409: -- Lock record in WIP_OPERATIONS table

Line 9414: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9410: -- Update the WRO quantities for the Overcompletion
9411: update_wro(p_gib => p_gib,
9412: x_returnStatus => x_returnStatus);
9413:
9414: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9415: l_errMsg := 'wip_movProc_priv.update_wro failed';
9416: raise fnd_api.g_exc_unexpected_error;
9417: END IF; -- check return status
9418:

Line 9416: raise fnd_api.g_exc_unexpected_error;

9412: x_returnStatus => x_returnStatus);
9413:
9414: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9415: l_errMsg := 'wip_movProc_priv.update_wro failed';
9416: raise fnd_api.g_exc_unexpected_error;
9417: END IF; -- check return status
9418:
9419: -- Record move transactions history in WIP_MOVE_TRANSACTIONS
9420: insert_txn_history(p_gib => p_gib,

Line 9423: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9419: -- Record move transactions history in WIP_MOVE_TRANSACTIONS
9420: insert_txn_history(p_gib => p_gib,
9421: x_returnStatus => x_returnStatus);
9422:
9423: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9424: l_errMsg := 'wip_movProc_priv.insert_txn_history failed';
9425: raise fnd_api.g_exc_unexpected_error;
9426: END IF; -- check return status
9427:

Line 9425: raise fnd_api.g_exc_unexpected_error;

9421: x_returnStatus => x_returnStatus);
9422:
9423: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9424: l_errMsg := 'wip_movProc_priv.insert_txn_history failed';
9425: raise fnd_api.g_exc_unexpected_error;
9426: END IF; -- check return status
9427:
9428: -- Delete child record (overmove/overcompletion/overreturn)
9429: delete_child_txn(p_gib => p_gib,

Line 9433: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9429: delete_child_txn(p_gib => p_gib,
9430: x_returnStatus => x_returnStatus);
9431:
9432: -- Delete child record (overmove/overcompletion/overreturn)
9433: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9434: l_errMsg := 'wip_movProc_priv.delete_child_txn failed';
9435: raise fnd_api.g_exc_unexpected_error;
9436: END IF; -- check return status
9437:

Line 9435: raise fnd_api.g_exc_unexpected_error;

9431:
9432: -- Delete child record (overmove/overcompletion/overreturn)
9433: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9434: l_errMsg := 'wip_movProc_priv.delete_child_txn failed';
9435: raise fnd_api.g_exc_unexpected_error;
9436: END IF; -- check return status
9437:
9438: -- Delete child record (overmove/overcompletion/overreturn)
9439: -- Insert auto-resources associated with move

Line 9444: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9440: -- (insert into WIP_COST_TXN_INTERFACE)
9441: insert_auto_resource(p_gib => p_gib,
9442: x_returnStatus => x_returnStatus);
9443:
9444: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9445: l_errMsg := 'wip_movProc_priv.insert_auto_resource failed';
9446: raise fnd_api.g_exc_unexpected_error;
9447: END IF; -- check return status
9448:

Line 9446: raise fnd_api.g_exc_unexpected_error;

9442: x_returnStatus => x_returnStatus);
9443:
9444: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9445: l_errMsg := 'wip_movProc_priv.insert_auto_resource failed';
9446: raise fnd_api.g_exc_unexpected_error;
9447: END IF; -- check return status
9448:
9449: -- Only call the cost allocation IF schedule transactions and auto resource
9450: -- per item exist (insert into WIP_TXN_ALLOCATIONS)

Line 9457: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9453:
9454: insert_txn_alloc(p_gib => p_gib,
9455: x_returnStatus => x_returnStatus);
9456:
9457: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9458: l_errMsg := 'wip_movProc_priv.insert_txn_alloc failed';
9459: raise fnd_api.g_exc_unexpected_error;
9460: END IF; -- check return status
9461: END IF; -- repetitive schedule and resource per item exist

Line 9459: raise fnd_api.g_exc_unexpected_error;

9455: x_returnStatus => x_returnStatus);
9456:
9457: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9458: l_errMsg := 'wip_movProc_priv.insert_txn_alloc failed';
9459: raise fnd_api.g_exc_unexpected_error;
9460: END IF; -- check return status
9461: END IF; -- repetitive schedule and resource per item exist
9462:
9463: -- Insert department overhead into WIP_COST_TXN_INTERFACE

Line 9467: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9463: -- Insert department overhead into WIP_COST_TXN_INTERFACE
9464: insert_dept_overhead(p_gib => p_gib,
9465: x_returnStatus => x_returnStatus);
9466:
9467: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9468: l_errMsg := 'wip_movProc_priv.insert_dept_overhead failed';
9469: raise fnd_api.g_exc_unexpected_error;
9470: END IF; -- check return status
9471:

Line 9469: raise fnd_api.g_exc_unexpected_error;

9465: x_returnStatus => x_returnStatus);
9466:
9467: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9468: l_errMsg := 'wip_movProc_priv.insert_dept_overhead failed';
9469: raise fnd_api.g_exc_unexpected_error;
9470: END IF; -- check return status
9471:
9472: -- Release costing transactions
9473: release_cost_txn(p_gib => p_gib,

Line 9476: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9472: -- Release costing transactions
9473: release_cost_txn(p_gib => p_gib,
9474: x_returnStatus => x_returnStatus);
9475:
9476: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9477: l_errMsg := 'wip_movProc_priv.release_cost_txn failed';
9478: raise fnd_api.g_exc_unexpected_error;
9479: END IF; -- check return status
9480:

Line 9478: raise fnd_api.g_exc_unexpected_error;

9474: x_returnStatus => x_returnStatus);
9475:
9476: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9477: l_errMsg := 'wip_movProc_priv.release_cost_txn failed';
9478: raise fnd_api.g_exc_unexpected_error;
9479: END IF; -- check return status
9480:
9481: -- IF PO installed and PO, insert PO info into PO_REQUISITIONS_INTERFACE_ALL
9482: l_po := fnd_installation.get_app_info

Line 9490: raise fnd_api.g_exc_unexpected_error;

9486: oracle_schema => l_poSchema);
9487:
9488: IF(l_po = FALSE) THEN -- there is an error calling fnd_installion package
9489: l_errMsg := 'fnd_installation.get_app_info failed';
9490: raise fnd_api.g_exc_unexpected_error;
9491: ELSE -- no error
9492: IF(l_poStatus = 'I') THEN -- IF PO installed, insert PO info
9493: insert_po_req(p_gib => p_gib,
9494: x_returnStatus => x_returnStatus);

Line 9496: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9492: IF(l_poStatus = 'I') THEN -- IF PO installed, insert PO info
9493: insert_po_req(p_gib => p_gib,
9494: x_returnStatus => x_returnStatus);
9495:
9496: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9497: l_errMsg := 'wip_movProc_priv.insert_po_req failed';
9498: raise fnd_api.g_exc_unexpected_error;
9499: END IF; -- check return status
9500: END IF;

Line 9498: raise fnd_api.g_exc_unexpected_error;

9494: x_returnStatus => x_returnStatus);
9495:
9496: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9497: l_errMsg := 'wip_movProc_priv.insert_po_req failed';
9498: raise fnd_api.g_exc_unexpected_error;
9499: END IF; -- check return status
9500: END IF;
9501: END IF;
9502:

Line 9509: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9505: -- quantity completed in update_wo_and_snapshot
9506: update_complete_qty(p_gib => p_gib,
9507: x_returnStatus => x_returnStatus);
9508:
9509: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9510: l_errMsg := 'wip_movProc_priv.update_complete_qty failed';
9511: raise fnd_api.g_exc_unexpected_error;
9512: END IF; -- check return status
9513: END IF;

Line 9511: raise fnd_api.g_exc_unexpected_error;

9507: x_returnStatus => x_returnStatus);
9508:
9509: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9510: l_errMsg := 'wip_movProc_priv.update_complete_qty failed';
9511: raise fnd_api.g_exc_unexpected_error;
9512: END IF; -- check return status
9513: END IF;
9514:
9515: -- Update scrap quantity in WIP_DISCRETE_JOBS and insert into MMTT IF

Line 9520: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9516: -- scrap account provided
9517: scrap_txns(p_gib => p_gib,
9518: x_returnStatus => x_returnStatus);
9519:
9520: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9521: l_errMsg := 'wip_movProc_priv.scrap_txns failed';
9522: raise fnd_api.g_exc_unexpected_error;
9523: END IF; -- check return status
9524:

Line 9522: raise fnd_api.g_exc_unexpected_error;

9518: x_returnStatus => x_returnStatus);
9519:
9520: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9521: l_errMsg := 'wip_movProc_priv.scrap_txns failed';
9522: raise fnd_api.g_exc_unexpected_error;
9523: END IF; -- check return status
9524:
9525: -- Start workflow for OSP stuff
9526: start_workflow(p_gib => p_gib,

Line 9529: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9525: -- Start workflow for OSP stuff
9526: start_workflow(p_gib => p_gib,
9527: x_returnStatus => x_returnStatus);
9528:
9529: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9530: l_errMsg := 'wip_movProc_priv.start_workflow failed';
9531: raise fnd_api.g_exc_unexpected_error;
9532: END IF; -- check return status
9533:

Line 9531: raise fnd_api.g_exc_unexpected_error;

9527: x_returnStatus => x_returnStatus);
9528:
9529: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9530: l_errMsg := 'wip_movProc_priv.start_workflow failed';
9531: raise fnd_api.g_exc_unexpected_error;
9532: END IF; -- check return status
9533:
9534: x_returnStatus := fnd_api.g_ret_sts_success;
9535:

Line 9534: x_returnStatus := fnd_api.g_ret_sts_success;

9530: l_errMsg := 'wip_movProc_priv.start_workflow failed';
9531: raise fnd_api.g_exc_unexpected_error;
9532: END IF; -- check return status
9533:
9534: x_returnStatus := fnd_api.g_ret_sts_success;
9535:
9536: -- write to the log file
9537: IF (l_logLevel <= wip_constants.trace_logging) THEN
9538: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.move_txns',

Line 9545: WHEN fnd_api.g_exc_unexpected_error THEN

9541: x_returnStatus => l_returnStatus);
9542: END IF;
9543:
9544: EXCEPTION
9545: WHEN fnd_api.g_exc_unexpected_error THEN
9546: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9547: IF (l_logLevel <= wip_constants.trace_logging) THEN
9548: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.move_txns',
9549: p_procReturnStatus => x_returnStatus,

Line 9546: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

9542: END IF;
9543:
9544: EXCEPTION
9545: WHEN fnd_api.g_exc_unexpected_error THEN
9546: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9547: IF (l_logLevel <= wip_constants.trace_logging) THEN
9548: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.move_txns',
9549: p_procReturnStatus => x_returnStatus,
9550: p_msg => l_errMsg,

Line 9555: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

9551: x_returnStatus => l_returnStatus);
9552: END IF;
9553:
9554: WHEN others THEN
9555: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
9556: l_errMsg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
9557:
9558: IF (l_logLevel <= wip_constants.trace_logging) THEN
9559: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.move_txns',

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

9685: -- Fixed bug 4361566
9686: l_return_hdr_id NUMBER := -1;
9687: BEGIN
9688:
9689: IF(fnd_api.to_boolean(p_initMsgList)) THEN
9690: fnd_msg_pub.initialize;
9691: END IF;
9692:
9693: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 9815: p_initMsgList => fnd_api.g_true);

9811: | Move Validation |
9812: +-----------------*/
9813: -- derive and validate all necessary info
9814: wip_move_validator.validate(p_group_id => p_group_id,
9815: p_initMsgList => fnd_api.g_true);
9816:
9817: -- There is no return status from this routine. IF some record error out,
9818: -- just neglect it and continue validating other records. The error record
9819: -- will have process_status in WIP_MOVE_TXN_INTERFACE equal to (3) or

Line 9868: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9864: /* get profile of this group of transactions */
9865: get_move_profile(p_gib => l_gib,
9866: x_returnStatus => x_returnStatus);
9867:
9868: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9869: l_errMsg := 'wip_movProc_priv.get_move_profile failed';
9870: raise fnd_api.g_exc_unexpected_error;
9871: END IF; -- check return status
9872:

Line 9870: raise fnd_api.g_exc_unexpected_error;

9866: x_returnStatus => x_returnStatus);
9867:
9868: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9869: l_errMsg := 'wip_movProc_priv.get_move_profile failed';
9870: raise fnd_api.g_exc_unexpected_error;
9871: END IF; -- check return status
9872:
9873: -- check IF easy return txns
9874: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN

Line 9875: IF(p_insertAssy = fnd_api.g_true) THEN

9871: END IF; -- check return status
9872:
9873: -- check IF easy return txns
9874: IF(l_gib.move_profile.easyReturn = WIP_CONSTANTS.YES) THEN
9875: IF(p_insertAssy = fnd_api.g_true) THEN
9876: ez_completion(p_gib => l_gib,
9877: p_txn_type => WIP_CONSTANTS.RET_TXN,
9878: x_returnStatus => x_returnStatus);
9879:

Line 9880: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9876: ez_completion(p_gib => l_gib,
9877: p_txn_type => WIP_CONSTANTS.RET_TXN,
9878: x_returnStatus => x_returnStatus);
9879:
9880: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9881: l_errMsg := 'wip_movProc_priv.ez_completion (return) failed';
9882: raise fnd_api.g_exc_unexpected_error;
9883: END IF; -- check return status
9884: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are

Line 9882: raise fnd_api.g_exc_unexpected_error;

9878: x_returnStatus => x_returnStatus);
9879:
9880: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9881: l_errMsg := 'wip_movProc_priv.ez_completion (return) failed';
9882: raise fnd_api.g_exc_unexpected_error;
9883: END IF; -- check return status
9884: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are
9885: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot
9886: for assembly return transaction.*/

Line 9885: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot

9881: l_errMsg := 'wip_movProc_priv.ez_completion (return) failed';
9882: raise fnd_api.g_exc_unexpected_error;
9883: END IF; -- check return status
9884: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are
9885: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot
9886: for assembly return transaction.*/
9887: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9888: p_org_id => l_gib.move_profile.org_id,
9889: p_txn_type => WIP_CONSTANTS.RET_TXN,

Line 9894: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9890: p_txn_type_id => WIP_CONSTANTS.RETASSY_TYPE,
9891: p_txn_action_id => WIP_CONSTANTS.RETASSY_ACTION,
9892: x_returnStatus => x_returnStatus);
9893:
9894: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9895: l_errMsg := 'wip_movProc_priv.snapshot_online (return) failed';
9896: raise fnd_api.g_exc_unexpected_error;
9897: END IF; -- check return status
9898: END IF; -- p_insertAssy = fnd_api.g_true

Line 9896: raise fnd_api.g_exc_unexpected_error;

9892: x_returnStatus => x_returnStatus);
9893:
9894: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9895: l_errMsg := 'wip_movProc_priv.snapshot_online (return) failed';
9896: raise fnd_api.g_exc_unexpected_error;
9897: END IF; -- check return status
9898: END IF; -- p_insertAssy = fnd_api.g_true
9899: /* End of bug fix 5026797 */
9900:

Line 9898: END IF; -- p_insertAssy = fnd_api.g_true

9894: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9895: l_errMsg := 'wip_movProc_priv.snapshot_online (return) failed';
9896: raise fnd_api.g_exc_unexpected_error;
9897: END IF; -- check return status
9898: END IF; -- p_insertAssy = fnd_api.g_true
9899: /* End of bug fix 5026797 */
9900:
9901: IF(l_gib.assy_header_id IS NOT NULL AND
9902: l_gib.assy_header_id <> -1) THEN

Line 9905: (p_initMsgList => fnd_api.g_true,

9901: IF(l_gib.assy_header_id IS NOT NULL AND
9902: l_gib.assy_header_id <> -1) THEN
9903: -- Process assembly return record
9904: wip_mtlTempProc_priv.processTemp
9905: (p_initMsgList => fnd_api.g_true,
9906: p_txnHdrID => l_gib.assy_header_id,
9907: p_txnMode => WIP_CONSTANTS.ONLINE,
9908: x_returnStatus => x_returnStatus,
9909: x_errorMsg => l_errMsg);

Line 9911: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9907: p_txnMode => WIP_CONSTANTS.ONLINE,
9908: x_returnStatus => x_returnStatus,
9909: x_errorMsg => l_errMsg);
9910:
9911: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9912: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
9913: fnd_message.set_token('MESSAGE', l_errMsg);
9914: fnd_msg_pub.add;
9915: l_errMsg := 'wip_mtlTempProc_priv.processTemp failed' ;

Line 9916: raise fnd_api.g_exc_unexpected_error;

9912: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
9913: fnd_message.set_token('MESSAGE', l_errMsg);
9914: fnd_msg_pub.add;
9915: l_errMsg := 'wip_mtlTempProc_priv.processTemp failed' ;
9916: raise fnd_api.g_exc_unexpected_error;
9917: END IF;
9918: l_return_hdr_id := l_gib.assy_header_id;
9919: -- reset l_gib.assy_header_id to null
9920: l_gib.assy_header_id := null;

Line 9931: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9927: -- call main move processor
9928: move_txns(p_gib => l_gib,
9929: x_returnStatus => x_returnStatus);
9930:
9931: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9932: l_errMsg := 'wip_movProc_priv.move_txns failed';
9933: raise fnd_api.g_exc_unexpected_error;
9934: END IF; -- check return status
9935:

Line 9933: raise fnd_api.g_exc_unexpected_error;

9929: x_returnStatus => x_returnStatus);
9930:
9931: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9932: l_errMsg := 'wip_movProc_priv.move_txns failed';
9933: raise fnd_api.g_exc_unexpected_error;
9934: END IF; -- check return status
9935:
9936: -- check IF easy completion txns
9937: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN

Line 9938: IF( p_insertAssy = fnd_api.g_true) THEN

9934: END IF; -- check return status
9935:
9936: -- check IF easy completion txns
9937: IF(l_gib.move_profile.easyComplete = WIP_CONSTANTS.YES) THEN
9938: IF( p_insertAssy = fnd_api.g_true) THEN
9939: ez_completion(p_gib => l_gib,
9940: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9941: x_returnStatus => x_returnStatus);
9942:

Line 9943: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9939: ez_completion(p_gib => l_gib,
9940: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9941: x_returnStatus => x_returnStatus);
9942:
9943: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9944: l_errMsg := 'wip_movProc_priv.ez_completion (complete) failed';
9945: raise fnd_api.g_exc_unexpected_error;
9946: END IF; -- check return status
9947: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are

Line 9945: raise fnd_api.g_exc_unexpected_error;

9941: x_returnStatus => x_returnStatus);
9942:
9943: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9944: l_errMsg := 'wip_movProc_priv.ez_completion (complete) failed';
9945: raise fnd_api.g_exc_unexpected_error;
9946: END IF; -- check return status
9947: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are
9948: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot for assembly completion transaction.*/
9949: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,

Line 9948: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot for assembly completion transaction.*/

9944: l_errMsg := 'wip_movProc_priv.ez_completion (complete) failed';
9945: raise fnd_api.g_exc_unexpected_error;
9946: END IF; -- check return status
9947: ELSE /* Bug fix 5026797 (base 4901865) - Assembly completion/return transaction through Discrete Workstation are
9948: processed with p_insertAssy = fnd_api.g_false. Added the following call to snapshot for assembly completion transaction.*/
9949: snapshot_online(p_mtl_header_id => l_gib.assy_header_id,
9950: p_org_id => l_gib.move_profile.org_id,
9951: p_txn_type => WIP_CONSTANTS.COMP_TXN,
9952: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,

Line 9956: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9952: p_txn_type_id => WIP_CONSTANTS.CPLASSY_TYPE,
9953: p_txn_action_id => WIP_CONSTANTS.CPLASSY_ACTION,
9954: x_returnStatus => x_returnStatus);
9955:
9956: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9957: l_errMsg := 'wip_movProc_priv.snapshot_online(complete) failed';
9958: raise fnd_api.g_exc_unexpected_error;
9959: END IF; -- check return status
9960: END IF; -- p_insertAssy = fnd_api.g_true

Line 9958: raise fnd_api.g_exc_unexpected_error;

9954: x_returnStatus => x_returnStatus);
9955:
9956: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9957: l_errMsg := 'wip_movProc_priv.snapshot_online(complete) failed';
9958: raise fnd_api.g_exc_unexpected_error;
9959: END IF; -- check return status
9960: END IF; -- p_insertAssy = fnd_api.g_true
9961: /* End of bug fix 5026797 */
9962: END IF; -- easy complete txn

Line 9960: END IF; -- p_insertAssy = fnd_api.g_true

9956: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9957: l_errMsg := 'wip_movProc_priv.snapshot_online(complete) failed';
9958: raise fnd_api.g_exc_unexpected_error;
9959: END IF; -- check return status
9960: END IF; -- p_insertAssy = fnd_api.g_true
9961: /* End of bug fix 5026797 */
9962: END IF; -- easy complete txn
9963:
9964: -- update completed quantity and take snapshot before calling inventory

Line 9969: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9965: -- to process aseembly completion record
9966: IF(l_gib.move_mode = WIP_CONSTANTS.BACKGROUND) THEN
9967: update_wo_and_snapshot(p_gib => l_gib,
9968: x_returnStatus => x_returnStatus);
9969: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9970: l_errMsg := 'wip_movProc_priv.update_wo_and_snapshot';
9971: raise fnd_api.g_exc_unexpected_error;
9972: END IF; -- check return status
9973: END IF;

Line 9971: raise fnd_api.g_exc_unexpected_error;

9967: update_wo_and_snapshot(p_gib => l_gib,
9968: x_returnStatus => x_returnStatus);
9969: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9970: l_errMsg := 'wip_movProc_priv.update_wo_and_snapshot';
9971: raise fnd_api.g_exc_unexpected_error;
9972: END IF; -- check return status
9973: END IF;
9974:
9975: /* call qualtiy to enable results */

Line 9983: p_init_msg_list => fnd_api.g_true,

9979: EXIT WHEN c_qa_id%NOTFOUND;
9980:
9981: QA_RESULT_GRP.ENABLE(
9982: p_api_version => 1.0,
9983: p_init_msg_list => fnd_api.g_true,
9984: p_commit => fnd_api.g_false,
9985: p_validation_level => 0,
9986: p_collection_id => l_qa_collection_id,
9987: p_return_status => x_returnStatus,

Line 9984: p_commit => fnd_api.g_false,

9980:
9981: QA_RESULT_GRP.ENABLE(
9982: p_api_version => 1.0,
9983: p_init_msg_list => fnd_api.g_true,
9984: p_commit => fnd_api.g_false,
9985: p_validation_level => 0,
9986: p_collection_id => l_qa_collection_id,
9987: p_return_status => x_returnStatus,
9988: p_msg_count => l_msgCount,

Line 9991: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

9987: p_return_status => x_returnStatus,
9988: p_msg_count => l_msgCount,
9989: p_msg_data => l_errMsg);
9990:
9991: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
9992: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
9993: fnd_message.set_token('MESSAGE', l_errMsg);
9994: fnd_msg_pub.add;
9995: l_errMsg := 'QA Failed. Collection ID:' || l_qa_collection_id;

Line 9996: raise fnd_api.g_exc_unexpected_error;

9992: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
9993: fnd_message.set_token('MESSAGE', l_errMsg);
9994: fnd_msg_pub.add;
9995: l_errMsg := 'QA Failed. Collection ID:' || l_qa_collection_id;
9996: raise fnd_api.g_exc_unexpected_error;
9997: END IF;
9998: END LOOP; -- c_qa_id FETCH
9999:
10000: CLOSE c_qa_id; /* Bug 4204892 - Close the cursor c_qa_id to avoid ORA-6511. */

Line 10052: (p_initMsgList => fnd_api.g_true,

10048: IF(l_gib.assy_header_id IS NOT NULL AND
10049: l_gib.assy_header_id <> -1) THEN
10050: -- Process assembly completion record
10051: wip_mtlTempProc_priv.processTemp
10052: (p_initMsgList => fnd_api.g_true,
10053: p_txnHdrID => l_gib.assy_header_id,
10054: p_txnMode => WIP_CONSTANTS.ONLINE,
10055: x_returnStatus => x_returnStatus,
10056: x_errorMsg => l_errMsg);

Line 10058: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

10054: p_txnMode => WIP_CONSTANTS.ONLINE,
10055: x_returnStatus => x_returnStatus,
10056: x_errorMsg => l_errMsg);
10057:
10058: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10059: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
10060: fnd_message.set_token('MESSAGE', l_errMsg);
10061: fnd_msg_pub.add;
10062: l_errMsg := 'wip_mtlTempProc_priv.processTemp failed' ;

Line 10063: raise fnd_api.g_exc_unexpected_error;

10059: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
10060: fnd_message.set_token('MESSAGE', l_errMsg);
10061: fnd_msg_pub.add;
10062: l_errMsg := 'wip_mtlTempProc_priv.processTemp failed' ;
10063: raise fnd_api.g_exc_unexpected_error;
10064: END IF;
10065: END IF; -- check l_gib.assy_header_id
10066:
10067: IF(p_allow_partial_commit = WIP_CONSTANTS.YES) THEN

Line 10089: IF(p_do_backflush = fnd_api.g_true) THEN

10085: p_proc_phase = WIP_CONSTANTS.MOVE_PROC OR
10086: p_proc_phase = WIP_CONSTANTS.BF_SETUP) THEN
10087:
10088: IF(l_gib.bf_mode = WIP_CONSTANTS.ONLINE) THEN
10089: IF(p_do_backflush = fnd_api.g_true) THEN
10090: IF(l_gib.mtl_header_id IS NULL OR
10091: l_gib.mtl_header_id = -1) THEN
10092: SELECT mtl_material_transactions_s.nextval
10093: INTO l_gib.mtl_header_id

Line 10128: p_init_msg_list => fnd_api.g_true,

10124: p_movTxnID => l_backflush.txn_id,
10125: p_mtlTxnMode => l_gib.mtl_mode,
10126: p_reasonID => l_backflush.reason_id,
10127: p_reference => l_backflush.reference,
10128: p_init_msg_list => fnd_api.g_true,
10129: x_lotSerRequired => l_ls_required,
10130: x_returnStatus => l_returnStatus,
10131: x_error_msg => l_error_msg, -- throw away value
10132: x_error_count => l_error_count); -- throw away value

Line 10134: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

10130: x_returnStatus => l_returnStatus,
10131: x_error_msg => l_error_msg, -- throw away value
10132: x_error_count => l_error_count); -- throw away value
10133:
10134: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10135: l_errMsg := 'wsm_serial_support_grp.backflush_comp failed' ;
10136: raise fnd_api.g_exc_unexpected_error;
10137: ELSE
10138: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

Line 10136: raise fnd_api.g_exc_unexpected_error;

10132: x_error_count => l_error_count); -- throw away value
10133:
10134: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10135: l_errMsg := 'wsm_serial_support_grp.backflush_comp failed' ;
10136: raise fnd_api.g_exc_unexpected_error;
10137: ELSE
10138: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
10139: -- If we need to gather more lot/serial, error out because
10140: -- we cannot gather lot/serial for background transaction.

Line 10143: raise fnd_api.g_exc_unexpected_error;

10139: -- If we need to gather more lot/serial, error out because
10140: -- we cannot gather lot/serial for background transaction.
10141: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
10142: fnd_msg_pub.add;
10143: raise fnd_api.g_exc_unexpected_error;
10144: END IF;
10145: END IF; -- check return status
10146: ELSE -- discrete job or repetitive schedule
10147: wip_bflProc_priv.backflush(

Line 10173: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

10169: x_lotSerRequired => l_ls_required,
10170: x_bfRequired => l_bf_required,
10171: x_returnStatus => l_returnStatus);
10172:
10173: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10174: l_errMsg := 'wip_bflProc_priv.backflush failed' ;
10175: raise fnd_api.g_exc_unexpected_error;
10176: ELSE
10177: IF(l_ls_required = WIP_CONSTANTS.YES) THEN

Line 10175: raise fnd_api.g_exc_unexpected_error;

10171: x_returnStatus => l_returnStatus);
10172:
10173: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10174: l_errMsg := 'wip_bflProc_priv.backflush failed' ;
10175: raise fnd_api.g_exc_unexpected_error;
10176: ELSE
10177: IF(l_ls_required = WIP_CONSTANTS.YES) THEN
10178: -- If we need to gather more lot/serial, error out because
10179: -- we cannot gather lot/serial for background transaction.

Line 10182: raise fnd_api.g_exc_unexpected_error;

10178: -- If we need to gather more lot/serial, error out because
10179: -- we cannot gather lot/serial for background transaction.
10180: fnd_message.set_name('WIP', 'WIP_NO_LOT_SER_COMP_BKGND');
10181: fnd_msg_pub.add;
10182: raise fnd_api.g_exc_unexpected_error;
10183: END IF;
10184: END IF; -- check return status
10185: END IF; -- check entity type
10186: EXCEPTION

Line 10187: WHEN fnd_api.g_exc_unexpected_error THEN

10183: END IF;
10184: END IF; -- check return status
10185: END IF; -- check entity type
10186: EXCEPTION
10187: WHEN fnd_api.g_exc_unexpected_error THEN
10188: ROLLBACK TO SAVEPOINT s_backflush_proc;
10189: wip_utilities.get_message_stack(p_msg =>l_errMsg);
10190: IF(l_errMsg IS NULL) THEN
10191: -- initialize message to something because we cannot

Line 10236: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN

10232: WHERE wmti.group_id = p_group_id
10233: AND transaction_id = l_backflush.txn_id;
10234:
10235: ELSE -- move mode is online, write to log file
10236: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
10237: -- let the user know that more lot/serial info required
10238: x_returnStatus := fnd_api.g_ret_sts_error;
10239: END IF;
10240: IF (l_logLevel <= wip_constants.trace_logging) THEN

Line 10238: x_returnStatus := fnd_api.g_ret_sts_error;

10234:
10235: ELSE -- move mode is online, write to log file
10236: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
10237: -- let the user know that more lot/serial info required
10238: x_returnStatus := fnd_api.g_ret_sts_error;
10239: END IF;
10240: IF (l_logLevel <= wip_constants.trace_logging) THEN
10241: l_errMsg := 'move_txn_id: ' || l_backflush.txn_id ||
10242: ' failed because ' || l_errMsg;

Line 10254: -- pass fnd_api.g_false to p_addMsgToStack because we never used

10250:
10251: CLOSE c_backflush; /* Bug 4204892 - Close the cursor c_backflush to avoid ORA-6511. */
10252:
10253: -- Move assembly pull and operation pull records from mti to mmtt
10254: -- pass fnd_api.g_false to p_addMsgToStack because we never used
10255: -- message stack for background transaction. Moreover, this will
10256: -- improve performance if there are lots of errors.
10257: wip_mtlTempProc_priv.validateInterfaceTxns(
10258: p_txnHdrID => l_gib.mtl_header_id,

Line 10259: p_addMsgToStack => fnd_api.g_false,

10255: -- message stack for background transaction. Moreover, this will
10256: -- improve performance if there are lots of errors.
10257: wip_mtlTempProc_priv.validateInterfaceTxns(
10258: p_txnHdrID => l_gib.mtl_header_id,
10259: p_addMsgToStack => fnd_api.g_false,
10260: p_rollbackOnErr => fnd_api.g_false,
10261: x_returnStatus => x_returnStatus);
10262:
10263: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 10260: p_rollbackOnErr => fnd_api.g_false,

10256: -- improve performance if there are lots of errors.
10257: wip_mtlTempProc_priv.validateInterfaceTxns(
10258: p_txnHdrID => l_gib.mtl_header_id,
10259: p_addMsgToStack => fnd_api.g_false,
10260: p_rollbackOnErr => fnd_api.g_false,
10261: x_returnStatus => x_returnStatus);
10262:
10263: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10264: -- write error into WIP_TXN_INTERFACE_ERRORS

Line 10263: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

10259: p_addMsgToStack => fnd_api.g_false,
10260: p_rollbackOnErr => fnd_api.g_false,
10261: x_returnStatus => x_returnStatus);
10262:
10263: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10264: -- write error into WIP_TXN_INTERFACE_ERRORS
10265: write_mtl_errors(p_mtl_header_id => l_gib.mtl_header_id);
10266: IF (l_logLevel <= wip_constants.full_logging) THEN
10267: l_errMsg := 'wip_mtlTempProc_priv.validateInterfaceTxns failed'||

Line 10274: -- raise fnd_api.g_exc_unexpected_error;

10270: x_returnStatus => l_returnStatus);
10271: END IF;
10272: -- Fixed bug 5056289. We will not raise exception because we still
10273: -- want to process the components that pass validation.
10274: -- raise fnd_api.g_exc_unexpected_error;
10275:
10276: -- Call component_cleanup to set the status of corresponding move
10277: -- records to error and delete error records from MTI and MTLI.
10278: component_cleanup(p_mtl_header_id => l_gib.mtl_header_id,

Line 10296: (p_initMsgList => fnd_api.g_true,

10292: l_gib.mtl_mode <> WIP_CONSTANTS.NO_PROCESSING) THEN
10293: -- Call material processor to process backflush components, and
10294: -- scrap assembly.
10295: wip_mtlTempProc_priv.processTemp
10296: (p_initMsgList => fnd_api.g_true,
10297: p_txnHdrID => l_gib.mtl_header_id,
10298: p_txnMode => l_gib.mtl_mode,
10299: x_returnStatus => x_returnStatus,
10300: x_errorMsg => l_errMsg);

Line 10302: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

10298: p_txnMode => l_gib.mtl_mode,
10299: x_returnStatus => x_returnStatus,
10300: x_errorMsg => l_errMsg);
10301:
10302: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
10303: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
10304: fnd_message.set_token('MESSAGE', l_errMsg);
10305: fnd_msg_pub.add;
10306: l_errMsg := 'wip_mtlTempProc_priv.processTemp failed' ;

Line 10307: raise fnd_api.g_exc_unexpected_error;

10303: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
10304: fnd_message.set_token('MESSAGE', l_errMsg);
10305: fnd_msg_pub.add;
10306: l_errMsg := 'wip_mtlTempProc_priv.processTemp failed' ;
10307: raise fnd_api.g_exc_unexpected_error;
10308: END IF;
10309: END IF; -- there is the records in MMTT with this header_id
10310: ELSE -- backflush is background
10311: UPDATE wip_move_txn_interface

Line 10338: WHEN fnd_api.g_exc_unexpected_error THEN

10334: l_gib.mtl_header_id := -1;
10335:
10336: EXCEPTION
10337:
10338: WHEN fnd_api.g_exc_unexpected_error THEN
10339:
10340: IF(p_move_mode = WIP_CONSTANTS.BACKGROUND) THEN
10341:
10342: ROLLBACK TO SAVEPOINT s_move_proc;

Line 10393: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN

10389: FROM wip_txn_interface_errors wtie
10390: WHERE wtie.transaction_id = wmti.transaction_id);
10391:
10392: ELSE -- move mode is online, write to log file
10393: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
10394: -- let the user know that more lot/serial info required
10395: x_returnStatus := fnd_api.g_ret_sts_error;
10396: ELSE
10397: ROLLBACK TO SAVEPOINT s_move_proc;

Line 10395: x_returnStatus := fnd_api.g_ret_sts_error;

10391:
10392: ELSE -- move mode is online, write to log file
10393: IF(x_returnStatus = fnd_api.g_ret_sts_error) THEN
10394: -- let the user know that more lot/serial info required
10395: x_returnStatus := fnd_api.g_ret_sts_error;
10396: ELSE
10397: ROLLBACK TO SAVEPOINT s_move_proc;
10398: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10399: END IF;

Line 10398: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

10394: -- let the user know that more lot/serial info required
10395: x_returnStatus := fnd_api.g_ret_sts_error;
10396: ELSE
10397: ROLLBACK TO SAVEPOINT s_move_proc;
10398: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10399: END IF;
10400: IF (l_logLevel <= wip_constants.trace_logging) THEN
10401: wip_logger.exitPoint(p_procName =>'wip_movProc_priv.processIntf',
10402: p_procReturnStatus => x_returnStatus,

Line 10407: IF (p_ENDDebug = fnd_api.g_true) THEN

10403: p_msg => l_errMsg,
10404: x_returnStatus => l_returnStatus);
10405: END IF;
10406: -- close log file
10407: IF (p_ENDDebug = fnd_api.g_true) THEN
10408: wip_logger.cleanUp(x_returnStatus => l_returnStatus);
10409: END IF;
10410: GOTO END_program;
10411: END IF; -- move mode is background

Line 10460: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

10456: AND NOT EXISTS (SELECT 1
10457: FROM wip_txn_interface_errors wtie
10458: WHERE wtie.transaction_id = wmti.transaction_id);
10459: ELSE -- move mode is online
10460: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10461: IF (l_logLevel <= wip_constants.trace_logging) THEN
10462: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.processIntf',
10463: p_procReturnStatus => x_returnStatus,
10464: p_msg => 'unexpected error: ' || SQLERRM,

Line 10468: IF (p_ENDDebug = fnd_api.g_true) THEN

10464: p_msg => 'unexpected error: ' || SQLERRM,
10465: x_returnStatus => l_returnStatus);
10466: END IF;
10467: -- close log file
10468: IF (p_ENDDebug = fnd_api.g_true) THEN
10469: wip_logger.cleanUp(x_returnStatus => l_returnStatus);
10470: END IF;
10471: GOTO END_program;
10472: END IF; -- move mode is background

Line 10530: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

10526: /*===========================================================*/
10527: /* transactions in current group left in interface table - */
10528: /* worker exit with warning signal */
10529: /*===========================================================*/
10530: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10531: -- Fixed bug 5355443. We should not always put WIP_SOME_RECORDS_ERROR in
10532: -- the message stack because this API will be called for both online and
10533: -- background transaction. However, WIP_SOME_RECORDS_ERROR is only
10534: -- applicable for background transaction.

Line 10544: IF (p_ENDDebug = fnd_api.g_true) THEN

10540: p_msg => 'some records error out',
10541: x_returnStatus => l_returnStatus);
10542: END IF;
10543: -- close log file
10544: IF (p_ENDDebug = fnd_api.g_true) THEN
10545: wip_logger.cleanUp(x_returnStatus => l_returnStatus);
10546: END IF;
10547: /*Bug 5727221 (FP of 5580093): Mobile WIP Transaction seems to be leaving
10548: transaction in WMTI in some exception case. However there is no error

Line 10553: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

10549: message propagated back to UI. As a result transaction goes through fine
10550: with no UI error but record remains in WMTI. x_returnStatus is changed
10551: to sucess by cleanup procedure after closing file . Hence repopulate
10552: x_returnStatus to error again */
10553: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10554: ELSE
10555: x_returnStatus := fnd_api.g_ret_sts_success;
10556: IF (l_logLevel <= wip_constants.trace_logging) THEN
10557: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processIntf',

Line 10555: x_returnStatus := fnd_api.g_ret_sts_success;

10551: to sucess by cleanup procedure after closing file . Hence repopulate
10552: x_returnStatus to error again */
10553: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10554: ELSE
10555: x_returnStatus := fnd_api.g_ret_sts_success;
10556: IF (l_logLevel <= wip_constants.trace_logging) THEN
10557: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processIntf',
10558: p_procReturnStatus => x_returnStatus,
10559: p_msg => 'no record in this group error out',

Line 10563: IF (p_ENDDebug = fnd_api.g_true) THEN

10559: p_msg => 'no record in this group error out',
10560: x_returnStatus => l_returnStatus);
10561: END IF;
10562: -- close log file
10563: IF (p_ENDDebug = fnd_api.g_true) THEN
10564: wip_logger.cleanUp(x_returnStatus => l_returnStatus);
10565: END IF;
10566: END IF;
10567:

Line 10613: p_endDebug => FND_API.G_TRUE,

10609: p_time_out => p_time_out,
10610: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10611: p_bf_mode => WIP_CONSTANTS.ONLINE,
10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10613: p_endDebug => FND_API.G_TRUE,
10614: p_initMsgList => FND_API.G_TRUE,
10615: p_insertAssy => FND_API.G_TRUE,
10616: p_do_backflush => FND_API.G_TRUE,
10617: p_seq_move => p_seq_move,

Line 10614: p_initMsgList => FND_API.G_TRUE,

10610: p_move_mode => WIP_CONSTANTS.BACKGROUND,
10611: p_bf_mode => WIP_CONSTANTS.ONLINE,
10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10613: p_endDebug => FND_API.G_TRUE,
10614: p_initMsgList => FND_API.G_TRUE,
10615: p_insertAssy => FND_API.G_TRUE,
10616: p_do_backflush => FND_API.G_TRUE,
10617: p_seq_move => p_seq_move,
10618: p_allow_partial_commit => WIP_CONSTANTS.YES, -- Fixed bug 4361566.

Line 10615: p_insertAssy => FND_API.G_TRUE,

10611: p_bf_mode => WIP_CONSTANTS.ONLINE,
10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10613: p_endDebug => FND_API.G_TRUE,
10614: p_initMsgList => FND_API.G_TRUE,
10615: p_insertAssy => FND_API.G_TRUE,
10616: p_do_backflush => FND_API.G_TRUE,
10617: p_seq_move => p_seq_move,
10618: p_allow_partial_commit => WIP_CONSTANTS.YES, -- Fixed bug 4361566.
10619: x_returnStatus => l_returnStatus);

Line 10616: p_do_backflush => FND_API.G_TRUE,

10612: p_mtl_mode => WIP_CONSTANTS.ONLINE,
10613: p_endDebug => FND_API.G_TRUE,
10614: p_initMsgList => FND_API.G_TRUE,
10615: p_insertAssy => FND_API.G_TRUE,
10616: p_do_backflush => FND_API.G_TRUE,
10617: p_seq_move => p_seq_move,
10618: p_allow_partial_commit => WIP_CONSTANTS.YES, -- Fixed bug 4361566.
10619: x_returnStatus => l_returnStatus);
10620:

Line 10625: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN

10621: -- Fixed bug 4361566. Reset global variable WIP_MOVE_WORKER to its original
10622: -- value.
10623: WIP_CONSTANTS.WIP_MOVE_WORKER := 'N';
10624:
10625: IF(l_returnStatus <> fnd_api.g_ret_sts_success) THEN
10626: retcode := 2; -- error
10627: -- Fixed bug 5355443. Since WIP_SOME_RECORDS_ERROR message is only
10628: -- applicable to background transaction, we should set error message here
10629: -- instead of wip_movProc_priv.processIntf().

Line 10710: x_returnStatus := fnd_api.g_ret_sts_success;

10706: l_msg := fnd_message.get;
10707: wip_logger.log(p_msg => l_msg,
10708: x_returnStatus => l_returnStatus);
10709: END IF;
10710: x_returnStatus := fnd_api.g_ret_sts_success;
10711:
10712: EXCEPTION
10713: WHEN others THEN
10714: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

Line 10714: x_returnStatus := fnd_api.g_ret_sts_unexp_error;

10710: x_returnStatus := fnd_api.g_ret_sts_success;
10711:
10712: EXCEPTION
10713: WHEN others THEN
10714: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
10715: l_msg := 'unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
10716:
10717: IF (l_logLevel <= wip_constants.trace_logging) THEN
10718: wip_logger.exitPoint(p_procName=>'wip_movProc_priv.repetitive_scrap',

Line 11025: raise fnd_api.g_exc_unexpected_error;

11021: transactionID => p_group_id,
11022: serialNumber => p_assySerial,
11023: errMessage => l_error_msg) = FALSE) THEN
11024: -- insert statement error out
11025: raise fnd_api.g_exc_unexpected_error;
11026: END IF;
11027: END IF; -- from serialized page
11028: l_process_phase := '2.5';
11029: -- Validate and move records from MTI to MMTT. This will move both assembly

Line 11033: p_addMsgToStack => fnd_api.g_true, -- So that we can display to user

11029: -- Validate and move records from MTI to MMTT. This will move both assembly
11030: -- and component records because we use the same header Id.
11031: wip_mtlTempProc_priv.validateInterfaceTxns(
11032: p_txnHdrID => p_mtl_header_id,
11033: p_addMsgToStack => fnd_api.g_true, -- So that we can display to user
11034: p_rollbackOnErr => fnd_api.g_false,
11035: x_returnStatus => x_returnStatus);
11036:
11037: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 11034: p_rollbackOnErr => fnd_api.g_false,

11030: -- and component records because we use the same header Id.
11031: wip_mtlTempProc_priv.validateInterfaceTxns(
11032: p_txnHdrID => p_mtl_header_id,
11033: p_addMsgToStack => fnd_api.g_true, -- So that we can display to user
11034: p_rollbackOnErr => fnd_api.g_false,
11035: x_returnStatus => x_returnStatus);
11036:
11037: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
11038: raise fnd_api.g_exc_unexpected_error;

Line 11037: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

11033: p_addMsgToStack => fnd_api.g_true, -- So that we can display to user
11034: p_rollbackOnErr => fnd_api.g_false,
11035: x_returnStatus => x_returnStatus);
11036:
11037: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
11038: raise fnd_api.g_exc_unexpected_error;
11039: END IF;
11040: l_process_phase := '3';
11041:

Line 11038: raise fnd_api.g_exc_unexpected_error;

11034: p_rollbackOnErr => fnd_api.g_false,
11035: x_returnStatus => x_returnStatus);
11036:
11037: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
11038: raise fnd_api.g_exc_unexpected_error;
11039: END IF;
11040: l_process_phase := '3';
11041:
11042: -- Perform some validations that have not done in the UI

Line 11057: p_endDebug => FND_API.G_FALSE,

11053: p_time_out => 0,
11054: p_move_mode => WIP_CONSTANTS.ONLINE,
11055: p_bf_mode => WIP_CONSTANTS.ONLINE,
11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11057: p_endDebug => FND_API.G_FALSE,
11058: p_initMsgList => FND_API.G_TRUE,
11059: p_insertAssy => FND_API.G_FALSE,
11060: p_do_backflush => p_do_backflush,
11061: x_returnStatus => x_returnStatus);

Line 11058: p_initMsgList => FND_API.G_TRUE,

11054: p_move_mode => WIP_CONSTANTS.ONLINE,
11055: p_bf_mode => WIP_CONSTANTS.ONLINE,
11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11057: p_endDebug => FND_API.G_FALSE,
11058: p_initMsgList => FND_API.G_TRUE,
11059: p_insertAssy => FND_API.G_FALSE,
11060: p_do_backflush => p_do_backflush,
11061: x_returnStatus => x_returnStatus);
11062:

Line 11059: p_insertAssy => FND_API.G_FALSE,

11055: p_bf_mode => WIP_CONSTANTS.ONLINE,
11056: p_mtl_mode => WIP_CONSTANTS.ONLINE,
11057: p_endDebug => FND_API.G_FALSE,
11058: p_initMsgList => FND_API.G_TRUE,
11059: p_insertAssy => FND_API.G_FALSE,
11060: p_do_backflush => p_do_backflush,
11061: x_returnStatus => x_returnStatus);
11062:
11063: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

Line 11063: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN

11059: p_insertAssy => FND_API.G_FALSE,
11060: p_do_backflush => p_do_backflush,
11061: x_returnStatus => x_returnStatus);
11062:
11063: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
11064: l_process_phase := '5';
11065: raise fnd_api.g_exc_unexpected_error;
11066: ELSE
11067: l_process_phase := '6';

Line 11065: raise fnd_api.g_exc_unexpected_error;

11061: x_returnStatus => x_returnStatus);
11062:
11063: IF(x_returnStatus <> fnd_api.g_ret_sts_success) THEN
11064: l_process_phase := '5';
11065: raise fnd_api.g_exc_unexpected_error;
11066: ELSE
11067: l_process_phase := '6';
11068: -- If move success, call time entry API to clock off operator if there
11069: -- is no quantity left at the operation.

Line 11086: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN

11082: x_status => l_return_status,
11083: x_msg_count => l_msg_count,
11084: x_msg => l_error_msg);
11085: -- do not error out if label printing, only put warning message in log
11086: IF(l_return_status <> fnd_api.g_ret_sts_success) THEN
11087: wip_utilities.get_message_stack(p_msg => l_msg_stack);
11088: IF (l_log_level <= wip_constants.full_logging) THEN
11089: wip_logger.log(p_msg => 'An error has occurred with label printing.\n' ||
11090: 'The following error has occurred during ' ||

Line 11101: x_returnStatus := fnd_api.g_ret_sts_success;

11097: END IF;
11098: l_process_phase := '8';
11099: /* End: VJ Label Printing */
11100:
11101: x_returnStatus := fnd_api.g_ret_sts_success;
11102:
11103: -- write to the log file
11104: IF (l_log_level <= wip_constants.trace_logging) THEN
11105: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',

Line 11113: WHEN fnd_api.g_exc_unexpected_error THEN

11109: END IF;
11110: -- close log file
11111: wip_logger.cleanUp(x_returnStatus => l_return_status);
11112: EXCEPTION
11113: WHEN fnd_api.g_exc_unexpected_error THEN
11114: -- Fixed bug 5518780. We should not clear message from the stack.
11115: -- If it fails inventory validation, no error will be recorded in WTIE.
11116: -- Instead, error message will be put in message stack.
11117: -- fnd_msg_pub.initialize;

Line 11124: x_returnStatus := fnd_api.g_ret_sts_error;

11120: fnd_message.set_token('MESSAGE', l_errors.error_message);
11121: fnd_msg_pub.add;
11122: END LOOP;
11123: ROLLBACK TO SAVEPOINT s_oa_txn_proc;
11124: x_returnStatus := fnd_api.g_ret_sts_error;
11125: IF (l_log_level <= wip_constants.trace_logging) THEN
11126: wip_logger.exitPoint(p_procName => 'wip_movProc_priv.processOATxn',
11127: p_procReturnStatus => x_returnStatus,
11128: p_msg => 'wip_movProc_priv.processOATxn failed : '

Line 11136: x_returnStatus := fnd_api.g_ret_sts_error;

11132: -- close log file
11133: wip_logger.cleanUp(x_returnStatus => l_return_status);
11134: WHEN others THEN
11135: ROLLBACK TO SAVEPOINT s_oa_txn_proc;
11136: x_returnStatus := fnd_api.g_ret_sts_error;
11137: l_error_msg := ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
11138:
11139: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
11140: fnd_message.set_token('MESSAGE', l_error_msg);