DBA Data[Home] [Help]

APPS.GME_COMMON_PVT dependencies on GME_COMMON_PVT

Line 1: PACKAGE BODY gme_common_pvt AS

1: PACKAGE BODY gme_common_pvt AS
2: /* $Header: GMEVCMNB.pls 120.36.12010000.2 2008/11/06 03:10:18 srpuri ship $ */
3: g_debug VARCHAR2 (5) := fnd_profile.VALUE ('AFLOG_LEVEL');
4: g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_COMMON_PVT';
5:

Line 4: g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_COMMON_PVT';

1: PACKAGE BODY gme_common_pvt AS
2: /* $Header: GMEVCMNB.pls 120.36.12010000.2 2008/11/06 03:10:18 srpuri ship $ */
3: g_debug VARCHAR2 (5) := fnd_profile.VALUE ('AFLOG_LEVEL');
4: g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_COMMON_PVT';
5:
6: /*************************************************************************************************/
7: /* Oracle Process Manufacturing Process Execution APIs */
8: /* */

Line 44: RETURN gme_common_pvt.g_transaction_header_id;

40: FUNCTION get_txn_header_id
41: RETURN NUMBER
42: IS
43: BEGIN
44: RETURN gme_common_pvt.g_transaction_header_id;
45: END get_txn_header_id;
46:
47: PROCEDURE set_txn_header_id(p_txn_header_id NUMBER) IS
48: BEGIN

Line 49: gme_common_pvt.g_transaction_header_id := p_txn_header_id;

45: END get_txn_header_id;
46:
47: PROCEDURE set_txn_header_id(p_txn_header_id NUMBER) IS
48: BEGIN
49: gme_common_pvt.g_transaction_header_id := p_txn_header_id;
50: END set_txn_header_id;
51:
52: PROCEDURE reset_txn_header_id IS
53: BEGIN

Line 54: gme_common_pvt.g_transaction_header_id := NULL;

50: END set_txn_header_id;
51:
52: PROCEDURE reset_txn_header_id IS
53: BEGIN
54: gme_common_pvt.g_transaction_header_id := NULL;
55: END reset_txn_header_id;
56:
57: FUNCTION get_timestamp
58: RETURN DATE

Line 61: RETURN gme_common_pvt.g_timestamp;

57: FUNCTION get_timestamp
58: RETURN DATE
59: IS
60: BEGIN
61: RETURN gme_common_pvt.g_timestamp;
62: END get_timestamp;
63:
64: PROCEDURE set_move_to_temp_off
65: IS

Line 67: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

63:
64: PROCEDURE set_move_to_temp_off
65: IS
66: BEGIN
67: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
68: END set_move_to_temp_off;
69:
70: -- nsinghi bug#5176319. Added this proc.
71: /* This procedure will take care of deleting the table g_mat_txn_hdr_tbl. This table should be

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

73: gme_transactions_pvt.
74: */
75: PROCEDURE reset_txn_hdr_tbl IS
76: BEGIN
77: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
78: gme_common_pvt.g_mat_txn_hdr_tbl.DELETE;
79: END IF;
80: END reset_txn_hdr_tbl;
81:

Line 78: gme_common_pvt.g_mat_txn_hdr_tbl.DELETE;

74: */
75: PROCEDURE reset_txn_hdr_tbl IS
76: BEGIN
77: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
78: gme_common_pvt.g_mat_txn_hdr_tbl.DELETE;
79: END IF;
80: END reset_txn_hdr_tbl;
81:
82: PROCEDURE log_message (

Line 164: gme_common_pvt.g_error_count := gme_common_pvt.g_error_count + 1;

160: || '/'
161: || p_token6_value);
162: END IF;
163:
164: gme_common_pvt.g_error_count := gme_common_pvt.g_error_count + 1;
165:
166: IF g_debug <= gme_debug.g_log_procedure THEN
167: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
168: END IF;

Line 224: IF (gme_common_pvt.g_setup_done) THEN

220: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
221: || l_api_name);
222: END IF;
223:
224: IF (gme_common_pvt.g_setup_done) THEN
225: RETURN TRUE;
226: END IF;
227:
228: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );

Line 228: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );

224: IF (gme_common_pvt.g_setup_done) THEN
225: RETURN TRUE;
226: END IF;
227:
228: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );
229: gme_common_pvt.g_user_ident :=
230: TO_NUMBER (fnd_profile.VALUE ('USER_ID') );
231:
232: OPEN cur_get_user (gme_common_pvt.g_user_ident);

Line 229: gme_common_pvt.g_user_ident :=

225: RETURN TRUE;
226: END IF;
227:
228: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );
229: gme_common_pvt.g_user_ident :=
230: TO_NUMBER (fnd_profile.VALUE ('USER_ID') );
231:
232: OPEN cur_get_user (gme_common_pvt.g_user_ident);
233:

Line 232: OPEN cur_get_user (gme_common_pvt.g_user_ident);

228: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );
229: gme_common_pvt.g_user_ident :=
230: TO_NUMBER (fnd_profile.VALUE ('USER_ID') );
231:
232: OPEN cur_get_user (gme_common_pvt.g_user_ident);
233:
234: FETCH cur_get_user
235: INTO l_dummy;
236:

Line 244: IF NVL (gme_common_pvt.g_user_ident, -1) = -1 THEN

240: END IF;
241:
242: CLOSE cur_get_user;
243:
244: IF NVL (gme_common_pvt.g_user_ident, -1) = -1 THEN
245: log_message ('GME_API_INVALID_USER_NAME'
246: ,'USER_NAME'
247: ,gme_common_pvt.g_user_name);
248: RAISE missing_profile_option;

Line 247: ,gme_common_pvt.g_user_name);

243:
244: IF NVL (gme_common_pvt.g_user_ident, -1) = -1 THEN
245: log_message ('GME_API_INVALID_USER_NAME'
246: ,'USER_NAME'
247: ,gme_common_pvt.g_user_name);
248: RAISE missing_profile_option;
249: END IF;
250:
251: OPEN cur_get_inv_params (p_org_id, p_org_code);

Line 254: INTO gme_common_pvt.g_organization_code

250:
251: OPEN cur_get_inv_params (p_org_id, p_org_code);
252:
253: FETCH cur_get_inv_params
254: INTO gme_common_pvt.g_organization_code
255: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
256: ,gme_common_pvt.g_org_locator_control
257: ,gme_common_pvt.g_organization_id;
258:

Line 255: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv

251: OPEN cur_get_inv_params (p_org_id, p_org_code);
252:
253: FETCH cur_get_inv_params
254: INTO gme_common_pvt.g_organization_code
255: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
256: ,gme_common_pvt.g_org_locator_control
257: ,gme_common_pvt.g_organization_id;
258:
259: IF (cur_get_inv_params%NOTFOUND) THEN

Line 256: ,gme_common_pvt.g_org_locator_control

252:
253: FETCH cur_get_inv_params
254: INTO gme_common_pvt.g_organization_code
255: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
256: ,gme_common_pvt.g_org_locator_control
257: ,gme_common_pvt.g_organization_id;
258:
259: IF (cur_get_inv_params%NOTFOUND) THEN
260: CLOSE cur_get_inv_params;

Line 257: ,gme_common_pvt.g_organization_id;

253: FETCH cur_get_inv_params
254: INTO gme_common_pvt.g_organization_code
255: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
256: ,gme_common_pvt.g_org_locator_control
257: ,gme_common_pvt.g_organization_id;
258:
259: IF (cur_get_inv_params%NOTFOUND) THEN
260: CLOSE cur_get_inv_params;
261:

Line 268: (p_orgn_id => gme_common_pvt.g_organization_id

264:
265: CLOSE cur_get_inv_params;
266:
267: gmd_api_grp.fetch_parm_values
268: (p_orgn_id => gme_common_pvt.g_organization_id
269: ,x_out_rec => l_gmd_params_rec
270: ,x_return_status => l_return_status);
271:
272: /*Assign the gmd params values to package variables */

Line 274: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;

270: ,x_return_status => l_return_status);
271:
272: /*Assign the gmd params values to package variables */
273: IF l_return_status = fnd_api.g_ret_sts_success THEN
274: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
275: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
276: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
278: gme_common_pvt.g_byprod_active :=

Line 275: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;

271:
272: /*Assign the gmd params values to package variables */
273: IF l_return_status = fnd_api.g_ret_sts_success THEN
274: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
275: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
276: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
278: gme_common_pvt.g_byprod_active :=
279: l_gmd_params_rec.gmd_byproduct_active;

Line 276: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;

272: /*Assign the gmd params values to package variables */
273: IF l_return_status = fnd_api.g_ret_sts_success THEN
274: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
275: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
276: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
278: gme_common_pvt.g_byprod_active :=
279: l_gmd_params_rec.gmd_byproduct_active;
280: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;

Line 277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;

273: IF l_return_status = fnd_api.g_ret_sts_success THEN
274: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
275: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
276: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
278: gme_common_pvt.g_byprod_active :=
279: l_gmd_params_rec.gmd_byproduct_active;
280: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
281: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;

Line 278: gme_common_pvt.g_byprod_active :=

274: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
275: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
276: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
278: gme_common_pvt.g_byprod_active :=
279: l_gmd_params_rec.gmd_byproduct_active;
280: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
281: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;
282: ELSE

Line 280: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;

276: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
278: gme_common_pvt.g_byprod_active :=
279: l_gmd_params_rec.gmd_byproduct_active;
280: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
281: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;
282: ELSE
283: RAISE gmd_params_not_defined;
284: END IF;

Line 281: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;

277: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
278: gme_common_pvt.g_byprod_active :=
279: l_gmd_params_rec.gmd_byproduct_active;
280: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
281: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;
282: ELSE
283: RAISE gmd_params_not_defined;
284: END IF;
285:

Line 286: OPEN cur_get_gme_params (gme_common_pvt.g_organization_id);

282: ELSE
283: RAISE gmd_params_not_defined;
284: END IF;
285:
286: OPEN cur_get_gme_params (gme_common_pvt.g_organization_id);
287:
288: FETCH cur_get_gme_params
289: INTO l_cur_get_org_params;
290:

Line 299: gme_common_pvt.g_auto_consume_supply_sub_only :=

295: END IF;
296:
297: CLOSE cur_get_gme_params;
298:
299: gme_common_pvt.g_auto_consume_supply_sub_only :=
300: l_cur_get_org_params.auto_consume_supply_sub_only;
301: gme_common_pvt.g_subinv_loc_ind :=
302: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
303: gme_common_pvt.g_supply_subinventory :=

Line 301: gme_common_pvt.g_subinv_loc_ind :=

297: CLOSE cur_get_gme_params;
298:
299: gme_common_pvt.g_auto_consume_supply_sub_only :=
300: l_cur_get_org_params.auto_consume_supply_sub_only;
301: gme_common_pvt.g_subinv_loc_ind :=
302: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
303: gme_common_pvt.g_supply_subinventory :=
304: l_cur_get_org_params.supply_subinventory;
305: gme_common_pvt.g_supply_locator_id :=

