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 253: p_init_msg_list => FND_API.G_FALSE,

249: -- Bug 12909216 - Do not call GMF if we have a phantom product for zero qty.
250: IF p_phantom_product_id IS NULL OR l_matl_dtl_rec.wip_plan_qty <> 0 THEN
251: GMF_VIB.Create_Batch_Requirements
252: ( p_api_version => 1.0,
253: p_init_msg_list => FND_API.G_FALSE,
254: p_batch_id => x_batch_header_rec.batch_id,
255: x_return_status => l_return_status, --Bug#6507649
256: x_msg_count => l_message_count,
257: x_msg_data => l_message_list);

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

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

Line 273: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 278: x_return_status := FND_API.g_ret_sts_unexp_error;

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

Line 283: x_return_status := FND_API.G_RET_STS_ERROR;

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

Line 289: x_return_status := FND_API.g_ret_sts_unexp_error;

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

Line 325: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

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

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

Line 381: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

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

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

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

Line 454: x_return_status := FND_API.g_ret_sts_unexp_error;

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

Line 459: x_return_status := fnd_api.g_ret_sts_error;

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

Line 465: x_return_status := FND_API.g_ret_sts_unexp_error;

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

Line 549: x_return_status := FND_API.G_RET_STS_SUCCESS;

545: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_no='||p_material_dtl_rec.line_no);
546: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' line_type='||p_material_dtl_rec.line_type);
547: END IF;
548: /* Set the return status to success initially */
549: x_return_status := FND_API.G_RET_STS_SUCCESS;
550:
551: -- set the output actual qty to it's current value...
552: x_actual_qty := p_material_dtl_rec.actual_qty;
553:

Line 594: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

590: ,p_dispense_ind => nvl(p_material_dtl_rec.dispense_ind,'N')
591: ,x_return_status => l_return_status
592: ,x_reservations_tbl => l_reservation_tab);
593:
594: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
595: x_return_status := l_return_status;
596: RAISE error_get_reservations;
597: END IF;
598:

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

697: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
698: ,x_actual_qty => x_actual_qty
699: ,x_return_status => l_return_status);
700:
701: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
702: x_return_status := l_return_status;
703: RAISE error_build_trxn;
704: END IF;
705: END IF; -- p_material_dtl_rec.dispense_ind = 'Y'

Line 778: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

774: ,p_material_dtl_rec => p_material_dtl_rec
775: ,p_item_rec => p_item_rec
776: ,x_reservation_rec => l_reservation_rec
777: ,x_return_status => l_return_status);
778: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
779: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
780: 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');
781: END IF;
782: ELSE

Line 799: ,p_init_msg_lst => fnd_api.g_false

