DBA Data[Home] [Help]

APPS.WIP_BATCH_MOVE dependencies on FND_API

Line 265: x_return_status := fnd_api.g_ret_sts_error;

261: OR (l_custom_returnStatus = 'S'
262: AND l_hook_to_op_seq is not null
263: AND l_hook_to_step_type is null)) THEN
264: --Case 2: Hook errored or success but not providing both values. In this case we fail the transaction.
265: x_return_status := fnd_api.g_ret_sts_error;
266: IF(c_move_info%ISOPEN) THEN
267: CLOSE c_move_info;
268: END IF;
269: l_error_msg := 'MOVE_TO_STEP_HOOK errored out: ' || l_return_message;

Line 342: x_return_status := fnd_api.g_ret_sts_success;

338: l_move_record.bom_revision := l_move_info.bom_revision;
339: x_move_table_pvt(x_move_table_pvt.count + 1) := l_move_record;
340: END LOOP;
341:
342: x_return_status := fnd_api.g_ret_sts_success;
343:
344: -- write to the log file
345: IF (l_log_level <= wip_constants.trace_logging) THEN
346: wip_logger.exitPoint(p_procName => 'wip_batch_move.derive_move',

Line 353: x_return_status := fnd_api.g_ret_sts_error;

349: x_returnStatus => l_return_status);
350: END IF;
351: EXCEPTION
352: WHEN others THEN
353: x_return_status := fnd_api.g_ret_sts_error;
354: IF(c_move_info%ISOPEN) THEN
355: CLOSE c_move_info;
356: END IF;
357: l_error_msg := 'process_phase = ' || l_process_phase || ';' ||

Line 515: raise fnd_api.g_exc_unexpected_error;

511: IF(l_default_scrap_acct_id IS NULL) THEN
512: fnd_message.set_name('WIP','WIP_NO_SCRAP_ACCT_NO_BATCH');
513: fnd_msg_pub.add;
514: l_error_msg := 'No default scrap accout defined.';
515: raise fnd_api.g_exc_unexpected_error;
516: ELSE
517: l_scrap_record.scrap_account_id := to_number(l_default_scrap_acct_id);
518: END IF;-- default scrap is null
519: END IF;

Line 545: x_return_status := fnd_api.g_ret_sts_success;

541: l_scrap_record.bom_revision := l_scrap_info.bom_revision;
542: x_move_table_pvt(x_move_table_pvt.count + 1) := l_scrap_record;
543: END LOOP;
544:
545: x_return_status := fnd_api.g_ret_sts_success;
546:
547: -- write to the log file
548: IF (l_log_level <= wip_constants.trace_logging) THEN
549: wip_logger.exitPoint(p_procName => 'wip_batch_move.derive_scrap',

Line 555: WHEN fnd_api.g_exc_unexpected_error THEN

551: p_msg => 'procedure complete',
552: x_returnStatus => l_return_status);
553: END IF;
554: EXCEPTION
555: WHEN fnd_api.g_exc_unexpected_error THEN
556: x_return_status := fnd_api.g_ret_sts_error;
557: IF(c_scrap_info%ISOPEN) THEN
558: CLOSE c_scrap_info;
559: END IF;

Line 556: x_return_status := fnd_api.g_ret_sts_error;

552: x_returnStatus => l_return_status);
553: END IF;
554: EXCEPTION
555: WHEN fnd_api.g_exc_unexpected_error THEN
556: x_return_status := fnd_api.g_ret_sts_error;
557: IF(c_scrap_info%ISOPEN) THEN
558: CLOSE c_scrap_info;
559: END IF;
560: IF (l_log_level <= wip_constants.trace_logging) THEN

Line 567: x_return_status := fnd_api.g_ret_sts_error;

563: p_msg => l_error_msg,
564: x_returnStatus => l_return_status);
565: END IF;
566: WHEN others THEN
567: x_return_status := fnd_api.g_ret_sts_error;
568: IF(c_scrap_info%ISOPEN) THEN
569: CLOSE c_scrap_info;
570: END IF;
571: l_error_msg := 'process_phase = ' || l_process_phase || ';' ||

Line 649: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

645: p_fm_step_type => p_fm_step_type,
646: x_move_table_pvt => x_move_table_pvt,
647: x_return_status => x_return_status);
648:
649: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
650: l_error_msg := 'wip_batch_move.derive_move failed';
651: raise fnd_api.g_exc_unexpected_error;
652: END IF;
653: END IF;

Line 651: raise fnd_api.g_exc_unexpected_error;

