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.61.12020000.4 2012/11/28 15:35:54 adeshmuk 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.61.12020000.4 2012/11/28 15:35:54 adeshmuk 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 120: RETURN gme_common_pvt.g_transaction_header_id;

116: FUNCTION get_txn_header_id
117: RETURN NUMBER
118: IS
119: BEGIN
120: RETURN gme_common_pvt.g_transaction_header_id;
121: END get_txn_header_id;
122:
123: PROCEDURE set_txn_header_id(p_txn_header_id NUMBER) IS
124: BEGIN

Line 125: gme_common_pvt.g_transaction_header_id := p_txn_header_id;

121: END get_txn_header_id;
122:
123: PROCEDURE set_txn_header_id(p_txn_header_id NUMBER) IS
124: BEGIN
125: gme_common_pvt.g_transaction_header_id := p_txn_header_id;
126: END set_txn_header_id;
127:
128: PROCEDURE reset_txn_header_id IS
129: BEGIN

Line 130: gme_common_pvt.g_transaction_header_id := NULL;

126: END set_txn_header_id;
127:
128: PROCEDURE reset_txn_header_id IS
129: BEGIN
130: gme_common_pvt.g_transaction_header_id := NULL;
131:
132: -- Bug 13881792 - Reset IB timestamp set global.
133: gme_common_pvt.g_ib_timestamp_set := 0;
134:

Line 133: gme_common_pvt.g_ib_timestamp_set := 0;

129: BEGIN
130: gme_common_pvt.g_transaction_header_id := NULL;
131:
132: -- Bug 13881792 - Reset IB timestamp set global.
133: gme_common_pvt.g_ib_timestamp_set := 0;
134:
135: END reset_txn_header_id;
136:
137: FUNCTION get_timestamp

Line 141: RETURN gme_common_pvt.g_timestamp;

137: FUNCTION get_timestamp
138: RETURN DATE
139: IS
140: BEGIN
141: RETURN gme_common_pvt.g_timestamp;
142: END get_timestamp;
143:
144: -- Bug 9938452 - renamed procedure set_move_to_temp_off to set_move_to_temp_toggle.
145: -- Also, added parameter to allow toggling of the global variable.

Line 150: gme_common_pvt.g_move_to_temp := fnd_api.g_true;

146: PROCEDURE set_move_to_temp_toggle(p_true IN NUMBER DEFAULT 0)
147: IS
148: BEGIN
149: IF p_true = 1 THEN
150: gme_common_pvt.g_move_to_temp := fnd_api.g_true;
151: ELSE
152: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
153: END IF;
154: END set_move_to_temp_toggle;

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

148: BEGIN
149: IF p_true = 1 THEN
150: gme_common_pvt.g_move_to_temp := fnd_api.g_true;
151: ELSE
152: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
153: END IF;
154: END set_move_to_temp_toggle;
155:
156: -- nsinghi bug#5176319. Added this proc.

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

159: gme_transactions_pvt.
160: */
161: PROCEDURE reset_txn_hdr_tbl IS
162: BEGIN
163: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
164: gme_common_pvt.g_mat_txn_hdr_tbl.DELETE;
165: END IF;
166: END reset_txn_hdr_tbl;
167:

Line 164: gme_common_pvt.g_mat_txn_hdr_tbl.DELETE;

160: */
161: PROCEDURE reset_txn_hdr_tbl IS
162: BEGIN
163: IF gme_common_pvt.g_mat_txn_hdr_tbl.COUNT > 0 THEN
164: gme_common_pvt.g_mat_txn_hdr_tbl.DELETE;
165: END IF;
166: END reset_txn_hdr_tbl;
167:
168: PROCEDURE log_message (

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

246: || '/'
247: || p_token6_value);
248: END IF;
249:
250: gme_common_pvt.g_error_count := gme_common_pvt.g_error_count + 1;
251:
252: IF g_debug <= gme_debug.g_log_procedure THEN
253: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
254: END IF;

Line 312: IF (gme_common_pvt.g_setup_done) THEN

308: END IF;
309:
310: -- Bug 15847423
311: -- Return true only if the org_id passed is same as the g_organization_id.
312: IF (gme_common_pvt.g_setup_done) THEN
313: IF NVL(p_org_id,-999) = gme_common_pvt.g_organization_id THEN
314: RETURN TRUE;
315: END IF;
316: END IF;

Line 313: IF NVL(p_org_id,-999) = gme_common_pvt.g_organization_id THEN

309:
310: -- Bug 15847423
311: -- Return true only if the org_id passed is same as the g_organization_id.
312: IF (gme_common_pvt.g_setup_done) THEN
313: IF NVL(p_org_id,-999) = gme_common_pvt.g_organization_id THEN
314: RETURN TRUE;
315: END IF;
316: END IF;
317:

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

314: RETURN TRUE;
315: END IF;
316: END IF;
317:
318: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );
319: gme_common_pvt.g_user_ident :=
320: TO_NUMBER (fnd_profile.VALUE ('USER_ID') );
321:
322: OPEN cur_get_user (gme_common_pvt.g_user_ident);

Line 319: gme_common_pvt.g_user_ident :=

315: END IF;
316: END IF;
317:
318: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );
319: gme_common_pvt.g_user_ident :=
320: TO_NUMBER (fnd_profile.VALUE ('USER_ID') );
321:
322: OPEN cur_get_user (gme_common_pvt.g_user_ident);
323:

Line 322: OPEN cur_get_user (gme_common_pvt.g_user_ident);

318: gme_common_pvt.g_login_id := TO_NUMBER (fnd_profile.VALUE ('LOGIN_ID') );
319: gme_common_pvt.g_user_ident :=
320: TO_NUMBER (fnd_profile.VALUE ('USER_ID') );
321:
322: OPEN cur_get_user (gme_common_pvt.g_user_ident);
323:
324: FETCH cur_get_user
325: INTO l_dummy;
326:

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

330: END IF;
331:
332: CLOSE cur_get_user;
333:
334: IF NVL (gme_common_pvt.g_user_ident, -1) = -1 THEN
335: log_message ('GME_API_INVALID_USER_NAME'
336: ,'USER_NAME'
337: ,gme_common_pvt.g_user_name);
338: RAISE missing_profile_option;

Line 337: ,gme_common_pvt.g_user_name);

333:
334: IF NVL (gme_common_pvt.g_user_ident, -1) = -1 THEN
335: log_message ('GME_API_INVALID_USER_NAME'
336: ,'USER_NAME'
337: ,gme_common_pvt.g_user_name);
338: RAISE missing_profile_option;
339: END IF;
340:
341: OPEN cur_get_inv_params (p_org_id, p_org_code);

Line 344: INTO gme_common_pvt.g_organization_code

340:
341: OPEN cur_get_inv_params (p_org_id, p_org_code);
342:
343: FETCH cur_get_inv_params
344: INTO gme_common_pvt.g_organization_code
345: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
346: ,gme_common_pvt.g_org_locator_control
347: ,gme_common_pvt.g_organization_id;
348:

Line 345: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv

341: OPEN cur_get_inv_params (p_org_id, p_org_code);
342:
343: FETCH cur_get_inv_params
344: INTO gme_common_pvt.g_organization_code
345: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
346: ,gme_common_pvt.g_org_locator_control
347: ,gme_common_pvt.g_organization_id;
348:
349: IF (cur_get_inv_params%NOTFOUND) THEN

Line 346: ,gme_common_pvt.g_org_locator_control

342:
343: FETCH cur_get_inv_params
344: INTO gme_common_pvt.g_organization_code
345: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
346: ,gme_common_pvt.g_org_locator_control
347: ,gme_common_pvt.g_organization_id;
348:
349: IF (cur_get_inv_params%NOTFOUND) THEN
350: CLOSE cur_get_inv_params;

Line 347: ,gme_common_pvt.g_organization_id;

343: FETCH cur_get_inv_params
344: INTO gme_common_pvt.g_organization_code
345: ,gme_common_pvt.g_calendar_code, gme_common_pvt.g_allow_neg_inv
346: ,gme_common_pvt.g_org_locator_control
347: ,gme_common_pvt.g_organization_id;
348:
349: IF (cur_get_inv_params%NOTFOUND) THEN
350: CLOSE cur_get_inv_params;
351:

Line 358: (p_orgn_id => gme_common_pvt.g_organization_id

354:
355: CLOSE cur_get_inv_params;
356:
357: gmd_api_grp.fetch_parm_values
358: (p_orgn_id => gme_common_pvt.g_organization_id
359: ,x_out_rec => l_gmd_params_rec
360: ,x_return_status => l_return_status);
361:
362: /*Assign the gmd params values to package variables */

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

360: ,x_return_status => l_return_status);
361:
362: /*Assign the gmd params values to package variables */
363: IF l_return_status = fnd_api.g_ret_sts_success THEN
364: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
365: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
366: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
368: gme_common_pvt.g_byprod_active :=

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

361:
362: /*Assign the gmd params values to package variables */
363: IF l_return_status = fnd_api.g_ret_sts_success THEN
364: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
365: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
366: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
368: gme_common_pvt.g_byprod_active :=
369: l_gmd_params_rec.gmd_byproduct_active;

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

362: /*Assign the gmd params values to package variables */
363: IF l_return_status = fnd_api.g_ret_sts_success THEN
364: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
365: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
366: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
368: gme_common_pvt.g_byprod_active :=
369: l_gmd_params_rec.gmd_byproduct_active;
370: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;

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

363: IF l_return_status = fnd_api.g_ret_sts_success THEN
364: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
365: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
366: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
368: gme_common_pvt.g_byprod_active :=
369: l_gmd_params_rec.gmd_byproduct_active;
370: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
371: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;

Line 368: gme_common_pvt.g_byprod_active :=

364: gme_common_pvt.g_plant_ind := l_gmd_params_rec.plant_ind;
365: gme_common_pvt.g_lab_ind := l_gmd_params_rec.lab_ind;
366: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
368: gme_common_pvt.g_byprod_active :=
369: l_gmd_params_rec.gmd_byproduct_active;
370: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
371: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;
372: ELSE

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

366: gme_common_pvt.g_yield_type := l_gmd_params_rec.fm_yield_type;
367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
368: gme_common_pvt.g_byprod_active :=
369: l_gmd_params_rec.gmd_byproduct_active;
370: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
371: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;
372: ELSE
373: RAISE gmd_params_not_defined;
374: END IF;

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

367: gme_common_pvt.g_release_type := l_gmd_params_rec.steprelease_type;
368: gme_common_pvt.g_byprod_active :=
369: l_gmd_params_rec.gmd_byproduct_active;
370: gme_common_pvt.g_mass_um_type := l_gmd_params_rec.gmd_mass_um_type;
371: gme_common_pvt.g_volume_um_type := l_gmd_params_rec.gmd_volume_um_type;
372: ELSE
373: RAISE gmd_params_not_defined;
374: END IF;
375:

Line 376: OPEN cur_get_gme_params (gme_common_pvt.g_organization_id);

372: ELSE
373: RAISE gmd_params_not_defined;
374: END IF;
375:
376: OPEN cur_get_gme_params (gme_common_pvt.g_organization_id);
377:
378: FETCH cur_get_gme_params
379: INTO l_cur_get_org_params;
380:

Line 389: gme_common_pvt.g_auto_consume_supply_sub_only :=

385: END IF;
386:
387: CLOSE cur_get_gme_params;
388:
389: gme_common_pvt.g_auto_consume_supply_sub_only :=
390: l_cur_get_org_params.auto_consume_supply_sub_only;
391: gme_common_pvt.g_subinv_loc_ind :=
392: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
393: gme_common_pvt.g_supply_subinventory :=

Line 391: gme_common_pvt.g_subinv_loc_ind :=

387: CLOSE cur_get_gme_params;
388:
389: gme_common_pvt.g_auto_consume_supply_sub_only :=
390: l_cur_get_org_params.auto_consume_supply_sub_only;
391: gme_common_pvt.g_subinv_loc_ind :=
392: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
393: gme_common_pvt.g_supply_subinventory :=
394: l_cur_get_org_params.supply_subinventory;
395: gme_common_pvt.g_supply_locator_id :=

Line 393: gme_common_pvt.g_supply_subinventory :=

389: gme_common_pvt.g_auto_consume_supply_sub_only :=
390: l_cur_get_org_params.auto_consume_supply_sub_only;
391: gme_common_pvt.g_subinv_loc_ind :=
392: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
393: gme_common_pvt.g_supply_subinventory :=
394: l_cur_get_org_params.supply_subinventory;
395: gme_common_pvt.g_supply_locator_id :=
396: l_cur_get_org_params.supply_locator_id;
397: gme_common_pvt.g_yield_subinventory :=

Line 395: gme_common_pvt.g_supply_locator_id :=

391: gme_common_pvt.g_subinv_loc_ind :=
392: l_cur_get_org_params.subinv_loc_ind; --Bug#5663458
393: gme_common_pvt.g_supply_subinventory :=
394: l_cur_get_org_params.supply_subinventory;
395: gme_common_pvt.g_supply_locator_id :=
396: l_cur_get_org_params.supply_locator_id;
397: gme_common_pvt.g_yield_subinventory :=
398: l_cur_get_org_params.yield_subinventory;
399: gme_common_pvt.g_yield_locator_id :=

Line 397: gme_common_pvt.g_yield_subinventory :=

393: gme_common_pvt.g_supply_subinventory :=
394: l_cur_get_org_params.supply_subinventory;
395: gme_common_pvt.g_supply_locator_id :=
396: l_cur_get_org_params.supply_locator_id;
397: gme_common_pvt.g_yield_subinventory :=
398: l_cur_get_org_params.yield_subinventory;
399: gme_common_pvt.g_yield_locator_id :=
400: l_cur_get_org_params.yield_locator_id;
401: gme_common_pvt.g_delete_material_ind :=

Line 399: gme_common_pvt.g_yield_locator_id :=

395: gme_common_pvt.g_supply_locator_id :=
396: l_cur_get_org_params.supply_locator_id;
397: gme_common_pvt.g_yield_subinventory :=
398: l_cur_get_org_params.yield_subinventory;
399: gme_common_pvt.g_yield_locator_id :=
400: l_cur_get_org_params.yield_locator_id;
401: gme_common_pvt.g_delete_material_ind :=
402: l_cur_get_org_params.delete_material_ind;
403: gme_common_pvt.g_validate_plan_dates_ind :=

Line 401: gme_common_pvt.g_delete_material_ind :=

397: gme_common_pvt.g_yield_subinventory :=
398: l_cur_get_org_params.yield_subinventory;
399: gme_common_pvt.g_yield_locator_id :=
400: l_cur_get_org_params.yield_locator_id;
401: gme_common_pvt.g_delete_material_ind :=
402: l_cur_get_org_params.delete_material_ind;
403: gme_common_pvt.g_validate_plan_dates_ind :=
404: l_cur_get_org_params.validate_plan_dates_ind;
405: --Bug#5111078

Line 403: gme_common_pvt.g_validate_plan_dates_ind :=

399: gme_common_pvt.g_yield_locator_id :=
400: l_cur_get_org_params.yield_locator_id;
401: gme_common_pvt.g_delete_material_ind :=
402: l_cur_get_org_params.delete_material_ind;
403: gme_common_pvt.g_validate_plan_dates_ind :=
404: l_cur_get_org_params.validate_plan_dates_ind;
405: --Bug#5111078
406: gme_common_pvt.g_ib_factor_ind :=
407: l_cur_get_org_params.ib_factor_ind;

Line 406: gme_common_pvt.g_ib_factor_ind :=

402: l_cur_get_org_params.delete_material_ind;
403: gme_common_pvt.g_validate_plan_dates_ind :=
404: l_cur_get_org_params.validate_plan_dates_ind;
405: --Bug#5111078
406: gme_common_pvt.g_ib_factor_ind :=
407: l_cur_get_org_params.ib_factor_ind;
408: --nsinghi bug#5674398 Added the global variable for ingr subs date type
409: -- Default it to Material Requirement Date as in R12, default ingr sub happens using mat req date.
410: gme_common_pvt.g_ingr_sub_date :=

Line 410: gme_common_pvt.g_ingr_sub_date :=

406: gme_common_pvt.g_ib_factor_ind :=
407: l_cur_get_org_params.ib_factor_ind;
408: --nsinghi bug#5674398 Added the global variable for ingr subs date type
409: -- Default it to Material Requirement Date as in R12, default ingr sub happens using mat req date.
410: gme_common_pvt.g_ingr_sub_date :=
411: NVL(l_cur_get_org_params.ingr_sub_date, 2);
412:
413: gme_common_pvt.g_display_unconsumed_material :=
414: l_cur_get_org_params.display_unconsumed_material;

Line 413: gme_common_pvt.g_display_unconsumed_material :=

409: -- Default it to Material Requirement Date as in R12, default ingr sub happens using mat req date.
410: gme_common_pvt.g_ingr_sub_date :=
411: NVL(l_cur_get_org_params.ingr_sub_date, 2);
412:
413: gme_common_pvt.g_display_unconsumed_material :=
414: l_cur_get_org_params.display_unconsumed_material;
415: gme_common_pvt.g_step_controls_batch_sts_ind :=
416: l_cur_get_org_params.step_controls_batch_sts_ind;
417: gme_common_pvt.g_backflush_rsrc_usg_ind :=

Line 415: gme_common_pvt.g_step_controls_batch_sts_ind :=

411: NVL(l_cur_get_org_params.ingr_sub_date, 2);
412:
413: gme_common_pvt.g_display_unconsumed_material :=
414: l_cur_get_org_params.display_unconsumed_material;
415: gme_common_pvt.g_step_controls_batch_sts_ind :=
416: l_cur_get_org_params.step_controls_batch_sts_ind;
417: gme_common_pvt.g_backflush_rsrc_usg_ind :=
418: l_cur_get_org_params.backflush_rsrc_usg_ind;
419: gme_common_pvt.g_def_actual_rsrc_usg_ind :=

Line 417: gme_common_pvt.g_backflush_rsrc_usg_ind :=

413: gme_common_pvt.g_display_unconsumed_material :=
414: l_cur_get_org_params.display_unconsumed_material;
415: gme_common_pvt.g_step_controls_batch_sts_ind :=
416: l_cur_get_org_params.step_controls_batch_sts_ind;
417: gme_common_pvt.g_backflush_rsrc_usg_ind :=
418: l_cur_get_org_params.backflush_rsrc_usg_ind;
419: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
420: l_cur_get_org_params.def_actual_rsrc_usg_ind;
421: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=

Line 419: gme_common_pvt.g_def_actual_rsrc_usg_ind :=

415: gme_common_pvt.g_step_controls_batch_sts_ind :=
416: l_cur_get_org_params.step_controls_batch_sts_ind;
417: gme_common_pvt.g_backflush_rsrc_usg_ind :=
418: l_cur_get_org_params.backflush_rsrc_usg_ind;
419: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
420: l_cur_get_org_params.def_actual_rsrc_usg_ind;
421: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
422: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
423: gme_common_pvt.g_allow_qty_below_min_ind :=

Line 421: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=

417: gme_common_pvt.g_backflush_rsrc_usg_ind :=
418: l_cur_get_org_params.backflush_rsrc_usg_ind;
419: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
420: l_cur_get_org_params.def_actual_rsrc_usg_ind;
421: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
422: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
423: gme_common_pvt.g_allow_qty_below_min_ind :=
424: l_cur_get_org_params.allow_qty_below_min_ind;
425: gme_common_pvt.g_display_non_work_days_ind :=

Line 423: gme_common_pvt.g_allow_qty_below_min_ind :=

419: gme_common_pvt.g_def_actual_rsrc_usg_ind :=
420: l_cur_get_org_params.def_actual_rsrc_usg_ind;
421: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
422: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
423: gme_common_pvt.g_allow_qty_below_min_ind :=
424: l_cur_get_org_params.allow_qty_below_min_ind;
425: gme_common_pvt.g_display_non_work_days_ind :=
426: l_cur_get_org_params.display_non_work_days_ind;
427: gme_common_pvt.g_check_shortages_ind :=

Line 425: gme_common_pvt.g_display_non_work_days_ind :=

421: gme_common_pvt.g_calc_interim_rsrc_usg_ind :=
422: l_cur_get_org_params.calc_interim_rsrc_usg_ind;
423: gme_common_pvt.g_allow_qty_below_min_ind :=
424: l_cur_get_org_params.allow_qty_below_min_ind;
425: gme_common_pvt.g_display_non_work_days_ind :=
426: l_cur_get_org_params.display_non_work_days_ind;
427: gme_common_pvt.g_check_shortages_ind :=
428: l_cur_get_org_params.check_shortages_ind;
429: gme_common_pvt.g_copy_formula_text_ind :=

Line 427: gme_common_pvt.g_check_shortages_ind :=

423: gme_common_pvt.g_allow_qty_below_min_ind :=
424: l_cur_get_org_params.allow_qty_below_min_ind;
425: gme_common_pvt.g_display_non_work_days_ind :=
426: l_cur_get_org_params.display_non_work_days_ind;
427: gme_common_pvt.g_check_shortages_ind :=
428: l_cur_get_org_params.check_shortages_ind;
429: gme_common_pvt.g_copy_formula_text_ind :=
430: l_cur_get_org_params.copy_formula_text_ind;
431: gme_common_pvt.g_copy_routing_text_ind :=

Line 429: gme_common_pvt.g_copy_formula_text_ind :=

425: gme_common_pvt.g_display_non_work_days_ind :=
426: l_cur_get_org_params.display_non_work_days_ind;
427: gme_common_pvt.g_check_shortages_ind :=
428: l_cur_get_org_params.check_shortages_ind;
429: gme_common_pvt.g_copy_formula_text_ind :=
430: l_cur_get_org_params.copy_formula_text_ind;
431: gme_common_pvt.g_copy_routing_text_ind :=
432: l_cur_get_org_params.copy_routing_text_ind;
433: gme_common_pvt.g_create_high_level_resv_ind :=

Line 431: gme_common_pvt.g_copy_routing_text_ind :=