795: -- Bug 13949475 - Let's see if there is enough inventory.
796: gme_transactions_pvt.query_quantities
797: (
798: p_api_version_number => 1
799: ,p_init_msg_lst => fnd_api.g_false
800: ,x_return_status => l_return_status
801: ,x_msg_count => l_msg_count
802: ,x_msg_data => l_msg_data
803: ,p_organization_id => p_material_dtl_rec.organization_id

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

842: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' after query quantities loc='||l_reservation_rec.locator_id);
843: END IF;
844:
845: -- Internal note - down the road this may need to be reconstructed like 7709971 below to consider allow neg inv.
846: IF l_return_status = FND_API.G_RET_STS_SUCCESS AND l_att > 0 THEN
847: build_and_create_transaction
848: (p_rsrv_rec => l_reservation_rec
849: ,p_lot_divisible_flag => p_item_rec.lot_divisible_flag
850: ,p_mtl_dtl_rec => p_material_dtl_rec

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

858: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
859: gme_debug.put_line ('after build and create');
860: END IF;
861:
862: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
863: x_return_status := l_return_status;
864: RAISE error_build_trxn;
865: END IF;
866:

Line 871: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS AND l_att

867: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
868: gme_debug.put_line ('after build and create build is successful');
869: END IF;
870:
871: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS AND l_att
872: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS for gme_reservations_pvt.convert_partial_to_dlr
873:
874: i := i + 1; -- move on to the next partial reservation
875: END LOOP;

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

868: gme_debug.put_line ('after build and create build is successful');
869: END IF;
870:
871: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS AND l_att
872: END IF; -- IF l_return_status <> FND_API.G_RET_STS_SUCCESS for gme_reservations_pvt.convert_partial_to_dlr
873:
874: i := i + 1; -- move on to the next partial reservation
875: END LOOP;
876:

Line 948: ,p_init_msg_lst => fnd_api.g_false

944:
945: gme_transactions_pvt.query_quantities
946: (
947: p_api_version_number => 1
948: ,p_init_msg_lst => fnd_api.g_false
949: ,x_return_status => l_return_status
950: ,x_msg_count => l_msg_count
951: ,x_msg_data => l_msg_data
952: ,p_organization_id => p_material_dtl_rec.organization_id

Line 997: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN

993: END IF;
994:
995: -- Bug 7709971 - Restructure this condition to handle orgs that allow negative inventory.
996: -- g_allow_neg_inv: 2 means do not allow neg inv whereas 1 means allow it.
997: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
998: IF l_att > 0 AND gme_common_pvt.g_allow_neg_inv = 2 THEN
999: build_and_create_transaction
1000: (p_rsrv_rec => NULL
1001: ,p_subinv => l_subinv

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

1010: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
1011: ,x_actual_qty => x_actual_qty
1012: ,x_return_status => l_return_status);
1013:
1014: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
1015: x_return_status := l_return_status;
1016: RAISE error_build_trxn;
1017: END IF;
1018: ELSIF gme_common_pvt.g_allow_neg_inv = 1 THEN

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

1042: ,p_revision => l_revision
1043: ,p_secondary_uom_code => p_item_rec.secondary_uom_code
1044: ,x_actual_qty => x_actual_qty
1045: ,x_return_status => l_return_status);
1046: IF l_return_status NOT IN (gme_common_pvt.g_not_transactable, FND_API.G_RET_STS_SUCCESS) THEN
1047: x_return_status := l_return_status;
1048: RAISE error_build_trxn;
1049: END IF;
1050: -- done!

Line 1082: ,p_force_unconsumed => fnd_api.g_true

1078: ,p_pending_move_order_ind => l_pending_mo_ind
1079: ,p_pending_rsrv_ind => l_pending_rsrv_ind
1080: ,p_transacted_qty => x_actual_qty - l_start_actual_qty
1081: ,p_exception_qty => l_consume_qty - x_actual_qty
1082: ,p_force_unconsumed => fnd_api.g_true
1083: ,x_exception_material_tbl => x_exception_material_tbl
1084: ,x_return_status => x_return_status);
1085: WHEN error_bad_trans_date THEN
1086: x_return_status := FND_API.g_ret_sts_unexp_error;

Line 1086: x_return_status := FND_API.g_ret_sts_unexp_error;

1082: ,p_force_unconsumed => fnd_api.g_true
1083: ,x_exception_material_tbl => x_exception_material_tbl
1084: ,x_return_status => x_return_status);
1085: WHEN error_bad_trans_date THEN
1086: x_return_status := FND_API.g_ret_sts_unexp_error;
1087: WHEN error_unexpected THEN
1088: x_return_status := FND_API.g_ret_sts_unexp_error;
1089: WHEN OTHERS THEN
1090: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 1088: x_return_status := FND_API.g_ret_sts_unexp_error;

1084: ,x_return_status => x_return_status);
1085: WHEN error_bad_trans_date THEN
1086: x_return_status := FND_API.g_ret_sts_unexp_error;
1087: WHEN error_unexpected THEN
1088: x_return_status := FND_API.g_ret_sts_unexp_error;
1089: WHEN OTHERS THEN
1090: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1091: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
1092: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 1094: x_return_status := FND_API.g_ret_sts_unexp_error;