647: x_return_status => x_return_status);
648:
649: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
650: l_error_msg := 'wip_batch_move.derive_move failed';
651: raise fnd_api.g_exc_unexpected_error;
652: END IF;
653: END IF;
654: l_process_phase := '3';
655: IF(p_scrap_qty > 0) THEN

Line 670: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

666: p_resp_key => p_resp_key,
667: x_move_table_pvt => x_move_table_pvt,
668: x_return_status => x_return_status);
669:
670: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
671: l_error_msg := 'wip_batch_move.derive_scrap failed';
672: raise fnd_api.g_exc_unexpected_error;
673: END IF;
674: END IF;

Line 672: raise fnd_api.g_exc_unexpected_error;

668: x_return_status => x_return_status);
669:
670: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
671: l_error_msg := 'wip_batch_move.derive_scrap failed';
672: raise fnd_api.g_exc_unexpected_error;
673: END IF;
674: END IF;
675:
676: x_return_status := fnd_api.g_ret_sts_success;

Line 676: x_return_status := fnd_api.g_ret_sts_success;

672: raise fnd_api.g_exc_unexpected_error;
673: END IF;
674: END IF;
675:
676: x_return_status := fnd_api.g_ret_sts_success;
677: -- write to the log file
678: IF (l_log_level <= wip_constants.trace_logging) THEN
679: wip_logger.exitPoint(p_procName => 'wip_batch_move.derive_row',
680: p_procReturnStatus => x_return_status,

Line 686: WHEN fnd_api.g_exc_unexpected_error THEN

682: x_returnStatus => l_return_status);
683: END IF;
684:
685: EXCEPTION
686: WHEN fnd_api.g_exc_unexpected_error THEN
687: x_return_status := fnd_api.g_ret_sts_error;
688: IF (l_log_level <= wip_constants.trace_logging) THEN
689: wip_logger.exitPoint(p_procName => 'wip_batch_move.derive_row',
690: p_procReturnStatus => x_return_status,

Line 687: x_return_status := fnd_api.g_ret_sts_error;

683: END IF;
684:
685: EXCEPTION
686: WHEN fnd_api.g_exc_unexpected_error THEN
687: x_return_status := fnd_api.g_ret_sts_error;
688: IF (l_log_level <= wip_constants.trace_logging) THEN
689: wip_logger.exitPoint(p_procName => 'wip_batch_move.derive_row',
690: p_procReturnStatus => x_return_status,
691: p_msg => l_error_msg,

Line 696: x_return_status := fnd_api.g_ret_sts_error;

692: x_returnStatus => l_return_status);
693: END IF;
694:
695: WHEN others THEN
696: x_return_status := fnd_api.g_ret_sts_error;
697: l_error_msg := 'process_phase = ' || l_process_phase || ';' ||
698: ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
699:
700: IF (l_log_level <= wip_constants.trace_logging) THEN

Line 763: x_return_status := fnd_api.g_ret_sts_success;

759: p_level_id => l_level_id);
760: l_process_phase := '7';
761: x_default_scrap_acct_id := to_number(l_default_scrap_acct_id);
762:
763: x_return_status := fnd_api.g_ret_sts_success;
764:
765: -- write to the log file
766: IF (l_log_level <= wip_constants.trace_logging) THEN
767: wip_logger.exitPoint(p_procName => 'wip_batch_move.get_preferences',

Line 774: x_return_status := fnd_api.g_ret_sts_error;

770: x_returnStatus => l_return_status);
771: END IF;
772: EXCEPTION
773: WHEN others THEN
774: x_return_status := fnd_api.g_ret_sts_error;
775: l_error_msg := 'process_phase = ' || l_process_phase || ';' ||
776: ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
777:
778: IF (l_log_level <= wip_constants.trace_logging) THEN

Line 987: RAISE fnd_api.g_exc_unexpected_error;

983: transactionID => l_txn_id,
984: serialNumber => p_assy_serial,
985: errMessage => l_error_msg) = FALSE) THEN
986: -- insert statement error out
987: RAISE fnd_api.g_exc_unexpected_error;
988: END IF;
989: ELSE
990: -- If serialized express move from dispatch list or search job, quantity
991: -- can be more than one. Need to insert serial records into wsmi.

Line 1039: x_return_status := fnd_api.g_ret_sts_success;