427: gme_common_pvt.g_check_shortages_ind :=
428: l_cur_get_org_params.check_shortages_ind;
429: gme_common_pvt.g_copy_formula_text_ind :=
430: l_cur_get_org_params.copy_formula_text_ind;
431: gme_common_pvt.g_copy_routing_text_ind :=
432: l_cur_get_org_params.copy_routing_text_ind;
433: gme_common_pvt.g_create_high_level_resv_ind :=
434: l_cur_get_org_params.create_high_level_resv_ind;
435: gme_common_pvt.g_create_move_orders_ind :=

Line 433: gme_common_pvt.g_create_high_level_resv_ind :=

429: gme_common_pvt.g_copy_formula_text_ind :=
430: l_cur_get_org_params.copy_formula_text_ind;
431: gme_common_pvt.g_copy_routing_text_ind :=
432: l_cur_get_org_params.copy_routing_text_ind;
433: gme_common_pvt.g_create_high_level_resv_ind :=
434: l_cur_get_org_params.create_high_level_resv_ind;
435: gme_common_pvt.g_create_move_orders_ind :=
436: l_cur_get_org_params.create_move_orders_ind;
437: gme_common_pvt.g_reservation_timefence :=

Line 435: gme_common_pvt.g_create_move_orders_ind :=

431: gme_common_pvt.g_copy_routing_text_ind :=
432: l_cur_get_org_params.copy_routing_text_ind;
433: gme_common_pvt.g_create_high_level_resv_ind :=
434: l_cur_get_org_params.create_high_level_resv_ind;
435: gme_common_pvt.g_create_move_orders_ind :=
436: l_cur_get_org_params.create_move_orders_ind;
437: gme_common_pvt.g_reservation_timefence :=
438: l_cur_get_org_params.reservation_timefence;
439: gme_common_pvt.g_move_order_timefence :=

Line 437: gme_common_pvt.g_reservation_timefence :=

433: gme_common_pvt.g_create_high_level_resv_ind :=
434: l_cur_get_org_params.create_high_level_resv_ind;
435: gme_common_pvt.g_create_move_orders_ind :=
436: l_cur_get_org_params.create_move_orders_ind;
437: gme_common_pvt.g_reservation_timefence :=
438: l_cur_get_org_params.reservation_timefence;
439: gme_common_pvt.g_move_order_timefence :=
440: l_cur_get_org_params.move_order_timefence;
441: gme_common_pvt.g_batch_doc_numbering :=

Line 439: gme_common_pvt.g_move_order_timefence :=

435: gme_common_pvt.g_create_move_orders_ind :=
436: l_cur_get_org_params.create_move_orders_ind;
437: gme_common_pvt.g_reservation_timefence :=
438: l_cur_get_org_params.reservation_timefence;
439: gme_common_pvt.g_move_order_timefence :=
440: l_cur_get_org_params.move_order_timefence;
441: gme_common_pvt.g_batch_doc_numbering :=
442: l_cur_get_org_params.batch_doc_numbering;
443: gme_common_pvt.g_batch_no_last_assigned :=

Line 441: gme_common_pvt.g_batch_doc_numbering :=

437: gme_common_pvt.g_reservation_timefence :=
438: l_cur_get_org_params.reservation_timefence;
439: gme_common_pvt.g_move_order_timefence :=
440: l_cur_get_org_params.move_order_timefence;
441: gme_common_pvt.g_batch_doc_numbering :=
442: l_cur_get_org_params.batch_doc_numbering;
443: gme_common_pvt.g_batch_no_last_assigned :=
444: l_cur_get_org_params.batch_no_last_assigned;
445: gme_common_pvt.g_fpo_doc_numbering :=

Line 443: gme_common_pvt.g_batch_no_last_assigned :=

439: gme_common_pvt.g_move_order_timefence :=
440: l_cur_get_org_params.move_order_timefence;
441: gme_common_pvt.g_batch_doc_numbering :=
442: l_cur_get_org_params.batch_doc_numbering;
443: gme_common_pvt.g_batch_no_last_assigned :=
444: l_cur_get_org_params.batch_no_last_assigned;
445: gme_common_pvt.g_fpo_doc_numbering :=
446: l_cur_get_org_params.fpo_doc_numbering;
447: gme_common_pvt.g_fpo_no_last_assigned :=

Line 445: gme_common_pvt.g_fpo_doc_numbering :=

441: gme_common_pvt.g_batch_doc_numbering :=
442: l_cur_get_org_params.batch_doc_numbering;
443: gme_common_pvt.g_batch_no_last_assigned :=
444: l_cur_get_org_params.batch_no_last_assigned;
445: gme_common_pvt.g_fpo_doc_numbering :=
446: l_cur_get_org_params.fpo_doc_numbering;
447: gme_common_pvt.g_fpo_no_last_assigned :=
448: l_cur_get_org_params.fpo_no_last_assigned;
449: gme_common_pvt.g_rule_based_resv_horizon :=

Line 447: gme_common_pvt.g_fpo_no_last_assigned :=

443: gme_common_pvt.g_batch_no_last_assigned :=
444: l_cur_get_org_params.batch_no_last_assigned;
445: gme_common_pvt.g_fpo_doc_numbering :=
446: l_cur_get_org_params.fpo_doc_numbering;
447: gme_common_pvt.g_fpo_no_last_assigned :=
448: l_cur_get_org_params.fpo_no_last_assigned;
449: gme_common_pvt.g_rule_based_resv_horizon :=
450: l_cur_get_org_params.rule_based_resv_horizon;
451: gme_common_pvt.g_hour_uom_code :=

Line 449: gme_common_pvt.g_rule_based_resv_horizon :=

445: gme_common_pvt.g_fpo_doc_numbering :=
446: l_cur_get_org_params.fpo_doc_numbering;
447: gme_common_pvt.g_fpo_no_last_assigned :=
448: l_cur_get_org_params.fpo_no_last_assigned;
449: gme_common_pvt.g_rule_based_resv_horizon :=
450: l_cur_get_org_params.rule_based_resv_horizon;
451: gme_common_pvt.g_hour_uom_code :=
452: fnd_profile.VALUE ('BOM:HOUR_UOM_CODE');
453:

Line 451: gme_common_pvt.g_hour_uom_code :=

447: gme_common_pvt.g_fpo_no_last_assigned :=
448: l_cur_get_org_params.fpo_no_last_assigned;
449: gme_common_pvt.g_rule_based_resv_horizon :=
450: l_cur_get_org_params.rule_based_resv_horizon;
451: gme_common_pvt.g_hour_uom_code :=
452: fnd_profile.VALUE ('BOM:HOUR_UOM_CODE');
453:
454: IF g_debug <= gme_debug.g_log_procedure THEN
455: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

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

