DBA Data[Home] [Help]

APPS.GME_UNRELEASE_BATCH_PVT dependencies on GME_COMMON_PVT

Line 44: l_material_detail_tbl gme_common_pvt.material_details_tab;

40: FROM gme_material_details
41: WHERE batch_id = v_batch_id
42: FOR UPDATE OF actual_qty NOWAIT;
43:
44: l_material_detail_tbl gme_common_pvt.material_details_tab;
45: l_material_detail_rec gme_material_details%ROWTYPE;
46: l_batch_step_tbl gme_common_pvt.steps_tab;
47: l_batch_step_rec gme_batch_steps%ROWTYPE;
48: l_in_batch_step_rec gme_batch_steps%ROWTYPE;

Line 46: l_batch_step_tbl gme_common_pvt.steps_tab;

42: FOR UPDATE OF actual_qty NOWAIT;
43:
44: l_material_detail_tbl gme_common_pvt.material_details_tab;
45: l_material_detail_rec gme_material_details%ROWTYPE;
46: l_batch_step_tbl gme_common_pvt.steps_tab;
47: l_batch_step_rec gme_batch_steps%ROWTYPE;
48: l_in_batch_step_rec gme_batch_steps%ROWTYPE;
49:
50: error_update_row EXCEPTION;

Line 91: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_pending;

87: END IF;
88: CLOSE cur_get_and_lock_mtls;
89:
90: -- set batch status
91: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_pending;
92: gme_common_pvt.g_batch_status_check := fnd_api.g_false;
93: -- set actual start date to NULL...
94: x_batch_header_rec.actual_start_date := NULL;
95:

Line 92: gme_common_pvt.g_batch_status_check := fnd_api.g_false;

88: CLOSE cur_get_and_lock_mtls;
89:
90: -- set batch status
91: x_batch_header_rec.batch_status := gme_common_pvt.g_batch_pending;
92: gme_common_pvt.g_batch_status_check := fnd_api.g_false;
93: -- set actual start date to NULL...
94: x_batch_header_rec.actual_start_date := NULL;
95:
96: -- Update the batch header

Line 103: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;

99: RAISE error_update_row;
100: END IF;
101:
102: -- Update WHO columns for output structure
103: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
104: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
105: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
106:
107: FOR i IN 1 .. l_material_detail_tbl.COUNT LOOP

Line 104: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;

100: END IF;
101:
102: -- Update WHO columns for output structure
103: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
104: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
105: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
106:
107: FOR i IN 1 .. l_material_detail_tbl.COUNT LOOP
108: l_material_detail_rec := l_material_detail_tbl (i);

Line 105: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;

101:
102: -- Update WHO columns for output structure
103: x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
104: x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
105: x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
106:
107: FOR i IN 1 .. l_material_detail_tbl.COUNT LOOP
108: l_material_detail_rec := l_material_detail_tbl (i);
109: unrelease_material

Line 179: IF NOT gme_common_pvt.create_history

175: END IF;
176: -- End Bug 5903208
177:
178: -- Bug 11846735 - Do not pass in a value for event_id.
179: IF NOT gme_common_pvt.create_history
180: (p_batch_header_rec => x_batch_header_rec
181: ,p_original_status => gme_common_pvt.g_batch_wip) THEN
182: -- ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN
183: IF g_debug <= gme_debug.g_log_procedure THEN

Line 181: ,p_original_status => gme_common_pvt.g_batch_wip) THEN