Line 303: gme_common_pvt.g_supply_subinventory :=

299: gme_common_pvt.g_auto_consume_supply_sub_only :=
300: l_cur_get_org_params.auto_consume_supply_sub_only;
301: gme_common_pvt.g_subinv_loc_ind :=
302: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
303: gme_common_pvt.g_supply_subinventory :=
304: l_cur_get_org_params.supply_subinventory;
305: gme_common_pvt.g_supply_locator_id :=
306: l_cur_get_org_params.supply_locator_id;
307: gme_common_pvt.g_yield_subinventory :=

Line 305: gme_common_pvt.g_supply_locator_id :=

301: gme_common_pvt.g_subinv_loc_ind :=
302: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
303: gme_common_pvt.g_supply_subinventory :=
304: l_cur_get_org_params.supply_subinventory;
305: gme_common_pvt.g_supply_locator_id :=
306: l_cur_get_org_params.supply_locator_id;
307: gme_common_pvt.g_yield_subinventory :=
308: l_cur_get_org_params.yield_subinventory;
309: gme_common_pvt.g_yield_locator_id :=

Line 307: gme_common_pvt.g_yield_subinventory :=

303: gme_common_pvt.g_supply_subinventory :=
304: l_cur_get_org_params.supply_subinventory;
305: gme_common_pvt.g_supply_locator_id :=
306: l_cur_get_org_params.supply_locator_id;
307: gme_common_pvt.g_yield_subinventory :=
308: l_cur_get_org_params.yield_subinventory;
309: gme_common_pvt.g_yield_locator_id :=
310: l_cur_get_org_params.yield_locator_id;
311: gme_common_pvt.g_delete_material_ind :=

Line 309: gme_common_pvt.g_yield_locator_id :=

305: gme_common_pvt.g_supply_locator_id :=
306: l_cur_get_org_params.supply_locator_id;
307: gme_common_pvt.g_yield_subinventory :=
308: l_cur_get_org_params.yield_subinventory;
309: gme_common_pvt.g_yield_locator_id :=
310: l_cur_get_org_params.yield_locator_id;
311: gme_common_pvt.g_delete_material_ind :=
312: l_cur_get_org_params.delete_material_ind;
313: gme_common_pvt.g_validate_plan_dates_ind :=

Line 311: gme_common_pvt.g_delete_material_ind :=

307: gme_common_pvt.g_yield_subinventory :=
308: l_cur_get_org_params.yield_subinventory;
309: gme_common_pvt.g_yield_locator_id :=
310: l_cur_get_org_params.yield_locator_id;
311: gme_common_pvt.g_delete_material_ind :=
312: l_cur_get_org_params.delete_material_ind;
313: gme_common_pvt.g_validate_plan_dates_ind :=
314: l_cur_get_org_params.validate_plan_dates_ind;
315: --Bug#5111078

Line 313: gme_common_pvt.g_validate_plan_dates_ind :=

309: gme_common_pvt.g_yield_locator_id :=
310: l_cur_get_org_params.yield_locator_id;
311: gme_common_pvt.g_delete_material_ind :=
312: l_cur_get_org_params.delete_material_ind;
313: gme_common_pvt.g_validate_plan_dates_ind :=
314: l_cur_get_org_params.validate_plan_dates_ind;
315: --Bug#5111078
316: gme_common_pvt.g_ib_factor_ind :=
317: l_cur_get_org_params.ib_factor_ind;

Line 316: gme_common_pvt.g_ib_factor_ind :=

312: l_cur_get_org_params.delete_material_ind;
313: gme_common_pvt.g_validate_plan_dates_ind :=
314: l_cur_get_org_params.validate_plan_dates_ind;
315: --Bug#5111078
316: gme_common_pvt.g_ib_factor_ind :=
317: l_cur_get_org_params.ib_factor_ind;
318: --nsinghi bug#5674398 Added the global variable for ingr subs date type
319: -- Default it to Material Requirement Date as in R12, default ingr sub happens using mat req date.
320: gme_common_pvt.g_ingr_sub_date :=

Line 320: gme_common_pvt.g_ingr_sub_date :=

316: gme_common_pvt.g_ib_factor_ind :=
317: l_cur_get_org_params.ib_factor_ind;
318: --nsinghi bug#5674398 Added the global variable for ingr subs date type
319: -- Default it to Material Requirement Date as in R12, default ingr sub happens using mat req date.
320: gme_common_pvt.g_ingr_sub_date :=
321: NVL(l_cur_get_org_params.ingr_sub_date, 2);
322:
323: gme_common_pvt.g_display_unconsumed_material :=
324: l_cur_get_org_params.display_unconsumed_material;

Line 323: gme_common_pvt.g_display_unconsumed_material :=

319: -- Default it to Material Requirement Date as in R12, default ingr sub happens using mat req date.
320: gme_common_pvt.g_ingr_sub_date :=
321: NVL(l_cur_get_org_params.ingr_sub_date, 2);
322:
323: gme_common_pvt.g_display_unconsumed_material :=
324: l_cur_get_org_params.display_unconsumed_material;
325: gme_common_pvt.g_step_controls_batch_sts_ind :=
326: l_cur_get_org_params.step_controls_batch_sts_ind;
327: gme_common_pvt.g_backflush_rsrc_usg_ind :=

Line 325: gme_common_pvt.g_step_controls_batch_sts_ind :=

321: NVL(l_cur_get_org_params.ingr_sub_date, 2);
322:
323: gme_common_pvt.g_display_unconsumed_material :=
324: l_cur_get_org_params.display_unconsumed_material;
325: gme_common_pvt.g_step_controls_batch_sts_ind :=
326: l_cur_get_org_params.step_controls_batch_sts_ind;
327: gme_common_pvt.g_backflush_rsrc_usg_ind :=
328: l_cur_get_org_params.backflush_rsrc_usg_ind;
329: gme_common_pvt.g_def_actual_rsrc_usg_ind :=

Line 327: gme_common_pvt.g_backflush_rsrc_usg_ind :=

323: gme_common_pvt.g_display_unconsumed_material :=
324: l_cur_get_org_params.display_unconsumed_material;
325: gme_common_pvt.g_step_controls_batch_sts_ind :=
326: l_cur_get_org_params.step_controls_batch_sts_ind;
327: gme_common_pvt.g_backflush_rsrc_usg_ind :=
328: l_cur_get_org_params.backflush_rsrc_usg_ind;
329: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
330: l_cur_get_org_params.def_actual_rsrc_usg_ind;
331: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=

Line 329: gme_common_pvt.g_def_actual_rsrc_usg_ind :=

325: gme_common_pvt.g_step_controls_batch_sts_ind :=
326: l_cur_get_org_params.step_controls_batch_sts_ind;
327: gme_common_pvt.g_backflush_rsrc_usg_ind :=
328: l_cur_get_org_params.backflush_rsrc_usg_ind;
329: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
330: l_cur_get_org_params.def_actual_rsrc_usg_ind;
331: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
332: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
333: gme_common_pvt.g_allow_qty_below_min_ind :=

Line 331: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=

327: gme_common_pvt.g_backflush_rsrc_usg_ind :=
328: l_cur_get_org_params.backflush_rsrc_usg_ind;
329: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
330: l_cur_get_org_params.def_actual_rsrc_usg_ind;
331: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
332: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
333: gme_common_pvt.g_allow_qty_below_min_ind :=
334: l_cur_get_org_params.allow_qty_below_min_ind;
335: gme_common_pvt.g_display_non_work_days_ind :=

Line 333: gme_common_pvt.g_allow_qty_below_min_ind :=

329: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
330: l_cur_get_org_params.def_actual_rsrc_usg_ind;
331: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
332: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
333: gme_common_pvt.g_allow_qty_below_min_ind :=
334: l_cur_get_org_params.allow_qty_below_min_ind;
335: gme_common_pvt.g_display_non_work_days_ind :=
336: l_cur_get_org_params.display_non_work_days_ind;
337: gme_common_pvt.g_check_shortages_ind :=

Line 335: gme_common_pvt.g_display_non_work_days_ind :=

331: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
332: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
333: gme_common_pvt.g_allow_qty_below_min_ind :=
334: l_cur_get_org_params.allow_qty_below_min_ind;
335: gme_common_pvt.g_display_non_work_days_ind :=
336: l_cur_get_org_params.display_non_work_days_ind;
337: gme_common_pvt.g_check_shortages_ind :=
338: l_cur_get_org_params.check_shortages_ind;
339: gme_common_pvt.g_copy_formula_text_ind :=

Line 337: gme_common_pvt.g_check_shortages_ind :=

333: gme_common_pvt.g_allow_qty_below_min_ind :=
334: l_cur_get_org_params.allow_qty_below_min_ind;
335: gme_common_pvt.g_display_non_work_days_ind :=
336: l_cur_get_org_params.display_non_work_days_ind;
337: gme_common_pvt.g_check_shortages_ind :=
338: l_cur_get_org_params.check_shortages_ind;
339: gme_common_pvt.g_copy_formula_text_ind :=
340: l_cur_get_org_params.copy_formula_text_ind;
341: gme_common_pvt.g_copy_routing_text_ind :=

Line 339: gme_common_pvt.g_copy_formula_text_ind :=

335: gme_common_pvt.g_display_non_work_days_ind :=
336: l_cur_get_org_params.display_non_work_days_ind;
337: gme_common_pvt.g_check_shortages_ind :=
338: l_cur_get_org_params.check_shortages_ind;
339: gme_common_pvt.g_copy_formula_text_ind :=
340: l_cur_get_org_params.copy_formula_text_ind;
341: gme_common_pvt.g_copy_routing_text_ind :=
342: l_cur_get_org_params.copy_routing_text_ind;
343: gme_common_pvt.g_create_high_level_resv_ind :=

Line 341: gme_common_pvt.g_copy_routing_text_ind :=

337: gme_common_pvt.g_check_shortages_ind :=
338: l_cur_get_org_params.check_shortages_ind;
339: gme_common_pvt.g_copy_formula_text_ind :=
340: l_cur_get_org_params.copy_formula_text_ind;
341: gme_common_pvt.g_copy_routing_text_ind :=
342: l_cur_get_org_params.copy_routing_text_ind;
343: gme_common_pvt.g_create_high_level_resv_ind :=
344: l_cur_get_org_params.create_high_level_resv_ind;
345: gme_common_pvt.g_create_move_orders_ind :=

Line 343: gme_common_pvt.g_create_high_level_resv_ind :=

339: gme_common_pvt.g_copy_formula_text_ind :=
340: l_cur_get_org_params.copy_formula_text_ind;
341: gme_common_pvt.g_copy_routing_text_ind :=
342: l_cur_get_org_params.copy_routing_text_ind;
343: gme_common_pvt.g_create_high_level_resv_ind :=
344: l_cur_get_org_params.create_high_level_resv_ind;
345: gme_common_pvt.g_create_move_orders_ind :=
346: l_cur_get_org_params.create_move_orders_ind;
347: gme_common_pvt.g_reservation_timefence :=

