DBA Data[Home] [Help]

APPS.GME_RELEASE_BATCH_PVT dependencies on FND_API

Line 73: x_return_status := FND_API.G_RET_STS_SUCCESS;

69: END IF;
70: END IF;
71:
72: /* Set the return status to success initially */
73: x_return_status := FND_API.G_RET_STS_SUCCESS;
74:
75: -- set output structure
76: x_batch_header_rec := p_batch_header_rec;
77: -- call for validate the batch for unexploded phantoms

Line 83: IF l_return_status <> fnd_api.g_ret_sts_success THEN

79: ,p_auto_by_step => 2
80: ,p_batchstep_id => null
81: ,x_return_status => l_return_status);
82:
83: IF l_return_status <> fnd_api.g_ret_sts_success THEN
84: RAISE error_unexp_phantom;
85: END IF;
86: -- set batch status
87: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_wip;

Line 137: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

133: ,p_update_inv_ind => x_batch_header_rec.update_inventory_ind
134: ,x_exception_material_tbl => x_exception_material_tbl
135: ,x_return_status => l_return_status);
136:
137: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
138: x_return_status := l_return_status;
139: RAISE error_process_ingredient;
140: END IF;
141:

Line 167: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

163: ,p_item_id => l_matl_dtl_rec.inventory_item_id
164: ,x_item_rec => l_item_rec
165: ,x_return_status => l_return_status);
166:
167: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
168: x_return_status := l_return_status;
169: RAISE error_get_item;
170: END IF;
171:

Line 183: ,p_force_unconsumed => fnd_api.g_true

179: (p_material_dtl_rec => l_matl_dtl_rec
180: ,p_yield_qty => l_matl_dtl_rec.plan_qty
181: ,p_trans_date => x_batch_header_rec.actual_start_date
182: ,p_item_rec => l_item_rec
183: ,p_force_unconsumed => fnd_api.g_true
184: ,x_exception_material_tbl => x_exception_material_tbl
185: ,x_actual_qty => l_actual_qty
186: ,x_return_status => l_return_status);
187:

Line 188: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

184: ,x_exception_material_tbl => x_exception_material_tbl
185: ,x_actual_qty => l_actual_qty
186: ,x_return_status => l_return_status);
187:
188: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
189: x_return_status := l_return_status;
190: RAISE error_yield_material;
191: END IF;
192:

Line 252: p_init_msg_list => FND_API.G_FALSE,

248: --
249:
250: GMF_VIB.Create_Batch_Requirements
251: ( p_api_version => 1.0,
252: p_init_msg_list => FND_API.G_FALSE,
253: p_batch_id => x_batch_header_rec.batch_id,
254: x_return_status => l_return_status, --Bug#6507649
255: x_msg_count => l_message_count,
256: x_msg_data => l_message_list);

Line 258: IF l_return_status <> FND_API.G_RET_STS_SUCCESS --Bug#6507649 Rework

254: x_return_status => l_return_status, --Bug#6507649
255: x_msg_count => l_message_count,
256: x_msg_data => l_message_list);
257:
258: IF l_return_status <> FND_API.G_RET_STS_SUCCESS --Bug#6507649 Rework
259: THEN
260: RAISE gmf_cost_failure;
261: END IF;
262: -- End Bug 5903208

Line 271: x_return_status := FND_API.G_RET_STS_ERROR;

267:
268: EXCEPTION
269: WHEN gmf_cost_failure THEN
270: -- Bug 5903208
271: x_return_status := FND_API.G_RET_STS_ERROR;
272:
273: WHEN error_update_batch OR error_update_row OR error_fetch_material THEN
274: /* Bug 5554841 No need to set messsage it is set by called APIs */
275: --gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);

Line 276: x_return_status := FND_API.g_ret_sts_unexp_error;