177:
178: -- Bug 11846735 - Do not pass in a value for event_id.
179: IF NOT gme_common_pvt.create_history
180: (p_batch_header_rec => x_batch_header_rec
181: ,p_original_status => gme_common_pvt.g_batch_wip) THEN
182: -- ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN
183: IF g_debug <= gme_debug.g_log_procedure THEN
184: gme_debug.put_line ( g_pkg_name
185: || '.'

Line 182: -- ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN

178: -- Bug 11846735 - Do not pass in a value for event_id.
179: IF NOT gme_common_pvt.create_history
180: (p_batch_header_rec => x_batch_header_rec
181: ,p_original_status => gme_common_pvt.g_batch_wip) THEN
182: -- ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN
183: IF g_debug <= gme_debug.g_log_procedure THEN
184: gme_debug.put_line ( g_pkg_name
185: || '.'
186: || l_api_name

Line 201: gme_common_pvt.log_message ('GME_API_BATCH_LINES_LOCKED');

197: -- Bug 5043868
198: x_return_status := FND_API.G_RET_STS_ERROR;
199:
200: WHEN error_mtls_locked THEN
201: gme_common_pvt.log_message ('GME_API_BATCH_LINES_LOCKED');
202: x_return_status := FND_API.G_RET_STS_ERROR;
203: WHEN error_update_row THEN
204: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
205: ,SQLERRM);

Line 204: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'

200: WHEN error_mtls_locked THEN
201: gme_common_pvt.log_message ('GME_API_BATCH_LINES_LOCKED');
202: x_return_status := FND_API.G_RET_STS_ERROR;
203: WHEN error_update_row THEN
204: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
205: ,SQLERRM);
206: x_return_status := fnd_api.g_ret_sts_unexp_error;
207: WHEN error_unrelease_matl OR error_unrelease_step THEN
208: NULL;

Line 237: l_exception_material_tbl gme_common_pvt.exceptions_tab;

233: l_in_phantom_batch_rec gme_batch_header%ROWTYPE;
234: l_item_rec mtl_system_items_b%ROWTYPE;
235: l_material_detail_rec gme_material_details%ROWTYPE;
236:
237: l_exception_material_tbl gme_common_pvt.exceptions_tab;
238: l_actual_qty NUMBER;
239:
240: error_unrelease_batch EXCEPTION;
241: error_fetch_batch EXCEPTION;

Line 279: IF l_phantom_batch_rec.batch_status = gme_common_pvt.g_batch_wip THEN

275: || ' found phantom ingredient material_detail_id='
276: || l_material_detail_rec.material_detail_id);
277: END IF;
278:
279: IF l_phantom_batch_rec.batch_status = gme_common_pvt.g_batch_wip THEN
280: l_in_phantom_batch_rec := l_phantom_batch_rec;
281: unrelease_batch
282: (p_batch_header_rec => l_in_phantom_batch_rec
283: ,p_create_resv_pend_lots => p_create_resv_pend_lots

Line 291: -- IF l_phantom_batch_rec.batch_status = gme_common_pvt.g_batch_wip THEN

287: IF x_return_status <> fnd_api.g_ret_sts_success THEN
288: RAISE error_unrelease_batch;
289: END IF;
290: END IF;
291: -- IF l_phantom_batch_rec.batch_status = gme_common_pvt.g_batch_wip THEN
292: ELSE
293: -- not a phantom ingredient;
294: -- phantom ingredient trxn will be deleted when phantom product is processed
295: gme_material_detail_pvt.get_item_rec

Line 346: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'

342: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
343: END IF;
344: EXCEPTION
345: WHEN error_update_row OR error_fetch_batch THEN
346: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
347: ,SQLERRM);
348: x_return_status := fnd_api.g_ret_sts_unexp_error;
349: WHEN error_get_item OR error_unrelease_batch OR error_revert_material THEN
350: NULL;

Line 371: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

367: p_material_detail_rec IN gme_material_details%ROWTYPE
368: ,p_create_resv_pend_lots IN NUMBER
369: ,p_ignore_transactable IN BOOLEAN DEFAULT FALSE
370: ,x_actual_qty OUT NOCOPY NUMBER
371: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
372: ,x_return_status OUT NOCOPY VARCHAR2)
373: IS
374: l_api_name CONSTANT VARCHAR2 (30) := 'revert_material_full';
375: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;

Line 375: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;

371: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
372: ,x_return_status OUT NOCOPY VARCHAR2)
373: IS
374: l_api_name CONSTANT VARCHAR2 (30) := 'revert_material_full';
375: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
376: l_mmt_rec mtl_material_transactions%ROWTYPE;
377: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
378: l_sequence NUMBER;
379: l_pplot_rec gme_pending_product_lots%ROWTYPE;

Line 377: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

373: IS
374: l_api_name CONSTANT VARCHAR2 (30) := 'revert_material_full';
375: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
376: l_mmt_rec mtl_material_transactions%ROWTYPE;
377: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
378: l_sequence NUMBER;
379: l_pplot_rec gme_pending_product_lots%ROWTYPE;
380: l_out_pplot_rec gme_pending_product_lots%ROWTYPE;
381: l_return_status VARCHAR2(1);