1090: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1091: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
1092: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1093: END IF;
1094: x_return_status := FND_API.g_ret_sts_unexp_error;
1095: END consume_material;
1096:
1097: PROCEDURE build_and_create_transaction
1098: (p_rsrv_rec IN mtl_reservations%ROWTYPE

Line 1171: x_return_status := FND_API.G_RET_STS_SUCCESS;

1167: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' x_actual_qty='||x_actual_qty);
1168: END IF;
1169:
1170: /* Set the return status to success initially */
1171: x_return_status := FND_API.G_RET_STS_SUCCESS;
1172:
1173: IF p_rsrv_rec.reservation_id IS NOT NULL THEN
1174: l_rsrv_mode := TRUE;
1175: ELSE

Line 1206: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1202: ,x_return_status => x_return_status);
1203: l_transaction_rec.revision := p_revision;
1204: END IF;
1205:
1206: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1207: RAISE error_build_mmti;
1208: END IF;
1209:
1210: IF l_rsrv_mode THEN

Line 1220: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1216: ,p_uom_code => p_mtl_dtl_rec.dtl_um
1217: ,x_qty => l_dtl_qty
1218: ,x_return_status => x_return_status);
1219:
1220: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1221: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1222: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' gme_reservations_pvt.get_reservation_dtl_qty returned error');
1223: END IF;
1224:

Line 1499: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1495: (p_mmti_rec => l_transaction_rec
1496: ,p_mmli_tbl => l_lot_rec
1497: ,x_return_status => x_return_status);
1498:
1499: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1500: IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
1501: gme_debug.put_line (g_pkg_name||'.'||l_api_name||' gme_transactions_pvt.create_transaction returned '||x_return_status);
1502: END IF;
1503: RAISE error_create_trxn;

Line 1540: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1536: (p_reservation_id => p_rsrv_rec.reservation_id
1537: ,p_prim_relieve_qty => l_prim_qty
1538: ,x_return_status => x_return_status);
1539:
1540: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1541: RAISE error_relieve_rsrv;
1542: END IF;
1543:
1544: -- Bug 4899399 - after relieving the reservation, informing the GMO about the transaction.

Line 1565: IF l_return_status <> fnd_api.g_ret_sts_success THEN

1561: p_dispense_id => p_rsrv_rec.external_source_line_id,
1562: p_status_code => 'CNSUMED',
1563: p_transaction_id => null
1564: ) ;
1565: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1566: RAISE dispense_error;
1567: END IF;
1568: END IF;
1569: END IF;

Line 1588: x_return_status := FND_API.g_ret_sts_error;

1584: fnd_message.set_token ('ITEM_NO', l_item_no);
1585: fnd_message.set_token ('FROM_UOM',l_from_um);
1586: fnd_message.set_token ('TO_UOM', l_to_um);
1587: fnd_msg_pub.ADD;
1588: x_return_status := FND_API.g_ret_sts_error;
1589: WHEN error_create_trxn OR error_build_mmti OR error_get_dtl_qty OR error_relieve_rsrv THEN
1590: NULL;
1591: WHEN dispense_error THEN
1592: x_return_status := fnd_api.g_ret_sts_error;

Line 1592: x_return_status := fnd_api.g_ret_sts_error;

1588: x_return_status := FND_API.g_ret_sts_error;
1589: WHEN error_create_trxn OR error_build_mmti OR error_get_dtl_qty OR error_relieve_rsrv THEN
1590: NULL;
1591: WHEN dispense_error THEN
1592: x_return_status := fnd_api.g_ret_sts_error;
1593: WHEN OTHERS THEN
1594: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1595: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
1596: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);

Line 1598: x_return_status := FND_API.g_ret_sts_unexp_error;

1594: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1595: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN
1596: gme_debug.put_line ('Unexpected error: '||g_pkg_name||'.'||l_api_name||': '||SQLERRM);
1597: END IF;
1598: x_return_status := FND_API.g_ret_sts_unexp_error;
1599: END build_and_create_transaction;
1600:
1601:
1602:

Line 1618: x_return_status := FND_API.g_ret_sts_success;