272:
273: WHEN error_update_batch OR error_update_row OR error_fetch_material THEN
274: /* Bug 5554841 No need to set messsage it is set by called APIs */
275: --gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
276: x_return_status := FND_API.g_ret_sts_unexp_error;
277: WHEN error_process_ingredient OR error_consume_material OR error_yield_material OR error_get_item THEN
278: NULL;
279: WHEN error_unexp_phantom THEN
280: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');

Line 281: x_return_status := FND_API.G_RET_STS_ERROR;

277: WHEN error_process_ingredient OR error_consume_material OR error_yield_material OR error_get_item THEN
278: NULL;
279: WHEN error_unexp_phantom THEN
280: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');
281: x_return_status := FND_API.G_RET_STS_ERROR;
282: WHEN OTHERS THEN
283: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
284: IF g_debug <= gme_debug.g_log_procedure THEN
285: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 287: x_return_status := FND_API.g_ret_sts_unexp_error;

283: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
284: IF g_debug <= gme_debug.g_log_procedure THEN
285: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
286: END IF;
287: x_return_status := FND_API.g_ret_sts_unexp_error;
288: END release_batch;
289:
290: PROCEDURE process_ingredient
291: (p_material_detail_rec IN gme_material_details%ROWTYPE

Line 323: x_return_status := FND_API.G_RET_STS_SUCCESS;

319: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' material_detail_id='||p_material_detail_rec.material_detail_id);
320: END IF;
321:
322: /* Set the return status to success initially */
323: x_return_status := FND_API.G_RET_STS_SUCCESS;
324:
325: -- Process the ingredients...
326: -- 1) release phantom batch ingredient
327: -- 2) consume non phantom ingredient

Line 358: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

354: ,x_batch_header_rec => l_phantom_batch_rec
355: ,x_return_status => l_return_status
356: ,x_exception_material_tbl => x_exception_material_tbl);
357:
358: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
359: x_return_status := l_return_status;
360: RAISE error_release_batch;
361: END IF;
362:

Line 379: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

375: ,p_item_id => l_matl_dtl_rec.inventory_item_id
376: ,x_item_rec => l_item_rec
377: ,x_return_status => l_return_status);
378:
379: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
380: x_return_status := l_return_status;
381: RAISE error_get_item;
382: END IF;
383:

Line 410: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN

406: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
407: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' after consume_material; it returned actual_qty='||l_actual_qty);
408: END IF;
409:
410: IF l_return_status NOT IN (FND_API.G_RET_STS_SUCCESS, gme_common_pvt.g_exceptions_err) THEN
411: x_return_status := l_return_status;
412: RAISE error_consume_material;
413: END IF;
414:

Line 450: x_return_status := FND_API.g_ret_sts_unexp_error;

446:
447: EXCEPTION
448: WHEN error_update_row OR error_fetch_batch THEN
449: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
450: x_return_status := FND_API.g_ret_sts_unexp_error;
451: WHEN error_release_batch OR error_consume_material OR error_get_item THEN
452: NULL;
453: WHEN error_dispense_non_reserve THEN
454: gme_common_pvt.log_message ('GME_DISPENSE_NON_RESERVE');

Line 455: x_return_status := fnd_api.g_ret_sts_error;

451: WHEN error_release_batch OR error_consume_material OR error_get_item THEN
452: NULL;
453: WHEN error_dispense_non_reserve THEN
454: gme_common_pvt.log_message ('GME_DISPENSE_NON_RESERVE');
455: x_return_status := fnd_api.g_ret_sts_error;
456: WHEN OTHERS THEN
457: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
458: IF g_debug <= gme_debug.g_log_procedure THEN
459: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 461: x_return_status := FND_API.g_ret_sts_unexp_error;