469: RETURN FALSE;
470: WHEN gmd_params_not_defined THEN
471: RETURN FALSE;
472: WHEN gme_params_not_defined THEN
473: gme_common_pvt.log_message ('GME_DEFINE_GME_PARAMETERS');
474: RETURN FALSE;
475: WHEN OTHERS THEN
476: IF g_debug <= gme_debug.g_log_unexpected THEN
477: gme_debug.put_line ( 'When others exception in '

Line 493: gme_common_pvt.g_timestamp := SYSDATE;

489: PROCEDURE set_timestamp
490: IS
491: l_api_name CONSTANT VARCHAR2 (30) := 'set_timestamp';
492: BEGIN
493: gme_common_pvt.g_timestamp := SYSDATE;
494: EXCEPTION
495: WHEN OTHERS THEN
496: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
497:

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

508: PROCEDURE set_who
509: IS
510: l_api_name CONSTANT VARCHAR2 (30) := 'set_who';
511: BEGIN
512: gme_common_pvt.g_user_ident := fnd_profile.VALUE ('USER_ID');
513: gme_common_pvt.g_login_id := fnd_profile.VALUE ('LOGIN_ID');
514: gme_common_pvt.set_timestamp;
515: EXCEPTION
516: WHEN OTHERS THEN

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

509: IS
510: l_api_name CONSTANT VARCHAR2 (30) := 'set_who';
511: BEGIN
512: gme_common_pvt.g_user_ident := fnd_profile.VALUE ('USER_ID');
513: gme_common_pvt.g_login_id := fnd_profile.VALUE ('LOGIN_ID');
514: gme_common_pvt.set_timestamp;
515: EXCEPTION
516: WHEN OTHERS THEN
517: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 514: gme_common_pvt.set_timestamp;

510: l_api_name CONSTANT VARCHAR2 (30) := 'set_who';
511: BEGIN
512: gme_common_pvt.g_user_ident := fnd_profile.VALUE ('USER_ID');
513: gme_common_pvt.g_login_id := fnd_profile.VALUE ('LOGIN_ID');
514: gme_common_pvt.set_timestamp;
515: EXCEPTION
516: WHEN OTHERS THEN
517: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
518:

Line 569: IF gme_common_pvt.g_user_ident IS NULL THEN

565: BEGIN
566: /* Set the return status to success initially */
567: x_return_status := fnd_api.g_ret_sts_success;
568:
569: IF gme_common_pvt.g_user_ident IS NULL THEN
570: set_who;
571: END IF;
572:
573: x_user_ident := gme_common_pvt.g_user_ident;

Line 573: x_user_ident := gme_common_pvt.g_user_ident;

569: IF gme_common_pvt.g_user_ident IS NULL THEN
570: set_who;
571: END IF;
572:
573: x_user_ident := gme_common_pvt.g_user_ident;
574: x_login_id := gme_common_pvt.g_login_id;
575: x_timestamp := gme_common_pvt.g_timestamp;
576: EXCEPTION
577: WHEN OTHERS THEN

Line 574: x_login_id := gme_common_pvt.g_login_id;

570: set_who;
571: END IF;
572:
573: x_user_ident := gme_common_pvt.g_user_ident;
574: x_login_id := gme_common_pvt.g_login_id;
575: x_timestamp := gme_common_pvt.g_timestamp;
576: EXCEPTION
577: WHEN OTHERS THEN
578: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 575: x_timestamp := gme_common_pvt.g_timestamp;

571: END IF;
572:
573: x_user_ident := gme_common_pvt.g_user_ident;
574: x_login_id := gme_common_pvt.g_login_id;
575: x_timestamp := gme_common_pvt.g_timestamp;
576: EXCEPTION
577: WHEN OTHERS THEN
578: x_return_status := fnd_api.g_ret_sts_unexp_error;
579: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 643: IF NOT (gme_common_pvt.check_subinventory

639:
640: CLOSE cur_supply_defaults;
641:
642: IF (x_subinventory IS NOT NULL) THEN
643: IF NOT (gme_common_pvt.check_subinventory
644: (p_organization_id => p_organization_id
645: ,p_subinventory => x_subinventory
646: ,p_inventory_item_id => p_inventory_item_id
647: ,p_restrict_subinv => l_restrict_subinv) ) THEN

Line 662: gme_common_pvt.eff_locator_control

658:
659: CLOSE cur_sub_control;
660:
661: l_eff_locator_control :=
662: gme_common_pvt.eff_locator_control
663: (p_organization_id => p_organization_id
664: ,p_org_control => gme_common_pvt.g_org_locator_control
665: ,p_subinventory => x_subinventory
666: ,p_sub_control => l_sub_locator_type

Line 664: ,p_org_control => gme_common_pvt.g_org_locator_control

660:
661: l_eff_locator_control :=
662: gme_common_pvt.eff_locator_control
663: (p_organization_id => p_organization_id
664: ,p_org_control => gme_common_pvt.g_org_locator_control
665: ,p_subinventory => x_subinventory
666: ,p_sub_control => l_sub_locator_type
667: ,p_item_control => l_item_loc_control
668: ,p_item_loc_restrict => l_restrict_locators

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

665: ,p_subinventory => x_subinventory
666: ,p_sub_control => l_sub_locator_type
667: ,p_item_control => l_item_loc_control
668: ,p_item_loc_restrict => l_restrict_locators
669: ,p_action => gme_common_pvt.g_ing_issue_txn_action);
670:
671: IF (l_eff_locator_control = 1) THEN
672: x_locator_id := NULL;
673: RETURN;

Line 684: IF NOT (gme_common_pvt.check_locator

680: INTO l_sub_locator_type;
681:
682: CLOSE cur_sub_control;
683:
684: IF NOT (gme_common_pvt.check_locator
685: (p_organization_id => p_organization_id
686: ,p_locator_id => x_locator_id
687: ,p_subinventory => x_subinventory
688: ,p_inventory_item_id => p_inventory_item_id

Line 689: ,p_org_control => gme_common_pvt.g_org_locator_control

685: (p_organization_id => p_organization_id
686: ,p_locator_id => x_locator_id
687: ,p_subinventory => x_subinventory
688: ,p_inventory_item_id => p_inventory_item_id
689: ,p_org_control => gme_common_pvt.g_org_locator_control
690: ,p_sub_control => l_sub_locator_type
691: ,p_item_control => l_item_loc_control
692: ,p_item_loc_restrict => l_restrict_locators
693: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

Line 693: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

689: ,p_org_control => gme_common_pvt.g_org_locator_control
690: ,p_sub_control => l_sub_locator_type
691: ,p_item_control => l_item_loc_control
692: ,p_item_loc_restrict => l_restrict_locators
693: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
694: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
695: x_locator_id := NULL;
696: END IF;
697: END IF;

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

690: ,p_sub_control => l_sub_locator_type
691: ,p_item_control => l_item_loc_control
692: ,p_item_loc_restrict => l_restrict_locators
693: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
694: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
695: x_locator_id := NULL;
696: END IF;
697: END IF;
698:

Line 770: IF NOT (gme_common_pvt.check_subinventory

766:
767: CLOSE cur_yield_defaults;
768:
769: IF (x_subinventory IS NOT NULL) THEN
770: IF NOT (gme_common_pvt.check_subinventory
771: (p_organization_id => p_organization_id
772: ,p_subinventory => x_subinventory
773: ,p_inventory_item_id => p_inventory_item_id
774: ,p_restrict_subinv => l_restrict_subinv) ) THEN

Line 782: l_txn_action := gme_common_pvt.g_prod_comp_txn_action;

778: END IF;
779: END IF;
780:
781: IF (p_line_type = g_line_type_prod) THEN
782: l_txn_action := gme_common_pvt.g_prod_comp_txn_action;
783: ELSIF (p_line_type = g_line_type_prod) THEN
784: l_txn_action := gme_common_pvt.g_byprod_comp_txn_action;
785: END IF;
786:

Line 784: l_txn_action := gme_common_pvt.g_byprod_comp_txn_action;

780:
781: IF (p_line_type = g_line_type_prod) THEN
782: l_txn_action := gme_common_pvt.g_prod_comp_txn_action;
783: ELSIF (p_line_type = g_line_type_prod) THEN
784: l_txn_action := gme_common_pvt.g_byprod_comp_txn_action;
785: END IF;
786:
787: OPEN cur_sub_control (p_organization_id, x_subinventory);
788:

Line 795: gme_common_pvt.eff_locator_control

791:
792: CLOSE cur_sub_control;
793:
794: l_eff_locator_control :=
795: gme_common_pvt.eff_locator_control
796: (p_organization_id => p_organization_id
797: ,p_org_control => gme_common_pvt.g_org_locator_control
798: ,p_subinventory => x_subinventory
799: ,p_sub_control => l_sub_locator_type

Line 797: ,p_org_control => gme_common_pvt.g_org_locator_control

793:
794: l_eff_locator_control :=
795: gme_common_pvt.eff_locator_control
796: (p_organization_id => p_organization_id
797: ,p_org_control => gme_common_pvt.g_org_locator_control
798: ,p_subinventory => x_subinventory
799: ,p_sub_control => l_sub_locator_type
800: ,p_item_control => l_item_loc_control
801: ,p_item_loc_restrict => l_restrict_locators

Line 810: IF NOT (gme_common_pvt.check_locator

806: RETURN;
807: END IF;
808:
809: IF (x_locator_id IS NOT NULL) THEN
810: IF NOT (gme_common_pvt.check_locator
811: (p_organization_id => p_organization_id
812: ,p_locator_id => x_locator_id
813: ,p_subinventory => x_subinventory
814: ,p_inventory_item_id => p_inventory_item_id

Line 815: ,p_org_control => gme_common_pvt.g_org_locator_control

811: (p_organization_id => p_organization_id
812: ,p_locator_id => x_locator_id
813: ,p_subinventory => x_subinventory
814: ,p_inventory_item_id => p_inventory_item_id
815: ,p_org_control => gme_common_pvt.g_org_locator_control
816: ,p_sub_control => l_sub_locator_type
817: ,p_item_control => l_item_loc_control
818: ,p_item_loc_restrict => l_restrict_locators
819: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

Line 819: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv

815: ,p_org_control => gme_common_pvt.g_org_locator_control
816: ,p_sub_control => l_sub_locator_type
817: ,p_item_control => l_item_loc_control
818: ,p_item_loc_restrict => l_restrict_locators
819: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
820: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
821: x_locator_id := NULL;
822: END IF;
823: END IF;

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

816: ,p_sub_control => l_sub_locator_type
817: ,p_item_control => l_item_loc_control
818: ,p_item_loc_restrict => l_restrict_locators
819: ,p_org_neg_allowed => gme_common_pvt.g_allow_neg_inv
820: ,p_txn_action_id => gme_common_pvt.g_ing_issue_txn_action) ) THEN
821: x_locator_id := NULL;
822: END IF;
823: END IF;
824:

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

919: EXCEPTION
920: WHEN get_defaults_err THEN
921: x_return_status := l_return_status;
922: WHEN OTHERS THEN
923: gme_common_pvt.log_message ('GME_API_MATL_DTL_SETUP_FAILURE');
924:
925: IF g_debug <= gme_debug.g_log_unexpected THEN
926: gme_debug.put_line ( 'When others exception in '
927: || g_pkg_name

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

1057:
1058: CLOSE cur_get_info;
1059:
1060: IF l_recipe_id IS NULL THEN
1061: gme_common_pvt.log_message ('GME_INVALID_BATCH');
1062: RAISE expected_error;
1063: END IF;
1064: ELSIF p_validity_rule_id IS NOT NULL THEN
1065: -- Validate recipe validity rule

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

1072:
1073: CLOSE cur_get_info_from_validity;
1074:
1075: IF l_recipe_id IS NULL THEN
1076: gme_common_pvt.log_message ('GME_API_INVALID_RULE');
1077: RAISE expected_error;
1078: END IF;
1079: END IF;
1080:

Line 1176: ,PRECISION => gme_common_pvt.g_precision

1172:
1173: IF l_uom <> l_routing_class_uom THEN
1174: l_qty := inv_convert.inv_um_convert
1175: (item_id => l_item_id
1176: ,PRECISION => gme_common_pvt.g_precision
1177: ,from_quantity => l_total_output_qty_pre_scale
1178: ,from_unit => l_uom
1179: ,to_unit => l_routing_class_uom
1180: ,from_name => NULL

Line 1200: ,PRECISION => gme_common_pvt.g_precision

1196:
1197: IF l_routing_uom <> l_routing_class_uom THEN
1198: l_qty := inv_convert.inv_um_convert
1199: (item_id => 0
1200: ,PRECISION => gme_common_pvt.g_precision
1201: ,from_quantity => l_total_output_qty_scaled
1202: ,from_unit => l_routing_uom
1203: ,to_unit => l_routing_class_uom
1204: ,from_name => NULL

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

1324: END IF;
1325:
1326: x_batch_header_rec := p_batch_header_rec;
1327:
1328: IF (x_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_batch) THEN
1329: SELECT batch_doc_numbering, batch_no_last_assigned + 1
1330: INTO l_assignment_type, l_document_no
1331: FROM gme_parameters
1332: WHERE organization_id = x_batch_header_rec.organization_id

Line 1342: IF l_assignment_type = gme_common_pvt.g_auto_doc_numbering THEN

1338: WHERE organization_id = x_batch_header_rec.organization_id
1339: FOR UPDATE OF batch_no_last_assigned NOWAIT;
1340: END IF;
1341:
1342: IF l_assignment_type = gme_common_pvt.g_auto_doc_numbering THEN
1343: IF l_document_no IS NULL THEN
1344: RAISE invalid_doc_no;
1345: END IF;
1346:

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

1343: IF l_document_no IS NULL THEN
1344: RAISE invalid_doc_no;
1345: END IF;
1346:
1347: IF (x_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_batch) THEN
1348: UPDATE gme_parameters
1349: SET batch_no_last_assigned = batch_no_last_assigned + 1
1350: WHERE organization_id = p_batch_header_rec.organization_id;
1351: ELSE

Line 1373: gme_common_pvt.log_message ('GME_DOC_SEQ_LOCK'

1369: fnd_message.set_name ('GME', 'GME_INVALID_AUTO_DOC');
1370: fnd_msg_pub.ADD;
1371: ROLLBACK;
1372: WHEN app_exception.record_lock_exception THEN
1373: gme_common_pvt.log_message ('GME_DOC_SEQ_LOCK'
1374: ,'S1'
1375: ,p_batch_header_rec.organization_id);
1376: ROLLBACK;
1377: WHEN NO_DATA_FOUND THEN

Line 1457: x_start_date := gme_common_pvt.g_timestamp;

1453: x_cmplt_date := p_cmplt_date;
1454: ELSE
1455: -- if you get here, that means that a rule was found, but no dates were passed in...
1456: -- let's default start date to sysdate and work in the prod rule...
1457: x_start_date := gme_common_pvt.g_timestamp;
1458: x_cmplt_date := x_start_date + l_total_leadtime;
1459: END IF;
1460:
1461: IF g_debug <= gme_debug.g_log_procedure THEN

Line 1523: (gme_common_pvt.g_mtl_manual_release

1519:
1520: x_return_status := fnd_api.g_ret_sts_success;
1521:
1522: IF p_mtl_dtl_rec.release_type IN
1523: (gme_common_pvt.g_mtl_manual_release
1524: ,gme_common_pvt.g_mtl_incremental_release
1525: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1526: IF (p_batchstep_rec.batchstep_id IS NULL) THEN
1527: OPEN cur_get_associated_step (p_mtl_dtl_rec.material_detail_id);

Line 1524: ,gme_common_pvt.g_mtl_incremental_release

1520: x_return_status := fnd_api.g_ret_sts_success;
1521:
1522: IF p_mtl_dtl_rec.release_type IN
1523: (gme_common_pvt.g_mtl_manual_release
1524: ,gme_common_pvt.g_mtl_incremental_release
1525: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1526: IF (p_batchstep_rec.batchstep_id IS NULL) THEN
1527: OPEN cur_get_associated_step (p_mtl_dtl_rec.material_detail_id);
1528:

Line 1525: ,gme_common_pvt.g_mtl_autobystep_release) THEN

1521:
1522: IF p_mtl_dtl_rec.release_type IN
1523: (gme_common_pvt.g_mtl_manual_release
1524: ,gme_common_pvt.g_mtl_incremental_release
1525: ,gme_common_pvt.g_mtl_autobystep_release) THEN
1526: IF (p_batchstep_rec.batchstep_id IS NULL) THEN
1527: OPEN cur_get_associated_step (p_mtl_dtl_rec.material_detail_id);
1528:
1529: FETCH cur_get_associated_step

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

1548: l_step_start_date := p_batchstep_rec.plan_start_date;
1549: l_step_cmplt_date := p_batchstep_rec.plan_cmplt_date;
1550: END IF;
1551:
1552: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
1553: x_mtl_req_date := l_step_start_date;
1554: ELSE
1555: x_mtl_req_date := l_step_cmplt_date;
1556: END IF;

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

1567: l_batch_start_date := p_batch_header_rec.plan_start_date;
1568: l_batch_cmplt_date := p_batch_header_rec.plan_cmplt_date;
1569: END IF;
1570:
1571: IF p_mtl_dtl_rec.line_type = gme_common_pvt.g_line_type_ing THEN
1572: x_mtl_req_date := l_batch_start_date;
1573: ELSE
1574: x_mtl_req_date := l_batch_cmplt_date;
1575: END IF;

Line 1789: l_resource_ids gme_common_pvt.number_tab;

1785: WHERE r.batch_id = p_batch_id
1786: AND s.batch_id = p_batch_id
1787: AND s.batchstep_id = r.batchstep_id;
1788:
1789: l_resource_ids gme_common_pvt.number_tab;
1790: l_batch_step_resources gme_batch_step_resources%ROWTYPE;
1791: l_found NUMBER (5) DEFAULT 0;
1792: l_resources VARCHAR2 (2000);
1793: l_api_name CONSTANT VARCHAR2 (30) := 'resource_qty_below_capacity';

Line 1836: gme_common_pvt.log_message ('GME_API_RSRC_QTY_BELOW_CAP'

1832: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1833: END IF;
1834:
1835: IF l_found = 1 THEN
1836: gme_common_pvt.log_message ('GME_API_RSRC_QTY_BELOW_CAP'
1837: ,'RESOURCES'
1838: ,l_resources);
1839: RETURN TRUE;
1840: ELSE

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

2268:
2269: IF get_validity_rule%NOTFOUND THEN
2270: CLOSE get_validity_rule;
2271:
2272: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2273: RETURN FALSE;
2274: END IF;
2275:
2276: CLOSE get_validity_rule;

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

2276: CLOSE get_validity_rule;
2277:
2278: -- Bug 13811289 - Make sure this is valid for the specific organization.
2279: IF NVL(l_validity_rec.organization_id, p_organization_id) <> p_organization_id THEN
2280: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2281: RETURN FALSE;
2282: END IF;
2283:
2284: IF l_validity_rec.delete_mark = 1 THEN

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

2281: RETURN FALSE;
2282: END IF;
2283:
2284: IF l_validity_rec.delete_mark = 1 THEN
2285: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2286: RETURN FALSE;
2287: ELSIF l_validity_rec.inventory_item_id <> p_prim_product_id THEN
2288: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_PROD');
2289: RETURN FALSE;

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

2284: IF l_validity_rec.delete_mark = 1 THEN
2285: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
2286: RETURN FALSE;
2287: ELSIF l_validity_rec.inventory_item_id <> p_prim_product_id THEN
2288: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_PROD');
2289: RETURN FALSE;
2290: ELSIF p_creation_mode NOT IN ('OUTPUT', 'INPUT') THEN
2291: IF p_uom <> l_validity_rec.detail_uom THEN
2292: l_qty :=

Line 2295: ,PRECISION => gme_common_pvt.g_precision

2291: IF p_uom <> l_validity_rec.detail_uom THEN
2292: l_qty :=
2293: inv_convert.inv_um_convert
2294: (item_id => p_prim_product_id
2295: ,PRECISION => gme_common_pvt.g_precision
2296: ,from_quantity => p_qty
2297: ,from_unit => p_uom
2298: ,to_unit => l_validity_rec.detail_uom
2299: ,from_name => NULL

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

2309: l_qty := p_qty;
2310: END IF;
2311:
2312: IF l_qty < l_validity_rec.min_qty OR l_qty > l_validity_rec.max_qty THEN
2313: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_QTY');
2314: RETURN FALSE;
2315: END IF;
2316:
2317: l_qty := p_qty;

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

2319:
2320: IF p_object_type = 'F' /* FPO */ THEN
2321: IF l_validity_rec.recipe_use NOT IN
2322: (0, 1) /* Production , Planning */ THEN
2323: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');
2324: RETURN FALSE;
2325: END IF;
2326:
2327: /* BUG 5021736 added between logic */

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

2325: END IF;
2326:
2327: /* BUG 5021736 added between logic */
2328: IF NOT(l_validity_rec.validity_rule_status between 700 and 799 OR l_validity_rec.validity_rule_status between 900 and 999) THEN
2329: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_STAT');
2330: RETURN FALSE;
2331: END IF;
2332:
2333: l_recipe_use := 0;

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

2332:
2333: l_recipe_use := 0;
2334: ELSIF p_object_type = 'P' /* Production Batch */ THEN
2335: IF l_validity_rec.recipe_use <> 0 /* Production */ THEN
2336: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');
2337: RETURN FALSE;
2338: END IF;
2339: /* BUG 5021736 added between logic */
2340: 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 2341: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_STAT');

2337: RETURN FALSE;
2338: END IF;
2339: /* BUG 5021736 added between logic */
2340: IF NOT(l_validity_rec.validity_rule_status between 700 and 799 OR l_validity_rec.validity_rule_status between 900 and 999) THEN
2341: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_STAT');
2342: RETURN FALSE;
2343: END IF;
2344:
2345: l_recipe_use := 1;

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

2344:
2345: l_recipe_use := 1;
2346: ELSIF p_object_type = 'L' /* Lab Batch */ THEN
2347: IF l_validity_rec.recipe_use <> 0 /* Production */ THEN
2348: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_USE');
2349: RETURN FALSE;
2350: END IF;
2351: /* BUG 5021736 added between logic */
2352: IF NOT(l_validity_rec.validity_rule_status between 400 and 499 OR

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

2353: l_validity_rec.validity_rule_status between 500 and 599 OR
2354: l_validity_rec.validity_rule_status between 700 and 799 OR
2355: l_validity_rec.validity_rule_status between 900 and 999 OR
2356: l_validity_rec.validity_rule_status between 600 and 699 ) THEN
2357: gme_common_pvt.log_message('GME_INVALID_VALIDITY_RULE_STAT');
2358: RETURN FALSE;
2359: END IF;
2360:
2361: l_recipe_use := 1;

Line 2370: IF NOT gme_common_pvt.check_validity_rule_dates

2366: If both dates are not passed then assume both as sysdate and check */
2367: l_start_date := p_start_date;
2368: l_cmplt_date := p_cmplt_date;
2369:
2370: IF NOT gme_common_pvt.check_validity_rule_dates
2371: (p_validity_rule_id => p_validity_rule_id
2372: ,p_start_date => l_start_date
2373: ,p_cmplt_date => l_cmplt_date) THEN
2374: RETURN FALSE;

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

2453: fnd_message.set_token ('TO_UOM', l_to_uom);
2454: fnd_msg_pub.ADD;
2455: RETURN FALSE;
2456: WHEN validation_failure THEN
2457: gme_common_pvt.log_message ('GME_INVALID_VALIDITY_RULE_QTY');
2458: RETURN FALSE;
2459: WHEN OTHERS THEN
2460: IF g_debug <= gme_debug.g_log_unexpected THEN
2461: gme_debug.put_line ( 'When others exception in '

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

2475: ,p_batch_id IN NUMBER
2476: ,p_invoke_mode IN VARCHAR2
2477: ,p_tree_mode IN NUMBER
2478: ,x_return_status OUT NOCOPY VARCHAR2
2479: ,x_exception_tbl OUT NOCOPY gme_common_pvt.exceptions_tab) IS
2480: /* Bug 5212165 added line_no in the order by */
2481: CURSOR cur_get_materials IS
2482: SELECT d.*
2483: FROM gme_material_details d, mtl_system_items_b i

Line 2524: ,gme_common_pvt.g_ing_issue

2520: AND (p_invoke_mode = 'O' OR (subinventory_code = v_sub_code) )
2521: AND (inv_material_status_grp.is_status_applicable
2522: (NULL
2523: ,NULL
2524: ,gme_common_pvt.g_ing_issue
2525: ,NULL
2526: ,NULL
2527: ,v_org_id
2528: ,inventory_item_id

Line 2601: IF NOT (gme_common_pvt.g_setup_done) THEN

2597: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
2598: gme_debug.put_line ('p_tree_mode '||p_tree_mode);
2599: END IF;
2600: x_return_status := fnd_api.g_ret_sts_success;
2601: IF NOT (gme_common_pvt.g_setup_done) THEN
2602: IF NOT (gme_common_pvt.setup (p_org_id => p_organization_id) ) THEN
2603: RAISE setup_failure;
2604: END IF;
2605: END IF;

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

2598: gme_debug.put_line ('p_tree_mode '||p_tree_mode);
2599: END IF;
2600: x_return_status := fnd_api.g_ret_sts_success;
2601: IF NOT (gme_common_pvt.g_setup_done) THEN
2602: IF NOT (gme_common_pvt.setup (p_org_id => p_organization_id) ) THEN
2603: RAISE setup_failure;
2604: END IF;
2605: END IF;
2606:

Line 2656: ,PRECISION => gme_common_pvt.g_precision

2652: l_open_qty_prim := l_open_qty;
2653: ELSE
2654: l_temp_qty := inv_convert.inv_um_convert
2655: (item_id => l_mtl_dtl_rec.inventory_item_id
2656: ,PRECISION => gme_common_pvt.g_precision
2657: ,from_quantity => l_open_qty
2658: ,from_unit => l_mtl_dtl_rec.dtl_um
2659: ,to_unit => l_item_rec.primary_uom_code
2660: ,from_name => NULL

Line 2882: demand_Source_type_id = gme_common_pvt.g_txn_source_type)

2878: AND t.inventory_item_id = l_mtl_dtl_rec.inventory_item_id
2879: AND t.reservation_id not in (select reservation_id from mtl_reservations
2880: where demand_source_header_id = l_mtl_dtl_rec.batch_id and
2881: demand_source_line_id = l_mtl_dtl_rec.material_detail_id and
2882: demand_Source_type_id = gme_common_pvt.g_txn_source_type)
2883: AND TRANSACTION_SOURCE_ID NOT IN (l_mtl_dtl_rec.batch_id) --bug 7496141
2884: AND TRX_SOURCE_LINE_ID NOT IN (l_mtl_dtl_rec.material_detail_id) --bug 7496141
2885: AND h.move_order_type = gme_common_pvt.g_txn_source_type
2886: AND l.line_status NOT IN (5, 6)

Line 2885: AND h.move_order_type = gme_common_pvt.g_txn_source_type

2881: demand_source_line_id = l_mtl_dtl_rec.material_detail_id and
2882: demand_Source_type_id = gme_common_pvt.g_txn_source_type)
2883: AND TRANSACTION_SOURCE_ID NOT IN (l_mtl_dtl_rec.batch_id) --bug 7496141
2884: AND TRX_SOURCE_LINE_ID NOT IN (l_mtl_dtl_rec.material_detail_id) --bug 7496141
2885: AND h.move_order_type = gme_common_pvt.g_txn_source_type
2886: AND l.line_status NOT IN (5, 6)
2887: AND h.header_id = l.header_id
2888: AND h.move_order_type NOT IN
2889: (gme_common_pvt.g_invis_move_order_type

Line 2889: (gme_common_pvt.g_invis_move_order_type

2885: AND h.move_order_type = gme_common_pvt.g_txn_source_type
2886: AND l.line_status NOT IN (5, 6)
2887: AND h.header_id = l.header_id
2888: AND h.move_order_type NOT IN
2889: (gme_common_pvt.g_invis_move_order_type
2890: ,inv_globals.g_move_order_put_away);
2891:
2892: IF g_debug <= gme_debug.g_log_statement THEN
2893: gme_debug.put_line('Additional Material Allocated to Move Order:'||l_allocated_qty);

Line 2996: l_resv_tbl gme_common_pvt.reservations_tab;

2992: AND inventory_item_id = v_inventory_item_id;
2993:
2994: l_item_loc_control NUMBER;
2995: l_item_restrict_locators NUMBER;
2996: l_resv_tbl gme_common_pvt.reservations_tab;
2997: get_reserved_qty_err EXCEPTION;
2998: get_reservations_err EXCEPTION;
2999: get_pending_qty_err EXCEPTION;
3000: BEGIN

Line 3368: p_exception_tbl IN gme_common_pvt.exceptions_tab)

3364: RETURN FALSE;
3365: END insert_exceptions;
3366:
3367: FUNCTION populate_temp_from_struct (
3368: p_exception_tbl IN gme_common_pvt.exceptions_tab)
3369: RETURN BOOLEAN
3370: IS
3371: l_api_name CONSTANT VARCHAR2 (30) := 'populate_temp_from_struct';
3372: BEGIN

Line 3535: gme_common_pvt.log_message ('GME_NO_KEYS'

3531: l_batch_header_rec := p_batch_header_rec;
3532:
3533: IF p_batch_header_rec.batch_id IS NULL THEN
3534: IF p_org_code IS NULL AND p_batch_header_rec.organization_id IS NULL THEN
3535: gme_common_pvt.log_message ('GME_NO_KEYS'
3536: ,'TABLE_NAME'
3537: ,'GME_BATCH_HEADER');
3538: RAISE fnd_api.g_exc_error;
3539: ELSIF p_org_code IS NOT NULL THEN

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

3543: INTO l_batch_header_rec.organization_id;
3544:
3545: IF get_organization%NOTFOUND THEN
3546: CLOSE get_organization;
3547: gme_common_pvt.log_message (p_message_code => 'IC_ORGNCODERR'
3548: ,p_product_code => 'GMI');
3549: RAISE fnd_api.g_exc_error;
3550: END IF;
3551: CLOSE get_organization;

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

3551: CLOSE get_organization;
3552: END IF;
3553:
3554: IF NVL (p_batch_header_rec.batch_type, p_batch_type) <> p_batch_type THEN
3555: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
3556: RAISE fnd_api.g_exc_error;
3557: ELSE
3558: l_batch_header_rec.batch_type :=
3559: NVL (p_batch_header_rec.batch_type, p_batch_type);

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

3565: RAISE fnd_api.g_exc_error;
3566: END IF;
3567:
3568: IF x_batch_header_rec.batch_type <> p_batch_type THEN
3569: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
3570: RAISE fnd_api.g_exc_error;
3571: END IF;
3572:
3573: RETURN TRUE;

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

3617: l_batch_step_rec := p_batch_step_rec;
3618: IF p_batch_step_rec.batchstep_id IS NULL THEN
3619: l_batch_header_rec_in.batch_no := p_batch_no;
3620: l_batch_header_rec_in.batch_id := p_batch_step_rec.batch_id;
3621: l_batch_header_rec_in.batch_type := gme_common_pvt.g_doc_type_batch;
3622: IF NOT gme_common_pvt.get_batch_header (
3623: p_batch_header_rec => l_batch_header_rec_in
3624: ,p_org_code => p_org_code
3625: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 3622: IF NOT gme_common_pvt.get_batch_header (

3618: IF p_batch_step_rec.batchstep_id IS NULL THEN
3619: l_batch_header_rec_in.batch_no := p_batch_no;
3620: l_batch_header_rec_in.batch_id := p_batch_step_rec.batch_id;
3621: l_batch_header_rec_in.batch_type := gme_common_pvt.g_doc_type_batch;
3622: IF NOT gme_common_pvt.get_batch_header (
3623: p_batch_header_rec => l_batch_header_rec_in
3624: ,p_org_code => p_org_code
3625: ,p_batch_type => gme_common_pvt.g_doc_type_batch
3626: ,x_batch_header_rec => l_batch_header_rec) THEN

Line 3625: ,p_batch_type => gme_common_pvt.g_doc_type_batch

3621: l_batch_header_rec_in.batch_type := gme_common_pvt.g_doc_type_batch;
3622: IF NOT gme_common_pvt.get_batch_header (
3623: p_batch_header_rec => l_batch_header_rec_in
3624: ,p_org_code => p_org_code
3625: ,p_batch_type => gme_common_pvt.g_doc_type_batch
3626: ,x_batch_header_rec => l_batch_header_rec) THEN
3627: RETURN FALSE;
3628: ELSE
3629: l_batch_step_rec.batch_id := l_batch_header_rec.batch_id;

Line 3734: ,transaction_date => gme_common_pvt.g_timestamp

3730: ,open_past_period => l_open_past_period);
3731:
3732: IF l_open_past_period = FALSE THEN
3733: invttmtx.tdatechk (org_id => p_org_id
3734: ,transaction_date => gme_common_pvt.g_timestamp
3735: ,period_id => l_period_id
3736: ,open_past_period => l_open_past_period);
3737:
3738: IF l_open_past_period = FALSE THEN

Line 3741: x_trans_date := gme_common_pvt.g_timestamp;

3737:
3738: IF l_open_past_period = FALSE THEN
3739: RETURN FALSE;
3740: ELSE
3741: x_trans_date := gme_common_pvt.g_timestamp;
3742: x_period_id := l_period_id;
3743: END IF;
3744: ELSE
3745: x_trans_date := p_trans_date;

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

4023: EXCEPTION
4024: 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
4025: IF g_debug <= gme_debug.g_log_unexpected THEN
4026: gme_debug.put_line
4027: ( ' user defined exception in gme_common_pvt.get_resource function'
4028: || SQLERRM);
4029: END IF;
4030:
4031: RETURN FALSE;

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

4031: RETURN FALSE;
4032: WHEN OTHERS THEN
4033: IF g_debug <= gme_debug.g_log_unexpected THEN
4034: gme_debug.put_line
4035: ( ' when others: exception in gme_common_pvt.get_resource function'
4036: || SQLERRM);
4037: END IF;
4038:
4039: RETURN FALSE;

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

4098: FETCH get_validity_rule INTO l_validity_rec;
4099:
4100: IF get_validity_rule%NOTFOUND THEN
4101: CLOSE get_validity_rule;
4102: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
4103: RETURN FALSE;
4104: END IF;
4105:
4106: CLOSE get_validity_rule;

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

4105:
4106: CLOSE get_validity_rule;
4107:
4108: IF l_validity_rec.delete_mark = 1 THEN
4109: gme_common_pvt.log_message ('GME_API_INVALID_VALIDITY');
4110: RETURN FALSE;
4111: END IF;
4112:
4113: l_start_date := p_start_date;

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

4113: l_start_date := p_start_date;
4114: l_cmplt_date := p_cmplt_date;
4115:
4116: IF p_start_date IS NULL
4117: AND NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 THEN
4118: /* Validate only start date against validity rules AND start date is not passed */
4119: RETURN TRUE;
4120: END IF;
4121:

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

4135: --Sunitha ch. Bug#5336007 checked the parameter p_validate_plan_dates_ind.If it is 1 then
4136: --validate planned start date only.If it is 0 then validate both
4137: --Sunitha ch. Bug#5404329 Changed the condition from AND to OR and changed the log message to
4138: --GME_INVAL_VAL_RULE_DATES when validating for actual start date
4139: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 OR NVL (p_validate_plan_dates_ind, 0) = 1 THEN
4140: IF l_start_date < l_validity_rec.start_date
4141: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date) THEN
4142: IF NVL (p_validate_plan_dates_ind, 0) = 1 THEN
4143: gme_common_pvt.log_message ('GME_INVAL_VAL_RULE_DATES');

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

4139: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 OR NVL (p_validate_plan_dates_ind, 0) = 1 THEN
4140: IF l_start_date < l_validity_rec.start_date
4141: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date) THEN
4142: IF NVL (p_validate_plan_dates_ind, 0) = 1 THEN
4143: gme_common_pvt.log_message ('GME_INVAL_VAL_RULE_DATES');
4144: ELSE
4145: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');
4146: END IF;
4147: RETURN FALSE;

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

4141: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date) THEN
4142: IF NVL (p_validate_plan_dates_ind, 0) = 1 THEN
4143: gme_common_pvt.log_message ('GME_INVAL_VAL_RULE_DATES');
4144: ELSE
4145: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');
4146: END IF;
4147: RETURN FALSE;
4148: END IF;
4149: ELSE

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

4151: IF l_start_date < l_validity_rec.start_date
4152: OR l_start_date > NVL (l_validity_rec.end_date, l_start_date)
4153: OR l_cmplt_date < l_validity_rec.start_date
4154: OR l_cmplt_date > NVL (l_validity_rec.end_date, l_cmplt_date) THEN
4155: gme_common_pvt.log_message ('GME_DATES_EXCEED_VALDTY_RULE');
4156: RETURN FALSE;
4157: END IF;
4158: END IF;
4159:

Line 4171: gme_common_pvt.g_batch_pending

4167: CLOSE cur_get_status_type;
4168:
4169: IF l_status_type IN ('1000', '800') THEN
4170: IF p_batch_header_rec.batch_status =
4171: gme_common_pvt.g_batch_pending
4172: AND p_batch_header_rec.batch_type = 0 THEN
4173: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
4174: RAISE invalid_validity_rule;
4175: ELSIF p_batch_header_rec.batch_status =

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

4169: IF l_status_type IN ('1000', '800') THEN
4170: IF p_batch_header_rec.batch_status =
4171: gme_common_pvt.g_batch_pending
4172: AND p_batch_header_rec.batch_type = 0 THEN
4173: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
4174: RAISE invalid_validity_rule;
4175: ELSIF p_batch_header_rec.batch_status =
4176: gme_common_pvt.g_batch_wip
4177: AND p_batch_header_rec.batch_type = 0 THEN

Line 4176: gme_common_pvt.g_batch_wip

4172: AND p_batch_header_rec.batch_type = 0 THEN
4173: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD');
4174: RAISE invalid_validity_rule;
4175: ELSIF p_batch_header_rec.batch_status =
4176: gme_common_pvt.g_batch_wip
4177: AND p_batch_header_rec.batch_type = 0 THEN
4178: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD1');
4179: END IF;
4180: END IF; /* l_status_type IN ('1000', '800') */

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

4174: RAISE invalid_validity_rule;
4175: ELSIF p_batch_header_rec.batch_status =
4176: gme_common_pvt.g_batch_wip
4177: AND p_batch_header_rec.batch_type = 0 THEN
4178: gme_common_pvt.log_message ('GME_VALIDITY_OBSO_OR_ONHOLD1');
4179: END IF;
4180: END IF; /* l_status_type IN ('1000', '800') */
4181: END IF; /* p_batch_header_rec.batch_id IS NOT NULL */
4182:

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

4256: AND mtrl.inventory_item_id = d.inventory_item_id
4257: AND mtrl.txn_source_id = d.batch_id
4258: AND mtrl.header_id = mtrh.header_id
4259: AND mtrl.txn_source_line_id = p_material_detail_id
4260: AND mtrh.move_order_type = gme_common_pvt.g_move_order_type;
4261:
4262: --FPbug#4912179 query modified to improve performance
4263: CURSOR cur_get_mo_allocations (p_line_id NUMBER)
4264: IS

Line 4318: l_rsv_array gme_common_pvt.reservations_tab;

4314: l_material_detail_rec gme_material_details%ROWTYPE;
4315: l_batch_header_rec gme_batch_header%ROWTYPE;
4316: l_rsv inv_reservation_global.mtl_reservation_rec_type;
4317: ---l_rsv_array inv_reservation_global.mtl_reservation_tbl_type; --------- Punit Kumar
4318: l_rsv_array gme_common_pvt.reservations_tab;
4319: l_to_rsv_rec inv_reservation_global.mtl_reservation_rec_type;
4320: l_rsv_tbl inv_reservation_global.mtl_reservation_tbl_type; -- 4944024
4321: l_rsv_count NUMBER; -- 4944024
4322: /* Punit Kumar */

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

4365: ELSE /* p_material_date IS NULL */
4366: IF (NVL (g_debug, 0) IN
4367: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4368: gme_debug.put_line
4369: ('p_material_date is null calling gme_common_pvt.calc_mtl_req_date');
4370: END IF;
4371:
4372: IF get_assoc_step (p_material_detail_id
4373: ,l_batchstep_rec.batchstep_id

Line 4381: gme_common_pvt.calc_mtl_req_date

4377: RAISE fnd_api.g_exc_error;
4378: END IF;
4379: END IF;
4380:
4381: gme_common_pvt.calc_mtl_req_date
4382: (p_batch_header_rec => l_batch_header_rec
4383: ,p_batchstep_rec => l_batchstep_rec
4384: ,p_mtl_dtl_rec => l_material_detail_rec
4385: ,x_mtl_req_date => l_material_date

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

4387:
4388: IF (NVL (g_debug, 0) IN
4389: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4390: gme_debug.put_line
4391: ( 'Came back from gme_common_pvt.calc_mtl_req_date with status '
4392: || l_return_status);
4393: END IF;
4394:
4395: -- Error handling for deduce_material_date call.

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

4428: IF (NVL (g_debug, 0) IN
4429: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4430: gme_debug.put_line (' Assessing line type which is '||l_material_detail_rec.line_type);
4431: END IF;
4432: IF l_material_detail_rec.line_type <> gme_common_pvt.g_line_type_ing THEN /* -1 */
4433: IF (NVL (g_debug, 0) IN
4434: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4435: gme_debug.put_line (' Line is a source of supply so invoke Query_Prod_Supply_Reservations');
4436: END IF;

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

4499: * 2. if line_type is not Ingredient.
4500: */
4501: IF l_batch_header_rec.update_inventory_ind <> 'Y'
4502: OR l_material_detail_rec.line_type <>
4503: gme_common_pvt.g_line_type_ing /* -1 */ THEN
4504: IF (NVL (g_debug, 0) IN
4505: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4506: gme_debug.put_line
4507: ( 'Returning no further processing of reservations and Move Orders are required. '

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

4514: RETURN;
4515: END IF;
4516:
4517: /* Query reservations for the material_detail_id by calling Query_reservation. */
4518: l_rsv.demand_source_type_id := gme_common_pvt.g_txn_source_type;
4519:
4520: IF (NVL (g_debug, 0) IN
4521: (gme_debug.g_log_statement, gme_debug.g_log_procedure) ) THEN
4522: gme_debug.put_line ('Calling Query Reservation.');

Line 4897: IF NOT gme_common_pvt.get_batch_header

4893: AND p_batch_no IS NOT NULL THEN
4894: l_batch_header_rec.batch_no := p_batch_no;
4895: l_batch_header_rec.batch_type := p_batch_type;
4896:
4897: IF NOT gme_common_pvt.get_batch_header
4898: (p_batch_header_rec => l_batch_header_rec
4899: ,p_org_code => p_org_code
4900: ,p_batch_type => p_batch_type
4901: ,x_batch_header_rec => x_batch_header_rec) THEN

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

5019: x_return_status := fnd_api.g_ret_sts_success;
5020: l_batch_header_rec := p_batch_header_rec;
5021:
5022: /* IF (p_batch_header_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
5023: gme_common_pvt.log_message(p_product_code => 'INV'
5024: ,p_message_code => 'INV_ORG_REQUIRED');
5025: RAISE fnd_api.g_exc_error;
5026: END IF; */
5027: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN

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

5024: ,p_message_code => 'INV_ORG_REQUIRED');
5025: RAISE fnd_api.g_exc_error;
5026: END IF; */
5027: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN
5028: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
5029: RAISE fnd_api.g_exc_error;
5030: END IF;
5031: IF NOT gme_common_pvt.get_batch_header
5032: (p_batch_header_rec => p_batch_header_rec

Line 5031: IF NOT gme_common_pvt.get_batch_header

5027: IF p_batch_header_rec.batch_no IS NULL AND p_batch_header_rec.batch_id IS NULL THEN
5028: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
5029: RAISE fnd_api.g_exc_error;
5030: END IF;
5031: IF NOT gme_common_pvt.get_batch_header
5032: (p_batch_header_rec => p_batch_header_rec
5033: ,p_org_code => p_org_code
5034: ,p_batch_type => p_batch_type
5035: ,x_batch_header_rec => l_batch_header_rec) THEN

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

5035: ,x_batch_header_rec => l_batch_header_rec) THEN
5036: IF (g_debug = gme_debug.g_log_statement) THEN
5037: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ': batch not found ');
5038: END IF;
5039: gme_common_pvt.log_message ('GME_BATCH_NOT_FOUND');
5040: RAISE batch_header_fetch_error;
5041: END IF;
5042:
5043: /* Check for phantom batch */

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

5042:
5043: /* Check for phantom batch */
5044: -- Bug 7562848 - Bypass phantom check if calling routine makes that request.
5045: IF NVL (l_batch_header_rec.parentline_id, 0) > 0 AND p_check_phantom = 'Y' THEN
5046: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
5047: RAISE fnd_api.g_exc_error;
5048: END IF;
5049:
5050: /* Check for migrated batch */

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

5048: END IF;
5049:
5050: /* Check for migrated batch */
5051: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5052: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5053: RAISE fnd_api.g_exc_error;
5054: END IF;
5055: gme_common_pvt.g_error_count := 0;
5056: gme_common_pvt.g_setup_done :=

Line 5055: gme_common_pvt.g_error_count := 0;

5051: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5052: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5053: RAISE fnd_api.g_exc_error;
5054: END IF;
5055: gme_common_pvt.g_error_count := 0;
5056: gme_common_pvt.g_setup_done :=
5057: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5058: ,p_org_code => p_org_code);
5059:

Line 5056: gme_common_pvt.g_setup_done :=

5052: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5053: RAISE fnd_api.g_exc_error;
5054: END IF;
5055: gme_common_pvt.g_error_count := 0;
5056: gme_common_pvt.g_setup_done :=
5057: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5058: ,p_org_code => p_org_code);
5059:
5060: IF NOT gme_common_pvt.g_setup_done THEN

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

5053: RAISE fnd_api.g_exc_error;
5054: END IF;
5055: gme_common_pvt.g_error_count := 0;
5056: gme_common_pvt.g_setup_done :=
5057: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5058: ,p_org_code => p_org_code);
5059:
5060: IF NOT gme_common_pvt.g_setup_done THEN
5061: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5060: IF NOT gme_common_pvt.g_setup_done THEN

5056: gme_common_pvt.g_setup_done :=
5057: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5058: ,p_org_code => p_org_code);
5059:
5060: IF NOT gme_common_pvt.g_setup_done THEN
5061: IF (g_debug = gme_debug.g_log_statement) THEN
5062: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
5063: END IF;
5064: RAISE fnd_api.g_exc_error;

Line 5067: gme_common_pvt.g_organization_id;

5063: END IF;
5064: RAISE fnd_api.g_exc_error;
5065: ELSE
5066: l_batch_header_rec.organization_id :=
5067: gme_common_pvt.g_organization_id;
5068: END IF;
5069: x_batch_header_rec := l_batch_header_rec ;
5070:
5071: IF g_debug <= gme_debug.g_log_statement THEN

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

5130: l_material_detail_rec := p_material_detail_rec;
5131:
5132:
5133: /*IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
5134: gme_common_pvt.log_message(p_product_code => 'INV'
5135: ,p_message_code => 'INV_ORG_REQUIRED');
5136: RAISE fnd_api.g_exc_error;
5137: END IF; */
5138: IF NOT gme_common_pvt.get_material_detail

Line 5138: IF NOT gme_common_pvt.get_material_detail

5134: gme_common_pvt.log_message(p_product_code => 'INV'
5135: ,p_message_code => 'INV_ORG_REQUIRED');
5136: RAISE fnd_api.g_exc_error;
5137: END IF; */
5138: IF NOT gme_common_pvt.get_material_detail
5139: (p_material_detail_rec => p_material_detail_rec
5140: ,p_org_code => p_org_code
5141: ,p_batch_no => p_batch_no
5142: ,p_batch_type => p_batch_type

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

5154: /* Bug#7157383 Commented the below code as this validation is not correct
5155: * in this place */
5156: /* Check for phantom batch
5157: IF NVL (l_batch_header_rec.parentline_id, 0) > 0 THEN
5158: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
5159: RAISE fnd_api.g_exc_error;
5160: END IF; */
5161: /* Check for migrated batch */
5162: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN

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

5159: RAISE fnd_api.g_exc_error;
5160: END IF; */
5161: /* Check for migrated batch */
5162: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5163: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5164: RAISE fnd_api.g_exc_error;
5165: END IF;
5166: gme_common_pvt.g_error_count := 0;
5167: gme_common_pvt.g_setup_done :=

Line 5166: gme_common_pvt.g_error_count := 0;

5162: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5163: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5164: RAISE fnd_api.g_exc_error;
5165: END IF;
5166: gme_common_pvt.g_error_count := 0;
5167: gme_common_pvt.g_setup_done :=
5168: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5169: ,p_org_code => p_org_code);
5170:

Line 5167: gme_common_pvt.g_setup_done :=

5163: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5164: RAISE fnd_api.g_exc_error;
5165: END IF;
5166: gme_common_pvt.g_error_count := 0;
5167: gme_common_pvt.g_setup_done :=
5168: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5169: ,p_org_code => p_org_code);
5170:
5171: IF NOT gme_common_pvt.g_setup_done THEN

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

5164: RAISE fnd_api.g_exc_error;
5165: END IF;
5166: gme_common_pvt.g_error_count := 0;
5167: gme_common_pvt.g_setup_done :=
5168: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5169: ,p_org_code => p_org_code);
5170:
5171: IF NOT gme_common_pvt.g_setup_done THEN
5172: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5171: IF NOT gme_common_pvt.g_setup_done THEN

5167: gme_common_pvt.g_setup_done :=
5168: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5169: ,p_org_code => p_org_code);
5170:
5171: IF NOT gme_common_pvt.g_setup_done THEN
5172: IF (g_debug = gme_debug.g_log_statement) THEN
5173: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
5174: END IF;
5175: RAISE fnd_api.g_exc_error;

Line 5178: gme_common_pvt.g_organization_id;

5174: END IF;
5175: RAISE fnd_api.g_exc_error;
5176: ELSE
5177: l_batch_header_rec.organization_id :=
5178: gme_common_pvt.g_organization_id;
5179: END IF;
5180: x_batch_header_rec := l_batch_header_rec ;
5181: x_material_detail_rec := l_material_detail_rec ;
5182: IF g_debug <= gme_debug.g_log_statement THEN

Line 5207: gme_common_pvt.count_and_get (x_count => x_message_count

5203: || SQLERRM);
5204: END IF;
5205: x_return_status := fnd_api.g_ret_sts_unexp_error;
5206: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5207: gme_common_pvt.count_and_get (x_count => x_message_count
5208: ,p_encoded => fnd_api.g_false
5209: ,x_data => x_message_list);
5210: END Validate_material_detail;
5211: /*======================================================================

Line 5250: IF NOT gme_common_pvt.get_batch_step (

5246: END IF;
5247: x_return_status := fnd_api.g_ret_sts_success;
5248:
5249:
5250: IF NOT gme_common_pvt.get_batch_step (
5251: p_batch_step_rec => p_batch_step_rec
5252: ,p_org_code => p_org_code
5253: ,p_batch_no => p_batch_no
5254: ,x_batch_step_rec => l_batch_step_rec

Line 5262: -- gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');

5258:
5259: /* Bug 13356510 - Commented the below code as this validation is not correct. */
5260: /* Check for phantom batch */
5261: -- IF NVL (l_batch_header_rec.parentline_id, 0) > 0 THEN
5262: -- gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
5263: -- RAISE fnd_api.g_exc_error;
5264: -- END IF;
5265:
5266: /* Check for migrated batch */

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

5264: -- END IF;
5265:
5266: /* Check for migrated batch */
5267: IF NVL (l_batch_header_rec.migrated_batch_ind, 'Y') = 'Y' THEN
5268: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5269: RAISE fnd_api.g_exc_error;
5270: END IF;
5271:
5272: gme_common_pvt.g_error_count := 0;

Line 5272: gme_common_pvt.g_error_count := 0;

5268: gme_common_pvt.log_message ('GME_MIGRATED_BATCH');
5269: RAISE fnd_api.g_exc_error;
5270: END IF;
5271:
5272: gme_common_pvt.g_error_count := 0;
5273: gme_common_pvt.g_setup_done :=
5274: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5275: ,p_org_code => p_org_code);
5276:

Line 5273: gme_common_pvt.g_setup_done :=

5269: RAISE fnd_api.g_exc_error;
5270: END IF;
5271:
5272: gme_common_pvt.g_error_count := 0;
5273: gme_common_pvt.g_setup_done :=
5274: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5275: ,p_org_code => p_org_code);
5276:
5277: IF NOT gme_common_pvt.g_setup_done THEN

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

5270: END IF;
5271:
5272: gme_common_pvt.g_error_count := 0;
5273: gme_common_pvt.g_setup_done :=
5274: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5275: ,p_org_code => p_org_code);
5276:
5277: IF NOT gme_common_pvt.g_setup_done THEN
5278: IF (g_debug = gme_debug.g_log_statement) THEN

Line 5277: IF NOT gme_common_pvt.g_setup_done THEN

5273: gme_common_pvt.g_setup_done :=
5274: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id
5275: ,p_org_code => p_org_code);
5276:
5277: IF NOT gme_common_pvt.g_setup_done THEN
5278: IF (g_debug = gme_debug.g_log_statement) THEN
5279: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
5280: END IF;
5281: RAISE fnd_api.g_exc_error;

Line 5284: gme_common_pvt.g_organization_id;

5280: END IF;
5281: RAISE fnd_api.g_exc_error;
5282: ELSE
5283: l_batch_header_rec.organization_id :=
5284: gme_common_pvt.g_organization_id;
5285: END IF;
5286: x_batch_header_rec := l_batch_header_rec ;
5287: x_batch_step_rec := l_batch_step_rec;
5288: IF g_debug <= gme_debug.g_log_statement THEN

Line 5318: gme_common_pvt.count_and_get (x_count => x_message_count

5314: || SQLERRM);
5315: END IF;
5316: x_return_status := fnd_api.g_ret_sts_unexp_error;
5317: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5318: gme_common_pvt.count_and_get (x_count => x_message_count
5319: ,p_encoded => fnd_api.g_false
5320: ,x_data => x_message_list);
5321: END Validate_batch_step;
5322:

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

5386: END IF;
5387: RAISE error_fetch_batch_details;
5388: END IF;
5389:
5390: IF l_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_autobystep_release,
5391: gme_common_pvt.g_mtl_auto_release ) THEN
5392: /*default ing and prod dates to batch actual dated*/
5393: l_ing_trans_date := l_batch_header_rec.actual_start_date;
5394: l_prod_trans_date := l_batch_header_rec.actual_cmplt_date;

Line 5391: gme_common_pvt.g_mtl_auto_release ) THEN

5387: RAISE error_fetch_batch_details;
5388: END IF;
5389:
5390: IF l_material_detail_rec.release_type IN (gme_common_pvt.g_mtl_autobystep_release,
5391: gme_common_pvt.g_mtl_auto_release ) THEN
5392: /*default ing and prod dates to batch actual dated*/
5393: l_ing_trans_date := l_batch_header_rec.actual_start_date;
5394: l_prod_trans_date := l_batch_header_rec.actual_cmplt_date;
5395:

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

5392: /*default ing and prod dates to batch actual dated*/
5393: l_ing_trans_date := l_batch_header_rec.actual_start_date;
5394: l_prod_trans_date := l_batch_header_rec.actual_cmplt_date;
5395:
5396: IF l_material_detail_rec.release_type = gme_common_pvt.g_mtl_autobystep_release THEN
5397: /* check whether material line is associated to step */
5398: OPEN cur_get_associated_step (l_material_detail_rec.material_detail_id);
5399: FETCH cur_get_associated_step INTO l_batchstep_id;
5400: CLOSE cur_get_associated_step;

Line 5423: IF (gme_common_pvt.g_ib_timestamp_set = -1) THEN

5419: Transacting manually it has to be defaulted to SYSDATE */
5420: IF p_invoke_mode = 'E' THEN
5421: -- l_trans_date := l_batch_header_rec.actual_cmplt_date;
5422: -- Bug 13881792 - If exception happened during IB then use the date.
5423: IF (gme_common_pvt.g_ib_timestamp_set = -1) THEN
5424: l_trans_date := gme_common_pvt.g_ib_timestamp_date;
5425: ELSE
5426: l_trans_date := l_batch_header_rec.actual_cmplt_date;
5427: END IF;

Line 5424: l_trans_date := gme_common_pvt.g_ib_timestamp_date;

5420: IF p_invoke_mode = 'E' THEN
5421: -- l_trans_date := l_batch_header_rec.actual_cmplt_date;
5422: -- Bug 13881792 - If exception happened during IB then use the date.
5423: IF (gme_common_pvt.g_ib_timestamp_set = -1) THEN
5424: l_trans_date := gme_common_pvt.g_ib_timestamp_date;
5425: ELSE
5426: l_trans_date := l_batch_header_rec.actual_cmplt_date;
5427: END IF;
5428: END IF;

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

5428: END IF;
5429: END IF; /*l_material_detail_rec.release_type*/
5430:
5431: /* check whether the date is in closed period or not */
5432: IF NOT gme_common_pvt.check_close_period(p_org_id => l_batch_header_rec.organization_id
5433: ,p_trans_date => l_trans_date) THEN
5434: l_trans_date := SYSDATE;
5435: END IF;
5436:

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

5502: l_start_date := p_start_date;
5503: l_cmplt_date := p_cmplt_date;
5504:
5505: --BAsed on the profile value 'GME:Validate plan dates' check the dates
5506: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 0 THEN
5507: /* Validate both planned dates against operation effectivity dates*/
5508: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5509: l_start_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_start_date) OR
5510: l_cmplt_date < l_oprn_rec.EFFECTIVE_START_DATE OR

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

5508: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5509: l_start_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_start_date) OR
5510: l_cmplt_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5511: l_cmplt_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_cmplt_date) THEN
5512: gme_common_pvt.log_message('GME_DATES_EXCEED_OPER_VALIDTY');
5513: RETURN FALSE;
5514: END IF;
5515: ELSE
5516: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR

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

5514: END IF;
5515: ELSE
5516: IF l_start_date < l_oprn_rec.EFFECTIVE_START_DATE OR
5517: l_start_date > nvl(l_oprn_rec.EFFECTIVE_END_DATE,l_start_date) THEN
5518: gme_common_pvt.log_message('GME_DATES_EXCEED_OPER_VALIDTY');
5519: RETURN FALSE;
5520: END IF;
5521: END IF;
5522: RETURN TRUE;

Line 5530: END gme_common_pvt;

5526: RETURN FALSE;
5527:
5528: END check_oprn_effectivity_dates ;
5529:
5530: END gme_common_pvt;