Line 345: gme_common_pvt.g_create_move_orders_ind :=

341: gme_common_pvt.g_copy_routing_text_ind :=
342: l_cur_get_org_params.copy_routing_text_ind;
343: gme_common_pvt.g_create_high_level_resv_ind :=
344: l_cur_get_org_params.create_high_level_resv_ind;
345: gme_common_pvt.g_create_move_orders_ind :=
346: l_cur_get_org_params.create_move_orders_ind;
347: gme_common_pvt.g_reservation_timefence :=
348: l_cur_get_org_params.reservation_timefence;
349: gme_common_pvt.g_move_order_timefence :=

Line 347: gme_common_pvt.g_reservation_timefence :=

343: gme_common_pvt.g_create_high_level_resv_ind :=
344: l_cur_get_org_params.create_high_level_resv_ind;
345: gme_common_pvt.g_create_move_orders_ind :=
346: l_cur_get_org_params.create_move_orders_ind;
347: gme_common_pvt.g_reservation_timefence :=
348: l_cur_get_org_params.reservation_timefence;
349: gme_common_pvt.g_move_order_timefence :=
350: l_cur_get_org_params.move_order_timefence;
351: gme_common_pvt.g_batch_doc_numbering :=

Line 349: gme_common_pvt.g_move_order_timefence :=

345: gme_common_pvt.g_create_move_orders_ind :=
346: l_cur_get_org_params.create_move_orders_ind;
347: gme_common_pvt.g_reservation_timefence :=
348: l_cur_get_org_params.reservation_timefence;
349: gme_common_pvt.g_move_order_timefence :=
350: l_cur_get_org_params.move_order_timefence;
351: gme_common_pvt.g_batch_doc_numbering :=
352: l_cur_get_org_params.batch_doc_numbering;
353: gme_common_pvt.g_batch_no_last_assigned :=

Line 351: gme_common_pvt.g_batch_doc_numbering :=

347: gme_common_pvt.g_reservation_timefence :=
348: l_cur_get_org_params.reservation_timefence;
349: gme_common_pvt.g_move_order_timefence :=
350: l_cur_get_org_params.move_order_timefence;
351: gme_common_pvt.g_batch_doc_numbering :=
352: l_cur_get_org_params.batch_doc_numbering;
353: gme_common_pvt.g_batch_no_last_assigned :=
354: l_cur_get_org_params.batch_no_last_assigned;
355: gme_common_pvt.g_fpo_doc_numbering :=

Line 353: gme_common_pvt.g_batch_no_last_assigned :=

349: gme_common_pvt.g_move_order_timefence :=
350: l_cur_get_org_params.move_order_timefence;
351: gme_common_pvt.g_batch_doc_numbering :=
352: l_cur_get_org_params.batch_doc_numbering;
353: gme_common_pvt.g_batch_no_last_assigned :=
354: l_cur_get_org_params.batch_no_last_assigned;
355: gme_common_pvt.g_fpo_doc_numbering :=
356: l_cur_get_org_params.fpo_doc_numbering;
357: gme_common_pvt.g_fpo_no_last_assigned :=

Line 355: gme_common_pvt.g_fpo_doc_numbering :=

351: gme_common_pvt.g_batch_doc_numbering :=
352: l_cur_get_org_params.batch_doc_numbering;
353: gme_common_pvt.g_batch_no_last_assigned :=
354: l_cur_get_org_params.batch_no_last_assigned;
355: gme_common_pvt.g_fpo_doc_numbering :=
356: l_cur_get_org_params.fpo_doc_numbering;
357: gme_common_pvt.g_fpo_no_last_assigned :=
358: l_cur_get_org_params.fpo_no_last_assigned;
359: gme_common_pvt.g_rule_based_resv_horizon :=

Line 357: gme_common_pvt.g_fpo_no_last_assigned :=

353: gme_common_pvt.g_batch_no_last_assigned :=
354: l_cur_get_org_params.batch_no_last_assigned;
355: gme_common_pvt.g_fpo_doc_numbering :=
356: l_cur_get_org_params.fpo_doc_numbering;
357: gme_common_pvt.g_fpo_no_last_assigned :=
358: l_cur_get_org_params.fpo_no_last_assigned;
359: gme_common_pvt.g_rule_based_resv_horizon :=
360: l_cur_get_org_params.rule_based_resv_horizon;
361: gme_common_pvt.g_hour_uom_code :=

Line 359: gme_common_pvt.g_rule_based_resv_horizon :=

355: gme_common_pvt.g_fpo_doc_numbering :=
356: l_cur_get_org_params.fpo_doc_numbering;
357: gme_common_pvt.g_fpo_no_last_assigned :=
358: l_cur_get_org_params.fpo_no_last_assigned;
359: gme_common_pvt.g_rule_based_resv_horizon :=
360: l_cur_get_org_params.rule_based_resv_horizon;
361: gme_common_pvt.g_hour_uom_code :=
362: fnd_profile.VALUE ('BOM:HOUR_UOM_CODE');
363:

Line 361: gme_common_pvt.g_hour_uom_code :=

357: gme_common_pvt.g_fpo_no_last_assigned :=
358: l_cur_get_org_params.fpo_no_last_assigned;
359: gme_common_pvt.g_rule_based_resv_horizon :=
360: l_cur_get_org_params.rule_based_resv_horizon;
361: gme_common_pvt.g_hour_uom_code :=
362: fnd_profile.VALUE ('BOM:HOUR_UOM_CODE');
363:
364: IF g_debug <= gme_debug.g_log_procedure THEN
365: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

Line 383: gme_common_pvt.log_message ('GME_DEFINE_GME_PARAMETERS');

