DBA Data[Home] [Help]

APPS.GME_PHANTOM_PVT dependencies on GME_COMMON_PVT

Line 67: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab

63: ,p_validity_rule_id IN NUMBER
64: ,p_use_workday_cal IN VARCHAR2
65: ,p_contiguity_override IN VARCHAR2
66: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
67: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
68: ,x_return_status OUT NOCOPY VARCHAR2)
69: IS
70: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_PHANTOM';
71: /* Exception definitions */

Line 114: AND line_type = gme_common_pvt.g_line_type_prod

110: SELECT material_detail_id
111: FROM gme_material_details
112: WHERE batch_id = v_batch_id
113: AND inventory_item_id = v_inventory_item_id
114: AND line_type = gme_common_pvt.g_line_type_prod
115: ORDER BY line_no;
116: BEGIN
117: IF g_debug <= gme_debug.g_log_procedure THEN
118: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

Line 141: gme_common_pvt.log_message ('PM_NOTAPHANTOM');

137: l_phant_batch := p_batch_header_rec;
138:
139: /* Check for phantom specific validations */
140: IF x_material_detail_rec.phantom_type = 0 THEN
141: gme_common_pvt.log_message ('PM_NOTAPHANTOM');
142: RAISE not_a_phantom;
143: ELSIF NVL (x_material_detail_rec.phantom_id, 0) > 0 THEN
144: gme_common_pvt.log_message ('PM_PHANTOM_EXISTS');
145: RAISE phantom_exists;

Line 144: gme_common_pvt.log_message ('PM_PHANTOM_EXISTS');

140: IF x_material_detail_rec.phantom_type = 0 THEN
141: gme_common_pvt.log_message ('PM_NOTAPHANTOM');
142: RAISE not_a_phantom;
143: ELSIF NVL (x_material_detail_rec.phantom_id, 0) > 0 THEN
144: gme_common_pvt.log_message ('PM_PHANTOM_EXISTS');
145: RAISE phantom_exists;
146: END IF;
147:
148: /* No need for scrap factor since plan_qty now includes scrap factor */

Line 155: ELSIF l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo THEN

151: /* Check for the validity rule passed in */
152: IF p_validity_rule_id IS NULL THEN
153: IF l_batch_header.laboratory_ind = 1 THEN
154: l_object_type := 'L';
155: ELSIF l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo THEN
156: l_object_type := 'F';
157: ELSE
158: l_object_type := 'P';
159: END IF;

Line 214: (gme_common_pvt.g_mtl_autobystep_release

210: l_phant_batch.batch_no := p_batch_no;
211: l_phant_batch.recipe_validity_rule_id := l_validity_rule_id;
212:
213: IF x_material_detail_rec.release_type IN
214: (gme_common_pvt.g_mtl_autobystep_release
215: ,gme_common_pvt.g_mtl_incremental_release
216: ,gme_common_pvt.g_mtl_manual_release) THEN
217: OPEN cur_step_matl_detail (x_material_detail_rec.material_detail_id);
218:

Line 215: ,gme_common_pvt.g_mtl_incremental_release

211: l_phant_batch.recipe_validity_rule_id := l_validity_rule_id;
212:
213: IF x_material_detail_rec.release_type IN
214: (gme_common_pvt.g_mtl_autobystep_release
215: ,gme_common_pvt.g_mtl_incremental_release
216: ,gme_common_pvt.g_mtl_manual_release) THEN
217: OPEN cur_step_matl_detail (x_material_detail_rec.material_detail_id);
218:
219: FETCH cur_step_matl_detail

Line 216: ,gme_common_pvt.g_mtl_manual_release) THEN

212:
213: IF x_material_detail_rec.release_type IN
214: (gme_common_pvt.g_mtl_autobystep_release
215: ,gme_common_pvt.g_mtl_incremental_release
216: ,gme_common_pvt.g_mtl_manual_release) THEN
217: OPEN cur_step_matl_detail (x_material_detail_rec.material_detail_id);
218:
219: FETCH cur_step_matl_detail
220: INTO l_step_rec;

Line 262: AND x_return_status <> gme_common_pvt.g_inv_short_err THEN

258: || x_return_status);
259: END IF;
260:
261: IF x_return_status <> fnd_api.g_ret_sts_success
262: AND x_return_status <> gme_common_pvt.g_inv_short_err THEN
263: ROLLBACK TO SAVEPOINT create_auto_phantom;
264: RAISE batch_creation_failed;
265: END IF;
266:

Line 281: -- l_phant_batch.last_update_date := gme_common_pvt.g_timestamp;

277:
278: -- Bug 8490219 - No need to timestamp this record as it was just created.
279: -- This leads to problems if a customized call is made in the interim and timestamp is
280: -- changed. Also, the update_row function stamps it properly so this is redundant.
281: -- l_phant_batch.last_update_date := gme_common_pvt.g_timestamp;
282:
283: IF NOT gme_batch_header_dbl.update_row (p_batch_header => l_phant_batch) THEN
284: RAISE batch_upd_error;
285: END IF;

Line 305: ,last_update_date = gme_common_pvt.g_timestamp

301: SET phantom_line_id = p_material_detail_rec.material_detail_id
302: ,release_type = x_material_detail_rec.release_type
303: ,subinventory = x_material_detail_rec.subinventory
304: ,locator_id = x_material_detail_rec.locator_id
305: ,last_update_date = gme_common_pvt.g_timestamp
306: ,last_updated_by = gme_common_pvt.g_user_ident
307: ,last_update_login = gme_common_pvt.g_login_id
308: WHERE material_detail_id = l_prod_mtl_dtl_id;
309:

Line 306: ,last_updated_by = gme_common_pvt.g_user_ident

302: ,release_type = x_material_detail_rec.release_type
303: ,subinventory = x_material_detail_rec.subinventory
304: ,locator_id = x_material_detail_rec.locator_id
305: ,last_update_date = gme_common_pvt.g_timestamp
306: ,last_updated_by = gme_common_pvt.g_user_ident
307: ,last_update_login = gme_common_pvt.g_login_id
308: WHERE material_detail_id = l_prod_mtl_dtl_id;
309:
310: x_material_detail_rec.phantom_id := l_phant_batch.batch_id;

Line 307: ,last_update_login = gme_common_pvt.g_login_id

303: ,subinventory = x_material_detail_rec.subinventory
304: ,locator_id = x_material_detail_rec.locator_id
305: ,last_update_date = gme_common_pvt.g_timestamp
306: ,last_updated_by = gme_common_pvt.g_user_ident
307: ,last_update_login = gme_common_pvt.g_login_id
308: WHERE material_detail_id = l_prod_mtl_dtl_id;
309:
310: x_material_detail_rec.phantom_id := l_phant_batch.batch_id;
311: x_material_detail_rec.phantom_line_id := l_prod_mtl_dtl_id;

Line 321: ,last_update_date = gme_common_pvt.g_timestamp

317:
318: UPDATE gme_material_details
319: SET phantom_line_id = l_prod_mtl_dtl_id
320: ,phantom_id = l_phant_batch.batch_id
321: ,last_update_date = gme_common_pvt.g_timestamp
322: ,last_updated_by = gme_common_pvt.g_user_ident
323: ,last_update_login = gme_common_pvt.g_login_id
324: WHERE material_detail_id = p_material_detail_rec.material_detail_id;
325:

Line 322: ,last_updated_by = gme_common_pvt.g_user_ident

318: UPDATE gme_material_details
319: SET phantom_line_id = l_prod_mtl_dtl_id
320: ,phantom_id = l_phant_batch.batch_id
321: ,last_update_date = gme_common_pvt.g_timestamp
322: ,last_updated_by = gme_common_pvt.g_user_ident
323: ,last_update_login = gme_common_pvt.g_login_id
324: WHERE material_detail_id = p_material_detail_rec.material_detail_id;
325:
326: x_return_status := fnd_api.g_ret_sts_success;

Line 323: ,last_update_login = gme_common_pvt.g_login_id

319: SET phantom_line_id = l_prod_mtl_dtl_id
320: ,phantom_id = l_phant_batch.batch_id
321: ,last_update_date = gme_common_pvt.g_timestamp
322: ,last_updated_by = gme_common_pvt.g_user_ident
323: ,last_update_login = gme_common_pvt.g_login_id
324: WHERE material_detail_id = p_material_detail_rec.material_detail_id;
325:
326: x_return_status := fnd_api.g_ret_sts_success;
327:

Line 428: ,x_phantom_ids OUT NOCOPY gme_common_pvt.number_tab