457: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
458: IF g_debug <= gme_debug.g_log_procedure THEN
459: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
460: END IF;
461: x_return_status := FND_API.g_ret_sts_unexp_error;
462: END process_ingredient;
463:
464: -- Note: p_consume_qty is the target actual qty; for incr, it's also the target, not the incr
465: PROCEDURE consume_material(p_material_dtl_rec IN gme_material_details%ROWTYPE

Line 542: x_return_status := FND_API.G_RET_STS_SUCCESS;

538: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_dtl_rec.line_no);
539: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_dtl_rec.line_type);
540: END IF;
541: /* Set the return status to success initially */
542: x_return_status := FND_API.G_RET_STS_SUCCESS;
543:
544: -- set the output actual qty to it's current value...
545: x_actual_qty := p_material_dtl_rec.actual_qty;
546:

Line 587: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

583: ,p_dispense_ind => nvl(p_material_dtl_rec.dispense_ind,'N')
584: ,x_return_status => l_return_status
585: ,x_reservations_tbl => l_reservation_tab);
586:
587: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
588: x_return_status := l_return_status;
589: RAISE error_get_reservations;
590: END IF;
591:

Line 654: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

650: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
651: ,x_actual_qty => x_actual_qty
652: ,x_return_status => l_return_status);
653:
654: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
655: x_return_status := l_return_status;
656: RAISE error_build_trxn;
657: END IF;
658: END IF; -- p_material_dtl_rec.dispense_ind = 'Y'

Line 728: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

724: ,p_material_dtl_rec => p_material_dtl_rec
725: ,p_item_rec => p_item_rec
726: ,x_reservation_rec => l_reservation_rec
727: ,x_return_status => l_return_status);
728: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
729: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
730: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' could not convert partial to dlr for reservation id='||l_partial_rec.reservation_id||'; moving to next partial');
731: END IF;
732: ELSE

Line 743: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

739: ,p_revision => NULL
740: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
741: ,x_actual_qty => x_actual_qty
742: ,x_return_status => l_return_status);
743: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
744: x_return_status := l_return_status;
745: RAISE error_build_trxn;
746: END IF;
747: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS for gme_reservations_pvt.convert_partial_to_dlr

Line 747: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS for gme_reservations_pvt.convert_partial_to_dlr

743: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
744: x_return_status := l_return_status;
745: RAISE error_build_trxn;
746: END IF;
747: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS for gme_reservations_pvt.convert_partial_to_dlr
748:
749: i := i + 1; -- move on to the next partial reservation
750: END LOOP;
751:

Line 810: ,p_init_msg_lst => fnd_api.g_false

806:
807: gme_transactions_pvt.query_quantities
808: (
809: p_api_version_number => 1
810: ,p_init_msg_lst => fnd_api.g_false
811: ,x_return_status => l_return_status
812: ,x_msg_count => l_msg_count
813: ,x_msg_data => l_msg_data
814: ,p_organization_id => p_material_dtl_rec.organization_id

Line 857: IF l_att > 0 AND l_return_status = FND_API.G_RET_STS_SUCCESS THEN

853: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after query quantities loc='||l_locator_id);
854: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after query quantities rev='||l_revision);
855: END IF;
856:
857: IF l_att > 0 AND l_return_status = FND_API.G_RET_STS_SUCCESS THEN
858: build_and_create_transaction
859: (p_rsrv_rec => NULL
860: ,p_subinv => l_subinv
861: ,p_locator_id => l_locator_id

Line 873: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN

869: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
870: ,x_actual_qty => x_actual_qty
871: ,x_return_status => l_return_status);
872:
873: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
874: x_return_status := l_return_status;
875: RAISE error_build_trxn;
876: END IF;
877: END IF;

Line 906: ,p_force_unconsumed => fnd_api.g_true

902: ,p_pending_move_order_ind => l_pending_mo_ind
903: ,p_pending_rsrv_ind => l_pending_rsrv_ind
904: ,p_transacted_qty => x_actual_qty - l_start_actual_qty
905: ,p_exception_qty => l_consume_qty - x_actual_qty
906: ,p_force_unconsumed => fnd_api.g_true
907: ,x_exception_material_tbl => x_exception_material_tbl
908: ,x_return_status => x_return_status);
909: WHEN error_unexpected THEN
910: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 910: x_return_status := FND_API.g_ret_sts_unexp_error;