379: RETURN FALSE;
380: WHEN gmd_params_not_defined THEN
381: RETURN FALSE;
382: WHEN gme_params_not_defined THEN
383: gme_common_pvt.log_message ('GME_DEFINE_GME_PARAMETERS');
384: RETURN FALSE;
385: WHEN OTHERS THEN
386: IF g_debug <= gme_debug.g_log_unexpected THEN
387: gme_debug.put_line ( 'When others exception in '

Line 403: gme_common_pvt.g_timestamp := SYSDATE;

399: PROCEDURE set_timestamp
400: IS
401: l_api_name CONSTANT VARCHAR2 (30) := 'set_timestamp';
402: BEGIN
403: gme_common_pvt.g_timestamp := SYSDATE;
404: EXCEPTION
405: WHEN OTHERS THEN
406: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
407:

Line 422: gme_common_pvt.g_user_ident := fnd_profile.VALUE ('USER_ID');

418: PROCEDURE set_who
419: IS
420: l_api_name CONSTANT VARCHAR2 (30) := 'set_who';
421: BEGIN
422: gme_common_pvt.g_user_ident := fnd_profile.VALUE ('USER_ID');
423: gme_common_pvt.g_login_id := fnd_profile.VALUE ('LOGIN_ID');
424: gme_common_pvt.set_timestamp;
425: EXCEPTION
426: WHEN OTHERS THEN

Line 423: gme_common_pvt.g_login_id := fnd_profile.VALUE ('LOGIN_ID');

419: IS
420: l_api_name CONSTANT VARCHAR2 (30) := 'set_who';
421: BEGIN
422: gme_common_pvt.g_user_ident := fnd_profile.VALUE ('USER_ID');
423: gme_common_pvt.g_login_id := fnd_profile.VALUE ('LOGIN_ID');
424: gme_common_pvt.set_timestamp;
425: EXCEPTION
426: WHEN OTHERS THEN
427: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 424: gme_common_pvt.set_timestamp;

420: l_api_name CONSTANT VARCHAR2 (30) := 'set_who';
421: BEGIN
422: gme_common_pvt.g_user_ident := fnd_profile.VALUE ('USER_ID');
423: gme_common_pvt.g_login_id := fnd_profile.VALUE ('LOGIN_ID');
424: gme_common_pvt.set_timestamp;
425: EXCEPTION
426: WHEN OTHERS THEN
427: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
428:

Line 479: IF gme_common_pvt.g_user_ident IS NULL THEN

475: BEGIN
476: /* Set the return status to success initially */
477: x_return_status := fnd_api.g_ret_sts_success;
478:
479: IF gme_common_pvt.g_user_ident IS NULL THEN
480: set_who;
481: END IF;
482:
483: x_user_ident := gme_common_pvt.g_user_ident;

Line 483: x_user_ident := gme_common_pvt.g_user_ident;

479: IF gme_common_pvt.g_user_ident IS NULL THEN
480: set_who;
481: END IF;
482:
483: x_user_ident := gme_common_pvt.g_user_ident;
484: x_login_id := gme_common_pvt.g_login_id;
485: x_timestamp := gme_common_pvt.g_timestamp;
486: EXCEPTION
487: WHEN OTHERS THEN

Line 484: x_login_id := gme_common_pvt.g_login_id;

480: set_who;
481: END IF;
482:
483: x_user_ident := gme_common_pvt.g_user_ident;
484: x_login_id := gme_common_pvt.g_login_id;
485: x_timestamp := gme_common_pvt.g_timestamp;
486: EXCEPTION
487: WHEN OTHERS THEN
488: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 485: x_timestamp := gme_common_pvt.g_timestamp;

481: END IF;
482:
483: x_user_ident := gme_common_pvt.g_user_ident;
484: x_login_id := gme_common_pvt.g_login_id;
485: x_timestamp := gme_common_pvt.g_timestamp;
486: EXCEPTION
487: WHEN OTHERS THEN
488: x_return_status := fnd_api.g_ret_sts_unexp_error;
489: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 553: IF NOT (gme_common_pvt.check_subinventory

549:
550: CLOSE cur_supply_defaults;
551:
552: IF (x_subinventory IS NOT NULL) THEN
553: IF NOT (gme_common_pvt.check_subinventory
554: (p_organization_id => p_organization_id
555: ,p_subinventory => x_subinventory
556: ,p_inventory_item_id => p_inventory_item_id
557: ,p_restrict_subinv => l_restrict_subinv) ) THEN

Line 572: gme_common_pvt.eff_locator_control

568:
569: CLOSE cur_sub_control;
570:
571: l_eff_locator_control :=
572: gme_common_pvt.eff_locator_control
573: (p_organization_id => p_organization_id
574: ,p_org_control => gme_common_pvt.g_org_locator_control
575: ,p_subinventory => x_subinventory
576: ,p_sub_control => l_sub_locator_type

Line 574: ,p_org_control => gme_common_pvt.g_org_locator_control

570:
571: l_eff_locator_control :=
572: gme_common_pvt.eff_locator_control
573: (p_organization_id => p_organization_id
574: ,p_org_control => gme_common_pvt.g_org_locator_control
575: ,p_subinventory => x_subinventory
576: ,p_sub_control => l_sub_locator_type
577: ,p_item_control => l_item_loc_control
578: ,p_item_loc_restrict => l_restrict_locators

Line 579: ,p_action => gme_common_pvt.g_ing_issue_txn_action);

575: ,p_subinventory => x_subinventory
576: ,p_sub_control => l_sub_locator_type
577: ,p_item_control => l_item_loc_control
578: ,p_item_loc_restrict => l_restrict_locators
579: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
580:
581: IF (l_eff_locator_control = 1) THEN
582: x_locator_id := NULL;
583: RETURN;

Line 594: IF NOT (gme_common_pvt.check_locator

590: INTO l_sub_locator_type;
591:
592: CLOSE cur_sub_control;
593:
594: IF NOT (gme_common_pvt.check_locator
595: (p_organization_id => p_organization_id
596: ,p_locator_id => x_locator_id
597: ,p_subinventory => x_subinventory
598: ,p_inventory_item_id => p_inventory_item_id

Line 599: ,p_org_control => gme_common_pvt.g_org_locator_control

595: (p_organization_id => p_organization_id
596: ,p_locator_id => x_locator_id
597: ,p_subinventory => x_subinventory
598: ,p_inventory_item_id => p_inventory_item_id
599: ,p_org_control => gme_common_pvt.g_org_locator_control
600: ,p_sub_control => l_sub_locator_type
601: ,p_item_control => l_item_loc_control
602: ,p_item_loc_restrict => l_restrict_locators
603: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

Line 603: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

599: ,p_org_control => gme_common_pvt.g_org_locator_control
600: ,p_sub_control => l_sub_locator_type
601: ,p_item_control => l_item_loc_control
602: ,p_item_loc_restrict => l_restrict_locators
603: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
604: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
605: x_locator_id := NULL;
606: END IF;
607: END IF;

Line 604: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN

600: ,p_sub_control => l_sub_locator_type
601: ,p_item_control => l_item_loc_control
602: ,p_item_loc_restrict => l_restrict_locators
603: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
604: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
605: x_locator_id := NULL;
606: END IF;
607: END IF;
608:

Line 680: IF NOT (gme_common_pvt.check_subinventory

676:
677: CLOSE cur_yield_defaults;
678:
679: IF (x_subinventory IS NOT NULL) THEN
680: IF NOT (gme_common_pvt.check_subinventory
681: (p_organization_id => p_organization_id
682: ,p_subinventory => x_subinventory
683: ,p_inventory_item_id => p_inventory_item_id
684: ,p_restrict_subinv => l_restrict_subinv) ) THEN

Line 692: l_txn_action := gme_common_pvt.g_prod_comp_txn_action;

688: END IF;
689: END IF;
690:
691: IF (p_line_type = g_line_type_prod) THEN
692: l_txn_action := gme_common_pvt.g_prod_comp_txn_action;
693: ELSIF (p_line_type = g_line_type_prod) THEN
694: l_txn_action := gme_common_pvt.g_byprod_comp_txn_action;
695: END IF;
696:

Line 694: l_txn_action := gme_common_pvt.g_byprod_comp_txn_action;

690:
691: IF (p_line_type = g_line_type_prod) THEN
692: l_txn_action := gme_common_pvt.g_prod_comp_txn_action;
693: ELSIF (p_line_type = g_line_type_prod) THEN
694: l_txn_action := gme_common_pvt.g_byprod_comp_txn_action;
695: END IF;
696:
697: OPEN cur_sub_control (p_organization_id, x_subinventory);
698:

Line 705: gme_common_pvt.eff_locator_control

701:
702: CLOSE cur_sub_control;
703:
704: l_eff_locator_control :=
705: gme_common_pvt.eff_locator_control
706: (p_organization_id => p_organization_id
707: ,p_org_control => gme_common_pvt.g_org_locator_control
708: ,p_subinventory => x_subinventory
709: ,p_sub_control => l_sub_locator_type

Line 707: ,p_org_control => gme_common_pvt.g_org_locator_control

703:
704: l_eff_locator_control :=
705: gme_common_pvt.eff_locator_control
706: (p_organization_id => p_organization_id
707: ,p_org_control => gme_common_pvt.g_org_locator_control
708: ,p_subinventory => x_subinventory
709: ,p_sub_control => l_sub_locator_type
710: ,p_item_control => l_item_loc_control
711: ,p_item_loc_restrict => l_restrict_locators

Line 720: IF NOT (gme_common_pvt.check_locator

716: RETURN;
717: END IF;
718:
719: IF (x_locator_id IS NOT NULL) THEN
720: IF NOT (gme_common_pvt.check_locator
721: (p_organization_id => p_organization_id
722: ,p_locator_id => x_locator_id
723: ,p_subinventory => x_subinventory
724: ,p_inventory_item_id => p_inventory_item_id

Line 725: ,p_org_control => gme_common_pvt.g_org_locator_control

721: (p_organization_id => p_organization_id
722: ,p_locator_id => x_locator_id
723: ,p_subinventory => x_subinventory
724: ,p_inventory_item_id => p_inventory_item_id
725: ,p_org_control => gme_common_pvt.g_org_locator_control
726: ,p_sub_control => l_sub_locator_type
727: ,p_item_control => l_item_loc_control
728: ,p_item_loc_restrict => l_restrict_locators
729: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

Line 729: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

725: ,p_org_control => gme_common_pvt.g_org_locator_control
726: ,p_sub_control => l_sub_locator_type
727: ,p_item_control => l_item_loc_control
728: ,p_item_loc_restrict => l_restrict_locators
729: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
730: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
731: x_locator_id := NULL;
732: END IF;
733: END IF;

Line 730: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN

726: ,p_sub_control => l_sub_locator_type
727: ,p_item_control => l_item_loc_control
728: ,p_item_loc_restrict => l_restrict_locators
729: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
730: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
731: x_locator_id := NULL;
732: END IF;
733: END IF;
734:

Line 833: gme_common_pvt.log_message ('GME_API_MATL_DTL_SETUP_FAILURE');

829: EXCEPTION
830: WHEN get_defaults_err THEN
831: x_return_status := l_return_status;
832: WHEN OTHERS THEN
833: gme_common_pvt.log_message ('GME_API_MATL_DTL_SETUP_FAILURE');
834:
835: IF g_debug <= gme_debug.g_log_unexpected THEN
836: gme_debug.put_line ( 'When others exception in '
837: || g_pkg_name

Line 971: gme_common_pvt.log_message ('GME_INVALID_BATCH');

967:
968: CLOSE cur_get_info;
969:
970: IF l_recipe_id IS NULL THEN
971: gme_common_pvt.log_message ('GME_INVALID_BATCH');
972: RAISE expected_error;
973: END IF;
974: ELSIF p_validity_rule_id IS NOT NULL THEN
975: -- Validate recipe validity rule

Line 986: gme_common_pvt.log_message ('GME_API_INVALID_RULE');

982:
983: CLOSE cur_get_info_from_validity;
984:
985: IF l_recipe_id IS NULL THEN
986: gme_common_pvt.log_message ('GME_API_INVALID_RULE');
987: RAISE expected_error;
988: END IF;
989: END IF;
990:

Line 1086: ,PRECISION => gme_common_pvt.g_precision

1082:
1083: IF l_uom <> l_routing_class_uom THEN
1084: l_qty := inv_convert.inv_um_convert
1085: (item_id => l_item_id
1086: ,PRECISION => gme_common_pvt.g_precision
1087: ,from_quantity => l_total_output_qty_pre_scale
1088: ,from_unit => l_uom
1089: ,to_unit => l_routing_class_uom
1090: ,from_name => NULL

Line 1110: ,PRECISION => gme_common_pvt.g_precision

1106:
1107: IF l_routing_uom <> l_routing_class_uom THEN
1108: l_qty := inv_convert.inv_um_convert
1109: (item_id => 0
1110: ,PRECISION => gme_common_pvt.g_precision
1111: ,from_quantity => l_total_output_qty_scaled
1112: ,from_unit => l_routing_uom
1113: ,to_unit => l_routing_class_uom
1114: ,from_name => NULL

Line 1238: IF (x_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_batch) THEN

1234: END IF;
1235:
1236: x_batch_header_rec := p_batch_header_rec;
1237:
1238: IF (x_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_batch) THEN
1239: SELECT batch_doc_numbering, batch_no_last_assigned + 1
1240: INTO l_assignment_type, l_document_no
1241: FROM gme_parameters
1242: WHERE organization_id = x_batch_header_rec.organization_id

Line 1252: IF l_assignment_type = gme_common_pvt.g_auto_doc_numbering THEN

1248: WHERE organization_id = x_batch_header_rec.organization_id
1249: FOR UPDATE OF batch_no_last_assigned NOWAIT;
1250: END IF;
1251:
1252: IF l_assignment_type = gme_common_pvt.g_auto_doc_numbering THEN
1253: IF l_document_no IS NULL THEN
1254: RAISE invalid_doc_no;
1255: END IF;
1256:

Line 1257: IF (x_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_batch) THEN

1253: IF l_document_no IS NULL THEN
1254: RAISE invalid_doc_no;
1255: END IF;
1256:
1257: IF (x_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_batch) THEN
1258: UPDATE gme_parameters
1259: SET batch_no_last_assigned = batch_no_last_assigned + 1
1260: WHERE organization_id = p_batch_header_rec.organization_id;
1261: ELSE

Line 1283: gme_common_pvt.log_message ('GME_DOC_SEQ_LOCK'

1279: fnd_message.set_name ('GME', 'GME_INVALID_AUTO_DOC');
1280: fnd_msg_pub.ADD;
1281: ROLLBACK;
1282: WHEN app_exception.record_lock_exception THEN
1283: gme_common_pvt.log_message ('GME_DOC_SEQ_LOCK'
1284: ,'S1'
1285: ,p_batch_header_rec.organization_id);
1286: ROLLBACK;
1287: WHEN NO_DATA_FOUND THEN

Line 1360: x_start_date := gme_common_pvt.g_timestamp;

1356: x_cmplt_date := p_cmplt_date;
1357: ELSE
1358: -- if you get here, that means that a rule was found, but no dates were passed in...
1359: -- let's default start date to sysdate and work in the prod rule...
1360: x_start_date := gme_common_pvt.g_timestamp;
1361: x_cmplt_date := x_start_date + l_total_leadtime;
1362: END IF;
1363:
1364: IF g_debug <= gme_debug.g_log_procedure THEN

Line 1426: (gme_common_pvt.g_mtl_manual_release

1422:
1423: x_return_status := fnd_api.g_ret_sts_success;
1424:
1425: IF p_mtl_dtl_rec.release_type IN
1426: (gme_common_pvt.g_mtl_manual_release
1427: ,gme_common_pvt.g_mtl_incremental_release
1428: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1429: IF (p_batchstep_rec.batchstep_id IS NULL) THEN
1430: OPEN cur_get_associated_step (p_mtl_dtl_rec.material_detail_id);

Line 1427: ,gme_common_pvt.g_mtl_incremental_release

1423: x_return_status := fnd_api.g_ret_sts_success;
1424:
1425: IF p_mtl_dtl_rec.release_type IN
1426: (gme_common_pvt.g_mtl_manual_release
1427: ,gme_common_pvt.g_mtl_incremental_release
1428: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1429: IF (p_batchstep_rec.batchstep_id IS NULL) THEN
1430: OPEN cur_get_associated_step (p_mtl_dtl_rec.material_detail_id);
1431:

Line 1428: ,gme_common_pvt.g_mtl_autobystep_release) THEN

1424:
1425: IF p_mtl_dtl_rec.release_type IN
1426: (gme_common_pvt.g_mtl_manual_release
1427: ,gme_common_pvt.g_mtl_incremental_release
1428: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1429: IF (p_batchstep_rec.batchstep_id IS NULL) THEN
1430: OPEN cur_get_associated_step (p_mtl_dtl_rec.material_detail_id);
1431:
1432: FETCH cur_get_associated_step

Line 1455: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN

1451: l_step_start_date := p_batchstep_rec.plan_start_date;
1452: l_step_cmplt_date := p_batchstep_rec.plan_cmplt_date;
1453: END IF;
1454:
1455: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
1456: x_mtl_req_date := l_step_start_date;
1457: ELSE
1458: x_mtl_req_date := l_step_cmplt_date;
1459: END IF;

Line 1474: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN

1470: l_batch_start_date := p_batch_header_rec.plan_start_date;
1471: l_batch_cmplt_date := p_batch_header_rec.plan_cmplt_date;
1472: END IF;
1473:
1474: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
1475: x_mtl_req_date := l_batch_start_date;
1476: ELSE
1477: x_mtl_req_date := l_batch_cmplt_date;
1478: END IF;

Line 1683: l_resource_ids gme_common_pvt.number_tab;

1679: SELECT batchstep_resource_id
1680: FROM gme_batch_step_resources
1681: WHERE batch_id = p_batch_id;
1682:
1683: l_resource_ids gme_common_pvt.number_tab;
1684: l_batch_step_resources gme_batch_step_resources%ROWTYPE;
1685: l_found NUMBER (5) DEFAULT 0;
1686: l_resources VARCHAR2 (2000);
1687: l_api_name CONSTANT VARCHAR2 (30) := 'resource_qty_below_capacity';

Line 1730: gme_common_pvt.log_message ('GME_API_RSRC_QTY_BELOW_CAP'

1726: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1727: END IF;
1728:
1729: IF l_found = 1 THEN
1730: gme_common_pvt.log_message ('GME_API_RSRC_QTY_BELOW_CAP'
1731: ,'RESOURCES'
1732: ,l_resources);
1733: RETURN TRUE;
1734: ELSE

Line 2164: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');

2160:
2161: IF get_validity_rule%NOTFOUND THEN
2162: CLOSE get_validity_rule;
2163:
2164: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2165: RETURN FALSE;
2166: END IF;
2167:
2168: CLOSE get_validity_rule;

Line 2171: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');

2167:
2168: CLOSE get_validity_rule;
2169:
2170: IF l_validity_rec.delete_mark = 1 THEN
2171: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2172: RETURN FALSE;
2173: ELSIF l_validity_rec.inventory_item_id <> p_prim_product_id THEN
2174: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_PROD');
2175: RETURN FALSE;

Line 2174: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_PROD');

2170: IF l_validity_rec.delete_mark = 1 THEN
2171: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2172: RETURN FALSE;
2173: ELSIF l_validity_rec.inventory_item_id <> p_prim_product_id THEN
2174: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_PROD');
2175: RETURN FALSE;
2176: ELSIF p_creation_mode NOT IN ('OUTPUT', 'INPUT') THEN
2177: IF p_uom <> l_validity_rec.detail_uom THEN
2178: l_qty :=

Line 2181: ,PRECISION => gme_common_pvt.g_precision

2177: IF p_uom <> l_validity_rec.detail_uom THEN
2178: l_qty :=
2179: inv_convert.inv_um_convert
2180: (item_id => p_prim_product_id
2181: ,PRECISION => gme_common_pvt.g_precision
2182: ,from_quantity => p_qty
2183: ,from_unit => p_uom
2184: ,to_unit => l_validity_rec.detail_uom
2185: ,from_name => NULL

Line 2199: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_QTY');

2195: l_qty := p_qty;
2196: END IF;
2197:
2198: IF l_qty < l_validity_rec.min_qty OR l_qty > l_validity_rec.max_qty THEN
2199: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_QTY');
2200: RETURN FALSE;
2201: END IF;
2202:
2203: l_qty := p_qty;

Line 2209: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');

2205:
2206: IF p_object_type = 'F' /* FPO */ THEN
2207: IF l_validity_rec.recipe_use NOT IN
2208: (0, 1) /* Production , Planning */ THEN
2209: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');
2210: RETURN FALSE;
2211: END IF;
2212:
2213: /* BUG 5021736 added between logic */

Line 2215: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_STAT');

2211: END IF;
2212:
2213: /* BUG 5021736 added between logic */
2214: IF NOT(l_validity_rec.validity_rule_status between 700 and 799 OR l_validity_rec.validity_rule_status between 900 and 999) THEN
2215: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_STAT');
2216: RETURN FALSE;
2217: END IF;
2218:
2219: l_recipe_use := 0;

Line 2222: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');

2218:
2219: l_recipe_use := 0;
2220: ELSIF p_object_type = 'P' /* Production Batch */ THEN
2221: IF l_validity_rec.recipe_use <> 0 /* Production */ THEN
2222: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');
2223: RETURN FALSE;
2224: END IF;
2225: /* BUG 5021736 added between logic */
2226: IF NOT(l_validity_rec.validity_rule_status between 700 and 799 OR l_validity_rec.validity_rule_status between 900 and 999) THEN

Line 2227: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_STAT');

2223: RETURN FALSE;
2224: END IF;
2225: /* BUG 5021736 added between logic */
2226: IF NOT(l_validity_rec.validity_rule_status between 700 and 799 OR l_validity_rec.validity_rule_status between 900 and 999) THEN
2227: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_STAT');
2228: RETURN FALSE;
2229: END IF;
2230:
2231: l_recipe_use := 1;

Line 2234: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');

2230:
2231: l_recipe_use := 1;
2232: ELSIF p_object_type = 'L' /* Lab Batch */ THEN
2233: IF l_validity_rec.recipe_use <> 0 /* Production */ THEN
2234: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');
2235: RETURN FALSE;
2236: END IF;
2237: /* BUG 5021736 added between logic */
2238: IF NOT(l_validity_rec.validity_rule_status between 400 and 499 OR

Line 2243: gme_common_pvt.log_message('GME_INVALID_VALIDITY_RULE_STAT');

2239: l_validity_rec.validity_rule_status between 500 and 599 OR
2240: l_validity_rec.validity_rule_status between 700 and 799 OR
2241: l_validity_rec.validity_rule_status between 900 and 999 OR
2242: l_validity_rec.validity_rule_status between 600 and 699 ) THEN
2243: gme_common_pvt.log_message('GME_INVALID_VALIDITY_RULE_STAT');
2244: RETURN FALSE;
2245: END IF;
2246:
2247: l_recipe_use := 1;

Line 2256: IF NOT gme_common_pvt.check_validity_rule_dates

2252: If both dates are not passed then assume both as sysdate and check */
2253: l_start_date := p_start_date;
2254: l_cmplt_date := p_cmplt_date;
2255:
2256: IF NOT gme_common_pvt.check_validity_rule_dates
2257: (p_validity_rule_id => p_validity_rule_id
2258: ,p_start_date => l_start_date
2259: ,p_cmplt_date => l_cmplt_date) THEN
2260: RETURN FALSE;

Line 2342: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_QTY');

2338: fnd_message.set_token ('TO_UOM', l_to_uom);
2339: fnd_msg_pub.ADD;
2340: RETURN FALSE;
2341: WHEN validation_failure THEN
2342: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_QTY');
2343: RETURN FALSE;
2344: WHEN OTHERS THEN
2345: IF g_debug <= gme_debug.g_log_unexpected THEN
2346: gme_debug.put_line ( 'When others exception in '

Line 2364: ,x_exception_tbl OUT NOCOPY gme_common_pvt.exceptions_tab) IS

2360: ,p_batch_id IN NUMBER
2361: ,p_invoke_mode IN VARCHAR2
2362: ,p_tree_mode IN NUMBER
2363: ,x_return_status OUT NOCOPY VARCHAR2
2364: ,x_exception_tbl OUT NOCOPY gme_common_pvt.exceptions_tab) IS
2365: /* Bug 5212165 added line_no in the order by */
2366: CURSOR cur_get_materials IS
2367: SELECT d.*
2368: FROM gme_material_details d, mtl_system_items_b i

Line 2409: ,gme_common_pvt.g_ing_issue

2405: AND (p_invoke_mode = 'O' OR (subinventory_code = v_sub_code) )
2406: AND (inv_material_status_grp.is_status_applicable
2407: (NULL
2408: ,NULL
2409: ,gme_common_pvt.g_ing_issue
2410: ,NULL
2411: ,NULL
2412: ,v_org_id
2413: ,inventory_item_id

Line 2475: IF NOT (gme_common_pvt.g_setup_done) THEN

2471: IF g_debug <= gme_debug.g_log_procedure THEN
2472: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
2473: END IF;
2474: x_return_status := fnd_api.g_ret_sts_success;
2475: IF NOT (gme_common_pvt.g_setup_done) THEN
2476: IF NOT (gme_common_pvt.setup (p_org_id => p_organization_id) ) THEN
2477: RAISE setup_failure;
2478: END IF;
2479: END IF;

Line 2476: IF NOT (gme_common_pvt.setup (p_org_id => p_organization_id) ) THEN

2472: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
2473: END IF;
2474: x_return_status := fnd_api.g_ret_sts_success;
2475: IF NOT (gme_common_pvt.g_setup_done) THEN
2476: IF NOT (gme_common_pvt.setup (p_org_id => p_organization_id) ) THEN
2477: RAISE setup_failure;
2478: END IF;
2479: END IF;
2480:

Line 2530: ,PRECISION => gme_common_pvt.g_precision

2526: l_open_qty_prim := l_open_qty;
2527: ELSE
2528: l_temp_qty := inv_convert.inv_um_convert
2529: (item_id => l_mtl_dtl_rec.inventory_item_id
2530: ,PRECISION => gme_common_pvt.g_precision
2531: ,from_quantity => l_open_qty
2532: ,from_unit => l_mtl_dtl_rec.dtl_um
2533: ,to_unit => l_item_rec.primary_uom_code
2534: ,from_name => NULL

Line 2720: demand_Source_type_id =gme_common_pvt.g_txn_source_type)

2716: AND t.inventory_item_id = l_mtl_dtl_rec.inventory_item_id
2717: AND t.reservation_id not in (select reservation_id from mtl_reservations
2718: where demand_source_header_id =l_mtl_dtl_rec.batch_id and
2719: demand_source_line_id = l_mtl_dtl_rec.material_detail_id and
2720: demand_Source_type_id =gme_common_pvt.g_txn_source_type)
2721: AND h.move_order_type =
2722: gme_common_pvt.g_txn_source_type
2723: AND l.line_status NOT IN (5, 6)
2724: AND h.header_id = l.header_id

Line 2722: gme_common_pvt.g_txn_source_type

2718: where demand_source_header_id =l_mtl_dtl_rec.batch_id and
2719: demand_source_line_id = l_mtl_dtl_rec.material_detail_id and
2720: demand_Source_type_id =gme_common_pvt.g_txn_source_type)
2721: AND h.move_order_type =
2722: gme_common_pvt.g_txn_source_type
2723: AND l.line_status NOT IN (5, 6)
2724: AND h.header_id = l.header_id
2725: AND h.move_order_type NOT IN
2726: (gme_common_pvt.g_invis_move_order_type

Line 2726: (gme_common_pvt.g_invis_move_order_type

2722: gme_common_pvt.g_txn_source_type
2723: AND l.line_status NOT IN (5, 6)
2724: AND h.header_id = l.header_id
2725: AND h.move_order_type NOT IN
2726: (gme_common_pvt.g_invis_move_order_type
2727: ,inv_globals.g_move_order_put_away);
2728: IF g_debug <= gme_debug.g_log_statement THEN
2729: gme_debug.put_line('Additional Material Allocated to Move Order:'||l_allocated_qty);
2730: END IF;

Line 2832: l_resv_tbl gme_common_pvt.reservations_tab;

2828: AND inventory_item_id = v_inventory_item_id;
2829:
2830: l_item_loc_control NUMBER;
2831: l_item_restrict_locators NUMBER;
2832: l_resv_tbl gme_common_pvt.reservations_tab;
2833: get_reserved_qty_err EXCEPTION;
2834: get_reservations_err EXCEPTION;
2835: get_pending_qty_err EXCEPTION;
2836: BEGIN

Line 3109: p_exception_tbl IN gme_common_pvt.exceptions_tab)

3105: RETURN FALSE;
3106: END insert_exceptions;
3107:
3108: FUNCTION populate_temp_from_struct (
3109: p_exception_tbl IN gme_common_pvt.exceptions_tab)
3110: RETURN BOOLEAN
3111: IS
3112: l_api_name CONSTANT VARCHAR2 (30) := 'populate_temp_from_struct';
3113: BEGIN

Line 3276: gme_common_pvt.log_message ('GME_NO_KEYS'

3272: l_batch_header_rec := p_batch_header_rec;
3273:
3274: IF p_batch_header_rec.batch_id IS NULL THEN
3275: IF p_org_code IS NULL AND p_batch_header_rec.organization_id IS NULL THEN
3276: gme_common_pvt.log_message ('GME_NO_KEYS'
3277: ,'TABLE_NAME'
3278: ,'GME_BATCH_HEADER');
3279: RAISE fnd_api.g_exc_error;
3280: ELSIF p_org_code IS NOT NULL THEN

Line 3288: gme_common_pvt.log_message (p_message_code => 'IC_ORGNCODERR'

3284: INTO l_batch_header_rec.organization_id;
3285:
3286: IF get_organization%NOTFOUND THEN
3287: CLOSE get_organization;
3288: gme_common_pvt.log_message (p_message_code => 'IC_ORGNCODERR'
3289: ,p_product_code => 'GMI');
3290: RAISE fnd_api.g_exc_error;
3291: END IF;
3292: CLOSE get_organization;

Line 3296: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');

3292: CLOSE get_organization;
3293: END IF;
3294:
3295: IF NVL (p_batch_header_rec.batch_type, p_batch_type) <> p_batch_type THEN
3296: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
3297: RAISE fnd_api.g_exc_error;
3298: ELSE
3299: l_batch_header_rec.batch_type :=
3300: NVL (p_batch_header_rec.batch_type, p_batch_type);

Line 3310: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');

3306: RAISE fnd_api.g_exc_error;
3307: END IF;
3308:
3309: IF x_batch_header_rec.batch_type <> p_batch_type THEN
3310: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
3311: RAISE fnd_api.g_exc_error;
3312: END IF;
3313:
3314: RETURN TRUE;

Line 3362: l_batch_header_rec_in.batch_type := gme_common_pvt.g_doc_type_batch;

3358: l_batch_step_rec := p_batch_step_rec;
3359: IF p_batch_step_rec.batchstep_id IS NULL THEN
3360: l_batch_header_rec_in.batch_no := p_batch_no;
3361: l_batch_header_rec_in.batch_id := p_batch_step_rec.batch_id;
3362: l_batch_header_rec_in.batch_type := gme_common_pvt.g_doc_type_batch;
3363: IF NOT gme_common_pvt.get_batch_header (
3364: p_batch_header_rec => l_batch_header_rec_in
3365: ,p_org_code => p_org_code
3366: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 3363: IF NOT gme_common_pvt.get_batch_header (

3359: IF p_batch_step_rec.batchstep_id IS NULL THEN
3360: l_batch_header_rec_in.batch_no := p_batch_no;
3361: l_batch_header_rec_in.batch_id := p_batch_step_rec.batch_id;
3362: l_batch_header_rec_in.batch_type := gme_common_pvt.g_doc_type_batch;
3363: IF NOT gme_common_pvt.get_batch_header (
3364: p_batch_header_rec => l_batch_header_rec_in
3365: ,p_org_code => p_org_code
3366: ,p_batch_type => gme_common_pvt.g_doc_type_batch
3367: ,x_batch_header_rec => l_batch_header_rec) THEN

Line 3366: ,p_batch_type => gme_common_pvt.g_doc_type_batch

3362: l_batch_header_rec_in.batch_type := gme_common_pvt.g_doc_type_batch;
3363: IF NOT gme_common_pvt.get_batch_header (
3364: p_batch_header_rec => l_batch_header_rec_in
3365: ,p_org_code => p_org_code
3366: ,p_batch_type => gme_common_pvt.g_doc_type_batch
3367: ,x_batch_header_rec => l_batch_header_rec) THEN
3368: RETURN FALSE;
3369: ELSE
3370: l_batch_step_rec.batch_id := l_batch_header_rec.batch_id;

Line 3475: ,transaction_date => gme_common_pvt.g_timestamp

3471: ,open_past_period => l_open_past_period);
3472:
3473: IF l_open_past_period = FALSE THEN
3474: invttmtx.tdatechk (org_id => p_org_id
3475: ,transaction_date => gme_common_pvt.g_timestamp
3476: ,period_id => l_period_id
3477: ,open_past_period => l_open_past_period);
3478:
3479: IF l_open_past_period = FALSE THEN

Line 3482: x_trans_date := gme_common_pvt.g_timestamp;

3478:
3479: IF l_open_past_period = FALSE THEN
3480: RETURN FALSE;
3481: ELSE
3482: x_trans_date := gme_common_pvt.g_timestamp;
3483: x_period_id := l_period_id;
3484: END IF;
3485: ELSE
3486: x_trans_date := p_trans_date;

Line 3768: ( ' user defined exception in gme_common_pvt.get_resource function'

3764: EXCEPTION
3765: WHEN invalid_record OR btchstep_rsrc_fetch_err OR invalid_organization OR invalid_batch OR invalid_batchstep OR invalid_batchstep_activity OR invalid_batchstep_resource THEN
3766: IF g_debug <= gme_debug.g_log_unexpected THEN
3767: gme_debug.put_line
3768: ( ' user defined exception in gme_common_pvt.get_resource function'
3769: || SQLERRM);
3770: END IF;
3771:
3772: RETURN FALSE;

Line 3776: ( ' when others: exception in gme_common_pvt.get_resource function'

3772: RETURN FALSE;
3773: WHEN OTHERS THEN
3774: IF g_debug <= gme_debug.g_log_unexpected THEN
3775: gme_debug.put_line
3776: ( ' when others: exception in gme_common_pvt.get_resource function'
3777: || SQLERRM);
3778: END IF;
3779:
3780: RETURN FALSE;

Line 3843: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');

3839: FETCH get_validity_rule INTO l_validity_rec;
3840:
3841: IF get_validity_rule%NOTFOUND THEN
3842: CLOSE get_validity_rule;
3843: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
3844: RETURN FALSE;
3845: END IF;
3846:
3847: CLOSE get_validity_rule;

Line 3850: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');

3846:
3847: CLOSE get_validity_rule;
3848:
3849: IF l_validity_rec.delete_mark = 1 THEN
3850: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
3851: RETURN FALSE;
3852: END IF;
3853:
3854: l_start_date := p_start_date;

Line 3858: AND NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 THEN

3854: l_start_date := p_start_date;
3855: l_cmplt_date := p_cmplt_date;
3856:
3857: IF p_start_date IS NULL
3858: AND NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 THEN
3859: /* Validate only start date against validity rules AND start date is not passed */
3860: RETURN TRUE;
3861: END IF;
3862:

Line 3880: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 OR NVL (p_validate_plan_dates_ind, 0) = 1 THEN

3876: --Sunitha ch. Bug#5336007 checked the parameter p_validate_plan_dates_ind.If it is 1 then
3877: --validate planned start date only.If it is 0 then validate both
3878: --Sunitha ch. Bug#5404329 Changed the condition from AND to OR and changed the log message to
3879: --GME_INVAL_VAL_RULE_DATES when validating for actual start date
3880: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 OR NVL (p_validate_plan_dates_ind, 0) = 1 THEN
3881: IF l_start_date < l_validity_rec.start_date
3882: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date) THEN
3883: IF NVL (p_validate_plan_dates_ind, 0) = 1 THEN
3884: gme_common_pvt.log_message ('GME_INVAL_VAL_RULE_DATES');

Line 3884: gme_common_pvt.log_message ('GME_INVAL_VAL_RULE_DATES');

3880: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 OR NVL (p_validate_plan_dates_ind, 0) = 1 THEN
3881: IF l_start_date < l_validity_rec.start_date
3882: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date) THEN
3883: IF NVL (p_validate_plan_dates_ind, 0) = 1 THEN
3884: gme_common_pvt.log_message ('GME_INVAL_VAL_RULE_DATES');
3885: ELSE
3886: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');
3887: END IF;
3888: RETURN FALSE;

Line 3886: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');

3882: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date) THEN
3883: IF NVL (p_validate_plan_dates_ind, 0) = 1 THEN
3884: gme_common_pvt.log_message ('GME_INVAL_VAL_RULE_DATES');
3885: ELSE
3886: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');
3887: END IF;
3888: RETURN FALSE;
3889: END IF;
3890: ELSE

Line 3896: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');

3892: IF l_start_date < l_validity_rec.start_date
3893: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date)
3894: OR l_cmplt_date < l_validity_rec.start_date
3895: OR l_cmplt_date > NVL (l_validity_rec.end_date, l_cmplt_date) THEN
3896: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');
3897: RETURN FALSE;
3898: END IF;
3899: END IF;
3900:

Line 3912: gme_common_pvt.g_batch_pending

3908: CLOSE cur_get_status_type;
3909:
3910: IF l_status_type IN ('1000', '800') THEN
3911: IF p_batch_header_rec.batch_status =
3912: gme_common_pvt.g_batch_pending
3913: AND p_batch_header_rec.batch_type = 0 THEN
3914: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
3915: RAISE invalid_validity_rule;
3916: ELSIF p_batch_header_rec.batch_status =

Line 3914: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');

3910: IF l_status_type IN ('1000', '800') THEN
3911: IF p_batch_header_rec.batch_status =
3912: gme_common_pvt.g_batch_pending
3913: AND p_batch_header_rec.batch_type = 0 THEN
3914: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
3915: RAISE invalid_validity_rule;
3916: ELSIF p_batch_header_rec.batch_status =
3917: gme_common_pvt.g_batch_wip
3918: AND p_batch_header_rec.batch_type = 0 THEN

Line 3917: gme_common_pvt.g_batch_wip

3913: AND p_batch_header_rec.batch_type = 0 THEN
3914: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
3915: RAISE invalid_validity_rule;
3916: ELSIF p_batch_header_rec.batch_status =
3917: gme_common_pvt.g_batch_wip
3918: AND p_batch_header_rec.batch_type = 0 THEN
3919: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD1');
3920: END IF;
3921: END IF; /* l_status_type IN ('1000', '800') */

Line 3919: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD1');

3915: RAISE invalid_validity_rule;
3916: ELSIF p_batch_header_rec.batch_status =
3917: gme_common_pvt.g_batch_wip
3918: AND p_batch_header_rec.batch_type = 0 THEN
3919: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD1');
3920: END IF;
3921: END IF; /* l_status_type IN ('1000', '800') */
3922: END IF; /* p_batch_header_rec.batch_id IS NOT NULL */
3923:

Line 4001: AND mtrh.move_order_type = gme_common_pvt.g_move_order_type;

3997: AND mtrl.inventory_item_id = d.inventory_item_id
3998: AND mtrl.txn_source_id = d.batch_id
3999: AND mtrl.header_id = mtrh.header_id
4000: AND mtrl.txn_source_line_id = p_material_detail_id
4001: AND mtrh.move_order_type = gme_common_pvt.g_move_order_type;
4002:
4003: --FPbug#4912179 query modified to improve performance
4004: CURSOR cur_get_mo_allocations (p_line_id NUMBER)
4005: IS

Line 4059: l_rsv_array gme_common_pvt.reservations_tab;

4055: l_material_detail_rec gme_material_details%ROWTYPE;
4056: l_batch_header_rec gme_batch_header%ROWTYPE;
4057: l_rsv inv_reservation_global.mtl_reservation_rec_type;
4058: ---l_rsv_array inv_reservation_global.mtl_reservation_tbl_type; --------- Punit Kumar
4059: l_rsv_array gme_common_pvt.reservations_tab;
4060: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4061: l_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type; -- 4944024
4062: l_rsv_count NUMBER; -- 4944024
4063: /* Punit Kumar */

Line 4110: ('p_material_date is null calling gme_common_pvt.calc_mtl_req_date');

4106: ELSE /* p_material_date IS NULL */
4107: IF (NVL (g_debug, 0) IN
4108: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4109: gme_debug.put_line
4110: ('p_material_date is null calling gme_common_pvt.calc_mtl_req_date');
4111: END IF;
4112:
4113: IF get_assoc_step (p_material_detail_id
4114: ,l_batchstep_rec.batchstep_id

Line 4122: gme_common_pvt.calc_mtl_req_date

4118: RAISE fnd_api.g_exc_error;
4119: END IF;
4120: END IF;
4121:
4122: gme_common_pvt.calc_mtl_req_date
4123: (p_batch_header_rec => l_batch_header_rec
4124: ,p_batchstep_rec => l_batchstep_rec
4125: ,p_mtl_dtl_rec => l_material_detail_rec
4126: ,x_mtl_req_date => l_material_date

Line 4132: ( 'Came back from gme_common_pvt.calc_mtl_req_date with status '

4128:
4129: IF (NVL (g_debug, 0) IN
4130: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4131: gme_debug.put_line
4132: ( 'Came back from gme_common_pvt.calc_mtl_req_date with status '
4133: || l_return_status);
4134: END IF;
4135:
4136: -- Error handling for deduce_material_date call.

Line 4173: IF l_material_detail_rec.line_type <> gme_common_pvt.g_line_type_ing THEN /* -1 */

4169: IF (NVL (g_debug, 0) IN
4170: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4171: gme_debug.put_line (' Assessing line type which is '||l_material_detail_rec.line_type);
4172: END IF;
4173: IF l_material_detail_rec.line_type <> gme_common_pvt.g_line_type_ing THEN /* -1 */
4174: IF (NVL (g_debug, 0) IN
4175: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4176: gme_debug.put_line (' Line is a source of supply so invoke Query_Prod_Supply_Reservations');
4177: END IF;

Line 4244: gme_common_pvt.g_line_type_ing /* -1 */ THEN

4240: * 2. if line_type is not Ingredient.
4241: */
4242: IF l_batch_header_rec.update_inventory_ind <> 'Y'
4243: OR l_material_detail_rec.line_type <>
4244: gme_common_pvt.g_line_type_ing /* -1 */ THEN
4245: IF (NVL (g_debug, 0) IN
4246: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4247: gme_debug.put_line
4248: ( 'Returning no further processing of reservations and Move Orders are required. '

Line 4259: l_rsv.demand_source_type_id := gme_common_pvt.g_txn_source_type;

4255: RETURN;
4256: END IF;
4257:
4258: /* Query reservations for the material_detail_id by calling Query_reservation. */
4259: l_rsv.demand_source_type_id := gme_common_pvt.g_txn_source_type;
4260:
4261: IF (NVL (g_debug, 0) IN
4262: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4263: gme_debug.put_line ('Calling Query Reservation.');

Line 4638: IF NOT gme_common_pvt.get_batch_header

4634: AND p_batch_no IS NOT NULL THEN
4635: l_batch_header_rec.batch_no := p_batch_no;
4636: l_batch_header_rec.batch_type := p_batch_type;
4637:
4638: IF NOT gme_common_pvt.get_batch_header
4639: (p_batch_header_rec => l_batch_header_rec
4640: ,p_org_code => p_org_code
4641: ,p_batch_type => p_batch_type
4642: ,x_batch_header_rec => x_batch_header_rec) THEN

Line 4761: gme_common_pvt.log_message(p_product_code => 'INV'

4757: x_return_status := fnd_api.g_ret_sts_success;
4758: l_batch_header_rec := p_batch_header_rec;
4759:
4760: /* IF (p_batch_header_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
4761: gme_common_pvt.log_message(p_product_code => 'INV'
4762: ,p_message_code => 'INV_ORG_REQUIRED');
4763: RAISE fnd_api.g_exc_error;
4764: END IF; */
4765: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN

Line 4766: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');

4762: ,p_message_code => 'INV_ORG_REQUIRED');
4763: RAISE fnd_api.g_exc_error;
4764: END IF; */
4765: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN
4766: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
4767: RAISE fnd_api.g_exc_error;
4768: END IF;
4769: IF NOT gme_common_pvt.get_batch_header
4770: (p_batch_header_rec => p_batch_header_rec

Line 4769: IF NOT gme_common_pvt.get_batch_header

4765: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN
4766: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
4767: RAISE fnd_api.g_exc_error;
4768: END IF;
4769: IF NOT gme_common_pvt.get_batch_header
4770: (p_batch_header_rec => p_batch_header_rec
4771: ,p_org_code => p_org_code
4772: ,p_batch_type => p_batch_type
4773: ,x_batch_header_rec => l_batch_header_rec) THEN

Line 4777: gme_common_pvt.log_message ('GME_BATCH_NOT_FOUND');

4773: ,x_batch_header_rec => l_batch_header_rec) THEN
4774: IF (g_debug = gme_debug.g_log_statement) THEN
4775: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ': batch not found ');
4776: END IF;
4777: gme_common_pvt.log_message ('GME_BATCH_NOT_FOUND');
4778: RAISE batch_header_fetch_error;
4779: END IF;
4780:
4781: /* Check for phantom batch */

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

4779: END IF;
4780:
4781: /* Check for phantom batch */
4782: IF NVL (l_batch_header_rec.parentline_id, 0) > 0 THEN
4783: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
4784: RAISE fnd_api.g_exc_error;
4785: END IF;
4786: /* Check for migrated batch */
4787: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN

Line 4788: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');

4784: RAISE fnd_api.g_exc_error;
4785: END IF;
4786: /* Check for migrated batch */
4787: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
4788: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
4789: RAISE fnd_api.g_exc_error;
4790: END IF;
4791: gme_common_pvt.g_error_count := 0;
4792: gme_common_pvt.g_setup_done :=

Line 4791: gme_common_pvt.g_error_count := 0;

4787: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
4788: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
4789: RAISE fnd_api.g_exc_error;
4790: END IF;
4791: gme_common_pvt.g_error_count := 0;
4792: gme_common_pvt.g_setup_done :=
4793: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4794: ,p_org_code => p_org_code);
4795:

Line 4792: gme_common_pvt.g_setup_done :=

4788: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
4789: RAISE fnd_api.g_exc_error;
4790: END IF;
4791: gme_common_pvt.g_error_count := 0;
4792: gme_common_pvt.g_setup_done :=
4793: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4794: ,p_org_code => p_org_code);
4795:
4796: IF NOT gme_common_pvt.g_setup_done THEN

Line 4793: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id

4789: RAISE fnd_api.g_exc_error;
4790: END IF;
4791: gme_common_pvt.g_error_count := 0;
4792: gme_common_pvt.g_setup_done :=
4793: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4794: ,p_org_code => p_org_code);
4795:
4796: IF NOT gme_common_pvt.g_setup_done THEN
4797: IF (g_debug = gme_debug.g_log_statement) THEN

Line 4796: IF NOT gme_common_pvt.g_setup_done THEN

4792: gme_common_pvt.g_setup_done :=
4793: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4794: ,p_org_code => p_org_code);
4795:
4796: IF NOT gme_common_pvt.g_setup_done THEN
4797: IF (g_debug = gme_debug.g_log_statement) THEN
4798: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
4799: END IF;
4800: RAISE fnd_api.g_exc_error;

Line 4803: gme_common_pvt.g_organization_id;

4799: END IF;
4800: RAISE fnd_api.g_exc_error;
4801: ELSE
4802: l_batch_header_rec.organization_id :=
4803: gme_common_pvt.g_organization_id;
4804: END IF;
4805: x_batch_header_rec := l_batch_header_rec ;
4806:
4807: IF g_debug <= gme_debug.g_log_statement THEN

Line 4870: gme_common_pvt.log_message(p_product_code => 'INV'

4866: l_material_detail_rec := p_material_detail_rec;
4867:
4868:
4869: /*IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
4870: gme_common_pvt.log_message(p_product_code => 'INV'
4871: ,p_message_code => 'INV_ORG_REQUIRED');
4872: RAISE fnd_api.g_exc_error;
4873: END IF; */
4874: IF NOT gme_common_pvt.get_material_detail

Line 4874: IF NOT gme_common_pvt.get_material_detail

4870: gme_common_pvt.log_message(p_product_code => 'INV'
4871: ,p_message_code => 'INV_ORG_REQUIRED');
4872: RAISE fnd_api.g_exc_error;
4873: END IF; */
4874: IF NOT gme_common_pvt.get_material_detail
4875: (p_material_detail_rec => p_material_detail_rec
4876: ,p_org_code => p_org_code
4877: ,p_batch_no => p_batch_no
4878: ,p_batch_type => p_batch_type

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

4890: /* Bug#7157383 Commented the below code as this validation is not correct
4891: * in this place */
4892: /* Check for phantom batch
4893: IF NVL (l_batch_header_rec.parentline_id, 0) > 0 THEN
4894: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
4895: RAISE fnd_api.g_exc_error;
4896: END IF; */
4897: /* Check for migrated batch */
4898: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN

Line 4899: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');

4895: RAISE fnd_api.g_exc_error;
4896: END IF; */
4897: /* Check for migrated batch */
4898: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
4899: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
4900: RAISE fnd_api.g_exc_error;
4901: END IF;
4902: gme_common_pvt.g_error_count := 0;
4903: gme_common_pvt.g_setup_done :=

Line 4902: gme_common_pvt.g_error_count := 0;

4898: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
4899: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
4900: RAISE fnd_api.g_exc_error;
4901: END IF;
4902: gme_common_pvt.g_error_count := 0;
4903: gme_common_pvt.g_setup_done :=
4904: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4905: ,p_org_code => p_org_code);
4906:

Line 4903: gme_common_pvt.g_setup_done :=

4899: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
4900: RAISE fnd_api.g_exc_error;
4901: END IF;
4902: gme_common_pvt.g_error_count := 0;
4903: gme_common_pvt.g_setup_done :=
4904: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4905: ,p_org_code => p_org_code);
4906:
4907: IF NOT gme_common_pvt.g_setup_done THEN

Line 4904: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id

4900: RAISE fnd_api.g_exc_error;
4901: END IF;
4902: gme_common_pvt.g_error_count := 0;
4903: gme_common_pvt.g_setup_done :=
4904: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4905: ,p_org_code => p_org_code);
4906:
4907: IF NOT gme_common_pvt.g_setup_done THEN
4908: IF (g_debug = gme_debug.g_log_statement) THEN

Line 4907: IF NOT gme_common_pvt.g_setup_done THEN

4903: gme_common_pvt.g_setup_done :=
4904: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
4905: ,p_org_code => p_org_code);
4906:
4907: IF NOT gme_common_pvt.g_setup_done THEN
4908: IF (g_debug = gme_debug.g_log_statement) THEN
4909: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
4910: END IF;
4911: RAISE fnd_api.g_exc_error;

Line 4914: gme_common_pvt.g_organization_id;

4910: END IF;
4911: RAISE fnd_api.g_exc_error;
4912: ELSE
4913: l_batch_header_rec.organization_id :=
4914: gme_common_pvt.g_organization_id;
4915: END IF;
4916: x_batch_header_rec := l_batch_header_rec ;
4917: x_material_detail_rec := l_material_detail_rec ;
4918: IF g_debug <= gme_debug.g_log_statement THEN

Line 4943: gme_common_pvt.count_and_get (x_count => x_message_count

4939: || SQLERRM);
4940: END IF;
4941: x_return_status := fnd_api.g_ret_sts_unexp_error;
4942: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4943: gme_common_pvt.count_and_get (x_count => x_message_count
4944: ,p_encoded => fnd_api.g_false
4945: ,x_data => x_message_list);
4946: END Validate_material_detail;
4947: /*======================================================================

Line 4984: IF NOT gme_common_pvt.get_batch_step (

4980: END IF;
4981: x_return_status := fnd_api.g_ret_sts_success;
4982:
4983:
4984: IF NOT gme_common_pvt.get_batch_step (
4985: p_batch_step_rec => p_batch_step_rec
4986: ,p_org_code => p_org_code
4987: ,p_batch_no => p_batch_no
4988: ,x_batch_step_rec => l_batch_step_rec

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

4991: END IF;
4992:
4993: /* Check for phantom batch */
4994: IF NVL (l_batch_header_rec.parentline_id, 0) > 0 THEN
4995: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
4996: RAISE fnd_api.g_exc_error;
4997: END IF;
4998: /* Check for migrated batch */
4999: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN

Line 5000: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');

4996: RAISE fnd_api.g_exc_error;
4997: END IF;
4998: /* Check for migrated batch */
4999: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5000: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5001: RAISE fnd_api.g_exc_error;
5002: END IF;
5003:
5004: gme_common_pvt.g_error_count := 0;

Line 5004: gme_common_pvt.g_error_count := 0;

5000: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5001: RAISE fnd_api.g_exc_error;
5002: END IF;
5003:
5004: gme_common_pvt.g_error_count := 0;
5005: gme_common_pvt.g_setup_done :=
5006: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5007: ,p_org_code => p_org_code);
5008:

Line 5005: gme_common_pvt.g_setup_done :=

5001: RAISE fnd_api.g_exc_error;
5002: END IF;
5003:
5004: gme_common_pvt.g_error_count := 0;
5005: gme_common_pvt.g_setup_done :=
5006: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5007: ,p_org_code => p_org_code);
5008:
5009: IF NOT gme_common_pvt.g_setup_done THEN

Line 5006: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id

5002: END IF;
5003:
5004: gme_common_pvt.g_error_count := 0;
5005: gme_common_pvt.g_setup_done :=
5006: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5007: ,p_org_code => p_org_code);
5008:
5009: IF NOT gme_common_pvt.g_setup_done THEN
5010: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5009: IF NOT gme_common_pvt.g_setup_done THEN

5005: gme_common_pvt.g_setup_done :=
5006: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5007: ,p_org_code => p_org_code);
5008:
5009: IF NOT gme_common_pvt.g_setup_done THEN
5010: IF (g_debug = gme_debug.g_log_statement) THEN
5011: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
5012: END IF;
5013: RAISE fnd_api.g_exc_error;

Line 5016: gme_common_pvt.g_organization_id;

5012: END IF;
5013: RAISE fnd_api.g_exc_error;
5014: ELSE
5015: l_batch_header_rec.organization_id :=
5016: gme_common_pvt.g_organization_id;
5017: END IF;
5018: x_batch_header_rec := l_batch_header_rec ;
5019: x_batch_step_rec := l_batch_step_rec;
5020: IF g_debug <= gme_debug.g_log_statement THEN

Line 5050: gme_common_pvt.count_and_get (x_count => x_message_count

5046: || SQLERRM);
5047: END IF;
5048: x_return_status := fnd_api.g_ret_sts_unexp_error;
5049: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5050: gme_common_pvt.count_and_get (x_count => x_message_count
5051: ,p_encoded => fnd_api.g_false
5052: ,x_data => x_message_list);
5053: END Validate_batch_step;
5054:

Line 5122: IF l_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_autobystep_release,

5118: END IF;
5119: RAISE error_fetch_batch_details;
5120: END IF;
5121:
5122: IF l_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_autobystep_release,
5123: gme_common_pvt.g_mtl_auto_release ) THEN
5124: /*default ing and prod dates to batch actual dated*/
5125: l_ing_trans_date := l_batch_header_rec.actual_start_date;
5126: l_prod_trans_date := l_batch_header_rec.actual_cmplt_date;

Line 5123: gme_common_pvt.g_mtl_auto_release ) THEN

5119: RAISE error_fetch_batch_details;
5120: END IF;
5121:
5122: IF l_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_autobystep_release,
5123: gme_common_pvt.g_mtl_auto_release ) THEN
5124: /*default ing and prod dates to batch actual dated*/
5125: l_ing_trans_date := l_batch_header_rec.actual_start_date;
5126: l_prod_trans_date := l_batch_header_rec.actual_cmplt_date;
5127:

Line 5128: IF l_material_detail_rec.release_type = gme_common_pvt.g_mtl_autobystep_release THEN

5124: /*default ing and prod dates to batch actual dated*/
5125: l_ing_trans_date := l_batch_header_rec.actual_start_date;
5126: l_prod_trans_date := l_batch_header_rec.actual_cmplt_date;
5127:
5128: IF l_material_detail_rec.release_type = gme_common_pvt.g_mtl_autobystep_release THEN
5129: /* check whether material line is associated to step */
5130: OPEN cur_get_associated_step (l_material_detail_rec.material_detail_id);
5131: FETCH cur_get_associated_step INTO l_batchstep_id;
5132: CLOSE cur_get_associated_step;

Line 5158: IF NOT gme_common_pvt.check_close_period(p_org_id => l_batch_header_rec.organization_id

5154: END IF;
5155: END IF; /*l_material_detail_rec.release_type*/
5156:
5157: /* check whether the date is in closed period or not */
5158: IF NOT gme_common_pvt.check_close_period(p_org_id => l_batch_header_rec.organization_id
5159: ,p_trans_date => l_trans_date) THEN
5160: l_trans_date := SYSDATE;
5161: END IF;
5162:

Line 5232: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 0 THEN

5228: l_start_date := p_start_date;
5229: l_cmplt_date := p_cmplt_date;
5230:
5231: --BAsed on the profile value 'GME:Validate plan dates' check the dates
5232: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 0 THEN
5233: /* Validate both planned dates against operation effectivity dates*/
5234: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5235: l_start_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_start_date) OR
5236: l_cmplt_date < l_oprn_rec.EFFECTIVE_START_DATE OR

Line 5238: gme_common_pvt.log_message('GME_DATES_EXCEED_OPER_VALIDTY');

5234: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5235: l_start_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_start_date) OR
5236: l_cmplt_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5237: l_cmplt_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_cmplt_date) THEN
5238: gme_common_pvt.log_message('GME_DATES_EXCEED_OPER_VALIDTY');
5239: RETURN FALSE;
5240: END IF;
5241: ELSE
5242: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR

Line 5244: gme_common_pvt.log_message('GME_DATES_EXCEED_OPER_VALIDTY');

5240: END IF;
5241: ELSE
5242: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5243: l_start_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_start_date) THEN
5244: gme_common_pvt.log_message('GME_DATES_EXCEED_OPER_VALIDTY');
5245: RETURN FALSE;
5246: END IF;
5247: END IF;
5248: RETURN TRUE;

Line 5256: END gme_common_pvt;

5252: RETURN FALSE;
5253:
5254: END check_oprn_effectivity_dates ;
5255:
5256: END gme_common_pvt;