1035: ORDER BY msn.serial_number;
1036:
1037: END IF;
1038:
1039: x_return_status := fnd_api.g_ret_sts_success;
1040: -- write to the log file
1041: IF (l_log_level <= wip_constants.trace_logging) THEN
1042: wip_logger.exitPoint(p_procName => 'wip_batch_move.insert_move_records',
1043: p_procReturnStatus => x_return_status,

Line 1050: x_return_status := fnd_api.g_ret_sts_error;

1046: END IF;
1047:
1048: EXCEPTION
1049: WHEN others THEN
1050: x_return_status := fnd_api.g_ret_sts_error;
1051: l_error_msg := 'process_phase = ' || l_process_phase || ';' ||
1052: ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1053:
1054: IF (l_log_level <= wip_constants.trace_logging) THEN

Line 1138: p_endDebug => fnd_api.g_false,

1134: p_time_out => 0,
1135: p_move_mode => WIP_CONSTANTS.BACKGROUND,
1136: p_bf_mode => WIP_CONSTANTS.ONLINE,
1137: p_mtl_mode => WIP_CONSTANTS.ONLINE,
1138: p_endDebug => fnd_api.g_false,
1139: p_initMsgList => fnd_api.g_true,
1140: p_insertAssy => fnd_api.g_true,
1141: p_do_backflush => fnd_api.g_true,
1142: x_returnStatus => x_return_status);

Line 1139: p_initMsgList => fnd_api.g_true,

1135: p_move_mode => WIP_CONSTANTS.BACKGROUND,
1136: p_bf_mode => WIP_CONSTANTS.ONLINE,
1137: p_mtl_mode => WIP_CONSTANTS.ONLINE,
1138: p_endDebug => fnd_api.g_false,
1139: p_initMsgList => fnd_api.g_true,
1140: p_insertAssy => fnd_api.g_true,
1141: p_do_backflush => fnd_api.g_true,
1142: x_returnStatus => x_return_status);
1143:

Line 1140: p_insertAssy => fnd_api.g_true,

1136: p_bf_mode => WIP_CONSTANTS.ONLINE,
1137: p_mtl_mode => WIP_CONSTANTS.ONLINE,
1138: p_endDebug => fnd_api.g_false,
1139: p_initMsgList => fnd_api.g_true,
1140: p_insertAssy => fnd_api.g_true,
1141: p_do_backflush => fnd_api.g_true,
1142: x_returnStatus => x_return_status);
1143:
1144: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

Line 1141: p_do_backflush => fnd_api.g_true,

1137: p_mtl_mode => WIP_CONSTANTS.ONLINE,
1138: p_endDebug => fnd_api.g_false,
1139: p_initMsgList => fnd_api.g_true,
1140: p_insertAssy => fnd_api.g_true,
1141: p_do_backflush => fnd_api.g_true,
1142: x_returnStatus => x_return_status);
1143:
1144: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1145: l_process_phase := '4';

Line 1144: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1140: p_insertAssy => fnd_api.g_true,
1141: p_do_backflush => fnd_api.g_true,
1142: x_returnStatus => x_return_status);
1143:
1144: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1145: l_process_phase := '4';
1146: l_error_msg := 'wip_movProc_priv.processIntf failed';
1147: raise fnd_api.g_exc_unexpected_error;
1148: ELSE

Line 1147: raise fnd_api.g_exc_unexpected_error;

1143:
1144: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1145: l_process_phase := '4';
1146: l_error_msg := 'wip_movProc_priv.processIntf failed';
1147: raise fnd_api.g_exc_unexpected_error;
1148: ELSE
1149: l_process_phase := '5';
1150: -- If move success, call time entry API to clock off operator if there
1151: -- is no quantity left at the operation.

Line 1168: WHEN fnd_api.g_exc_unexpected_error THEN

1164: x_returnStatus => l_return_status);
1165: END IF;
1166:
1167: EXCEPTION
1168: WHEN fnd_api.g_exc_unexpected_error THEN
1169: x_return_status := fnd_api.g_ret_sts_error;
1170: IF(c_errors%ISOPEN) THEN
1171: CLOSE c_errors;
1172: END IF;

Line 1169: x_return_status := fnd_api.g_ret_sts_error;

1165: END IF;
1166:
1167: EXCEPTION
1168: WHEN fnd_api.g_exc_unexpected_error THEN
1169: x_return_status := fnd_api.g_ret_sts_error;
1170: IF(c_errors%ISOPEN) THEN
1171: CLOSE c_errors;
1172: END IF;
1173: IF(c_move_intf_records%ISOPEN) THEN

Line 1191: x_return_status := fnd_api.g_ret_sts_error;

1187: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
1188: fnd_message.set_token('MESSAGE', l_error_text);
1189: fnd_msg_pub.add;
1190: WHEN others THEN
1191: x_return_status := fnd_api.g_ret_sts_error;
1192: IF(c_errors%ISOPEN) THEN
1193: CLOSE c_errors;
1194: END IF;
1195: IF(c_move_intf_records%ISOPEN) THEN