1614: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' reservation_id='||p_rsrv_rec.reservation_id);
1615: END IF;
1616:
1617: /* Initially let us assign the return status to success */
1618: x_return_status := FND_API.g_ret_sts_success;
1619:
1620: -- consturct mtl_transactions_interface
1621: x_mmti_rec.transaction_source_id := p_rsrv_rec.demand_source_header_id; -- batch_id
1622: x_mmti_rec.trx_source_line_id := p_rsrv_rec.demand_source_line_id; -- material_detail_id

Line 1647: WHEN FND_API.G_EXC_ERROR THEN

1643: END IF;
1644:
1645:
1646: EXCEPTION
1647: WHEN FND_API.G_EXC_ERROR THEN
1648: x_return_status := FND_API.G_RET_STS_ERROR;
1649:
1650: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1651: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1648: x_return_status := FND_API.G_RET_STS_ERROR;

1644:
1645:
1646: EXCEPTION
1647: WHEN FND_API.G_EXC_ERROR THEN
1648: x_return_status := FND_API.G_RET_STS_ERROR;
1649:
1650: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1651: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1652:

Line 1650: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1646: EXCEPTION
1647: WHEN FND_API.G_EXC_ERROR THEN
1648: x_return_status := FND_API.G_RET_STS_ERROR;
1649:
1650: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1651: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1652:
1653: WHEN OTHERS THEN
1654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1651: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1647: WHEN FND_API.G_EXC_ERROR THEN
1648: x_return_status := FND_API.G_RET_STS_ERROR;
1649:
1650: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1651: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1652:
1653: WHEN OTHERS THEN
1654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1655: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);

Line 1654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1650: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1651: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1652:
1653: WHEN OTHERS THEN
1654: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1655: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);
1656:
1657: END constr_mmti_from_reservation;
1658:

Line 1677: x_return_status := FND_API.g_ret_sts_success;

1673: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' p_locator_id='||p_locator_id);
1674: END IF;
1675:
1676: /* Initially let us assign the return status to success */
1677: x_return_status := FND_API.g_ret_sts_success;
1678:
1679: -- consturct mtl_transactions_interface
1680: x_mmti_rec.transaction_source_id := p_mtl_dtl_rec.batch_id;
1681: x_mmti_rec.trx_source_line_id := p_mtl_dtl_rec.material_detail_id;

Line 1692: WHEN FND_API.G_EXC_ERROR THEN

1688: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name);
1689: END IF;
1690:
1691: EXCEPTION
1692: WHEN FND_API.G_EXC_ERROR THEN
1693: x_return_status := FND_API.G_RET_STS_ERROR;
1694:
1695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1693: x_return_status := FND_API.G_RET_STS_ERROR;

1689: END IF;
1690:
1691: EXCEPTION
1692: WHEN FND_API.G_EXC_ERROR THEN
1693: x_return_status := FND_API.G_RET_STS_ERROR;
1694:
1695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1697:

Line 1695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1691: EXCEPTION
1692: WHEN FND_API.G_EXC_ERROR THEN
1693: x_return_status := FND_API.G_RET_STS_ERROR;
1694:
1695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1697:
1698: WHEN OTHERS THEN
1699: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 1696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1692: WHEN FND_API.G_EXC_ERROR THEN
1693: x_return_status := FND_API.G_RET_STS_ERROR;
1694:
1695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1697:
1698: WHEN OTHERS THEN
1699: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1700: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);

Line 1699: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1695: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1697:
1698: WHEN OTHERS THEN
1699: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1700: FND_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , l_api_name);
1701:
1702: END constr_mmti_from_qty_tree;
1703:

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

1706: ,p_pending_move_order_ind IN BOOLEAN := NULL
1707: ,p_pending_rsrv_ind IN BOOLEAN := NULL
1708: ,p_transacted_qty IN NUMBER := NULL
1709: ,p_exception_qty IN NUMBER := NULL
1710: ,p_force_unconsumed IN VARCHAR2 := fnd_api.g_true
1711: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
1712: ,x_return_status OUT NOCOPY VARCHAR2) IS
1713:
1714: l_api_name CONSTANT VARCHAR2 (30) := 'create_batch_exception';