906: ,p_force_unconsumed => fnd_api.g_true
907: ,x_exception_material_tbl => x_exception_material_tbl
908: ,x_return_status => x_return_status);
909: WHEN error_unexpected THEN
910: x_return_status := FND_API.g_ret_sts_unexp_error;
911: WHEN OTHERS THEN
912: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
913: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
914: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 916: x_return_status := FND_API.g_ret_sts_unexp_error;

912: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
913: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
914: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
915: END IF;
916: x_return_status := FND_API.g_ret_sts_unexp_error;
917: END consume_material;
918:
919: PROCEDURE build_and_create_transaction
920: (p_rsrv_rec IN mtl_reservations%ROWTYPE

Line 990: x_return_status := FND_API.G_RET_STS_SUCCESS;

986: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' x_actual_qty='||x_actual_qty);
987: END IF;
988:
989: /* Set the return status to success initially */
990: x_return_status := FND_API.G_RET_STS_SUCCESS;
991:
992: IF p_rsrv_rec.reservation_id IS NOT NULL THEN
993: l_rsrv_mode := TRUE;
994: ELSE

Line 1014: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1010: ,x_return_status => x_return_status);
1011: l_transaction_rec.revision := p_revision;
1012: END IF;
1013:
1014: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1015: RAISE error_build_mmti;
1016: END IF;
1017:
1018: IF l_rsrv_mode THEN

Line 1028: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1024: ,p_uom_code => p_mtl_dtl_rec.dtl_um
1025: ,x_qty => l_dtl_qty
1026: ,x_return_status => x_return_status);
1027:
1028: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1029: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1030: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' gme_reservations_pvt.get_reservation_dtl_qty returned error');
1031: END IF;
1032:

Line 1149: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1145: (p_mmti_rec => l_transaction_rec
1146: ,p_mmli_tbl => l_lot_rec
1147: ,x_return_status => x_return_status);
1148:
1149: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1150: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1151: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' gme_transactions_pvt.create_transaction returned '||x_return_status);
1152: END IF;
1153: RAISE error_create_trxn;

Line 1190: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1186: (p_reservation_id => p_rsrv_rec.reservation_id
1187: ,p_prim_relieve_qty => l_prim_qty
1188: ,x_return_status => x_return_status);
1189:
1190: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1191: RAISE error_relieve_rsrv;
1192: END IF;
1193:
1194: -- Bug 4899399 - after relieving the reservation, informing the GMO about the transaction.

Line 1215: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1211: p_dispense_id => p_rsrv_rec.external_source_line_id,
1212: p_status_code => 'CNSUMED',
1213: p_transaction_id => null
1214: ) ;
1215: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1216: RAISE dispense_error;
1217: END IF;
1218: END IF;
1219: END IF;

Line 1238: x_return_status := FND_API.g_ret_sts_error;

1234: fnd_message.set_token ('ITEM_NO', l_item_no);
1235: fnd_message.set_token ('FROM_UOM',l_from_um);
1236: fnd_message.set_token ('TO_UOM', l_to_um);
1237: fnd_msg_pub.ADD;
1238: x_return_status := FND_API.g_ret_sts_error;
1239: WHEN error_create_trxn OR error_build_mmti OR error_get_dtl_qty OR error_relieve_rsrv THEN
1240: NULL;
1241: WHEN dispense_error THEN
1242: x_return_status := fnd_api.g_ret_sts_error;

Line 1242: x_return_status := fnd_api.g_ret_sts_error;

1238: x_return_status := FND_API.g_ret_sts_error;
1239: WHEN error_create_trxn OR error_build_mmti OR error_get_dtl_qty OR error_relieve_rsrv THEN
1240: NULL;
1241: WHEN dispense_error THEN
1242: x_return_status := fnd_api.g_ret_sts_error;
1243: WHEN OTHERS THEN
1244: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1245: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
1246: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 1248: x_return_status := FND_API.g_ret_sts_unexp_error;