Line 1244: x_quality_require := fnd_api.g_false;

1240: wip_logger.entryPoint(p_procName => 'wip_batch_move.quality_require',
1241: p_params => l_params,
1242: x_returnStatus => l_return_status);
1243: END IF;
1244: x_quality_require := fnd_api.g_false;
1245: l_total_row := p_move_tbl.count;
1246:
1247: FOR i IN 1..l_total_row LOOP
1248: -- Build l_context_values to pass to quality API.

Line 1311: IF(l_quality_plan_exist = fnd_api.g_false)THEN

1307: p_txn_number => qa_ss_const.wip_move_txn,
1308: p_org_id => p_org_id,
1309: p_context_values => l_context_values,
1310: x_plan_txn_ids => l_plan_txn_ids);
1311: IF(l_quality_plan_exist = fnd_api.g_false)THEN
1312: -- If no collection plan exist, there is no need to call
1313: -- qa_txn_grp.commit_allowed().
1314: raise fnd_api.g_exc_unexpected_error;
1315: END IF;

Line 1314: raise fnd_api.g_exc_unexpected_error;

1310: x_plan_txn_ids => l_plan_txn_ids);
1311: IF(l_quality_plan_exist = fnd_api.g_false)THEN
1312: -- If no collection plan exist, there is no need to call
1313: -- qa_txn_grp.commit_allowed().
1314: raise fnd_api.g_exc_unexpected_error;
1315: END IF;
1316: -- If quality collection plan exist, we have to check whether it is
1317: -- mandatory or not.
1318: -- Fixed bug 5335024.Call is_commit_allowed() instead of commit_allowed()

Line 1329: IF(l_commit_allow = fnd_api.g_false)THEN

1325: --Pass 0 as Bryan suggested.
1326: p_collection_id => 0,
1327: x_plan_names => x_plan_names);
1328:
1329: IF(l_commit_allow = fnd_api.g_false)THEN
1330: -- If quality plan is mandatory, no need to do more check.
1331: x_quality_require := fnd_api.g_true;
1332: GOTO end_quality_check;
1333: --Start of Fix bug 13336388

Line 1331: x_quality_require := fnd_api.g_true;

