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 164: IF NOT gme_common_pvt.create_history

160: RAISE gmf_cost_failure;
161: END IF;
162: -- End Bug 5903208
163:
164: IF NOT gme_common_pvt.create_history
165: (p_batch_header_rec => x_batch_header_rec
166: ,p_original_status => gme_common_pvt.g_batch_wip
167: ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN
168: IF g_debug <= gme_debug.g_log_procedure THEN

Line 166: ,p_original_status => gme_common_pvt.g_batch_wip

162: -- End Bug 5903208
163:
164: IF NOT gme_common_pvt.create_history
165: (p_batch_header_rec => x_batch_header_rec
166: ,p_original_status => gme_common_pvt.g_batch_wip
167: ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN
168: IF g_debug <= gme_debug.g_log_procedure THEN
169: gme_debug.put_line ( g_pkg_name
170: || '.'

Line 167: ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN

163:
164: IF NOT gme_common_pvt.create_history
165: (p_batch_header_rec => x_batch_header_rec
166: ,p_original_status => gme_common_pvt.g_batch_wip
167: ,p_event_id => gme_common_pvt.g_transaction_header_id) THEN
168: IF g_debug <= gme_debug.g_log_procedure THEN
169: gme_debug.put_line ( g_pkg_name
170: || '.'
171: || l_api_name

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

182: -- Bug 5043868
183: x_return_status := FND_API.G_RET_STS_ERROR;
184:
185: WHEN error_mtls_locked THEN
186: gme_common_pvt.log_message ('GME_API_BATCH_LINES_LOCKED');
187: x_return_status := FND_API.G_RET_STS_ERROR;
188: WHEN error_update_row THEN
189: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
190: ,SQLERRM);

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

185: WHEN error_mtls_locked THEN
186: gme_common_pvt.log_message ('GME_API_BATCH_LINES_LOCKED');
187: x_return_status := FND_API.G_RET_STS_ERROR;
188: WHEN error_update_row THEN
189: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
190: ,SQLERRM);
191: x_return_status := fnd_api.g_ret_sts_unexp_error;
192: WHEN error_unrelease_matl OR error_unrelease_step THEN
193: NULL;

Line 222: l_exception_material_tbl gme_common_pvt.exceptions_tab;

218: l_in_phantom_batch_rec gme_batch_header%ROWTYPE;
219: l_item_rec mtl_system_items_b%ROWTYPE;
220: l_material_detail_rec gme_material_details%ROWTYPE;
221:
222: l_exception_material_tbl gme_common_pvt.exceptions_tab;
223: l_actual_qty NUMBER;
224:
225: error_unrelease_batch EXCEPTION;
226: error_fetch_batch EXCEPTION;

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

260: || ' found phantom ingredient material_detail_id='
261: || l_material_detail_rec.material_detail_id);
262: END IF;
263:
264: IF l_phantom_batch_rec.batch_status = gme_common_pvt.g_batch_wip THEN
265: l_in_phantom_batch_rec := l_phantom_batch_rec;
266: unrelease_batch
267: (p_batch_header_rec => l_in_phantom_batch_rec
268: ,p_create_resv_pend_lots => p_create_resv_pend_lots

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

272: IF x_return_status <> fnd_api.g_ret_sts_success THEN
273: RAISE error_unrelease_batch;
274: END IF;
275: END IF;
276: -- IF l_phantom_batch_rec.batch_status = gme_common_pvt.g_batch_wip THEN
277: ELSE
278: -- not a phantom ingredient;
279: -- phantom ingredient trxn will be deleted when phantom product is processed
280: gme_material_detail_pvt.get_item_rec

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

327: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
328: END IF;
329: EXCEPTION
330: WHEN error_update_row OR error_fetch_batch THEN
331: gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
332: ,SQLERRM);
333: x_return_status := fnd_api.g_ret_sts_unexp_error;
334: WHEN error_get_item OR error_unrelease_batch OR error_revert_material THEN
335: NULL;

Line 356: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab

352: p_material_detail_rec IN gme_material_details%ROWTYPE
353: ,p_create_resv_pend_lots IN NUMBER
354: ,p_ignore_transactable IN BOOLEAN DEFAULT FALSE
355: ,x_actual_qty OUT NOCOPY NUMBER
356: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
357: ,x_return_status OUT NOCOPY VARCHAR2)
358: IS
359: l_api_name CONSTANT VARCHAR2 (30) := 'revert_material_full';
360: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;