Line 1765: x_return_status := FND_API.G_RET_STS_SUCCESS;

1761: END IF;
1762:
1763: END IF;
1764:
1765: x_return_status := FND_API.G_RET_STS_SUCCESS;
1766:
1767: IF p_force_unconsumed = fnd_api.g_true THEN
1768: l_display_unconsumed := fnd_api.g_true;
1769: ELSIF p_force_unconsumed = fnd_api.g_false THEN

Line 1767: IF p_force_unconsumed = fnd_api.g_true THEN

1763: END IF;
1764:
1765: x_return_status := FND_API.G_RET_STS_SUCCESS;
1766:
1767: IF p_force_unconsumed = fnd_api.g_true THEN
1768: l_display_unconsumed := fnd_api.g_true;
1769: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1770: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1771: l_display_unconsumed := fnd_api.g_true;

Line 1768: l_display_unconsumed := fnd_api.g_true;

1764:
1765: x_return_status := FND_API.G_RET_STS_SUCCESS;
1766:
1767: IF p_force_unconsumed = fnd_api.g_true THEN
1768: l_display_unconsumed := fnd_api.g_true;
1769: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1770: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1771: l_display_unconsumed := fnd_api.g_true;
1772: ELSE

Line 1769: ELSIF p_force_unconsumed = fnd_api.g_false THEN

1765: x_return_status := FND_API.G_RET_STS_SUCCESS;
1766:
1767: IF p_force_unconsumed = fnd_api.g_true THEN
1768: l_display_unconsumed := fnd_api.g_true;
1769: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1770: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1771: l_display_unconsumed := fnd_api.g_true;
1772: ELSE
1773: l_display_unconsumed := fnd_api.g_false;

Line 1771: l_display_unconsumed := fnd_api.g_true;

1767: IF p_force_unconsumed = fnd_api.g_true THEN
1768: l_display_unconsumed := fnd_api.g_true;
1769: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1770: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1771: l_display_unconsumed := fnd_api.g_true;
1772: ELSE
1773: l_display_unconsumed := fnd_api.g_false;
1774: END IF;
1775: END IF;

Line 1773: l_display_unconsumed := fnd_api.g_false;

1769: ELSIF p_force_unconsumed = fnd_api.g_false THEN
1770: IF gme_common_pvt.g_display_unconsumed_material = 1 THEN
1771: l_display_unconsumed := fnd_api.g_true;
1772: ELSE
1773: l_display_unconsumed := fnd_api.g_false;
1774: END IF;
1775: END IF;
1776:
1777: 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 1830: (l_display_unconsumed = FND_API.g_true AND l_exceptions_rec.exception_qty > 0) OR

1826: l_exceptions_rec.exception_qty := NVL(p_exception_qty, p_material_dtl_rec.plan_qty - p_material_dtl_rec.actual_qty);
1827: l_exceptions_rec.exception_qty := ROUND(l_exceptions_rec.exception_qty, gme_common_pvt.g_precision);
1828:
1829: IF l_pending_rsrv_ind OR l_pending_mo_ind OR
1830: (l_display_unconsumed = FND_API.g_true AND l_exceptions_rec.exception_qty > 0) OR
1831: -- next line is for negative IB
1832: (l_display_unconsumed = FND_API.g_true AND p_exception_qty < 0) THEN
1833: i := x_exception_material_tbl.COUNT + 1;
1834: x_exception_material_tbl(i) := l_exceptions_rec;

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

1828:
1829: IF l_pending_rsrv_ind OR l_pending_mo_ind OR
1830: (l_display_unconsumed = FND_API.g_true AND l_exceptions_rec.exception_qty > 0) OR
1831: -- next line is for negative IB
1832: (l_display_unconsumed = FND_API.g_true AND p_exception_qty < 0) THEN
1833: i := x_exception_material_tbl.COUNT + 1;
1834: x_exception_material_tbl(i) := l_exceptions_rec;
1835:
1836: IF NOT gme_common_pvt.insert_exceptions(p_exception_rec => l_exceptions_rec) THEN