1327: x_plan_names => x_plan_names);
1328:
1329: IF(l_commit_allow = fnd_api.g_false)THEN
1330: -- If quality plan is mandatory, no need to do more check.
1331: x_quality_require := fnd_api.g_true;
1332: GOTO end_quality_check;
1333: --Start of Fix bug 13336388
1334: ELSE
1335: l_qa_enabled := qa_txn_grp.qa_enabled(p_txn_number => qa_ss_const.wip_move_txn,

Line 1337: IF(l_qa_enabled = fnd_api.g_true)THEN

1333: --Start of Fix bug 13336388
1334: ELSE
1335: l_qa_enabled := qa_txn_grp.qa_enabled(p_txn_number => qa_ss_const.wip_move_txn,
1336: p_org_id => p_org_id);
1337: IF(l_qa_enabled = fnd_api.g_true)THEN
1338: l_collection_id := qa_txn_grp.get_collection_id();
1339: qa_txn_grp.post_background_results (
1340: p_txn_number => qa_ss_const.wip_move_txn,
1341: p_org_id => p_org_id,

Line 1348: p_init_msg_list => fnd_api.g_true,

1344: p_collection_id => l_collection_id);
1345:
1346: qa_result_grp.enable(
1347: p_api_version => 1.0,
1348: p_init_msg_list => fnd_api.g_true,
1349: p_commit => fnd_api.g_false,
1350: p_validation_level => 0,
1351: p_collection_id => l_collection_id,
1352: p_return_status => l_return_status,

Line 1349: p_commit => fnd_api.g_false,

1345:
1346: qa_result_grp.enable(
1347: p_api_version => 1.0,
1348: p_init_msg_list => fnd_api.g_true,
1349: p_commit => fnd_api.g_false,
1350: p_validation_level => 0,
1351: p_collection_id => l_collection_id,
1352: p_return_status => l_return_status,
1353: p_msg_count => l_msg_count,

Line 1358: END IF; -- end if for (l_qa_enabled = fnd_api.g_true)

1354: p_msg_data => l_err_msg);
1355:
1356: qa_txn_grp.relate_results(l_collection_id);
1357:
1358: END IF; -- end if for (l_qa_enabled = fnd_api.g_true)
1359: END IF; --End of Fix bug 13336388
1360: EXCEPTION
1361: WHEN fnd_api.g_exc_unexpected_error THEN
1362: -- This is not a real error, so we do not have to do anything.

Line 1361: WHEN fnd_api.g_exc_unexpected_error THEN

1357:
1358: END IF; -- end if for (l_qa_enabled = fnd_api.g_true)
1359: END IF; --End of Fix bug 13336388
1360: EXCEPTION
1361: WHEN fnd_api.g_exc_unexpected_error THEN
1362: -- This is not a real error, so we do not have to do anything.
1363: NULL;
1364: WHEN others THEN
1365: l_error_msg := ' unexpected error: ' || SQLERRM || 'SQLCODE = ' ||

Line 1381: p_procReturnStatus => fnd_api.g_ret_sts_success,

1377:
1378: -- write to the log file
1379: IF (l_log_level <= wip_constants.trace_logging) THEN
1380: wip_logger.exitPoint(p_procName => 'wip_batch_move.quality_require',
1381: p_procReturnStatus => fnd_api.g_ret_sts_success,
1382: p_msg => 'procedure complete',
1383: x_returnStatus => l_return_status);
1384: END IF;
1385: <>

Line 1386: x_return_status := fnd_api.g_ret_sts_success;

1382: p_msg => 'procedure complete',
1383: x_returnStatus => l_return_status);
1384: END IF;
1385: <>
1386: x_return_status := fnd_api.g_ret_sts_success;
1387:
1388: -- write to the log file
1389: IF (l_log_level <= wip_constants.trace_logging) THEN
1390: wip_logger.exitPoint(p_procName => 'wip_batch_move.derive_move',

Line 1397: x_return_status := fnd_api.g_ret_sts_error;

1393: x_returnStatus => l_return_status);
1394: END IF;
1395: EXCEPTION
1396: WHEN others THEN
1397: x_return_status := fnd_api.g_ret_sts_error;
1398: l_error_msg := ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1399:
1400: IF (l_log_level <= wip_constants.trace_logging) THEN
1401: wip_logger.exitPoint(p_procName => 'wip_batch_move.derive_move',

Line 1435: raise fnd_api.g_exc_unexpected_error;

1431: -- we should move assembly to.
1432: fnd_message.set_name('WIP','WIP_NO_DEFAULT_STEP_NO_BATCH');
1433: fnd_msg_pub.add;
1434: l_error_msg := 'No default intraoperation step defined.';
1435: raise fnd_api.g_exc_unexpected_error;
1436: END IF;
1437:
1438: l_process_phase := '3';
1439: l_dff_required := fnd_flex_apis.is_descr_required(

Line 1449: raise fnd_api.g_exc_unexpected_error;

1445: -- provide DFF information for this type of transaction.
1446: fnd_message.set_name('WIP','WIP_DFF_REQUIRE_NO_BATCH');
1447: fnd_msg_pub.add;
1448: l_error_msg := 'DFF is mandatory.';
1449: raise fnd_api.g_exc_unexpected_error;
1450: END IF;
1451:
1452: x_return_status := fnd_api.g_ret_sts_success;
1453: -- write to the log file

Line 1452: x_return_status := fnd_api.g_ret_sts_success;

1448: l_error_msg := 'DFF is mandatory.';
1449: raise fnd_api.g_exc_unexpected_error;
1450: END IF;
1451:
1452: x_return_status := fnd_api.g_ret_sts_success;
1453: -- write to the log file
1454: IF (l_log_level <= wip_constants.trace_logging) THEN
1455: wip_logger.exitPoint(p_procName => 'wip_batch_move.validate_batch',
1456: p_procReturnStatus => x_return_status,

Line 1461: WHEN fnd_api.g_exc_unexpected_error THEN

1457: p_msg => 'procedure complete',
1458: x_returnStatus => l_return_status);
1459: END IF;
1460: EXCEPTION
1461: WHEN fnd_api.g_exc_unexpected_error THEN
1462: x_return_status := fnd_api.g_ret_sts_error;
1463:
1464: IF (l_log_level <= wip_constants.trace_logging) THEN
1465: wip_logger.exitPoint(p_procName => 'wip_batch_move.validate_batch',

Line 1462: x_return_status := fnd_api.g_ret_sts_error;

1458: x_returnStatus => l_return_status);
1459: END IF;
1460: EXCEPTION
1461: WHEN fnd_api.g_exc_unexpected_error THEN
1462: x_return_status := fnd_api.g_ret_sts_error;
1463:
1464: IF (l_log_level <= wip_constants.trace_logging) THEN
1465: wip_logger.exitPoint(p_procName => 'wip_batch_move.validate_batch',
1466: p_procReturnStatus => x_return_status,

Line 1472: x_return_status := fnd_api.g_ret_sts_error;

1468: x_returnStatus => l_return_status);
1469: END IF;
1470:
1471: WHEN others THEN
1472: x_return_status := fnd_api.g_ret_sts_error;
1473: l_error_msg := 'process_phase = ' || l_process_phase || ';' ||
1474: ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1475:
1476: IF (l_log_level <= wip_constants.trace_logging) THEN

Line 1586: raise fnd_api.g_exc_unexpected_error;

1582: l_to_move_qty <> l_available_qty) THEN
1583: fnd_message.set_name('WIP','WIP_QTY_SPLIT_NO_BATCH');
1584: fnd_msg_pub.add;
1585: l_error_msg := 'Quantity split at from operation.';
1586: raise fnd_api.g_exc_unexpected_error;
1587: END IF;
1588:
1589: -- If quantity not split, derive from step.
1590: IF(l_queue_qty = l_available_qty)THEN

Line 1625: raise fnd_api.g_exc_unexpected_error;

1621: IF(p_move_qty + p_scrap_qty > l_available_qty) THEN
1622: fnd_message.set_name('WIP','WIP_NOT_ENOUGH_QTY_FOR_BATCH');
1623: fnd_msg_pub.add;
1624: l_error_msg := 'Transaction quantity is greater than available quantity.';
1625: raise fnd_api.g_exc_unexpected_error;
1626: END IF;
1627:
1628: l_process_phase := '4';
1629: SELECT mandatory_scrap_flag

Line 1641: raise fnd_api.g_exc_unexpected_error;

1637: p_default_scrap_acct_id IS NULL) THEN
1638: fnd_message.set_name('WIP','WIP_NO_SCRAP_ACCT_NO_BATCH');
1639: fnd_msg_pub.add;
1640: l_error_msg := 'No default scrap accout defined.';
1641: raise fnd_api.g_exc_unexpected_error;
1642: END IF;
1643: l_process_phase := '5';
1644: -- Derive move/scrap information
1645: derive_row(p_org_id => p_org_id,

Line 1659: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1655: p_resp_key => p_resp_key,
1656: x_move_table_pvt => x_move_table_pvt,
1657: x_return_status => x_return_status);
1658:
1659: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1660: l_error_msg := 'wip_batch_move.derive_row failed';
1661: raise fnd_api.g_exc_unexpected_error;
1662: END IF;
1663: l_process_phase := '6';

Line 1661: raise fnd_api.g_exc_unexpected_error;

1657: x_return_status => x_return_status);
1658:
1659: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1660: l_error_msg := 'wip_batch_move.derive_row failed';
1661: raise fnd_api.g_exc_unexpected_error;
1662: END IF;
1663: l_process_phase := '6';
1664: -- Check whether quality collection is mandatory or not.
1665:

Line 1686: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1682: x_plan_names => l_plan_names,
1683: x_return_status => x_return_status);
1684: end if;
1685:
1686: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1687: l_error_msg := 'wip_batch_move.quality_require failed';
1688: raise fnd_api.g_exc_unexpected_error;
1689: ELSE -- If success, check whether quality is mandatory or not.
1690: IF(l_quality_require = fnd_api.g_true) THEN

Line 1688: raise fnd_api.g_exc_unexpected_error;

1684: end if;
1685:
1686: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1687: l_error_msg := 'wip_batch_move.quality_require failed';
1688: raise fnd_api.g_exc_unexpected_error;
1689: ELSE -- If success, check whether quality is mandatory or not.
1690: IF(l_quality_require = fnd_api.g_true) THEN
1691: -- Fixed bug 5335024. Change error message from a generic error message
1692: -- WIP_QUALITY_REQUIRE_NO_BATCH to QA_TXN_INCOMPLETE which contain plan

Line 1690: IF(l_quality_require = fnd_api.g_true) THEN

1686: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1687: l_error_msg := 'wip_batch_move.quality_require failed';
1688: raise fnd_api.g_exc_unexpected_error;
1689: ELSE -- If success, check whether quality is mandatory or not.
1690: IF(l_quality_require = fnd_api.g_true) THEN
1691: -- Fixed bug 5335024. Change error message from a generic error message
1692: -- WIP_QUALITY_REQUIRE_NO_BATCH to QA_TXN_INCOMPLETE which contain plan
1693: -- name.
1694: fnd_message.set_name('QA','QA_TXN_INCOMPLETE');

Line 1698: raise fnd_api.g_exc_unexpected_error;

1694: fnd_message.set_name('QA','QA_TXN_INCOMPLETE');
1695: fnd_message.set_token('PLANS1', l_plan_names);
1696: fnd_msg_pub.add;
1697: l_error_msg := 'Quality collection is mandatory.';
1698: raise fnd_api.g_exc_unexpected_error;
1699: END IF;
1700: END IF;
1701:
1702: x_return_status := fnd_api.g_ret_sts_success;