Line 431: IF gme_common_pvt.g_ib_timestamp_set > 0 THEN

427: END IF;
428:
429: -- Bug 13017256 - Let's initialize the variable with the user entered date.
430: l_trans_date := NULL;
431: IF gme_common_pvt.g_ib_timestamp_set > 0 THEN
432: l_trans_date := NVL(gme_common_pvt.g_ib_timestamp_date, gme_common_pvt.g_timestamp);
433: END IF;
434:
435: x_actual_qty := p_material_detail_rec.actual_qty;

Line 432: l_trans_date := NVL(gme_common_pvt.g_ib_timestamp_date, gme_common_pvt.g_timestamp);

428:
429: -- Bug 13017256 - Let's initialize the variable with the user entered date.
430: l_trans_date := NULL;
431: IF gme_common_pvt.g_ib_timestamp_set > 0 THEN
432: l_trans_date := NVL(gme_common_pvt.g_ib_timestamp_date, gme_common_pvt.g_timestamp);
433: END IF;
434:
435: x_actual_qty := p_material_detail_rec.actual_qty;
436: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

Line 460: IF (l_mmt_rec.transaction_type_id IN (gme_common_pvt.g_ing_return, gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN

456: END IF;
457: END IF;
458:
459: /* Bug 5021522 Added logic to see if inventory will go negative when opposite txn is created */
460: IF (l_mmt_rec.transaction_type_id IN (gme_common_pvt.g_ing_return, gme_common_pvt.g_prod_completion, gme_common_pvt.g_byprod_completion)) THEN
461: -- Bug 8607365 - No need to do negative inventory checking for phantom prods or ingredients.
462: IF (NVL(p_material_detail_rec.phantom_line_id, 0) = 0) THEN
463: IF check_inv_negative(p_mmt_rec => l_mmt_rec,
464: p_mmln_tbl => l_mmln_tbl,

Line 528: gme_common_pvt.log_message

524: || 'Current LPN locator id '
525: || l_lpn_loc);
526: END IF;
527:
528: gme_common_pvt.log_message
529: ( p_message_code => 'GME_LPN_LOC_MISMATCH'
530: ,p_product_code => 'GME'
531: ,p_token1_name => 'ITEM_NO'
532: ,p_token1_value => l_item_rec.concatenated_segments

Line 555: IF x_return_status = gme_common_pvt.g_not_transactable AND p_ignore_transactable THEN

551: ,p_txns_pair => NULL
552: ,x_return_status => x_return_status);
553:
554: IF x_return_status <> fnd_api.g_ret_sts_success THEN
555: IF x_return_status = gme_common_pvt.g_not_transactable AND p_ignore_transactable THEN
556: -- don't do anything... move to the next...
557: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
558: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name
559: || ' gme_transactions_pvt.delete_material_txn returned '||l_return_status

Line 590: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN

586:
587: IF p_create_resv_pend_lots = 1 THEN
588: -- nsinghi bug#5176319. Do not already create reservation. Reservation will be created in gme_post_process after onhand is increased due to wip return.
589: /* Bug 5754914 Added reservable_type condition */
590: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
591:
592: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
593: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
594: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;

Line 592: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;

588: -- nsinghi bug#5176319. Do not already create reservation. Reservation will be created in gme_post_process after onhand is increased due to wip return.
589: /* Bug 5754914 Added reservable_type condition */
590: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
591:
592: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
593: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
594: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
595:
596: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;

Line 593: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;

589: /* Bug 5754914 Added reservable_type condition */
590: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
591:
592: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
593: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
594: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
595:
596: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;
597:

Line 594: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;

590: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
591:
592: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
593: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
594: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
595:
596: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;
597:
598: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN

Line 596: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;

592: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
593: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
594: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
595:
596: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;
597:
598: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
599: gme_debug.put_line ( g_pkg_name
600: || '.'

Line 603: ||'gme_common_pvt.g_mat_txn_hdr_tbl('

599: gme_debug.put_line ( g_pkg_name
600: || '.'
601: || l_api_name
602: || ':'
603: ||'gme_common_pvt.g_mat_txn_hdr_tbl('
604: ||l_txn_hdr_tbl_cnt||') = '
605: || l_mmt_rec.transaction_id);
606: END IF;
607: ELSE -- product or by-product

Line 613: END IF; -- IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing

609: (p_material_detail_rec => p_material_detail_rec
610: ,p_mmt_rec => l_mmt_rec
611: ,p_mmln_tbl => l_mmln_tbl
612: ,x_return_status => l_return_status);
613: END IF; -- IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing
614:
615: -- don't error out if the recreate fails
616: END IF;
617: END IF;

Line 669: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;

665: IS
666: l_mat_dtl_rec gme_material_details%ROWTYPE;
667: l_mmt_rec mtl_material_transactions%ROWTYPE;
668: l_new_mmt_rec mtl_material_transactions%ROWTYPE; -- Bug 6997483
669: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;
670: l_trans_hdr_id NUMBER;
671: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_MATL_RESV_PPLOT';
672: -- Bug 6997483
673: l_new_transaction_id NUMBER;

Line 689: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl.COUNT = '

685:
686: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
687: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'p_material_dtl_id = '
688: ||p_material_dtl_id);
689: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl.COUNT = '
690: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
691: END IF;
692:
693: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN

Line 690: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);

686: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
687: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'p_material_dtl_id = '
688: ||p_material_dtl_id);
689: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl.COUNT = '
690: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
691: END IF;
692:
693: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
694: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST

Line 693: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN

689: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl.COUNT = '
690: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
691: END IF;
692:
693: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
694: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST
695: LOOP
696:
697: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN

Line 694: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST

690: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
691: END IF;
692:
693: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
694: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST
695: LOOP
696:
697: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
698:

Line 697: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN

693: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
694: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST
695: LOOP
696:
697: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
698:
699: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
700: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
701: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);

Line 700: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '

696:
697: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
698:
699: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
700: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
701: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
702: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
703: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
704: END IF;

Line 701: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);

697: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
698:
699: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
700: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
701: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
702: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
703: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
704: END IF;
705:

Line 702: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '

698:
699: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
700: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
701: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
702: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
703: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
704: END IF;
705:
706: l_mat_dtl_rec.material_detail_id := gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id;

Line 703: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);

699: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
700: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
701: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
702: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
703: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
704: END IF;
705:
706: l_mat_dtl_rec.material_detail_id := gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id;
707:

Line 706: l_mat_dtl_rec.material_detail_id := gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id;

702: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
703: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
704: END IF;
705:
706: l_mat_dtl_rec.material_detail_id := gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id;
707:
708: IF NOT gme_material_details_dbl.fetch_row
709: (p_material_detail => l_mat_dtl_rec
710: ,x_material_detail => l_mat_dtl_rec) THEN

Line 715: p_transaction_id => gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id

711: RAISE fnd_api.g_exc_error;
712: END IF;
713:
714: gme_transactions_pvt.get_mmt_transactions (
715: p_transaction_id => gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id
716: ,x_mmt_rec => l_mmt_rec
717: ,x_mmln_tbl => l_mmln_rec
718: ,x_return_status => x_return_status);
719:

Line 720: IF l_mat_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN

716: ,x_mmt_rec => l_mmt_rec
717: ,x_mmln_tbl => l_mmln_rec
718: ,x_return_status => x_return_status);
719:
720: IF l_mat_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
721: -- Bug 6997483
722: -- Get the mmt details for the ing return/reversal transaction.
723: l_new_transaction_id := p_transaction_id;
724: OPEN cur_get_transaction (l_new_transaction_id);

Line 746: END IF; -- IF l_mat_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN

742: ,p_mmt_rec => l_mmt_rec
743: ,p_mmln_tbl => l_mmln_rec
744: ,x_return_status => x_return_status);
745: END IF;
746: END IF; -- IF l_mat_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
747: END IF;
748: END LOOP;
749: END IF;
750: END create_matl_resv_pplot;

Line 755: ,p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl

751:
752: PROCEDURE create_resv_pplot (
753: p_material_detail_rec IN gme_material_details%ROWTYPE
754: ,p_mmt_rec IN mtl_material_transactions%ROWTYPE
755: ,p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl
756: ,x_return_status OUT NOCOPY VARCHAR2)
757: IS
758: l_api_name CONSTANT VARCHAR2 (30) := 'create_resv_pplot';
759:

Line 761: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

757: IS
758: l_api_name CONSTANT VARCHAR2 (30) := 'create_resv_pplot';
759:
760: l_mmt_rec mtl_material_transactions%ROWTYPE;
761: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
762: l_material_detail_rec gme_material_details%ROWTYPE;
763:
764: l_sequence NUMBER;
765: l_pplot_rec gme_pending_product_lots%ROWTYPE;

Line 781: IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN

777: l_mmt_rec := p_mmt_rec;
778: l_mmln_tbl := p_mmln_tbl;
779: l_material_detail_rec := p_material_detail_rec;
780:
781: IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
782: l_material_detail_rec.revision := l_mmt_rec.revision;
783: -- following loop will execute if this is lot control item
784: FOR j in 1 .. l_mmln_tbl.count LOOP
785: -- put following if condition in for negative IB, could be passing 0 quantity lots;

Line 854: END IF; -- IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing

850: x_return_status := l_return_status;
851: -- don't error out if the reservation was not created... just set the return status
852: END IF;
853: END LOOP;
854: END IF; -- IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing
855:
856: IF NVL (g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
857: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name|| ' with return_status='||x_return_status);
858: END IF;

Line 885: WHERE step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_wip)

881:
882: CURSOR cur_is_step_status_valid (v_batch_id NUMBER) IS
883: SELECT count(1)
884: FROM gme_batch_steps
885: WHERE step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_wip)
886: AND batch_id = v_batch_id;
887:
888: l_is_step_status_valid NUMBER;
889:

Line 902: IF p_batch_hdr_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

898: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
899: || l_api_name);
900: END IF;
901:
902: IF p_batch_hdr_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
903: RAISE error_batch_type;
904: END IF;
905:
906: IF p_batch_hdr_rec.parentline_id IS NOT NULL THEN

Line 910: IF p_batch_hdr_rec.batch_status <> gme_common_pvt.g_batch_wip THEN

906: IF p_batch_hdr_rec.parentline_id IS NOT NULL THEN
907: RAISE error_phantom;
908: END IF;
909:
910: IF p_batch_hdr_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
911: RAISE error_batch_status;
912: END IF;
913:
914: OPEN cur_is_step_status_valid(p_batch_hdr_rec.batch_id);

Line 928: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');

924: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
925: END IF;
926: EXCEPTION
927: WHEN error_phantom THEN
928: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
929: x_return_status := FND_API.G_RET_STS_ERROR;
930: WHEN error_batch_type OR error_batch_status THEN
931: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNREL');
932: x_return_status := fnd_api.g_ret_sts_error;

Line 931: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNREL');

927: WHEN error_phantom THEN
928: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
929: x_return_status := FND_API.G_RET_STS_ERROR;
930: WHEN error_batch_type OR error_batch_status THEN
931: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNREL');
932: x_return_status := fnd_api.g_ret_sts_error;
933: WHEN error_step_status THEN
934: gme_common_pvt.log_message('GME_API_INVALID_STEP_UNREL');
935: x_return_status := fnd_api.g_ret_sts_error;

Line 934: gme_common_pvt.log_message('GME_API_INVALID_STEP_UNREL');

930: WHEN error_batch_type OR error_batch_status THEN
931: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNREL');
932: x_return_status := fnd_api.g_ret_sts_error;
933: WHEN error_step_status THEN
934: gme_common_pvt.log_message('GME_API_INVALID_STEP_UNREL');
935: x_return_status := fnd_api.g_ret_sts_error;
936: WHEN OTHERS THEN
937: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
938:

Line 953: p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl,

949: END validate_batch_for_unrelease;
950:
951: /* Bug 5021522 added function RETURNS TRUE if inv will go negative and org control does not allow it */
952: FUNCTION check_inv_negative(p_mmt_rec IN mtl_material_transactions%ROWTYPE,
953: p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl,
954: p_org_neg_control IN NUMBER DEFAULT gme_common_pvt.g_allow_neg_inv,
955: p_item_no IN VARCHAR2) RETURN BOOLEAN IS
956: l_api_name CONSTANT VARCHAR2(30) := 'check_inv_negative';
957: l_return_status VARCHAR2(1);