Line 1852: x_return_status := FND_API.G_RET_STS_ERROR;

1848: gme_debug.put_line('Exiting api '||g_pkg_name||'.'||l_api_name||' with return status= '||x_return_status);
1849: END IF;
1850: EXCEPTION
1851: WHEN error_insert_exceptions THEN
1852: x_return_status := FND_API.G_RET_STS_ERROR;
1853: WHEN error_no_exception THEN
1854: NULL;
1855: WHEN OTHERS THEN
1856: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN

Line 1860: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1856: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN
1857: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1858: END IF;
1859: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1860: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1861: END create_batch_exception;
1862:
1863: /*************************************************************************************/
1864: /* p_auto_by_step Include auto by step */

Line 1909: x_return_status := FND_API.G_RET_STS_SUCCESS;

1905: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' batchstep_id='||p_batchstep_id);
1906: gme_debug.put_line(g_pkg_name||'.'||l_api_name||' mode='||p_auto_by_step);
1907: END IF;
1908:
1909: x_return_status := FND_API.G_RET_STS_SUCCESS;
1910:
1911: OPEN cur_get_phantom_ingred(p_batch_id);
1912: FETCH cur_get_phantom_ingred BULK COLLECT INTO l_matl_dtl_tab;
1913: CLOSE cur_get_phantom_ingred;

Line 1953: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1949: ,p_auto_by_step => 2
1950: ,p_batchstep_id => NULL
1951: ,x_return_status => x_return_status);
1952:
1953: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1954: RAISE error_unexp_downstream;
1955: END IF;
1956: END IF;
1957: END LOOP;

Line 1966: x_return_status := FND_API.G_RET_STS_ERROR;

1962:
1963: EXCEPTION
1964: WHEN error_unexp_phantom THEN
1965: gme_common_pvt.log_message ('PM_UNEXPLODED_PHANTOMS');
1966: x_return_status := FND_API.G_RET_STS_ERROR;
1967: WHEN error_unexp_downstream THEN
1968: NULL;
1969: WHEN OTHERS THEN
1970: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN

Line 1974: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

1970: IF nvl(g_debug, gme_debug.g_log_unexpected + 1) <= gme_debug.g_log_unexpected THEN
1971: gme_debug.put_line('When others exception in '||g_pkg_name||'.'||l_api_name||' Error is ' || SQLERRM);
1972: END IF;
1973: fnd_msg_pub.add_exc_msg(g_pkg_name, l_api_name);
1974: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1975: END check_unexploded_phantom;
1976:
1977: PROCEDURE validate_batch_for_release (p_batch_header_rec IN gme_batch_header%ROWTYPE
1978: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE

Line 2016: x_return_status := FND_API.g_ret_sts_success;

2012: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
2013: || l_api_name);
2014: END IF;
2015:
2016: x_return_status := FND_API.g_ret_sts_success;
2017:
2018: -- set output structure
2019: x_batch_header_rec := p_batch_header_rec;
2020:

Line 2073: x_return_status := fnd_api.g_ret_sts_error;

2069: ,p_start_date => p_batch_header_rec.actual_start_date
2070: ,p_cmplt_date => p_batch_header_rec.actual_cmplt_date
2071: ,p_batch_header_rec => p_batch_header_rec
2072: ,p_validate_plan_dates_ind => 1) THEN
2073: x_return_status := fnd_api.g_ret_sts_error;
2074: RAISE error_vr_dates;
2075: END IF;
2076: -- End Bug 5336007
2077: END IF; -- IF p_batch_header_rec.recipe_validity_rule_id IS NOT NULL