1244: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1245: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
1246: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1247: END IF;
1248: x_return_status := FND_API.g_ret_sts_unexp_error;
1249: END build_and_create_transaction;
1250:
1251:
1252:

Line 1268: x_return_status := FND_API.g_ret_sts_success;

1264: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' reservation_id='||p_rsrv_rec.reservation_id);
1265: END IF;
1266:
1267: /* Initially let us assign the return status to success */
1268: x_return_status := FND_API.g_ret_sts_success;
1269:
1270: -- consturct mtl_transactions_interface
1271: x_mmti_rec.transaction_source_id := p_rsrv_rec.demand_source_header_id; -- batch_id
1272: x_mmti_rec.trx_source_line_id := p_rsrv_rec.demand_source_line_id; -- material_detail_id

Line 1294: WHEN FND_API.G_EXC_ERROR THEN

1290: END IF;
1291:
1292:
1293: EXCEPTION
1294: WHEN FND_API.G_EXC_ERROR THEN
1295: x_return_status := FND_API.G_RET_STS_ERROR;
1296:
1297: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1295: x_return_status := FND_API.G_RET_STS_ERROR;

1291:
1292:
1293: EXCEPTION
1294: WHEN FND_API.G_EXC_ERROR THEN
1295: x_return_status := FND_API.G_RET_STS_ERROR;
1296:
1297: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1299:

Line 1297: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1293: EXCEPTION
1294: WHEN FND_API.G_EXC_ERROR THEN
1295: x_return_status := FND_API.G_RET_STS_ERROR;
1296:
1297: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1299:
1300: WHEN OTHERS THEN
1301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1294: WHEN FND_API.G_EXC_ERROR THEN
1295: x_return_status := FND_API.G_RET_STS_ERROR;
1296:
1297: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1299:
1300: WHEN OTHERS THEN
1301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1302: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);

Line 1301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1297: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1298: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1299:
1300: WHEN OTHERS THEN
1301: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1302: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);
1303:
1304: END constr_mmti_from_reservation;
1305:

Line 1324: x_return_status := FND_API.g_ret_sts_success;

1320: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_locator_id='||p_locator_id);
1321: END IF;
1322:
1323: /* Initially let us assign the return status to success */
1324: x_return_status := FND_API.g_ret_sts_success;
1325:
1326: -- consturct mtl_transactions_interface
1327: x_mmti_rec.transaction_source_id := p_mtl_dtl_rec.batch_id;
1328: x_mmti_rec.trx_source_line_id := p_mtl_dtl_rec.material_detail_id;

Line 1339: WHEN FND_API.G_EXC_ERROR THEN

1335: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1336: END IF;
1337:
1338: EXCEPTION
1339: WHEN FND_API.G_EXC_ERROR THEN
1340: x_return_status := FND_API.G_RET_STS_ERROR;
1341:
1342: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1343: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1340: x_return_status := FND_API.G_RET_STS_ERROR;

1336: END IF;
1337:
1338: EXCEPTION
1339: WHEN FND_API.G_EXC_ERROR THEN
1340: x_return_status := FND_API.G_RET_STS_ERROR;
1341:
1342: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1343: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1344:

Line 1342: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1338: EXCEPTION
1339: WHEN FND_API.G_EXC_ERROR THEN
1340: x_return_status := FND_API.G_RET_STS_ERROR;
1341:
1342: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1343: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1344:
1345: WHEN OTHERS THEN
1346: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1343: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1339: WHEN FND_API.G_EXC_ERROR THEN
1340: x_return_status := FND_API.G_RET_STS_ERROR;
1341:
1342: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1343: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1344:
1345: WHEN OTHERS THEN
1346: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1347: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);

Line 1346: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1342: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1343: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1344:
1345: WHEN OTHERS THEN
1346: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1347: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);
1348:
1349: END constr_mmti_from_qty_tree;
1350:

Line 1357: ,p_force_unconsumed IN VARCHAR2 := fnd_api.g_true