Line 954: p_org_neg_control IN NUMBER DEFAULT gme_common_pvt.g_allow_neg_inv,

950:
951: /* Bug 5021522 added function RETURNS TRUE if inv will go negative and org control does not allow it */
952: FUNCTION check_inv_negative(p_mmt_rec IN mtl_material_transactions%ROWTYPE,
953: p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl,
954: p_org_neg_control IN NUMBER DEFAULT gme_common_pvt.g_allow_neg_inv,
955: p_item_no IN VARCHAR2) RETURN BOOLEAN IS
956: l_api_name CONSTANT VARCHAR2(30) := 'check_inv_negative';
957: l_return_status VARCHAR2(1);
958: l_msg_data VARCHAR2(2000);

Line 983: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,

979: x_msg_count => l_msg_cnt,
980: x_msg_data => l_msg_data,
981: p_organization_id => p_mmt_rec.organization_id,
982: p_inventory_item_id => p_mmt_rec.inventory_item_id,
983: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,
984: p_grade_code => NULL,
985: p_revision => p_mmt_rec.revision,
986: p_lot_number => p_mmln_tbl(i).lot_number,
987: p_subinventory_code => p_mmt_rec.subinventory_code,

Line 1007: gme_common_pvt.log_message

1003: gme_debug.put_line('NVL(ABS(p_mmln_tbl(i).primary_quantity),0) = '||NVL(ABS(p_mmln_tbl(i).primary_quantity),0));
1004: END IF;
1005: IF (NVL(l_att,0) < NVL(ABS(p_mmln_tbl(i).primary_quantity),0)) THEN
1006: IF (p_org_neg_control = 2) THEN --org does not allow negative inventory
1007: gme_common_pvt.log_message
1008: ( p_message_code => 'GME_ITEM_NEG_INVENTORY'
1009: ,p_product_code => 'GME'
1010: ,p_token1_name => 'ITEM_NO'
1011: ,p_token1_value => p_item_no

Line 1019: gme_common_pvt.log_message

1015: END IF;
1016: RETURN TRUE;
1017: ELSIF (p_org_neg_control = 1) --org allows negative inventory
1018: AND (l_qr > 0) THEN
1019: gme_common_pvt.log_message
1020: ( p_message_code => 'GME_NEG_INV_WHEN_RSRVTNS_EXIST'
1021: ,p_product_code => 'GME'
1022: ,p_token1_name => 'ITEM_NO'
1023: ,p_token1_value => p_item_no

Line 1038: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,

1034: x_msg_count => l_msg_cnt,
1035: x_msg_data => l_msg_data,
1036: p_organization_id => p_mmt_rec.organization_id,
1037: p_inventory_item_id => p_mmt_rec.inventory_item_id,
1038: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,
1039: p_grade_code => NULL,
1040: p_revision => p_mmt_rec.revision,
1041: p_lot_number => NULL,
1042: p_subinventory_code => p_mmt_rec.subinventory_code,

Line 1062: gme_common_pvt.log_message

1058: gme_debug.put_line('NVL(ABS(p_mmt_rec.primary_quantity),0) = '||NVL(ABS(p_mmt_rec.primary_quantity),0));
1059: END IF;
1060: IF (NVL(l_att,0) < NVL(ABS(p_mmt_rec.primary_quantity),0)) THEN
1061: IF (p_org_neg_control = 2) THEN --org does not allow negative inventory
1062: gme_common_pvt.log_message
1063: ( p_message_code => 'GME_ITEM_NEG_INVENTORY'
1064: ,p_product_code => 'GME'
1065: ,p_token1_name => 'ITEM_NO'
1066: ,p_token1_value => p_item_no

Line 1074: gme_common_pvt.log_message

1070: END IF;
1071: RETURN TRUE;
1072: ELSIF (p_org_neg_control = 1) --org allows negative inventory
1073: AND (l_qr > 0) THEN
1074: gme_common_pvt.log_message
1075: ( p_message_code => 'GME_NEG_INV_WHEN_RSRVTNS_EXIST'
1076: ,p_product_code => 'GME'
1077: ,p_token1_name => 'ITEM_NO'
1078: ,p_token1_value => p_item_no