Line 1702: x_return_status := fnd_api.g_ret_sts_success;

1698: raise fnd_api.g_exc_unexpected_error;
1699: END IF;
1700: END IF;
1701:
1702: x_return_status := fnd_api.g_ret_sts_success;
1703:
1704: -- write to the log file
1705: IF (l_log_level <= wip_constants.trace_logging) THEN
1706: wip_logger.exitPoint(p_procName => 'wip_batch_move.validate_row',

Line 1712: WHEN fnd_api.g_exc_unexpected_error THEN

1708: p_msg => 'procedure complete',
1709: x_returnStatus => l_return_status);
1710: END IF;
1711: EXCEPTION
1712: WHEN fnd_api.g_exc_unexpected_error THEN
1713: x_return_status := fnd_api.g_ret_sts_error;
1714: IF (l_log_level <= wip_constants.trace_logging) THEN
1715: wip_logger.exitPoint(p_procName => 'wip_batch_move.validate_row',
1716: p_procReturnStatus => x_return_status,

Line 1713: x_return_status := fnd_api.g_ret_sts_error;

1709: x_returnStatus => l_return_status);
1710: END IF;
1711: EXCEPTION
1712: WHEN fnd_api.g_exc_unexpected_error THEN
1713: x_return_status := fnd_api.g_ret_sts_error;
1714: IF (l_log_level <= wip_constants.trace_logging) THEN
1715: wip_logger.exitPoint(p_procName => 'wip_batch_move.validate_row',
1716: p_procReturnStatus => x_return_status,
1717: p_msg => l_error_msg,

Line 1722: x_return_status := fnd_api.g_ret_sts_error;

1718: x_returnStatus => l_return_status);
1719: END IF;
1720:
1721: WHEN others THEN
1722: x_return_status := fnd_api.g_ret_sts_error;
1723: l_error_msg := 'process_phase = ' || l_process_phase || ';' ||
1724: ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1725:
1726: IF (l_log_level <= wip_constants.trace_logging) THEN

Line 1783: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1779: x_default_step_type => l_default_step_type,
1780: x_default_scrap_acct_id => l_default_scrap_acct_id,
1781: x_return_status => x_return_status);
1782:
1783: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1784: l_error_msg := 'wip_batch_move.get_preferences failed';
1785: raise fnd_api.g_exc_unexpected_error;
1786: END IF;
1787: -- Perform generic validation for the whole batch.

Line 1785: raise fnd_api.g_exc_unexpected_error;

1781: x_return_status => x_return_status);
1782:
1783: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1784: l_error_msg := 'wip_batch_move.get_preferences failed';
1785: raise fnd_api.g_exc_unexpected_error;
1786: END IF;
1787: -- Perform generic validation for the whole batch.
1788: validate_batch(p_default_step_type => l_default_step_type,
1789: x_return_status => x_return_status);

Line 1791: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1787: -- Perform generic validation for the whole batch.
1788: validate_batch(p_default_step_type => l_default_step_type,
1789: x_return_status => x_return_status);
1790:
1791: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1792: l_error_msg := 'wip_batch_move.validate_batch failed';
1793: raise fnd_api.g_exc_unexpected_error;
1794: END IF;
1795:

Line 1793: raise fnd_api.g_exc_unexpected_error;

1789: x_return_status => x_return_status);
1790:
1791: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1792: l_error_msg := 'wip_batch_move.validate_batch failed';
1793: raise fnd_api.g_exc_unexpected_error;
1794: END IF;
1795:
1796: l_total_row := p_move_table.count;
1797:

Line 1815: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1811: p_assy_serial => p_move_table(i).assy_serial,
1812: x_move_table_pvt => l_move_table_pvt,
1813: x_return_status => x_return_status);
1814:
1815: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1816: l_error_msg := 'wip_batch_move.validate_row failed';
1817: raise fnd_api.g_exc_unexpected_error;
1818: END IF;
1819: -- Insert move/scrap record into WMTI

Line 1817: raise fnd_api.g_exc_unexpected_error;

1813: x_return_status => x_return_status);
1814:
1815: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1816: l_error_msg := 'wip_batch_move.validate_row failed';
1817: raise fnd_api.g_exc_unexpected_error;
1818: END IF;
1819: -- Insert move/scrap record into WMTI
1820: insert_move_records(p_org_id => p_org_id,
1821: p_employee_id => p_employee_id,

Line 1827: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1823: p_assy_serial => p_move_table(i).assy_serial,
1824: x_group_id => l_group_id,
1825: x_return_status => x_return_status);
1826:
1827: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1828: l_error_msg := 'wip_batch_move.insert_move_records failed';
1829: raise fnd_api.g_exc_unexpected_error;
1830: END IF;
1831: -- Clear all move information.