Line 360: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;

356: ,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
357: ,x_return_status OUT NOCOPY VARCHAR2)
358: IS
359: l_api_name CONSTANT VARCHAR2 (30) := 'revert_material_full';
360: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
361: l_mmt_rec mtl_material_transactions%ROWTYPE;
362: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
363: l_sequence NUMBER;
364: l_pplot_rec gme_pending_product_lots%ROWTYPE;

Line 362: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

358: IS
359: l_api_name CONSTANT VARCHAR2 (30) := 'revert_material_full';
360: l_mmt_tbl gme_common_pvt.mtl_mat_tran_tbl;
361: l_mmt_rec mtl_material_transactions%ROWTYPE;
362: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
363: l_sequence NUMBER;
364: l_pplot_rec gme_pending_product_lots%ROWTYPE;
365: l_out_pplot_rec gme_pending_product_lots%ROWTYPE;
366: l_return_status VARCHAR2(1);

Line 428: 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

424: RAISE error_get_trans;
425: END IF;
426: END IF;
427: /* Bug 5021522 Added logic to see if inventory will go negative when opposite txn is created */
428: 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
429: IF check_inv_negative(p_mmt_rec => l_mmt_rec,
430: p_mmln_tbl => l_mmln_tbl,
431: p_item_no => l_item_rec.concatenated_segments) THEN
432: RAISE fnd_api.g_exc_error;

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

442: ,p_txns_pair => NULL
443: ,x_return_status => x_return_status);
444:
445: IF x_return_status <> fnd_api.g_ret_sts_success THEN
446: IF x_return_status = gme_common_pvt.g_not_transactable AND p_ignore_transactable THEN
447: -- don't do anything... move to the next...
448: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
449: gme_debug.put_line(g_pkg_name|| '.'|| l_api_name
450: || ' gme_transactions_pvt.delete_material_txn returned '||l_return_status

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

477:
478: IF p_create_resv_pend_lots = 1 THEN
479: -- nsinghi bug#5176319. Do not already create reservation. Reservation will be created in gme_post_process after onhand is increased due to wip return.
480: /* Bug 5754914 Added reservable_type condition */
481: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
482:
483: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
484: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
485: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;

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

479: -- nsinghi bug#5176319. Do not already create reservation. Reservation will be created in gme_post_process after onhand is increased due to wip return.
480: /* Bug 5754914 Added reservable_type condition */
481: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
482:
483: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
484: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
485: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
486:
487: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;

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

480: /* Bug 5754914 Added reservable_type condition */
481: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
482:
483: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
484: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
485: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
486:
487: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;
488:

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

481: IF p_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing AND l_item_rec.reservable_type = 1 THEN
482:
483: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
484: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
485: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
486:
487: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;
488:
489: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN

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

483: l_txn_hdr_tbl_cnt := gme_common_pvt.g_mat_txn_hdr_tbl.COUNT;
484: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).txn_header_id := l_mmt_rec.transaction_id;
485: gme_common_pvt.g_mat_txn_hdr_tbl(l_txn_hdr_tbl_cnt).material_dtl_id := p_material_detail_rec.material_detail_id;
486:
487: -- gme_common_pvt.g_txn_hdr_tbl_cnt := gme_common_pvt.g_txn_hdr_tbl_cnt + 1;
488:
489: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
490: gme_debug.put_line ( g_pkg_name
491: || '.'

Line 494: ||'gme_common_pvt.g_mat_txn_hdr_tbl('

490: gme_debug.put_line ( g_pkg_name
491: || '.'
492: || l_api_name
493: || ':'
494: ||'gme_common_pvt.g_mat_txn_hdr_tbl('
495: ||l_txn_hdr_tbl_cnt||') = '
496: || l_mmt_rec.transaction_id);
497: END IF;
498: ELSE -- product or by-product

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

500: (p_material_detail_rec => p_material_detail_rec
501: ,p_mmt_rec => l_mmt_rec
502: ,p_mmln_tbl => l_mmln_tbl
503: ,x_return_status => l_return_status);
504: END IF; -- IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing
505:
506: -- don't error out if the recreate fails
507: END IF;
508: END IF;

Line 560: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;

556: IS
557: l_mat_dtl_rec gme_material_details%ROWTYPE;
558: l_mmt_rec mtl_material_transactions%ROWTYPE;
559: l_new_mmt_rec mtl_material_transactions%ROWTYPE; -- Bug 6997483
560: l_mmln_rec gme_common_pvt.mtl_trans_lots_num_tbl;
561: l_trans_hdr_id NUMBER;
562: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_MATL_RESV_PPLOT';
563:
564: -- Bug 6997483

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

577:
578: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
579: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'p_material_dtl_id = '
580: ||p_material_dtl_id);
581: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl.COUNT = '
582: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
583: END IF;
584:
585: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN

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