1353: ,p_pending_move_order_ind IN BOOLEAN := NULL
1354: ,p_pending_rsrv_ind IN BOOLEAN := NULL
1355: ,p_transacted_qty IN NUMBER := NULL
1356: ,p_exception_qty IN NUMBER := NULL
1357: ,p_force_unconsumed IN VARCHAR2 := fnd_api.g_true
1358: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
1359: ,x_return_status OUT NOCOPY VARCHAR2) IS
1360:
1361: l_api_name CONSTANT VARCHAR2 (30) := 'create_batch_exception';

Line 1412: x_return_status := FND_API.G_RET_STS_SUCCESS;

1408: END IF;
1409:
1410: END IF;
1411:
1412: x_return_status := FND_API.G_RET_STS_SUCCESS;
1413:
1414: IF p_force_unconsumed = fnd_api.g_true THEN
1415: l_display_unconsumed := fnd_api.g_true;
1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN

Line 1414: IF p_force_unconsumed = fnd_api.g_true THEN

1410: END IF;
1411:
1412: x_return_status := FND_API.G_RET_STS_SUCCESS;
1413:
1414: IF p_force_unconsumed = fnd_api.g_true THEN
1415: l_display_unconsumed := fnd_api.g_true;
1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1417: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1418: l_display_unconsumed := fnd_api.g_true;

Line 1415: l_display_unconsumed := fnd_api.g_true;

1411:
1412: x_return_status := FND_API.G_RET_STS_SUCCESS;
1413:
1414: IF p_force_unconsumed = fnd_api.g_true THEN
1415: l_display_unconsumed := fnd_api.g_true;
1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1417: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1418: l_display_unconsumed := fnd_api.g_true;
1419: ELSE

Line 1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN

1412: x_return_status := FND_API.G_RET_STS_SUCCESS;
1413:
1414: IF p_force_unconsumed = fnd_api.g_true THEN
1415: l_display_unconsumed := fnd_api.g_true;
1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1417: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1418: l_display_unconsumed := fnd_api.g_true;
1419: ELSE
1420: l_display_unconsumed := fnd_api.g_false;

Line 1418: l_display_unconsumed := fnd_api.g_true;

1414: IF p_force_unconsumed = fnd_api.g_true THEN
1415: l_display_unconsumed := fnd_api.g_true;
1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1417: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1418: l_display_unconsumed := fnd_api.g_true;
1419: ELSE
1420: l_display_unconsumed := fnd_api.g_false;
1421: END IF;
1422: END IF;

Line 1420: l_display_unconsumed := fnd_api.g_false;

1416: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1417: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1418: l_display_unconsumed := fnd_api.g_true;
1419: ELSE
1420: l_display_unconsumed := fnd_api.g_false;
1421: END IF;
1422: END IF;
1423:
1424: IF p_material_dtl_rec.line_type = gme_common_pvt.g_line_type_ing AND p_material_dtl_rec.phantom_line_id IS NOT NULL THEN

Line 1477: (l_display_unconsumed = FND_API.g_true AND l_exceptions_rec.exception_qty > 0) OR

1473: l_exceptions_rec.exception_qty := NVL(p_exception_qty, p_material_dtl_rec.plan_qty - p_material_dtl_rec.actual_qty);
1474: l_exceptions_rec.exception_qty := ROUND(l_exceptions_rec.exception_qty, gme_common_pvt.g_precision);
1475:
1476: IF l_pending_rsrv_ind OR l_pending_mo_ind OR
1477: (l_display_unconsumed = FND_API.g_true AND l_exceptions_rec.exception_qty > 0) OR
1478: -- next line is for negative IB
1479: (l_display_unconsumed = FND_API.g_true AND p_exception_qty < 0) THEN
1480: i := x_exception_material_tbl.COUNT + 1;
1481: x_exception_material_tbl(i) := l_exceptions_rec;

Line 1479: (l_display_unconsumed = FND_API.g_true AND p_exception_qty < 0) THEN