Line 2084: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2080: (p_batch_header => p_batch_header_rec
2081: ,x_batch_header => x_batch_header_rec
2082: ,x_return_status => x_return_status);
2083:
2084: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2085: RAISE error_validation;
2086: END IF;
2087:
2088: check_unexploded_phantom(p_batch_id => p_batch_header_rec.batch_id

Line 2093: IF x_return_status <> fnd_api.g_ret_sts_success THEN

2089: ,p_auto_by_step => 0 -- all but auto by step ingredients
2090: ,p_batchstep_id => NULL
2091: ,x_return_status => x_return_status);
2092:
2093: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2094: RAISE error_validation;
2095: END IF;
2096:
2097: IF NVL (g_debug, gme_debug.g_log_procedure + 1) <=

Line 2106: x_return_status := FND_API.G_RET_STS_ERROR;

2102: EXCEPTION
2103: WHEN error_validation THEN
2104: NULL;
2105: WHEN error_vr_dates THEN
2106: x_return_status := FND_API.G_RET_STS_ERROR;
2107: WHEN error_validity_status THEN
2108: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
2109: x_return_status := FND_API.G_RET_STS_ERROR;
2110: WHEN error_vr_not_found THEN

Line 2109: x_return_status := FND_API.G_RET_STS_ERROR;

2105: WHEN error_vr_dates THEN
2106: x_return_status := FND_API.G_RET_STS_ERROR;
2107: WHEN error_validity_status THEN
2108: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
2109: x_return_status := FND_API.G_RET_STS_ERROR;
2110: WHEN error_vr_not_found THEN
2111: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2112: x_return_status := FND_API.G_RET_STS_ERROR;
2113: WHEN error_phantom THEN

Line 2112: x_return_status := FND_API.G_RET_STS_ERROR;

2108: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
2109: x_return_status := FND_API.G_RET_STS_ERROR;
2110: WHEN error_vr_not_found THEN
2111: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2112: x_return_status := FND_API.G_RET_STS_ERROR;
2113: WHEN error_phantom THEN
2114: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2115: x_return_status := FND_API.G_RET_STS_ERROR;
2116: WHEN error_batch_type OR error_batch_status THEN

Line 2115: x_return_status := FND_API.G_RET_STS_ERROR;

2111: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2112: x_return_status := FND_API.G_RET_STS_ERROR;
2113: WHEN error_phantom THEN
2114: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2115: x_return_status := FND_API.G_RET_STS_ERROR;
2116: WHEN error_batch_type OR error_batch_status THEN
2117: gme_common_pvt.log_message('GME_API_INVALID_BATCH_REL');
2118: x_return_status := fnd_api.g_ret_sts_error;
2119: WHEN error_future_date THEN

Line 2118: x_return_status := fnd_api.g_ret_sts_error;

2114: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2115: x_return_status := FND_API.G_RET_STS_ERROR;
2116: WHEN error_batch_type OR error_batch_status THEN
2117: gme_common_pvt.log_message('GME_API_INVALID_BATCH_REL');
2118: x_return_status := fnd_api.g_ret_sts_error;
2119: WHEN error_future_date THEN
2120: fnd_message.set_name ('GMA', 'SY_NOFUTUREDATE');
2121: fnd_msg_pub.ADD;
2122: x_return_status := fnd_api.g_ret_sts_error;

Line 2122: x_return_status := fnd_api.g_ret_sts_error;

2118: x_return_status := fnd_api.g_ret_sts_error;
2119: WHEN error_future_date THEN
2120: fnd_message.set_name ('GMA', 'SY_NOFUTUREDATE');
2121: fnd_msg_pub.ADD;
2122: x_return_status := fnd_api.g_ret_sts_error;
2123: WHEN OTHERS THEN
2124: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2125:
2126: IF g_debug <= gme_debug.g_log_procedure THEN

Line 2135: x_return_status := fnd_api.g_ret_sts_unexp_error;

2131: || ': '
2132: || SQLERRM);
2133: END IF;
2134:
2135: x_return_status := fnd_api.g_ret_sts_unexp_error;
2136: END validate_batch_for_release;
2137:
2138: END gme_release_batch_pvt;