578: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
579: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'p_material_dtl_id = '
580: ||p_material_dtl_id);
581: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl.COUNT = '
582: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
583: END IF;
584:
585: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
586: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST

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

581: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl.COUNT = '
582: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
583: END IF;
584:
585: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
586: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST
587: LOOP
588:
589: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN

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

582: ||gme_common_pvt.g_mat_txn_hdr_tbl.COUNT);
583: END IF;
584:
585: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
586: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST
587: LOOP
588:
589: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
590:

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

585: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
586: FOR cnt IN gme_common_pvt.g_mat_txn_hdr_tbl.FIRST..gme_common_pvt.g_mat_txn_hdr_tbl.LAST
587: LOOP
588:
589: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
590:
591: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
592: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
593: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);

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

588:
589: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
590:
591: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
592: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
593: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
594: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
595: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
596: END IF;

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

589: IF gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id = p_material_dtl_id THEN
590:
591: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
592: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
593: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
594: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
595: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
596: END IF;
597:

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

590:
591: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
592: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
593: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
594: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
595: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
596: END IF;
597:
598: l_mat_dtl_rec.material_detail_id := gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id;

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

591: IF (NVL (g_debug, 0) = gme_debug.g_log_statement) THEN
592: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').txn_header_id = '
593: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id);
594: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
595: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
596: END IF;
597:
598: l_mat_dtl_rec.material_detail_id := gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id;
599:

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

594: gme_debug.put_line ( g_pkg_name|| '.'|| l_api_name|| ':'||'gme_common_pvt.g_mat_txn_hdr_tbl('||cnt||').material_dtl_id = '
595: ||gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id);
596: END IF;
597:
598: l_mat_dtl_rec.material_detail_id := gme_common_pvt.g_mat_txn_hdr_tbl(cnt).material_dtl_id;
599:
600: IF NOT gme_material_details_dbl.fetch_row
601: (p_material_detail => l_mat_dtl_rec
602: ,x_material_detail => l_mat_dtl_rec) THEN

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

604: END IF;
605:
606:
607: gme_transactions_pvt.get_mmt_transactions (
608: p_transaction_id => gme_common_pvt.g_mat_txn_hdr_tbl(cnt).txn_header_id
609: ,x_mmt_rec => l_mmt_rec
610: ,x_mmln_tbl => l_mmln_rec
611: ,x_return_status => x_return_status);
612:

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

609: ,x_mmt_rec => l_mmt_rec
610: ,x_mmln_tbl => l_mmln_rec
611: ,x_return_status => x_return_status);
612:
613: IF l_mat_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
614: -- Bug 6997483
615: -- Get the mmt details for the ing return/reversal transaction.
616: l_new_transaction_id := p_transaction_id;
617: OPEN cur_get_transaction (l_new_transaction_id);

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

634: ,p_mmt_rec => l_mmt_rec
635: ,p_mmln_tbl => l_mmln_rec
636: ,x_return_status => x_return_status);
637: END IF;
638: END IF; -- IF l_mat_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
639: END IF;
640: END LOOP;
641: END IF;
642: END create_matl_resv_pplot;

Line 647: ,p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl

643:
644: PROCEDURE create_resv_pplot (
645: p_material_detail_rec IN gme_material_details%ROWTYPE
646: ,p_mmt_rec IN mtl_material_transactions%ROWTYPE
647: ,p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl
648: ,x_return_status OUT NOCOPY VARCHAR2)
649: IS
650: l_api_name CONSTANT VARCHAR2 (30) := 'create_resv_pplot';
651:

Line 653: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

649: IS
650: l_api_name CONSTANT VARCHAR2 (30) := 'create_resv_pplot';
651:
652: l_mmt_rec mtl_material_transactions%ROWTYPE;
653: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
654: l_material_detail_rec gme_material_details%ROWTYPE;
655:
656: l_sequence NUMBER;
657: l_pplot_rec gme_pending_product_lots%ROWTYPE;

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

669: l_mmt_rec := p_mmt_rec;
670: l_mmln_tbl := p_mmln_tbl;
671: l_material_detail_rec := p_material_detail_rec;
672:
673: IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing THEN
674: l_material_detail_rec.revision := l_mmt_rec.revision;
675: -- following loop will execute if this is lot control item
676: FOR j in 1 .. l_mmln_tbl.count LOOP
677: -- put following if condition in for negative IB, could be passing 0 quantity lots;

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

741: x_return_status := l_return_status;
742: -- don't error out if the reservation was not created... just set the return status
743: END IF;
744: END LOOP;
745: END IF; -- IF l_material_detail_rec.line_type = gme_common_pvt.g_line_type_ing
746:
747: IF NVL (g_debug, gme_debug.g_log_procedure + 1) <= gme_debug.g_log_procedure THEN
748: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name|| ' with return_status='||x_return_status);
749: END IF;

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

772:
773: CURSOR cur_is_step_status_valid (v_batch_id NUMBER) IS
774: SELECT count(1)
775: FROM gme_batch_steps
776: WHERE step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_wip)
777: AND batch_id = v_batch_id;
778:
779: l_is_step_status_valid NUMBER;
780:

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

789: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
790: || l_api_name);
791: END IF;
792:
793: IF p_batch_hdr_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
794: RAISE error_batch_type;
795: END IF;
796:
797: IF p_batch_hdr_rec.parentline_id IS NOT NULL THEN

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

797: IF p_batch_hdr_rec.parentline_id IS NOT NULL THEN
798: RAISE error_phantom;
799: END IF;
800:
801: IF p_batch_hdr_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
802: RAISE error_batch_status;
803: END IF;
804:
805: OPEN cur_is_step_status_valid(p_batch_hdr_rec.batch_id);

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

815: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
816: END IF;
817: EXCEPTION
818: WHEN error_phantom THEN
819: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
820: x_return_status := FND_API.G_RET_STS_ERROR;
821: WHEN error_batch_type OR error_batch_status THEN
822: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNREL');
823: x_return_status := fnd_api.g_ret_sts_error;

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

818: WHEN error_phantom THEN
819: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
820: x_return_status := FND_API.G_RET_STS_ERROR;
821: WHEN error_batch_type OR error_batch_status THEN
822: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNREL');
823: x_return_status := fnd_api.g_ret_sts_error;
824: WHEN error_step_status THEN
825: gme_common_pvt.log_message('GME_API_INVALID_STEP_UNREL');
826: x_return_status := fnd_api.g_ret_sts_error;

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

821: WHEN error_batch_type OR error_batch_status THEN
822: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNREL');
823: x_return_status := fnd_api.g_ret_sts_error;
824: WHEN error_step_status THEN
825: gme_common_pvt.log_message('GME_API_INVALID_STEP_UNREL');
826: x_return_status := fnd_api.g_ret_sts_error;
827: WHEN OTHERS THEN
828: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
829:

Line 844: p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl,

840: END validate_batch_for_unrelease;
841:
842: /* Bug 5021522 added function RETURNS TRUE if inv will go negative and org control does not allow it */
843: FUNCTION check_inv_negative(p_mmt_rec IN mtl_material_transactions%ROWTYPE,
844: p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl,
845: p_org_neg_control IN NUMBER DEFAULT gme_common_pvt.g_allow_neg_inv,
846: p_item_no IN VARCHAR2) RETURN BOOLEAN IS
847: l_api_name CONSTANT VARCHAR2(30) := 'check_inv_negative';
848: l_return_status VARCHAR2(1);