Line 1829: raise fnd_api.g_exc_unexpected_error;

1825: x_return_status => x_return_status);
1826:
1827: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1828: l_error_msg := 'wip_batch_move.insert_move_records failed';
1829: raise fnd_api.g_exc_unexpected_error;
1830: END IF;
1831: -- Clear all move information.
1832: l_move_table_pvt.delete;
1833:

Line 1838: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN

1834: -- Process move records
1835: process_move_records(p_group_id => l_group_id,
1836: x_return_status => x_return_status);
1837:
1838: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1839: l_error_msg := 'wip_batch_move.process_move_records failed';
1840: raise fnd_api.g_exc_unexpected_error;
1841: ELSE
1842: -- Initialize message stack to clear "Txn Success" inventory put in

Line 1840: raise fnd_api.g_exc_unexpected_error;

1836: x_return_status => x_return_status);
1837:
1838: IF(x_return_status <> fnd_api.g_ret_sts_success) THEN
1839: l_error_msg := 'wip_batch_move.process_move_records failed';
1840: raise fnd_api.g_exc_unexpected_error;
1841: ELSE
1842: -- Initialize message stack to clear "Txn Success" inventory put in
1843: -- the stack.
1844: fnd_msg_pub.initialize;

Line 1849: WHEN fnd_api.g_exc_unexpected_error THEN

1845: COMMIT;
1846: END IF;
1847:
1848: EXCEPTION
1849: WHEN fnd_api.g_exc_unexpected_error THEN
1850: ROLLBACK TO SAVEPOINT s_batch_move1;
1851: -- Put a useful error message in the stack to display back to the user.
1852: wip_utilities.get_message_stack(p_msg => l_error_text);
1853: add_error(p_job_name => p_move_table(i).wip_entity_name,

Line 1882: x_return_status := fnd_api.g_ret_sts_success;

1878: END;
1879: END LOOP;
1880:
1881: IF(l_error_row = 0) THEN
1882: x_return_status := fnd_api.g_ret_sts_success;
1883: ELSE
1884: -- Put all error message to message stack.
1885: load_errors;
1886: x_return_status := fnd_api.g_ret_sts_error;

Line 1886: x_return_status := fnd_api.g_ret_sts_error;

1882: x_return_status := fnd_api.g_ret_sts_success;
1883: ELSE
1884: -- Put all error message to message stack.
1885: load_errors;
1886: x_return_status := fnd_api.g_ret_sts_error;
1887: END IF;
1888: -- Write to the log file.
1889: IF (l_log_level <= wip_constants.trace_logging) THEN
1890: wip_logger.exitPoint(p_procName => 'wip_batch_move.process',

Line 1897: WHEN fnd_api.g_exc_unexpected_error THEN

1893: x_returnStatus => l_return_status);
1894: wip_logger.cleanUp(x_returnStatus => l_return_status);
1895: END IF;
1896: EXCEPTION
1897: WHEN fnd_api.g_exc_unexpected_error THEN
1898: x_return_status := fnd_api.g_ret_sts_error;
1899: IF (l_log_level <= wip_constants.trace_logging) THEN
1900: wip_logger.exitPoint(p_procName => 'wip_batch_move.process',
1901: p_procReturnStatus => x_return_status,

Line 1898: x_return_status := fnd_api.g_ret_sts_error;

1894: wip_logger.cleanUp(x_returnStatus => l_return_status);
1895: END IF;
1896: EXCEPTION
1897: WHEN fnd_api.g_exc_unexpected_error THEN
1898: x_return_status := fnd_api.g_ret_sts_error;
1899: IF (l_log_level <= wip_constants.trace_logging) THEN
1900: wip_logger.exitPoint(p_procName => 'wip_batch_move.process',
1901: p_procReturnStatus => x_return_status,
1902: p_msg => l_error_msg,

Line 1908: x_return_status := fnd_api.g_ret_sts_error;

1904: wip_logger.cleanUp(x_returnStatus => l_return_status);
1905: END IF;
1906:
1907: WHEN others THEN
1908: x_return_status := fnd_api.g_ret_sts_error;
1909: l_error_msg := ' unexpected error: ' || SQLERRM || 'SQLCODE = ' || SQLCODE;
1910:
1911: IF (l_log_level <= wip_constants.trace_logging) THEN
1912: wip_logger.exitPoint(p_procName => 'wip_batch_move.process',