1475:
1476: IF l_pending_rsrv_ind OR l_pending_mo_ind OR
1477: (l_display_unconsumed = FND_API.g_true AND l_exceptions_rec.exception_qty > 0) OR
1478: -- next line is for negative IB
1479: (l_display_unconsumed = FND_API.g_true AND p_exception_qty < 0) THEN
1480: i := x_exception_material_tbl.COUNT + 1;
1481: x_exception_material_tbl(i) := l_exceptions_rec;
1482:
1483: IF NOT gme_common_pvt.insert_exceptions(p_exception_rec => l_exceptions_rec) THEN

Line 1499: x_return_status := FND_API.G_RET_STS_ERROR;

1495: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with return status= '||x_return_status);
1496: END IF;
1497: EXCEPTION
1498: WHEN error_insert_exceptions THEN
1499: x_return_status := FND_API.G_RET_STS_ERROR;
1500: WHEN error_no_exception THEN
1501: NULL;
1502: WHEN OTHERS THEN
1503: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN

Line 1507: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1503: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN
1504: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1505: END IF;
1506: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1507: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1508: END create_batch_exception;
1509:
1510: /*************************************************************************************/
1511: /* p_auto_by_step Include auto by step */

Line 1556: x_return_status := FND_API.G_RET_STS_SUCCESS;

1552: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batchstep_id='||p_batchstep_id);
1553: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' mode='||p_auto_by_step);
1554: END IF;
1555:
1556: x_return_status := FND_API.G_RET_STS_SUCCESS;
1557:
1558: OPEN cur_get_phantom_ingred(p_batch_id);
1559: FETCH cur_get_phantom_ingred BULK COLLECT INTO l_matl_dtl_tab;
1560: CLOSE cur_get_phantom_ingred;

Line 1600: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1596: ,p_auto_by_step => 2
1597: ,p_batchstep_id => NULL
1598: ,x_return_status => x_return_status);
1599:
1600: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1601: RAISE error_unexp_downstream;
1602: END IF;
1603: END IF;
1604: END LOOP;

Line 1613: x_return_status := FND_API.G_RET_STS_ERROR;

1609:
1610: EXCEPTION
1611: WHEN error_unexp_phantom THEN
1612: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');
1613: x_return_status := FND_API.G_RET_STS_ERROR;
1614: WHEN error_unexp_downstream THEN
1615: NULL;
1616: WHEN OTHERS THEN
1617: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN

Line 1621: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1617: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN
1618: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1619: END IF;
1620: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1621: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1622: END check_unexploded_phantom;
1623:
1624: PROCEDURE validate_batch_for_release (p_batch_header_rec IN gme_batch_header%ROWTYPE
1625: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE

Line 1663: x_return_status := FND_API.g_ret_sts_success;

1659: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1660: || l_api_name);
1661: END IF;
1662:
1663: x_return_status := FND_API.g_ret_sts_success;
1664:
1665: -- set output structure
1666: x_batch_header_rec := p_batch_header_rec;
1667:

Line 1720: x_return_status := fnd_api.g_ret_sts_error;

1716: ,p_start_date => p_batch_header_rec.actual_start_date
1717: ,p_cmplt_date => p_batch_header_rec.actual_cmplt_date
1718: ,p_batch_header_rec => p_batch_header_rec
1719: ,p_validate_plan_dates_ind => 1) THEN
1720: x_return_status := fnd_api.g_ret_sts_error;
1721: RAISE error_vr_dates;
1722: END IF;
1723: -- End Bug 5336007
1724: END IF; -- IF p_batch_header_rec.recipe_validity_rule_id IS NOT NULL