424: PROCEDURE fetch_step_phantoms (
425: p_batch_id IN NUMBER
426: ,p_batchstep_id IN NUMBER
427: ,p_all_release_type_assoc IN NUMBER DEFAULT 0
428: ,x_phantom_ids OUT NOCOPY gme_common_pvt.number_tab
429: ,x_return_status OUT NOCOPY VARCHAR2)
430: IS
431: l_api_name CONSTANT VARCHAR2 (30) := 'FETCH_STEP_PHANTOMS';
432:

Line 442: AND ( d.release_type = gme_common_pvt.g_mtl_autobystep_release

438: FROM gme_batch_step_items i, gme_material_details d
439: WHERE d.batch_id = v_batch_id
440: AND i.material_detail_id = d.material_detail_id
441: AND batchstep_id = v_batchstep_id
442: AND ( d.release_type = gme_common_pvt.g_mtl_autobystep_release
443: OR ( d.release_type IN
444: (gme_common_pvt.g_mtl_manual_release
445: ,gme_common_pvt.g_mtl_incremental_release)
446: AND p_all_release_type_assoc = 1) )

Line 444: (gme_common_pvt.g_mtl_manual_release

440: AND i.material_detail_id = d.material_detail_id
441: AND batchstep_id = v_batchstep_id
442: AND ( d.release_type = gme_common_pvt.g_mtl_autobystep_release
443: OR ( d.release_type IN
444: (gme_common_pvt.g_mtl_manual_release
445: ,gme_common_pvt.g_mtl_incremental_release)
446: AND p_all_release_type_assoc = 1) )
447: AND NVL (d.phantom_id, 0) > 0;
448:

Line 445: ,gme_common_pvt.g_mtl_incremental_release)

441: AND batchstep_id = v_batchstep_id
442: AND ( d.release_type = gme_common_pvt.g_mtl_autobystep_release
443: OR ( d.release_type IN
444: (gme_common_pvt.g_mtl_manual_release
445: ,gme_common_pvt.g_mtl_incremental_release)
446: AND p_all_release_type_assoc = 1) )
447: AND NVL (d.phantom_id, 0) > 0;
448:
449: no_keys EXCEPTION;

Line 475: gme_common_pvt.log_message ('GME_NO_KEYS'

471: END IF;
472: EXCEPTION
473: WHEN no_keys THEN
474: x_return_status := fnd_api.g_ret_sts_error;
475: gme_common_pvt.log_message ('GME_NO_KEYS'
476: ,'TABLE_NAME'
477: ,'FETCH_STEP_PHANTOMS');
478: WHEN OTHERS THEN
479: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 510: ,x_phantom_ids OUT NOCOPY gme_common_pvt.number_tab

506: =============================================================================================*/
507: PROCEDURE fetch_line_phantoms (
508: p_batch_id IN NUMBER
509: ,p_include_step IN BOOLEAN DEFAULT TRUE
510: ,x_phantom_ids OUT NOCOPY gme_common_pvt.number_tab
511: ,x_return_status OUT NOCOPY VARCHAR2)
512: IS
513: l_api_name CONSTANT VARCHAR2 (30) := 'FETCH_LINE_PHANTOMS';
514:

Line 538: ,gme_common_pvt.g_mtl_autobystep_release);

534: END IF;
535:
536: IF p_include_step THEN
537: OPEN cur_matl_phant_ids (p_batch_id
538: ,gme_common_pvt.g_mtl_autobystep_release);
539: ELSE
540: OPEN cur_matl_phant_ids (p_batch_id
541: ,gme_common_pvt.g_mtl_incremental_release);
542: END IF;

Line 541: ,gme_common_pvt.g_mtl_incremental_release);

537: OPEN cur_matl_phant_ids (p_batch_id
538: ,gme_common_pvt.g_mtl_autobystep_release);
539: ELSE
540: OPEN cur_matl_phant_ids (p_batch_id
541: ,gme_common_pvt.g_mtl_incremental_release);
542: END IF;
543:
544: FETCH cur_matl_phant_ids
545: BULK COLLECT INTO x_phantom_ids;

Line 555: gme_common_pvt.log_message ('GME_NO_KEYS'

551: END IF;
552: EXCEPTION
553: WHEN no_keys THEN
554: x_return_status := fnd_api.g_ret_sts_error;
555: gme_common_pvt.log_message ('GME_NO_KEYS'
556: ,'TABLE_NAME'
557: ,'FETCH_LINE_PHANTOMS');
558: WHEN OTHERS THEN
559: IF g_debug <= gme_debug.g_log_unexpected THEN