Line 845: p_org_neg_control IN NUMBER DEFAULT gme_common_pvt.g_allow_neg_inv,

841:
842: /* Bug 5021522 added function RETURNS TRUE if inv will go negative and org control does not allow it */
843: FUNCTION check_inv_negative(p_mmt_rec IN mtl_material_transactions%ROWTYPE,
844: p_mmln_tbl IN gme_common_pvt.mtl_trans_lots_num_tbl,
845: p_org_neg_control IN NUMBER DEFAULT gme_common_pvt.g_allow_neg_inv,
846: p_item_no IN VARCHAR2) RETURN BOOLEAN IS
847: l_api_name CONSTANT VARCHAR2(30) := 'check_inv_negative';
848: l_return_status VARCHAR2(1);
849: l_msg_data VARCHAR2(2000);

Line 874: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,

870: x_msg_count => l_msg_cnt,
871: x_msg_data => l_msg_data,
872: p_organization_id => p_mmt_rec.organization_id,
873: p_inventory_item_id => p_mmt_rec.inventory_item_id,
874: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,
875: p_grade_code => NULL,
876: p_revision => p_mmt_rec.revision,
877: p_lot_number => p_mmln_tbl(i).lot_number,
878: p_subinventory_code => p_mmt_rec.subinventory_code,

Line 898: gme_common_pvt.log_message

894: gme_debug.put_line('NVL(ABS(p_mmln_tbl(i).primary_quantity),0) = '||NVL(ABS(p_mmln_tbl(i).primary_quantity),0));
895: END IF;
896: IF (NVL(l_att,0) < NVL(ABS(p_mmln_tbl(i).primary_quantity),0)) THEN
897: IF (p_org_neg_control = 2) THEN --org does not allow negative inventory
898: gme_common_pvt.log_message
899: ( p_message_code => 'GME_ITEM_NEG_INVENTORY'
900: ,p_product_code => 'GME'
901: ,p_token1_name => 'ITEM_NO'
902: ,p_token1_value => p_item_no

Line 910: gme_common_pvt.log_message

906: END IF;
907: RETURN TRUE;
908: ELSIF (p_org_neg_control = 1) --org allows negative inventory
909: AND (l_qr > 0) THEN
910: gme_common_pvt.log_message
911: ( p_message_code => 'GME_NEG_INV_WHEN_RSRVTNS_EXIST'
912: ,p_product_code => 'GME'
913: ,p_token1_name => 'ITEM_NO'
914: ,p_token1_value => p_item_no

Line 929: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,

925: x_msg_count => l_msg_cnt,
926: x_msg_data => l_msg_data,
927: p_organization_id => p_mmt_rec.organization_id,
928: p_inventory_item_id => p_mmt_rec.inventory_item_id,
929: p_tree_mode => gme_common_pvt.g_tree_transaction_mode,
930: p_grade_code => NULL,
931: p_revision => p_mmt_rec.revision,
932: p_lot_number => NULL,
933: p_subinventory_code => p_mmt_rec.subinventory_code,

Line 953: gme_common_pvt.log_message

949: gme_debug.put_line('NVL(ABS(p_mmt_rec.primary_quantity),0) = '||NVL(ABS(p_mmt_rec.primary_quantity),0));
950: END IF;
951: IF (NVL(l_att,0) < NVL(ABS(p_mmt_rec.primary_quantity),0)) THEN
952: IF (p_org_neg_control = 2) THEN --org does not allow negative inventory
953: gme_common_pvt.log_message
954: ( p_message_code => 'GME_ITEM_NEG_INVENTORY'
955: ,p_product_code => 'GME'
956: ,p_token1_name => 'ITEM_NO'
957: ,p_token1_value => p_item_no

Line 965: gme_common_pvt.log_message

961: END IF;
962: RETURN TRUE;
963: ELSIF (p_org_neg_control = 1) --org allows negative inventory
964: AND (l_qr > 0) THEN
965: gme_common_pvt.log_message
966: ( p_message_code => 'GME_NEG_INV_WHEN_RSRVTNS_EXIST'
967: ,p_product_code => 'GME'
968: ,p_token1_name => 'ITEM_NO'
969: ,p_token1_value => p_item_no