Line 1731: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1727: (p_batch_header => p_batch_header_rec
1728: ,x_batch_header => x_batch_header_rec
1729: ,x_return_status => x_return_status);
1730:
1731: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1732: RAISE error_validation;
1733: END IF;
1734:
1735: check_unexploded_phantom(p_batch_id => p_batch_header_rec.batch_id

Line 1740: IF x_return_status <> fnd_api.g_ret_sts_success THEN

1736: ,p_auto_by_step => 0 -- all but auto by step ingredients
1737: ,p_batchstep_id => NULL
1738: ,x_return_status => x_return_status);
1739:
1740: IF x_return_status <> fnd_api.g_ret_sts_success THEN
1741: RAISE error_validation;
1742: END IF;
1743:
1744: IF NVL (g_debug, gme_debug.g_log_procedure + 1) <=

Line 1753: x_return_status := FND_API.G_RET_STS_ERROR;

1749: EXCEPTION
1750: WHEN error_validation THEN
1751: NULL;
1752: WHEN error_vr_dates THEN
1753: x_return_status := FND_API.G_RET_STS_ERROR;
1754: WHEN error_validity_status THEN
1755: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
1756: x_return_status := FND_API.G_RET_STS_ERROR;
1757: WHEN error_vr_not_found THEN

Line 1756: x_return_status := FND_API.G_RET_STS_ERROR;

1752: WHEN error_vr_dates THEN
1753: x_return_status := FND_API.G_RET_STS_ERROR;
1754: WHEN error_validity_status THEN
1755: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
1756: x_return_status := FND_API.G_RET_STS_ERROR;
1757: WHEN error_vr_not_found THEN
1758: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
1759: x_return_status := FND_API.G_RET_STS_ERROR;
1760: WHEN error_phantom THEN

Line 1759: x_return_status := FND_API.G_RET_STS_ERROR;

1755: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
1756: x_return_status := FND_API.G_RET_STS_ERROR;
1757: WHEN error_vr_not_found THEN
1758: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
1759: x_return_status := FND_API.G_RET_STS_ERROR;
1760: WHEN error_phantom THEN
1761: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1762: x_return_status := FND_API.G_RET_STS_ERROR;
1763: WHEN error_batch_type OR error_batch_status THEN

Line 1762: x_return_status := FND_API.G_RET_STS_ERROR;

1758: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
1759: x_return_status := FND_API.G_RET_STS_ERROR;
1760: WHEN error_phantom THEN
1761: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1762: x_return_status := FND_API.G_RET_STS_ERROR;
1763: WHEN error_batch_type OR error_batch_status THEN
1764: gme_common_pvt.log_message('GME_API_INVALID_BATCH_REL');
1765: x_return_status := fnd_api.g_ret_sts_error;
1766: WHEN error_future_date THEN

Line 1765: x_return_status := fnd_api.g_ret_sts_error;

1761: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
1762: x_return_status := FND_API.G_RET_STS_ERROR;
1763: WHEN error_batch_type OR error_batch_status THEN
1764: gme_common_pvt.log_message('GME_API_INVALID_BATCH_REL');
1765: x_return_status := fnd_api.g_ret_sts_error;
1766: WHEN error_future_date THEN
1767: fnd_message.set_name ('GMA', 'SY_NOFUTUREDATE');
1768: fnd_msg_pub.ADD;
1769: x_return_status := fnd_api.g_ret_sts_error;

Line 1769: x_return_status := fnd_api.g_ret_sts_error;

1765: x_return_status := fnd_api.g_ret_sts_error;
1766: WHEN error_future_date THEN
1767: fnd_message.set_name ('GMA', 'SY_NOFUTUREDATE');
1768: fnd_msg_pub.ADD;
1769: x_return_status := fnd_api.g_ret_sts_error;
1770: WHEN OTHERS THEN
1771: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1772:
1773: IF g_debug <= gme_debug.g_log_procedure THEN

Line 1782: x_return_status := fnd_api.g_ret_sts_unexp_error;

1778: || ': '
1779: || SQLERRM);
1780: END IF;
1781:
1782: x_return_status := fnd_api.g_ret_sts_unexp_error;
1783: END validate_batch_for_release;
1784:
1785: END gme_release_batch_pvt;