DBA Data[Home] [Help]

APPS.GME_API_PUB dependencies on GME_COMMON_PVT

Line 23: gme_common_pvt.count_and_get (x_count => x_message_count

19: IF g_debug <= gme_debug.g_log_unexpected THEN
20: gme_debug.put_line(g_pkg_name||'.'||p_api_name||':'||'When others exception:'||SQLERRM);
21: END IF;
22: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
23: gme_common_pvt.count_and_get (x_count => x_message_count
24: ,p_encoded => fnd_api.g_false
25: ,x_data => x_message_list);
26: x_return_status := fnd_api.g_ret_sts_unexp_error;
27:

Line 70: IF gme_common_pvt.g_check_primary_rsrc = 1

66: x_return_status := fnd_api.g_ret_sts_success;
67:
68: FOR header_row IN header_cursor LOOP
69: -- Check that there is one and only one primary resource
70: IF gme_common_pvt.g_check_primary_rsrc = 1
71: AND p_commit = fnd_api.g_true THEN
72: gme_resource_engine_pvt.check_primary_resource
73: (p_batch_id => header_row.batch_id
74: ,p_batchstep_id => NULL

Line 80: END IF; -- IF gme_common_pvt.g_check_primary_rsrc = 1 THEN

76:
77: IF x_return_status <> fnd_api.g_ret_sts_success THEN
78: RAISE error_save_batch;
79: END IF;
80: END IF; -- IF gme_common_pvt.g_check_primary_rsrc = 1 THEN
81:
82: gme_resource_engine_pvt.consolidate_batch_resources
83: (header_row.batch_id
84: ,x_return_status);

Line 91: l_header_id := NVL (p_header_id, gme_common_pvt.g_transaction_header_id);

87: RAISE error_save_batch;
88: END IF;
89: END LOOP;
90:
91: l_header_id := NVL (p_header_id, gme_common_pvt.g_transaction_header_id);
92:
93:
94: IF (NVL (l_header_id, 0) <> 0) THEN
95: /* Bug 5255959 added p_clear_qty_cache parameter */

Line 132: gme_common_pvt.count_and_get (x_count => l_msg_count

128: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
129: END IF;
130: EXCEPTION
131: WHEN error_save_batch THEN
132: gme_common_pvt.count_and_get (x_count => l_msg_count
133: ,p_encoded => fnd_api.g_false
134: ,x_data => l_msg_data);
135: WHEN OTHERS THEN
136: gme_when_others ( p_api_name => l_api_name

Line 146: := gme_common_pvt.g_max_errors

142: /*************************************************************************/
143: PROCEDURE create_batch (
144: p_api_version IN NUMBER
145: ,p_validation_level IN NUMBER
146: := gme_common_pvt.g_max_errors
147: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
148: ,p_commit IN VARCHAR2 := fnd_api.g_false
149: ,x_message_count OUT NOCOPY NUMBER
150: ,x_message_list OUT NOCOPY VARCHAR2

Line 168: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

164: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
165: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
166: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
167: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
168: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
169: IS
170: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_BATCH';
171: l_batch_header gme_batch_header%ROWTYPE;
172: l_return_status VARCHAR2 (1);

Line 242: (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo) ) THEN

238: RAISE fnd_api.g_exc_error;
239: END IF;
240:
241: IF (l_batch_header.batch_type NOT IN
242: (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo) ) THEN
243: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
244: RAISE fnd_api.g_exc_error;
245: END IF;
246:

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

239: END IF;
240:
241: IF (l_batch_header.batch_type NOT IN
242: (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo) ) THEN
243: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
244: RAISE fnd_api.g_exc_error;
245: END IF;
246:
247: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

Line 248: gme_common_pvt.log_message ('GME_INVALID_FIELD'

244: RAISE fnd_api.g_exc_error;
245: END IF;
246:
247: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
248: gme_common_pvt.log_message ('GME_INVALID_FIELD'
249: ,'FIELD'
250: ,'p_contiguity_override');
251: RAISE fnd_api.g_exc_error;
252: ELSE

Line 257: gme_common_pvt.log_message ('GME_INVALID_FIELD'

253: l_contiguity_override := p_contiguity_override;
254: END IF;
255:
256: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
257: gme_common_pvt.log_message ('GME_INVALID_FIELD'
258: ,'FIELD'
259: ,'p_use_workday_cal');
260: RAISE fnd_api.g_exc_error;
261: END IF;

Line 264: gme_common_pvt.log_message ('GME_INVALID_FIELD'

260: RAISE fnd_api.g_exc_error;
261: END IF;
262:
263: IF (p_ignore_qty_below_cap NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
264: gme_common_pvt.log_message ('GME_INVALID_FIELD'
265: ,'FIELD'
266: ,'p_ignore_qty_below_cap');
267: RAISE fnd_api.g_exc_error;
268: END IF;

Line 271: gme_common_pvt.log_message ('GME_API_UNSUPPORTED_MODE'

267: RAISE fnd_api.g_exc_error;
268: END IF;
269:
270: IF (p_creation_mode NOT IN ('INPUT', 'OUTPUT', 'RECIPE', 'PRODUCT') ) THEN
271: gme_common_pvt.log_message ('GME_API_UNSUPPORTED_MODE'
272: ,'MODE'
273: ,p_creation_mode);
274: RAISE fnd_api.g_exc_error;
275: ELSIF (p_creation_mode IN ('INPUT', 'OUTPUT', 'PRODUCT') ) THEN

Line 277: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

273: ,p_creation_mode);
274: RAISE fnd_api.g_exc_error;
275: ELSIF (p_creation_mode IN ('INPUT', 'OUTPUT', 'PRODUCT') ) THEN
276: IF (p_batch_size IS NULL) THEN
277: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
278: ,'FIELD_NAME'
279: ,'p_batch_size');
280: RAISE fnd_api.g_exc_error;
281: ELSIF (p_batch_size < 0) THEN

Line 282: gme_common_pvt.log_message ('GME_INVALID_FIELD'

278: ,'FIELD_NAME'
279: ,'p_batch_size');
280: RAISE fnd_api.g_exc_error;
281: ELSIF (p_batch_size < 0) THEN
282: gme_common_pvt.log_message ('GME_INVALID_FIELD'
283: ,'FIELD'
284: ,'p_batch_size');
285: RAISE fnd_api.g_exc_error;
286: END IF;

Line 289: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

285: RAISE fnd_api.g_exc_error;
286: END IF;
287:
288: IF (p_batch_size_uom IS NULL) THEN
289: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
290: ,'FIELD_NAME'
291: ,'p_batch_size_uom');
292: RAISE fnd_api.g_exc_error;
293: ELSE

Line 300: gme_common_pvt.log_message ('GME_INVALID_FIELD'

296: FETCH cur_validate_uom
297: INTO l_exists;
298:
299: IF (cur_validate_uom%NOTFOUND) THEN
300: gme_common_pvt.log_message ('GME_INVALID_FIELD'
301: ,'FIELD'
302: ,'p_batch_size_uom');
303: CLOSE cur_validate_uom;
304: RAISE fnd_api.g_exc_error;

Line 315: gme_common_pvt.g_error_count := 0;

311: IF g_debug <= gme_debug.g_log_statement THEN
312: gme_debug.put_line ('Finished parameter validation');
313: END IF;
314:
315: gme_common_pvt.g_error_count := 0;
316: gme_common_pvt.g_setup_done :=
317: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
318: ,p_org_code => p_org_code);
319:

Line 316: gme_common_pvt.g_setup_done :=

312: gme_debug.put_line ('Finished parameter validation');
313: END IF;
314:
315: gme_common_pvt.g_error_count := 0;
316: gme_common_pvt.g_setup_done :=
317: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
318: ,p_org_code => p_org_code);
319:
320: IF NOT gme_common_pvt.g_setup_done THEN

Line 317: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id

313: END IF;
314:
315: gme_common_pvt.g_error_count := 0;
316: gme_common_pvt.g_setup_done :=
317: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
318: ,p_org_code => p_org_code);
319:
320: IF NOT gme_common_pvt.g_setup_done THEN
321: RAISE fnd_api.g_exc_error;

Line 320: IF NOT gme_common_pvt.g_setup_done THEN

316: gme_common_pvt.g_setup_done :=
317: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
318: ,p_org_code => p_org_code);
319:
320: IF NOT gme_common_pvt.g_setup_done THEN
321: RAISE fnd_api.g_exc_error;
322: ELSE
323: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
324: END IF;

Line 323: l_batch_header.organization_id := gme_common_pvt.g_organization_id;

319:
320: IF NOT gme_common_pvt.g_setup_done THEN
321: RAISE fnd_api.g_exc_error;
322: ELSE
323: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
324: END IF;
325:
326: IF g_debug <= gme_debug.g_log_statement THEN
327: gme_debug.put_line ('Finished setup');

Line 330: IF (gme_common_pvt.g_lab_ind = 0 AND l_batch_header.laboratory_ind = 1) THEN

326: IF g_debug <= gme_debug.g_log_statement THEN
327: gme_debug.put_line ('Finished setup');
328: END IF;
329:
330: IF (gme_common_pvt.g_lab_ind = 0 AND l_batch_header.laboratory_ind = 1) THEN
331: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');
332: RAISE fnd_api.g_exc_error;
333: END IF;
334:

Line 331: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');

327: gme_debug.put_line ('Finished setup');
328: END IF;
329:
330: IF (gme_common_pvt.g_lab_ind = 0 AND l_batch_header.laboratory_ind = 1) THEN
331: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');
332: RAISE fnd_api.g_exc_error;
333: END IF;
334:
335: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN

Line 335: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN

331: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');
332: RAISE fnd_api.g_exc_error;
333: END IF;
334:
335: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN
336: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');
337: RAISE fnd_api.g_exc_error;
338: END IF;
339:

Line 336: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');

332: RAISE fnd_api.g_exc_error;
333: END IF;
334:
335: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN
336: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');
337: RAISE fnd_api.g_exc_error;
338: END IF;
339:
340: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN

Line 340: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN

336: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');
337: RAISE fnd_api.g_exc_error;
338: END IF;
339:
340: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN
341: IF (l_batch_header.laboratory_ind = 1) THEN
342: l_object_type := 'L';
343: ELSE
344: IF (l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo) THEN

Line 344: IF (l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo) THEN

340: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN
341: IF (l_batch_header.laboratory_ind = 1) THEN
342: l_object_type := 'L';
343: ELSE
344: IF (l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo) THEN
345: l_object_type := fnd_api.g_false;
346: ELSE
347: l_object_type := 'P';
348: END IF;

Line 350: ELSIF (gme_common_pvt.g_lab_ind = 1) THEN

346: ELSE
347: l_object_type := 'P';
348: END IF;
349: END IF;
350: ELSIF (gme_common_pvt.g_lab_ind = 1) THEN
351: l_object_type := 'L';
352: ELSIF (gme_common_pvt.g_plant_ind = 1) THEN
353: IF (l_batch_header.batch_type = 10) THEN
354: l_object_type := fnd_api.g_false;

Line 352: ELSIF (gme_common_pvt.g_plant_ind = 1) THEN

348: END IF;
349: END IF;
350: ELSIF (gme_common_pvt.g_lab_ind = 1) THEN
351: l_object_type := 'L';
352: ELSIF (gme_common_pvt.g_plant_ind = 1) THEN
353: IF (l_batch_header.batch_type = 10) THEN
354: l_object_type := fnd_api.g_false;
355: ELSE
356: l_object_type := 'P';

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

360: IF g_debug <= gme_debug.g_log_statement THEN
361: gme_debug.put_line ('Finished lab_ind plant_ind setup');
362: END IF;
363:
364: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 THEN
365: l_cmplt_date := NULL;
366: ELSE
367: l_cmplt_date := p_batch_header_rec.plan_cmplt_date;
368: END IF;

Line 382: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

378: CLOSE get_item_id;
379: ELSIF p_product_id IS NOT NULL THEN
380: l_item_id := p_product_id;
381: ELSE
382: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
383: ,'FIELD_NAME'
384: ,'p_product_no or p_product_id');
385: RAISE fnd_api.g_exc_error;
386: END IF;

Line 452: IF NOT (gme_common_pvt.validate_validity_rule

448: ELSE
449: l_item_id := p_product_id;
450: END IF;
451:
452: IF NOT (gme_common_pvt.validate_validity_rule
453: (p_validity_rule_id => l_batch_header.recipe_validity_rule_id
454: ,p_organization_id => l_batch_header.organization_id
455: ,p_prim_product_id => l_item_id
456: ,p_qty => p_batch_size

Line 474: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN

470: IF p_use_workday_cal IS NOT NULL THEN
471: l_use := p_use_workday_cal;
472:
473: IF l_use = fnd_api.g_true THEN
474: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
475: IF (p_batch_header_rec.plan_start_date IS NOT NULL) THEN
476: IF NOT gmp_calendar_api.is_working_daytime
477: (1.0
478: ,FALSE

Line 479: ,gme_common_pvt.g_calendar_code

475: IF (p_batch_header_rec.plan_start_date IS NOT NULL) THEN
476: IF NOT gmp_calendar_api.is_working_daytime
477: (1.0
478: ,FALSE
479: ,gme_common_pvt.g_calendar_code
480: ,p_batch_header_rec.plan_start_date
481: ,0
482: ,l_return_status) THEN
483: gme_common_pvt.log_message

Line 483: gme_common_pvt.log_message

479: ,gme_common_pvt.g_calendar_code
480: ,p_batch_header_rec.plan_start_date
481: ,0
482: ,l_return_status) THEN
483: gme_common_pvt.log_message
484: ('GME_NON_WORKING_TIME'
485: ,'PDATE'
486: ,fnd_date.date_to_displaydt
487: (p_batch_header_rec.plan_start_date) );

Line 496: ,gme_common_pvt.g_calendar_code

492: IF (p_batch_header_rec.plan_cmplt_date IS NOT NULL) THEN
493: IF NOT gmp_calendar_api.is_working_daytime
494: (1.0
495: ,FALSE
496: ,gme_common_pvt.g_calendar_code
497: ,p_batch_header_rec.plan_cmplt_date
498: ,1
499: ,l_return_status) THEN
500: gme_common_pvt.log_message

Line 500: gme_common_pvt.log_message

496: ,gme_common_pvt.g_calendar_code
497: ,p_batch_header_rec.plan_cmplt_date
498: ,1
499: ,l_return_status) THEN
500: gme_common_pvt.log_message
501: ('GME_NON_WORKING_TIME'
502: ,'PDATE'
503: ,TO_CHAR (p_batch_header_rec.plan_cmplt_date
504: ,'DD-MON-YYYY HH24:MI:SS') );

Line 514: ,gme_common_pvt.g_calendar_code

510: AND p_batch_header_rec.plan_start_date IS NULL THEN
511: IF NOT gmp_calendar_api.is_working_daytime
512: (1.0
513: ,FALSE
514: ,gme_common_pvt.g_calendar_code
515: ,SYSDATE
516: ,0
517: ,l_return_status) THEN
518: gme_common_pvt.log_message

Line 518: gme_common_pvt.log_message

514: ,gme_common_pvt.g_calendar_code
515: ,SYSDATE
516: ,0
517: ,l_return_status) THEN
518: gme_common_pvt.log_message
519: ('GME_NON_WORKING_TIME'
520: ,'PDATE'
521: ,TO_CHAR (SYSDATE
522: ,'DD-MON-YYYY HH24:MI:SS') );

Line 557: AND x_return_status <> gme_common_pvt.g_inv_short_err) THEN

553: ,p_use_least_cost_validity_rule => p_use_least_cost_validity_rule
554: ,x_exception_material_tbl => x_exception_material_tbl);
555:
556: IF ( x_return_status <> fnd_api.g_ret_sts_success
557: AND x_return_status <> gme_common_pvt.g_inv_short_err) THEN
558: RAISE fnd_api.g_exc_error;
559: END IF;
560:
561: IF (p_commit = fnd_api.g_true) THEN

Line 565: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');

561: IF (p_commit = fnd_api.g_true) THEN
562: COMMIT;
563: END IF;
564:
565: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
566: gme_common_pvt.count_and_get (x_count => x_message_count
567: ,p_encoded => fnd_api.g_false
568: ,x_data => x_message_list);
569:

Line 566: gme_common_pvt.count_and_get (x_count => x_message_count

562: COMMIT;
563: END IF;
564:
565: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
566: gme_common_pvt.count_and_get (x_count => x_message_count
567: ,p_encoded => fnd_api.g_false
568: ,x_data => x_message_list);
569:
570: IF g_debug <= gme_debug.g_log_procedure THEN

Line 578: gme_common_pvt.count_and_get (x_count => x_message_count

574: EXCEPTION
575: WHEN fnd_api.g_exc_error THEN
576: x_batch_header_rec := NULL;
577: x_return_status := fnd_api.g_ret_sts_error;
578: gme_common_pvt.count_and_get (x_count => x_message_count
579: ,p_encoded => fnd_api.g_false
580: ,x_data => x_message_list);
581: WHEN OTHERS THEN
582: x_batch_header_rec := NULL;

Line 593: := gme_common_pvt.g_max_errors

589: /*************************************************************************/
590: PROCEDURE create_phantom (
591: p_api_version IN NUMBER
592: ,p_validation_level IN NUMBER
593: := gme_common_pvt.g_max_errors
594: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
595: ,p_commit IN VARCHAR2 := fnd_api.g_false
596: ,x_message_count OUT NOCOPY NUMBER
597: ,x_message_list OUT NOCOPY VARCHAR2

Line 608: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

604: ,p_validity_rule_id IN NUMBER
605: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
606: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
607: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
608: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
609: IS
610: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_PHANTOM';
611: phantom_creation_failure EXCEPTION;
612: l_batch_header gme_batch_header%ROWTYPE;

Line 631: gme_common_pvt.g_error_count := 0;

627: SAVEPOINT create_phantom;
628:
629: IF p_init_msg_list = fnd_api.g_true THEN
630: fnd_msg_pub.initialize;
631: gme_common_pvt.g_error_count := 0;
632: END IF;
633:
634: IF NOT fnd_api.compatible_api_call (2.0
635: ,p_api_version

Line 638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

634: IF NOT fnd_api.compatible_api_call (2.0
635: ,p_api_version
636: ,'create_phantom'
637: ,g_pkg_name) THEN
638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
639: RAISE fnd_api.g_exc_error;
640: END IF;
641:
642: IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

Line 649: gme_common_pvt.log_message ('GME_INVALID_FIELD'

645: RAISE fnd_api.g_exc_error;
646: END IF;
647:
648: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
649: gme_common_pvt.log_message ('GME_INVALID_FIELD'
650: ,'FIELD'
651: ,'p_contiguity_override');
652: RAISE fnd_api.g_exc_error;
653: END IF;

Line 656: gme_common_pvt.log_message ('GME_INVALID_FIELD'

652: RAISE fnd_api.g_exc_error;
653: END IF;
654:
655: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
656: gme_common_pvt.log_message ('GME_INVALID_FIELD'
657: ,'FIELD'
658: ,'p_use_workday_cal');
659: RAISE fnd_api.g_exc_error;
660: END IF;

Line 663: gme_common_pvt.g_setup_done :=

659: RAISE fnd_api.g_exc_error;
660: END IF;
661:
662: l_material_detail := p_material_detail_rec;
663: gme_common_pvt.g_setup_done :=
664: gme_common_pvt.setup (p_material_detail_rec.organization_id
665: ,p_org_code);
666:
667: IF NOT gme_common_pvt.g_setup_done THEN

Line 664: gme_common_pvt.setup (p_material_detail_rec.organization_id

660: END IF;
661:
662: l_material_detail := p_material_detail_rec;
663: gme_common_pvt.g_setup_done :=
664: gme_common_pvt.setup (p_material_detail_rec.organization_id
665: ,p_org_code);
666:
667: IF NOT gme_common_pvt.g_setup_done THEN
668: RAISE fnd_api.g_exc_error;

Line 667: IF NOT gme_common_pvt.g_setup_done THEN

663: gme_common_pvt.g_setup_done :=
664: gme_common_pvt.setup (p_material_detail_rec.organization_id
665: ,p_org_code);
666:
667: IF NOT gme_common_pvt.g_setup_done THEN
668: RAISE fnd_api.g_exc_error;
669: ELSE
670: l_material_detail.organization_id :=
671: gme_common_pvt.g_organization_id;

Line 671: gme_common_pvt.g_organization_id;

667: IF NOT gme_common_pvt.g_setup_done THEN
668: RAISE fnd_api.g_exc_error;
669: ELSE
670: l_material_detail.organization_id :=
671: gme_common_pvt.g_organization_id;
672: END IF;
673:
674: gme_api_main.create_phantom
675: (p_validation_level => p_validation_level

Line 706: gme_common_pvt.count_and_get (x_count => x_message_count

702: EXCEPTION
703: WHEN phantom_creation_failure THEN
704: ROLLBACK TO SAVEPOINT create_phantom;
705: x_material_detail_rec := NULL;
706: gme_common_pvt.count_and_get (x_count => x_message_count
707: ,p_encoded => fnd_api.g_false
708: ,x_data => x_message_list);
709: WHEN fnd_api.g_exc_error THEN
710: ROLLBACK TO SAVEPOINT create_phantom;

Line 713: gme_common_pvt.count_and_get (x_count => x_message_count

709: WHEN fnd_api.g_exc_error THEN
710: ROLLBACK TO SAVEPOINT create_phantom;
711: x_material_detail_rec := NULL;
712: x_return_status := fnd_api.g_ret_sts_error;
713: gme_common_pvt.count_and_get (x_count => x_message_count
714: ,p_encoded => fnd_api.g_false
715: ,x_data => x_message_list);
716: WHEN OTHERS THEN
717: ROLLBACK TO SAVEPOINT create_phantom;

Line 740: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab

736: ,p_qty_type IN NUMBER
737: ,p_recalc_dates IN VARCHAR2
738: ,p_use_workday_cal IN VARCHAR2
739: ,p_contiguity_override IN VARCHAR2
740: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
741: ,x_message_count OUT NOCOPY NUMBER
742: ,x_message_list OUT NOCOPY VARCHAR2
743: ,x_return_status OUT NOCOPY VARCHAR2
744: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE)

Line 777: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

773: IF NOT fnd_api.compatible_api_call (2.0
774: ,p_api_version
775: ,'scale_batch'
776: ,g_pkg_name) THEN
777: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
778: RAISE fnd_api.g_exc_error;
779: END IF;
780: gme_common_pvt.validate_batch
781: (p_batch_header_rec => p_batch_header_rec

Line 780: gme_common_pvt.validate_batch

776: ,g_pkg_name) THEN
777: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
778: RAISE fnd_api.g_exc_error;
779: END IF;
780: gme_common_pvt.validate_batch
781: (p_batch_header_rec => p_batch_header_rec
782: ,p_org_code => p_org_code
783: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
784: ,x_batch_header_rec => l_batch_header_rec

Line 783: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

779: END IF;
780: gme_common_pvt.validate_batch
781: (p_batch_header_rec => p_batch_header_rec
782: ,p_org_code => p_org_code
783: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
784: ,x_batch_header_rec => l_batch_header_rec
785: ,x_message_count => x_message_count
786: ,x_message_list => x_message_list
787: ,x_return_status => x_return_status );

Line 799: gme_common_pvt.log_message ('GME_INVALID_QUANTITY_TYPE');

795: END IF;
796:
797: /* Check for p_qty_type */
798: IF (p_qty_type NOT IN (0, 1) ) THEN
799: gme_common_pvt.log_message ('GME_INVALID_QUANTITY_TYPE');
800: RAISE fnd_api.g_exc_error;
801: END IF;
802:
803: /* Check for p_recalc_dates */

Line 805: gme_common_pvt.log_message ('GME_INVALID_FIELD'

801: END IF;
802:
803: /* Check for p_recalc_dates */
804: IF (p_recalc_dates NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
805: gme_common_pvt.log_message ('GME_INVALID_FIELD'
806: ,'FIELD'
807: ,'p_recalc_dates');
808: RAISE fnd_api.g_exc_error;
809: END IF;

Line 813: gme_common_pvt.log_message ('GME_INVALID_FIELD'

809: END IF;
810:
811: /* Check for p_use_workday_cal */
812: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
813: gme_common_pvt.log_message ('GME_INVALID_FIELD'
814: ,'FIELD'
815: ,'p_use_workday_cal');
816: RAISE fnd_api.g_exc_error;
817: END IF;

Line 821: gme_common_pvt.log_message ('GME_INVALID_FIELD'

817: END IF;
818:
819: /* Check for p_contiguity_override */
820: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
821: gme_common_pvt.log_message ('GME_INVALID_FIELD'
822: ,'FIELD'
823: ,'p_contiguity_override');
824: RAISE fnd_api.g_exc_error;
825: END IF;

Line 864: gme_common_pvt.log_message ('GME_SCALE_SUCCESS');

860: RAISE scale_batch_failed;
861: END IF;
862: --Bug#5459105 End
863:
864: gme_common_pvt.log_message ('GME_SCALE_SUCCESS');
865: gme_common_pvt.count_and_get (x_count => x_message_count
866: ,p_encoded => fnd_api.g_false
867: ,x_data => x_message_list);
868:

Line 865: gme_common_pvt.count_and_get (x_count => x_message_count

861: END IF;
862: --Bug#5459105 End
863:
864: gme_common_pvt.log_message ('GME_SCALE_SUCCESS');
865: gme_common_pvt.count_and_get (x_count => x_message_count
866: ,p_encoded => fnd_api.g_false
867: ,x_data => x_message_list);
868:
869: IF g_debug <= gme_debug.g_log_procedure THEN

Line 877: gme_common_pvt.count_and_get (x_count => x_message_count

873: EXCEPTION
874: WHEN scale_batch_failed THEN
875: ROLLBACK TO SAVEPOINT scale_batch;
876: x_batch_header_rec := NULL;
877: gme_common_pvt.count_and_get (x_count => x_message_count
878: ,p_encoded => fnd_api.g_false
879: ,x_data => x_message_list);
880: WHEN fnd_api.g_exc_error THEN
881: ROLLBACK TO SAVEPOINT scale_batch;

Line 884: gme_common_pvt.count_and_get (x_count => x_message_count

880: WHEN fnd_api.g_exc_error THEN
881: ROLLBACK TO SAVEPOINT scale_batch;
882: x_batch_header_rec := NULL;
883: x_return_status := fnd_api.g_ret_sts_error;
884: gme_common_pvt.count_and_get (x_count => x_message_count
885: ,p_encoded => fnd_api.g_false
886: ,x_data => x_message_list);
887: WHEN OTHERS THEN
888: ROLLBACK TO SAVEPOINT scale_batch;

Line 940: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

936: IF NOT fnd_api.compatible_api_call (2.0
937: ,p_api_version
938: ,'theoretical_yield_batch'
939: ,g_pkg_name) THEN
940: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
941: RAISE fnd_api.g_exc_error;
942: END IF;
943: gme_common_pvt.validate_batch
944: (p_batch_header_rec => p_batch_header_rec

Line 943: gme_common_pvt.validate_batch

939: ,g_pkg_name) THEN
940: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
941: RAISE fnd_api.g_exc_error;
942: END IF;
943: gme_common_pvt.validate_batch
944: (p_batch_header_rec => p_batch_header_rec
945: ,p_org_code => p_org_code
946: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
947: ,x_batch_header_rec => l_batch_header_rec

Line 946: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

942: END IF;
943: gme_common_pvt.validate_batch
944: (p_batch_header_rec => p_batch_header_rec
945: ,p_org_code => p_org_code
946: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
947: ,x_batch_header_rec => l_batch_header_rec
948: ,x_message_count => x_message_count
949: ,x_message_list => x_message_list
950: ,x_return_status => x_return_status );

Line 995: gme_common_pvt.count_and_get (x_count => x_message_count

991: EXCEPTION
992: WHEN fnd_api.g_exc_error THEN
993: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
994: x_return_status := fnd_api.g_ret_sts_error;
995: gme_common_pvt.count_and_get (x_count => x_message_count
996: ,p_encoded => fnd_api.g_false
997: ,x_data => x_message_list);
998: WHEN theoretical_yield_failed THEN
999: ROLLBACK TO SAVEPOINT theoretical_yield_batch;

Line 1000: gme_common_pvt.count_and_get (x_count => x_message_count

996: ,p_encoded => fnd_api.g_false
997: ,x_data => x_message_list);
998: WHEN theoretical_yield_failed THEN
999: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
1000: gme_common_pvt.count_and_get (x_count => x_message_count
1001: ,p_encoded => fnd_api.g_false
1002: ,x_data => x_message_list);
1003: WHEN OTHERS THEN
1004: ROLLBACK TO SAVEPOINT theoretical_yield_batch;

Line 1021: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

1017: # 10-MAR-2005 Punit Kumar Convergence changes
1018: #########################################################################*/
1019: PROCEDURE update_actual_rsrc_usage (
1020: p_api_version IN NUMBER := 2.0
1021: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1022: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1023: ,p_commit IN VARCHAR2 := fnd_api.g_false
1024: ,p_org_code IN VARCHAR2
1025: ,p_batch_no IN VARCHAR2 := NULL

Line 1069: gme_common_pvt.g_error_count := 0;

1065: x_return_status := fnd_api.g_ret_sts_success;
1066: /* Initialize message list and count if needed */
1067: IF p_init_msg_list = fnd_api.g_true THEN
1068: fnd_msg_pub.initialize;
1069: gme_common_pvt.g_error_count := 0;
1070: END IF;
1071:
1072: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1073: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

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

1070: END IF;
1071:
1072: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1073: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1074: gme_common_pvt.log_message(p_product_code => 'INV'
1075: ,p_message_code => 'INV_ORG_REQUIRED');
1076: RAISE fnd_api.g_exc_error;
1077: END IF;
1078: /* Setup the common constants used accross the apis */

Line 1079: gme_common_pvt.g_setup_done :=

1075: ,p_message_code => 'INV_ORG_REQUIRED');
1076: RAISE fnd_api.g_exc_error;
1077: END IF;
1078: /* Setup the common constants used accross the apis */
1079: gme_common_pvt.g_setup_done :=
1080: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1081: ,p_org_code => p_org_code);
1082:
1083: IF NOT gme_common_pvt.g_setup_done THEN

Line 1080: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

1076: RAISE fnd_api.g_exc_error;
1077: END IF;
1078: /* Setup the common constants used accross the apis */
1079: gme_common_pvt.g_setup_done :=
1080: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1081: ,p_org_code => p_org_code);
1082:
1083: IF NOT gme_common_pvt.g_setup_done THEN
1084: RAISE fnd_api.g_exc_error;

Line 1083: IF NOT gme_common_pvt.g_setup_done THEN

1079: gme_common_pvt.g_setup_done :=
1080: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1081: ,p_org_code => p_org_code);
1082:
1083: IF NOT gme_common_pvt.g_setup_done THEN
1084: RAISE fnd_api.g_exc_error;
1085: ELSE
1086: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1087: END IF;

Line 1086: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;

1082:
1083: IF NOT gme_common_pvt.g_setup_done THEN
1084: RAISE fnd_api.g_exc_error;
1085: ELSE
1086: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1087: END IF;
1088:
1089: /* Make sure we are call compatible */
1090: IF NOT fnd_api.compatible_api_call (2.0

Line 1094: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

1090: IF NOT fnd_api.compatible_api_call (2.0
1091: ,p_api_version
1092: ,'update_actual_resource_usage'
1093: ,g_pkg_name) THEN
1094: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1095: RAISE fnd_api.g_exc_error;
1096: END IF;
1097:
1098: IF p_validate_flexfields = 'T' THEN

Line 1099: gme_common_pvt.g_flex_validate_prof := 1;

1095: RAISE fnd_api.g_exc_error;
1096: END IF;
1097:
1098: IF p_validate_flexfields = 'T' THEN
1099: gme_common_pvt.g_flex_validate_prof := 1;
1100: ELSE
1101: gme_common_pvt.g_flex_validate_prof := 0;
1102: END IF;
1103: gme_common_pvt.set_timestamp;

Line 1101: gme_common_pvt.g_flex_validate_prof := 0;

1097:
1098: IF p_validate_flexfields = 'T' THEN
1099: gme_common_pvt.g_flex_validate_prof := 1;
1100: ELSE
1101: gme_common_pvt.g_flex_validate_prof := 0;
1102: END IF;
1103: gme_common_pvt.set_timestamp;
1104:
1105: IF g_debug <= gme_debug.g_log_procedure THEN

Line 1103: gme_common_pvt.set_timestamp;

1099: gme_common_pvt.g_flex_validate_prof := 1;
1100: ELSE
1101: gme_common_pvt.g_flex_validate_prof := 0;
1102: END IF;
1103: gme_common_pvt.set_timestamp;
1104:
1105: IF g_debug <= gme_debug.g_log_procedure THEN
1106: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1107: ||'BEFORE CALLING gme_resource_engine_pvt.update_actual_resource_usagep ' );

Line 1122: gme_common_pvt.g_flex_validate_prof := 0;

1118: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1119: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1120: ,x_return_status => x_return_status);
1121:
1122: gme_common_pvt.g_flex_validate_prof := 0;
1123:
1124: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1125:
1126: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 1169: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

1165: gme_debug.put_line ( 'Actual rsrc usage at '
1166: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1167: END IF;
1168:
1169: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1170: gme_common_pvt.count_and_get (x_count => x_message_count
1171: ,p_encoded => fnd_api.g_false
1172: ,x_data => x_message_list);
1173: EXCEPTION

Line 1170: gme_common_pvt.count_and_get (x_count => x_message_count

1166: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1167: END IF;
1168:
1169: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1170: gme_common_pvt.count_and_get (x_count => x_message_count
1171: ,p_encoded => fnd_api.g_false
1172: ,x_data => x_message_list);
1173: EXCEPTION
1174: WHEN fnd_api.g_exc_error THEN

Line 1177: gme_common_pvt.count_and_get (x_count => x_message_count

1173: EXCEPTION
1174: WHEN fnd_api.g_exc_error THEN
1175: x_return_status := fnd_api.g_ret_sts_error;
1176: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1177: gme_common_pvt.count_and_get (x_count => x_message_count
1178: ,p_encoded => fnd_api.g_false
1179: ,x_data => x_message_list);
1180: WHEN update_rsrc_usage THEN
1181: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;

Line 1182: gme_common_pvt.count_and_get (x_count => x_message_count

1178: ,p_encoded => fnd_api.g_false
1179: ,x_data => x_message_list);
1180: WHEN update_rsrc_usage THEN
1181: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1182: gme_common_pvt.count_and_get (x_count => x_message_count
1183: ,p_encoded => fnd_api.g_false
1184: ,x_data => x_message_list);
1185: WHEN OTHERS THEN
1186: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;

Line 1203: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

1199: # Convergence changes
1200: #########################################################################*/
1201: PROCEDURE insert_incr_actual_rsrc_txn (
1202: p_api_version IN NUMBER := 2.0
1203: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1204: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1205: ,p_commit IN VARCHAR2 := fnd_api.g_false
1206: ,p_org_code IN VARCHAR2
1207: ,p_batch_no IN VARCHAR2 := NULL

Line 1235: gme_common_pvt.g_error_count := 0;

1231: x_return_status := fnd_api.g_ret_sts_success;
1232: /* Initialize message list and count if needed */
1233: IF p_init_msg_list = fnd_api.g_true THEN
1234: fnd_msg_pub.initialize;
1235: gme_common_pvt.g_error_count := 0;
1236: END IF;
1237:
1238: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1239: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

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

1236: END IF;
1237:
1238: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1239: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1240: gme_common_pvt.log_message(p_product_code => 'INV'
1241: ,p_message_code => 'INV_ORG_REQUIRED');
1242: RAISE fnd_api.g_exc_error;
1243: END IF;
1244: gme_common_pvt.g_setup_done :=

Line 1244: gme_common_pvt.g_setup_done :=

1240: gme_common_pvt.log_message(p_product_code => 'INV'
1241: ,p_message_code => 'INV_ORG_REQUIRED');
1242: RAISE fnd_api.g_exc_error;
1243: END IF;
1244: gme_common_pvt.g_setup_done :=
1245: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1246: ,p_org_code => p_org_code);
1247:
1248: IF NOT gme_common_pvt.g_setup_done THEN

Line 1245: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

1241: ,p_message_code => 'INV_ORG_REQUIRED');
1242: RAISE fnd_api.g_exc_error;
1243: END IF;
1244: gme_common_pvt.g_setup_done :=
1245: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1246: ,p_org_code => p_org_code);
1247:
1248: IF NOT gme_common_pvt.g_setup_done THEN
1249: RAISE fnd_api.g_exc_error;

Line 1248: IF NOT gme_common_pvt.g_setup_done THEN

1244: gme_common_pvt.g_setup_done :=
1245: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1246: ,p_org_code => p_org_code);
1247:
1248: IF NOT gme_common_pvt.g_setup_done THEN
1249: RAISE fnd_api.g_exc_error;
1250: ELSE
1251: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1252: END IF;

Line 1251: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;

1247:
1248: IF NOT gme_common_pvt.g_setup_done THEN
1249: RAISE fnd_api.g_exc_error;
1250: ELSE
1251: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1252: END IF;
1253:
1254: /* Make sure we are call compatible */
1255: IF NOT fnd_api.compatible_api_call (2.0

Line 1259: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

1255: IF NOT fnd_api.compatible_api_call (2.0
1256: ,p_api_version
1257: ,'insert_incr_actual_rsrc_txn'
1258: ,g_pkg_name) THEN
1259: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1260: RAISE fnd_api.g_exc_error;
1261: END IF;
1262:
1263: /*Validate if org_code or organization_id is passed, or give error.*/

Line 1265: gme_common_pvt.g_flex_validate_prof := 1;

1261: END IF;
1262:
1263: /*Validate if org_code or organization_id is passed, or give error.*/
1264: IF p_validate_flexfields = 'T' THEN
1265: gme_common_pvt.g_flex_validate_prof := 1;
1266: ELSE
1267: gme_common_pvt.g_flex_validate_prof := 0;
1268: END IF;
1269: gme_common_pvt.set_timestamp;

Line 1267: gme_common_pvt.g_flex_validate_prof := 0;

1263: /*Validate if org_code or organization_id is passed, or give error.*/
1264: IF p_validate_flexfields = 'T' THEN
1265: gme_common_pvt.g_flex_validate_prof := 1;
1266: ELSE
1267: gme_common_pvt.g_flex_validate_prof := 0;
1268: END IF;
1269: gme_common_pvt.set_timestamp;
1270: IF g_debug <= gme_debug.g_log_procedure THEN
1271: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1269: gme_common_pvt.set_timestamp;

1265: gme_common_pvt.g_flex_validate_prof := 1;
1266: ELSE
1267: gme_common_pvt.g_flex_validate_prof := 0;
1268: END IF;
1269: gme_common_pvt.set_timestamp;
1270: IF g_debug <= gme_debug.g_log_procedure THEN
1271: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1272: ||'BEFORE CALLING gme_resource_engine_pvt.insert_incr_actual_rsrc_txnp ' );
1273: END IF;

Line 1286: gme_common_pvt.g_flex_validate_prof := 0;

1282: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1283: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1284: ,x_return_status => x_return_status);
1285: --Reset flex global
1286: gme_common_pvt.g_flex_validate_prof := 0;
1287: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1288:
1289: IF x_return_status = fnd_api.g_ret_sts_success THEN
1290: IF p_commit = fnd_api.g_true THEN

Line 1311: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

1307: gme_debug.put_line ( 'Insert Incr Actual rsrc usage at '
1308: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1309: END IF;
1310:
1311: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1312: gme_common_pvt.count_and_get (x_count => x_message_count
1313: ,p_encoded => fnd_api.g_false
1314: ,x_data => x_message_list);
1315: EXCEPTION

Line 1312: gme_common_pvt.count_and_get (x_count => x_message_count

1308: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1309: END IF;
1310:
1311: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1312: gme_common_pvt.count_and_get (x_count => x_message_count
1313: ,p_encoded => fnd_api.g_false
1314: ,x_data => x_message_list);
1315: EXCEPTION
1316: WHEN fnd_api.g_exc_error THEN

Line 1319: gme_common_pvt.count_and_get (x_count => x_message_count

1315: EXCEPTION
1316: WHEN fnd_api.g_exc_error THEN
1317: x_return_status := fnd_api.g_ret_sts_error;
1318: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;
1319: gme_common_pvt.count_and_get (x_count => x_message_count
1320: ,p_encoded => fnd_api.g_false
1321: ,x_data => x_message_list);
1322: WHEN OTHERS THEN
1323: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;

Line 1342: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

1338: # Convergence changes
1339: #########################################################################*/
1340: PROCEDURE insert_timed_actual_rsrc_txn (
1341: p_api_version IN NUMBER := 2.0
1342: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1343: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1344: ,p_commit IN VARCHAR2 := fnd_api.g_false
1345: ,p_org_code IN VARCHAR2
1346: ,p_batch_no IN VARCHAR2 := NULL

Line 1375: gme_common_pvt.g_error_count := 0;

1371:
1372: /* Initialize message list and count if needed */
1373: IF p_init_msg_list = fnd_api.g_true THEN
1374: fnd_msg_pub.initialize;
1375: gme_common_pvt.g_error_count := 0;
1376: END IF;
1377: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1378: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1379: gme_common_pvt.log_message(p_product_code => 'INV'

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

1375: gme_common_pvt.g_error_count := 0;
1376: END IF;
1377: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1378: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1379: gme_common_pvt.log_message(p_product_code => 'INV'
1380: ,p_message_code => 'INV_ORG_REQUIRED');
1381: RAISE fnd_api.g_exc_error;
1382: END IF;
1383:

Line 1384: gme_common_pvt.g_setup_done :=

1380: ,p_message_code => 'INV_ORG_REQUIRED');
1381: RAISE fnd_api.g_exc_error;
1382: END IF;
1383:
1384: gme_common_pvt.g_setup_done :=
1385: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1386: ,p_org_code => p_org_code);
1387:
1388: IF NOT gme_common_pvt.g_setup_done THEN

Line 1385: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

1381: RAISE fnd_api.g_exc_error;
1382: END IF;
1383:
1384: gme_common_pvt.g_setup_done :=
1385: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1386: ,p_org_code => p_org_code);
1387:
1388: IF NOT gme_common_pvt.g_setup_done THEN
1389: RAISE fnd_api.g_exc_error;

Line 1388: IF NOT gme_common_pvt.g_setup_done THEN

1384: gme_common_pvt.g_setup_done :=
1385: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1386: ,p_org_code => p_org_code);
1387:
1388: IF NOT gme_common_pvt.g_setup_done THEN
1389: RAISE fnd_api.g_exc_error;
1390: ELSE
1391: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1392: END IF;

Line 1391: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;

1387:
1388: IF NOT gme_common_pvt.g_setup_done THEN
1389: RAISE fnd_api.g_exc_error;
1390: ELSE
1391: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1392: END IF;
1393:
1394: /* Make sure we are call compatible */
1395: IF NOT fnd_api.compatible_api_call (2.0

Line 1399: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

1395: IF NOT fnd_api.compatible_api_call (2.0
1396: ,p_api_version
1397: ,'insert_timed_actual_rsrc_txn'
1398: ,g_pkg_name) THEN
1399: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1400: RAISE fnd_api.g_exc_error;
1401: END IF;
1402:
1403: gme_common_pvt.set_timestamp;

Line 1403: gme_common_pvt.set_timestamp;

1399: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1400: RAISE fnd_api.g_exc_error;
1401: END IF;
1402:
1403: gme_common_pvt.set_timestamp;
1404:
1405: IF p_validate_flexfields = 'T' THEN
1406: gme_common_pvt.g_flex_validate_prof := 1;
1407: ELSE

Line 1406: gme_common_pvt.g_flex_validate_prof := 1;

1402:
1403: gme_common_pvt.set_timestamp;
1404:
1405: IF p_validate_flexfields = 'T' THEN
1406: gme_common_pvt.g_flex_validate_prof := 1;
1407: ELSE
1408: gme_common_pvt.g_flex_validate_prof := 0;
1409: END IF;
1410:

Line 1408: gme_common_pvt.g_flex_validate_prof := 0;

1404:
1405: IF p_validate_flexfields = 'T' THEN
1406: gme_common_pvt.g_flex_validate_prof := 1;
1407: ELSE
1408: gme_common_pvt.g_flex_validate_prof := 0;
1409: END IF;
1410:
1411: IF g_debug <= gme_debug.g_log_procedure THEN
1412: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1428: gme_common_pvt.g_flex_validate_prof := 0;

1424: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1425: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1426: ,x_return_status => x_return_status);
1427: --Reset flex global
1428: gme_common_pvt.g_flex_validate_prof := 0;
1429: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1430:
1431: IF x_return_status = fnd_api.g_ret_sts_success THEN
1432: IF p_commit = fnd_api.g_true THEN

Line 1453: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

1449: gme_debug.put_line ( 'Insert timed Actual rsrc usage at '
1450: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1451: END IF;
1452:
1453: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1454: gme_common_pvt.count_and_get (x_count => x_message_count
1455: ,p_encoded => fnd_api.g_false
1456: ,x_data => x_message_list);
1457: EXCEPTION

Line 1454: gme_common_pvt.count_and_get (x_count => x_message_count

1450: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1451: END IF;
1452:
1453: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1454: gme_common_pvt.count_and_get (x_count => x_message_count
1455: ,p_encoded => fnd_api.g_false
1456: ,x_data => x_message_list);
1457: EXCEPTION
1458: WHEN fnd_api.g_exc_error THEN

Line 1461: gme_common_pvt.count_and_get (x_count => x_message_count

1457: EXCEPTION
1458: WHEN fnd_api.g_exc_error THEN
1459: x_return_status := fnd_api.g_ret_sts_error;
1460: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;
1461: gme_common_pvt.count_and_get (x_count => x_message_count
1462: ,p_encoded => fnd_api.g_false
1463: ,x_data => x_message_list);
1464: WHEN OTHERS THEN
1465: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;

Line 1490: := gme_common_pvt.g_max_errors

1486: #########################################################################*/
1487: PROCEDURE start_cmplt_actual_rsrc_txn (
1488: p_api_version IN NUMBER := 2.0
1489: ,p_validation_level IN NUMBER
1490: := gme_common_pvt.g_max_errors
1491: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1492: ,p_commit IN VARCHAR2 := fnd_api.g_false
1493: ,p_org_code IN VARCHAR2
1494: ,p_batch_no IN VARCHAR2 := NULL

Line 1523: gme_common_pvt.g_error_count := 0;

1519:
1520: /* Initialize message list and count if needed */
1521: IF p_init_msg_list = fnd_api.g_true THEN
1522: fnd_msg_pub.initialize;
1523: gme_common_pvt.g_error_count := 0;
1524: END IF;
1525: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1526: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1527: gme_common_pvt.log_message(p_product_code => 'INV'

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

1523: gme_common_pvt.g_error_count := 0;
1524: END IF;
1525: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1526: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1527: gme_common_pvt.log_message(p_product_code => 'INV'
1528: ,p_message_code => 'INV_ORG_REQUIRED');
1529: RAISE fnd_api.g_exc_error;
1530: END IF;
1531: gme_common_pvt.g_setup_done :=

Line 1531: gme_common_pvt.g_setup_done :=

1527: gme_common_pvt.log_message(p_product_code => 'INV'
1528: ,p_message_code => 'INV_ORG_REQUIRED');
1529: RAISE fnd_api.g_exc_error;
1530: END IF;
1531: gme_common_pvt.g_setup_done :=
1532: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1533: ,p_org_code => p_org_code);
1534: IF NOT gme_common_pvt.g_setup_done THEN
1535: RAISE fnd_api.g_exc_error;

Line 1532: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

1528: ,p_message_code => 'INV_ORG_REQUIRED');
1529: RAISE fnd_api.g_exc_error;
1530: END IF;
1531: gme_common_pvt.g_setup_done :=
1532: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1533: ,p_org_code => p_org_code);
1534: IF NOT gme_common_pvt.g_setup_done THEN
1535: RAISE fnd_api.g_exc_error;
1536: ELSE

Line 1534: IF NOT gme_common_pvt.g_setup_done THEN

1530: END IF;
1531: gme_common_pvt.g_setup_done :=
1532: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1533: ,p_org_code => p_org_code);
1534: IF NOT gme_common_pvt.g_setup_done THEN
1535: RAISE fnd_api.g_exc_error;
1536: ELSE
1537: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1538: END IF;

Line 1537: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;

1533: ,p_org_code => p_org_code);
1534: IF NOT gme_common_pvt.g_setup_done THEN
1535: RAISE fnd_api.g_exc_error;
1536: ELSE
1537: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1538: END IF;
1539:
1540: /* Make sure we are call compatible */
1541: IF NOT fnd_api.compatible_api_call (2.0,p_api_version,

Line 1543: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

1539:
1540: /* Make sure we are call compatible */
1541: IF NOT fnd_api.compatible_api_call (2.0,p_api_version,
1542: 'start_cmplt_actual_rsrc_txn',g_pkg_name) THEN
1543: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1544: RAISE fnd_api.g_exc_error;
1545: END IF;
1546: gme_common_pvt.set_timestamp;
1547: IF p_validate_flexfields = 'T' THEN

Line 1546: gme_common_pvt.set_timestamp;

1542: 'start_cmplt_actual_rsrc_txn',g_pkg_name) THEN
1543: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1544: RAISE fnd_api.g_exc_error;
1545: END IF;
1546: gme_common_pvt.set_timestamp;
1547: IF p_validate_flexfields = 'T' THEN
1548: gme_common_pvt.g_flex_validate_prof := 1;
1549: ELSE
1550: gme_common_pvt.g_flex_validate_prof := 0;

Line 1548: gme_common_pvt.g_flex_validate_prof := 1;

1544: RAISE fnd_api.g_exc_error;
1545: END IF;
1546: gme_common_pvt.set_timestamp;
1547: IF p_validate_flexfields = 'T' THEN
1548: gme_common_pvt.g_flex_validate_prof := 1;
1549: ELSE
1550: gme_common_pvt.g_flex_validate_prof := 0;
1551: END IF;
1552:

Line 1550: gme_common_pvt.g_flex_validate_prof := 0;

1546: gme_common_pvt.set_timestamp;
1547: IF p_validate_flexfields = 'T' THEN
1548: gme_common_pvt.g_flex_validate_prof := 1;
1549: ELSE
1550: gme_common_pvt.g_flex_validate_prof := 0;
1551: END IF;
1552:
1553: IF g_debug <= gme_debug.g_log_procedure THEN
1554: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1570: gme_common_pvt.g_flex_validate_prof := 0;

1566: ,p_rsrc_txn_rec => l_rsrc_txn_rec
1567: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1568: ,x_return_status => x_return_status);
1569: -----Reset flex global
1570: gme_common_pvt.g_flex_validate_prof := 0;
1571: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1572:
1573: /*end */
1574: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 1596: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

1592: gme_debug.put_line ( 'start Actual rsrc txn at '
1593: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1594: END IF;
1595:
1596: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1597: gme_common_pvt.count_and_get (x_count => x_message_count
1598: ,p_encoded => fnd_api.g_false
1599: ,x_data => x_message_list);
1600: EXCEPTION

Line 1597: gme_common_pvt.count_and_get (x_count => x_message_count

1593: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1594: END IF;
1595:
1596: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1597: gme_common_pvt.count_and_get (x_count => x_message_count
1598: ,p_encoded => fnd_api.g_false
1599: ,x_data => x_message_list);
1600: EXCEPTION
1601: WHEN fnd_api.g_exc_error THEN

Line 1604: gme_common_pvt.count_and_get (x_count => x_message_count

1600: EXCEPTION
1601: WHEN fnd_api.g_exc_error THEN
1602: x_return_status := fnd_api.g_ret_sts_error;
1603: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;
1604: gme_common_pvt.count_and_get (x_count => x_message_count
1605: ,p_encoded => fnd_api.g_false
1606: ,x_data => x_message_list);
1607: WHEN OTHERS THEN
1608: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;

Line 1628: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

1624: # Convergence changes
1625: #########################################################################*/
1626: PROCEDURE end_cmplt_actual_rsrc_txn (
1627: p_api_version IN NUMBER := 2.0
1628: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1629: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1630: ,p_commit IN VARCHAR2 := fnd_api.g_false
1631: ,p_instance_no IN NUMBER := NULL
1632: ,p_reason_name IN VARCHAR2 := NULL

Line 1654: gme_common_pvt.g_error_count := 0;

1650:
1651: /* Initialize message list and count if needed */
1652: IF p_init_msg_list = fnd_api.g_true THEN
1653: fnd_msg_pub.initialize;
1654: gme_common_pvt.g_error_count := 0;
1655: END IF;
1656: /* Set the return status to success initially */
1657: x_return_status := fnd_api.g_ret_sts_success;
1658: l_rsrc_txn_rec := p_rsrc_txn_rec;

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

1656: /* Set the return status to success initially */
1657: x_return_status := fnd_api.g_ret_sts_success;
1658: l_rsrc_txn_rec := p_rsrc_txn_rec;
1659: IF (l_rsrc_txn_rec.organization_id IS NULL ) THEN
1660: gme_common_pvt.log_message(p_product_code => 'INV'
1661: ,p_message_code => 'INV_ORG_REQUIRED');
1662: RAISE fnd_api.g_exc_error;
1663: END IF;
1664: /* Setup the common constants used accross the apis */

Line 1665: gme_common_pvt.g_setup_done :=

1661: ,p_message_code => 'INV_ORG_REQUIRED');
1662: RAISE fnd_api.g_exc_error;
1663: END IF;
1664: /* Setup the common constants used accross the apis */
1665: gme_common_pvt.g_setup_done :=
1666: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1667: ,p_org_code => null);
1668:
1669: IF NOT gme_common_pvt.g_setup_done THEN

Line 1666: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id

1662: RAISE fnd_api.g_exc_error;
1663: END IF;
1664: /* Setup the common constants used accross the apis */
1665: gme_common_pvt.g_setup_done :=
1666: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1667: ,p_org_code => null);
1668:
1669: IF NOT gme_common_pvt.g_setup_done THEN
1670: RAISE fnd_api.g_exc_error;

Line 1669: IF NOT gme_common_pvt.g_setup_done THEN

1665: gme_common_pvt.g_setup_done :=
1666: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1667: ,p_org_code => null);
1668:
1669: IF NOT gme_common_pvt.g_setup_done THEN
1670: RAISE fnd_api.g_exc_error;
1671: ELSE
1672: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1673: END IF;

Line 1672: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;

1668:
1669: IF NOT gme_common_pvt.g_setup_done THEN
1670: RAISE fnd_api.g_exc_error;
1671: ELSE
1672: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1673: END IF;
1674:
1675: /* Make sure we are call compatible */
1676: IF NOT fnd_api.compatible_api_call (2.0

Line 1680: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

1676: IF NOT fnd_api.compatible_api_call (2.0
1677: ,p_api_version
1678: ,'end_cmplt_actual_rsrc_txn'
1679: ,g_pkg_name) THEN
1680: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1681: RAISE fnd_api.g_exc_error;
1682: END IF;
1683: gme_common_pvt.set_timestamp;
1684: IF p_validate_flexfields = 'T' THEN

Line 1683: gme_common_pvt.set_timestamp;

1679: ,g_pkg_name) THEN
1680: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1681: RAISE fnd_api.g_exc_error;
1682: END IF;
1683: gme_common_pvt.set_timestamp;
1684: IF p_validate_flexfields = 'T' THEN
1685: gme_common_pvt.g_flex_validate_prof := 1;
1686: ELSE
1687: gme_common_pvt.g_flex_validate_prof := 0;

Line 1685: gme_common_pvt.g_flex_validate_prof := 1;

1681: RAISE fnd_api.g_exc_error;
1682: END IF;
1683: gme_common_pvt.set_timestamp;
1684: IF p_validate_flexfields = 'T' THEN
1685: gme_common_pvt.g_flex_validate_prof := 1;
1686: ELSE
1687: gme_common_pvt.g_flex_validate_prof := 0;
1688: END IF;
1689:

Line 1687: gme_common_pvt.g_flex_validate_prof := 0;

1683: gme_common_pvt.set_timestamp;
1684: IF p_validate_flexfields = 'T' THEN
1685: gme_common_pvt.g_flex_validate_prof := 1;
1686: ELSE
1687: gme_common_pvt.g_flex_validate_prof := 0;
1688: END IF;
1689:
1690: IF g_debug <= gme_debug.g_log_procedure THEN
1691: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1702: gme_common_pvt.g_flex_validate_prof := 0;

1698: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1699: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1700: ,x_return_status => x_return_status);
1701:
1702: gme_common_pvt.g_flex_validate_prof := 0;
1703: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1704:
1705: /* end */
1706: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 1728: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

1724: gme_debug.put_line ( 'Insert Incr Actual rsrc usage at '
1725: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1726: END IF;
1727:
1728: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1729: gme_common_pvt.count_and_get (x_count => x_message_count
1730: ,p_encoded => fnd_api.g_false
1731: ,x_data => x_message_list);
1732: EXCEPTION

Line 1729: gme_common_pvt.count_and_get (x_count => x_message_count

1725: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1726: END IF;
1727:
1728: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1729: gme_common_pvt.count_and_get (x_count => x_message_count
1730: ,p_encoded => fnd_api.g_false
1731: ,x_data => x_message_list);
1732: EXCEPTION
1733: WHEN fnd_api.g_exc_error THEN

Line 1736: gme_common_pvt.count_and_get (x_count => x_message_count

1732: EXCEPTION
1733: WHEN fnd_api.g_exc_error THEN
1734: x_return_status := fnd_api.g_ret_sts_error;
1735: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;
1736: gme_common_pvt.count_and_get (x_count => x_message_count
1737: ,p_encoded => fnd_api.g_false
1738: ,x_data => x_message_list);
1739: WHEN OTHERS THEN
1740: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;

Line 1788: gme_common_pvt.validate_batch

1784: /* Initialize message list and count if needed */
1785: IF p_init_msg_list = fnd_api.g_true THEN
1786: fnd_msg_pub.initialize;
1787: END IF;
1788: gme_common_pvt.validate_batch
1789: (p_batch_header_rec => p_batch_header_rec
1790: ,p_org_code => p_org_code
1791: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
1792: ,x_batch_header_rec => l_batch_header_rec

Line 1791: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

1787: END IF;
1788: gme_common_pvt.validate_batch
1789: (p_batch_header_rec => p_batch_header_rec
1790: ,p_org_code => p_org_code
1791: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
1792: ,x_batch_header_rec => l_batch_header_rec
1793: ,x_message_count => x_message_count
1794: ,x_message_list => x_message_list
1795: ,x_return_status => x_return_status );

Line 1810: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

1806: IF NOT fnd_api.compatible_api_call (2.0
1807: ,p_api_version
1808: ,'reschedule_batch'
1809: ,g_pkg_name) THEN
1810: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1811: RAISE fnd_api.g_exc_error;
1812: END IF;
1813:
1814: IF g_debug <= gme_debug.g_log_procedure THEN

Line 1824: gme_common_pvt.log_message ('GME_NO_NULL_DATES');

1820: END IF;
1821:
1822: IF l_batch_header_rec.plan_start_date IS NULL
1823: AND l_batch_header_rec.plan_cmplt_date IS NULL THEN
1824: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
1825: RAISE fnd_api.g_exc_error;
1826: END IF;
1827:
1828: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending) THEN

Line 1828: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending) THEN

1824: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
1825: RAISE fnd_api.g_exc_error;
1826: END IF;
1827:
1828: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending) THEN
1829: IF l_batch_header_rec.plan_start_date IS NOT NULL
1830: AND l_batch_header_rec.plan_cmplt_date IS NOT NULL
1831: AND l_batch_header_rec.plan_start_date >
1832: l_batch_header_rec.plan_cmplt_date THEN

Line 1834: gme_common_pvt.log_message ('GME_CMPLT_START_DT');

1830: AND l_batch_header_rec.plan_cmplt_date IS NOT NULL
1831: AND l_batch_header_rec.plan_start_date >
1832: l_batch_header_rec.plan_cmplt_date THEN
1833: --Bug#5439736 replaced the message
1834: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1835: RAISE fnd_api.g_exc_error;
1836: END IF;
1837: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1838: IF l_batch_header_rec.plan_cmplt_date IS NULL THEN

Line 1837: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN

1833: --Bug#5439736 replaced the message
1834: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1835: RAISE fnd_api.g_exc_error;
1836: END IF;
1837: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1838: IF l_batch_header_rec.plan_cmplt_date IS NULL THEN
1839: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
1840: RAISE fnd_api.g_exc_error;
1841: ELSE

Line 1839: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');

1835: RAISE fnd_api.g_exc_error;
1836: END IF;
1837: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1838: IF l_batch_header_rec.plan_cmplt_date IS NULL THEN
1839: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
1840: RAISE fnd_api.g_exc_error;
1841: ELSE
1842: IF NVL (l_batch_header_rec.plan_start_date
1843: ,l_batch_header_rec.plan_start_date) <>

Line 1845: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');

1841: ELSE
1842: IF NVL (l_batch_header_rec.plan_start_date
1843: ,l_batch_header_rec.plan_start_date) <>
1844: l_batch_header_rec.plan_start_date THEN
1845: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');
1846: RAISE fnd_api.g_exc_error;
1847: END IF;
1848:
1849: IF l_batch_header_rec.plan_cmplt_date <

Line 1851: gme_common_pvt.log_message ('GME_CMPLT_START_DT');

1847: END IF;
1848:
1849: IF l_batch_header_rec.plan_cmplt_date <
1850: l_batch_header_rec.plan_start_date THEN
1851: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1852: RAISE fnd_api.g_exc_error;
1853: END IF;
1854: END IF;
1855: ELSE /* batch status other than pending, WIP */

Line 1857: gme_common_pvt.log_message ('GME_API_INV_BATCH_RESCHED');

1853: END IF;
1854: END IF;
1855: ELSE /* batch status other than pending, WIP */
1856: -- Batch cannot be rescheduled. Batch must have a status of pending or WIP to be rescheduled.
1857: gme_common_pvt.log_message ('GME_API_INV_BATCH_RESCHED');
1858: RAISE fnd_api.g_exc_error;
1859: END IF;
1860: /* Check plan_start_date > plan_cmplt_date if batch_status = pending */
1861: IF p_use_workday_cal IS NOT NULL THEN

Line 1865: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

1861: IF p_use_workday_cal IS NOT NULL THEN
1862: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN
1863: l_use := p_use_workday_cal;
1864: ELSE
1865: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1866: ,'FIELD_NAME'
1867: ,'p_use_workday_cal');
1868: RAISE fnd_api.g_exc_error;
1869: END IF;

Line 1873: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

1869: END IF;
1870: IF p_contiguity_override IS NOT NULL THEN
1871: IF p_contiguity_override NOT IN
1872: (fnd_api.g_true, fnd_api.g_false) THEN
1873: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1874: ,'FIELD_NAME'
1875: ,'p_contiguity_override');
1876: RAISE fnd_api.g_exc_error;
1877: END IF;

Line 1884: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN

1880: l_use := fnd_api.g_false;
1881: END IF; /* p_use_workday_cal IS NOT NULL */
1882:
1883: IF l_use = fnd_api.g_true THEN
1884: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
1885: -- Check if plan_start_date falls on non working day for pending batch.
1886: IF l_batch_header_rec.batch_status =
1887: gme_common_pvt.g_batch_pending
1888: AND l_batch_header_rec.plan_start_date IS NOT NULL THEN

Line 1887: gme_common_pvt.g_batch_pending

1883: IF l_use = fnd_api.g_true THEN
1884: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
1885: -- Check if plan_start_date falls on non working day for pending batch.
1886: IF l_batch_header_rec.batch_status =
1887: gme_common_pvt.g_batch_pending
1888: AND l_batch_header_rec.plan_start_date IS NOT NULL THEN
1889: IF NOT gmp_calendar_api.is_working_daytime
1890: (1.0
1891: ,FALSE

Line 1892: ,gme_common_pvt.g_calendar_code

1888: AND l_batch_header_rec.plan_start_date IS NOT NULL THEN
1889: IF NOT gmp_calendar_api.is_working_daytime
1890: (1.0
1891: ,FALSE
1892: ,gme_common_pvt.g_calendar_code
1893: ,l_batch_header_rec.plan_start_date
1894: ,0
1895: ,l_return_status) THEN
1896: gme_common_pvt.log_message

Line 1896: gme_common_pvt.log_message

1892: ,gme_common_pvt.g_calendar_code
1893: ,l_batch_header_rec.plan_start_date
1894: ,0
1895: ,l_return_status) THEN
1896: gme_common_pvt.log_message
1897: ('GME_NON_WORKING_TIME'
1898: ,'PDATE'
1899: ,TO_CHAR (l_batch_header_rec.plan_start_date
1900: ,'DD-MON-YYYY HH24:MI:SS') );

Line 1905: /* l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending */

1901: RAISE fnd_api.g_exc_error;
1902: END IF;
1903: END IF;
1904:
1905: /* l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending */
1906:
1907: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch.
1908: IF l_batch_header_rec.batch_status IN
1909: (gme_common_pvt.g_batch_pending

Line 1909: (gme_common_pvt.g_batch_pending

1905: /* l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending */
1906:
1907: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch.
1908: IF l_batch_header_rec.batch_status IN
1909: (gme_common_pvt.g_batch_pending
1910: ,gme_common_pvt.g_batch_wip)
1911: AND l_batch_header_rec.plan_cmplt_date IS NOT NULL THEN
1912: IF NOT gmp_calendar_api.is_working_daytime
1913: (1.0

Line 1910: ,gme_common_pvt.g_batch_wip)

1906:
1907: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch.
1908: IF l_batch_header_rec.batch_status IN
1909: (gme_common_pvt.g_batch_pending
1910: ,gme_common_pvt.g_batch_wip)
1911: AND l_batch_header_rec.plan_cmplt_date IS NOT NULL THEN
1912: IF NOT gmp_calendar_api.is_working_daytime
1913: (1.0
1914: ,FALSE

Line 1915: ,gme_common_pvt.g_calendar_code

1911: AND l_batch_header_rec.plan_cmplt_date IS NOT NULL THEN
1912: IF NOT gmp_calendar_api.is_working_daytime
1913: (1.0
1914: ,FALSE
1915: ,gme_common_pvt.g_calendar_code
1916: ,l_batch_header_rec.plan_cmplt_date
1917: ,1
1918: ,l_return_status) THEN
1919: gme_common_pvt.log_message

Line 1919: gme_common_pvt.log_message

1915: ,gme_common_pvt.g_calendar_code
1916: ,l_batch_header_rec.plan_cmplt_date
1917: ,1
1918: ,l_return_status) THEN
1919: gme_common_pvt.log_message
1920: ('GME_NON_WORKING_TIME'
1921: ,'PDATE'
1922: ,TO_CHAR (l_batch_header_rec.plan_cmplt_date
1923: ,'DD-MON-YYYY HH24:MI:SS') );

Line 1928: /* l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) */

1924: RAISE fnd_api.g_exc_error;
1925: END IF;
1926: END IF;
1927:
1928: /* l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) */
1929: IF l_batch_header_rec.plan_cmplt_date IS NULL
1930: AND l_batch_header_rec.plan_start_date IS NULL THEN
1931: IF NOT gmp_calendar_api.is_working_daytime
1932: (1.0

Line 1934: ,gme_common_pvt.g_calendar_code

1930: AND l_batch_header_rec.plan_start_date IS NULL THEN
1931: IF NOT gmp_calendar_api.is_working_daytime
1932: (1.0
1933: ,FALSE
1934: ,gme_common_pvt.g_calendar_code
1935: ,SYSDATE
1936: ,0
1937: ,l_return_status) THEN
1938: gme_common_pvt.log_message ('GME_NON_WORKING_TIME' ,'PDATE'

Line 1938: gme_common_pvt.log_message ('GME_NON_WORKING_TIME' ,'PDATE'

1934: ,gme_common_pvt.g_calendar_code
1935: ,SYSDATE
1936: ,0
1937: ,l_return_status) THEN
1938: gme_common_pvt.log_message ('GME_NON_WORKING_TIME' ,'PDATE'
1939: ,TO_CHAR (SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
1940: RAISE fnd_api.g_exc_error;
1941: END IF;
1942: END IF; /* l_batch_header_rec.plan_cmplt_date IS NULL */

Line 1943: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */

1939: ,TO_CHAR (SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
1940: RAISE fnd_api.g_exc_error;
1941: END IF;
1942: END IF; /* l_batch_header_rec.plan_cmplt_date IS NULL */
1943: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
1944: END IF; /* l_use = FND_API.G_TRUE */
1945:
1946: IF (g_debug = gme_debug.g_log_statement) THEN
1947: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'

Line 1996: gme_common_pvt.count_and_get (x_count => x_message_count

1992: WHEN fnd_api.g_exc_error THEN
1993: ROLLBACK TO SAVEPOINT reschedule_batch;
1994: x_batch_header_rec := NULL;
1995: x_return_status := fnd_api.g_ret_sts_error;
1996: gme_common_pvt.count_and_get (x_count => x_message_count
1997: ,p_encoded => fnd_api.g_false
1998: ,x_data => x_message_list);
1999: WHEN reschedule_batch_failed THEN
2000: ROLLBACK TO SAVEPOINT reschedule_batch;

Line 2002: gme_common_pvt.count_and_get (x_count => x_message_count

1998: ,x_data => x_message_list);
1999: WHEN reschedule_batch_failed THEN
2000: ROLLBACK TO SAVEPOINT reschedule_batch;
2001: x_batch_header_rec := NULL;
2002: gme_common_pvt.count_and_get (x_count => x_message_count
2003: ,p_encoded => fnd_api.g_false
2004: ,x_data => x_message_list);
2005: WHEN OTHERS THEN
2006: ROLLBACK TO SAVEPOINT reschedule_batch;

Line 2066: gme_common_pvt.Validate_batch_step (

2062: fnd_msg_pub.initialize;
2063: END IF;
2064:
2065: /* Validate Input parameters */
2066: gme_common_pvt.Validate_batch_step (
2067: p_batch_step_rec => p_batch_step_rec
2068: ,p_org_code => p_org_code
2069: ,p_batch_no => p_batch_no
2070: ,x_batch_step_rec => l_batch_step_rec

Line 2089: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

2085: IF NOT fnd_api.compatible_api_call (2.0
2086: ,p_api_version
2087: ,'reschedule_batch_step'
2088: ,g_pkg_name) THEN
2089: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2090: RAISE fnd_api.g_exc_error;
2091: END IF;
2092:
2093: /* Navin: Check whether both l_batch_step_rec.plan_start_date, l_batch_step_rec.plan_cmplt_date are null. If so, RAISE error; */

Line 2097: gme_common_pvt.log_message ('GME_NO_NULL_DATES');

2093: /* Navin: Check whether both l_batch_step_rec.plan_start_date, l_batch_step_rec.plan_cmplt_date are null. If so, RAISE error; */
2094: IF p_batch_step_rec.plan_start_date IS NULL
2095: AND p_batch_step_rec.plan_cmplt_date IS NULL THEN
2096: -- Both planned start and planned completion dates cannot be null.
2097: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
2098: RAISE fnd_api.g_exc_error;
2099: END IF;
2100:
2101: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN

Line 2101: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN

2097: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
2098: RAISE fnd_api.g_exc_error;
2099: END IF;
2100:
2101: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN
2102: -- You cannot reschedule steps for firm planned orders.
2103: gme_common_pvt.log_message ('GME_FPO_STEP_RESCH_ERR');
2104: -- Navin: PENDING: New Message
2105: RAISE fnd_api.g_exc_error;

Line 2103: gme_common_pvt.log_message ('GME_FPO_STEP_RESCH_ERR');

2099: END IF;
2100:
2101: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN
2102: -- You cannot reschedule steps for firm planned orders.
2103: gme_common_pvt.log_message ('GME_FPO_STEP_RESCH_ERR');
2104: -- Navin: PENDING: New Message
2105: RAISE fnd_api.g_exc_error;
2106: END IF;
2107:

Line 2109: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

2105: RAISE fnd_api.g_exc_error;
2106: END IF;
2107:
2108: IF p_reschedule_preceding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2109: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2110: ,'FIELD_NAME'
2111: ,'p_reschedule_preceding');
2112: RAISE fnd_api.g_exc_error;
2113: END IF;

Line 2116: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

2112: RAISE fnd_api.g_exc_error;
2113: END IF;
2114:
2115: IF p_reschedule_succeeding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2116: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2117: ,'FIELD_NAME'
2118: ,'p_reschedule_succeeding');
2119: RAISE fnd_api.g_exc_error;
2120: END IF;

Line 2125: IF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_pending) THEN

2121:
2122: l_batch_step_rec.plan_start_date := p_batch_step_rec.plan_start_date;
2123: l_batch_step_rec.plan_cmplt_date := p_batch_step_rec.plan_cmplt_date;
2124: /* Navin: Check plan_start_date > plan_cmplt_date if step_status = pending */
2125: IF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_pending) THEN
2126: IF l_batch_step_rec.plan_start_date IS NOT NULL
2127: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL
2128: AND l_batch_step_rec.plan_start_date >
2129: l_batch_step_rec.plan_cmplt_date THEN

Line 2131: gme_common_pvt.log_message ('GME_CMPLT_START_DT');

2127: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL
2128: AND l_batch_step_rec.plan_start_date >
2129: l_batch_step_rec.plan_cmplt_date THEN
2130: -- The planned start cannot be greater than the planned completion date.
2131: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2132: -- Navin: PENDING: New Message
2133: RAISE fnd_api.g_exc_error;
2134: END IF;
2135: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN

Line 2135: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN

2131: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2132: -- Navin: PENDING: New Message
2133: RAISE fnd_api.g_exc_error;
2134: END IF;
2135: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN
2136: IF l_batch_step_rec.plan_cmplt_date IS NULL THEN
2137: -- Planned completion dates cannot be null for a batch with status of WIP.
2138: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
2139: -- Navin: PENDING: New Message

Line 2138: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');

2134: END IF;
2135: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN
2136: IF l_batch_step_rec.plan_cmplt_date IS NULL THEN
2137: -- Planned completion dates cannot be null for a batch with status of WIP.
2138: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
2139: -- Navin: PENDING: New Message
2140: RAISE fnd_api.g_exc_error;
2141: ELSE
2142: IF NVL (l_batch_step_rec.plan_start_date

Line 2146: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');

2142: IF NVL (l_batch_step_rec.plan_start_date
2143: ,l_batch_step_rec.plan_start_date) <>
2144: l_batch_step_rec.plan_start_date THEN
2145: -- Cannot update planned start date.
2146: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');
2147: -- Navin: PENDING: New Message
2148: RAISE fnd_api.g_exc_error;
2149: END IF;
2150:

Line 2154: gme_common_pvt.log_message ('GME_CMPLT_START_DT');

2150:
2151: IF l_batch_step_rec.plan_cmplt_date <
2152: l_batch_step_rec.plan_start_date THEN
2153: -- Planned completion date cannot be earlier than the planned start date.
2154: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2155: -- Navin: PENDING: New Message
2156: RAISE fnd_api.g_exc_error;
2157: END IF;
2158: END IF;

Line 2161: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_RESCH');

2157: END IF;
2158: END IF;
2159: ELSE /*step status other than pending, WIP */
2160: --Bug#5439736
2161: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_RESCH');
2162: RAISE fnd_api.g_exc_error;
2163: END IF;
2164:
2165: -- When enforce_step_dependency option is enforced then override Reschedule_preceding, Reschedule_succeeding fields.

Line 2178: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

2174: IF p_use_workday_cal IS NOT NULL THEN
2175: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN
2176: l_use := p_use_workday_cal;
2177: ELSE
2178: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2179: ,'FIELD_NAME'
2180: ,'p_use_workday_cal');
2181: RAISE fnd_api.g_exc_error;
2182: END IF;

Line 2187: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

2183:
2184: IF p_contiguity_override IS NOT NULL THEN
2185: IF p_contiguity_override NOT IN
2186: (fnd_api.g_true, fnd_api.g_false) THEN
2187: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2188: ,'FIELD_NAME'
2189: ,'p_contiguity_override');
2190: RAISE fnd_api.g_exc_error;
2191: END IF;

Line 2198: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN

2194: l_use := fnd_api.g_false;
2195: END IF; /* p_use_workday_cal IS NOT NULL */
2196:
2197: IF l_use = fnd_api.g_true THEN
2198: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
2199: -- Check if plan_start_date falls on non working day for pending batch step.
2200: IF l_batch_step_rec.step_status =
2201: gme_common_pvt.g_step_pending
2202: AND l_batch_step_rec.plan_start_date IS NOT NULL THEN

Line 2201: gme_common_pvt.g_step_pending

2197: IF l_use = fnd_api.g_true THEN
2198: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
2199: -- Check if plan_start_date falls on non working day for pending batch step.
2200: IF l_batch_step_rec.step_status =
2201: gme_common_pvt.g_step_pending
2202: AND l_batch_step_rec.plan_start_date IS NOT NULL THEN
2203: IF NOT gmp_calendar_api.is_working_daytime
2204: (1.0
2205: ,FALSE

Line 2206: ,gme_common_pvt.g_calendar_code

2202: AND l_batch_step_rec.plan_start_date IS NOT NULL THEN
2203: IF NOT gmp_calendar_api.is_working_daytime
2204: (1.0
2205: ,FALSE
2206: ,gme_common_pvt.g_calendar_code
2207: ,l_batch_step_rec.plan_start_date
2208: ,0
2209: ,l_return_status) THEN
2210: gme_common_pvt.log_message

Line 2210: gme_common_pvt.log_message

2206: ,gme_common_pvt.g_calendar_code
2207: ,l_batch_step_rec.plan_start_date
2208: ,0
2209: ,l_return_status) THEN
2210: gme_common_pvt.log_message
2211: ('GME_NON_WORKING_TIME'
2212: ,'PDATE'
2213: ,TO_CHAR (l_batch_step_rec.plan_start_date
2214: ,'DD-MON-YYYY HH24:MI:SS') );

Line 2221: (gme_common_pvt.g_step_pending

2217: END IF;
2218:
2219: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch step.
2220: IF l_batch_step_rec.step_status IN
2221: (gme_common_pvt.g_step_pending
2222: ,gme_common_pvt.g_step_wip)
2223: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL THEN
2224: gme_debug.put_line ('in cmplt');
2225:

Line 2222: ,gme_common_pvt.g_step_wip)

2218:
2219: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch step.
2220: IF l_batch_step_rec.step_status IN
2221: (gme_common_pvt.g_step_pending
2222: ,gme_common_pvt.g_step_wip)
2223: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL THEN
2224: gme_debug.put_line ('in cmplt');
2225:
2226: IF NOT gmp_calendar_api.is_working_daytime

Line 2229: ,gme_common_pvt.g_calendar_code

2225:
2226: IF NOT gmp_calendar_api.is_working_daytime
2227: (1.0
2228: ,FALSE
2229: ,gme_common_pvt.g_calendar_code
2230: ,l_batch_step_rec.plan_cmplt_date
2231: ,1
2232: ,l_return_status) THEN
2233: gme_common_pvt.log_message

Line 2233: gme_common_pvt.log_message

2229: ,gme_common_pvt.g_calendar_code
2230: ,l_batch_step_rec.plan_cmplt_date
2231: ,1
2232: ,l_return_status) THEN
2233: gme_common_pvt.log_message
2234: ('GME_NON_WORKING_TIME'
2235: ,'PDATE'
2236: ,TO_CHAR (l_batch_step_rec.plan_cmplt_date
2237: ,'DD-MON-YYYY HH24:MI:SS') );

Line 2247: ,gme_common_pvt.g_calendar_code

2243: AND l_batch_step_rec.plan_start_date IS NULL THEN
2244: IF NOT gmp_calendar_api.is_working_daytime
2245: (1.0
2246: ,FALSE
2247: ,gme_common_pvt.g_calendar_code
2248: ,SYSDATE
2249: ,0
2250: ,l_return_status) THEN
2251: gme_common_pvt.log_message

Line 2251: gme_common_pvt.log_message

2247: ,gme_common_pvt.g_calendar_code
2248: ,SYSDATE
2249: ,0
2250: ,l_return_status) THEN
2251: gme_common_pvt.log_message
2252: ('GME_NON_WORKING_TIME'
2253: ,'PDATE'
2254: ,TO_CHAR (SYSDATE
2255: ,'DD-MON-YYYY HH24:MI:SS') );

Line 2259: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */

2255: ,'DD-MON-YYYY HH24:MI:SS') );
2256: RAISE fnd_api.g_exc_error;
2257: END IF;
2258: END IF; /* l_batch_step_rec.plan_cmplt_date IS NULL */
2259: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
2260: END IF; /* l_use = FND_API.G_TRUE */
2261:
2262: IF (g_debug = gme_debug.g_log_statement) THEN
2263: gme_debug.put_line ( g_pkg_name

Line 2321: gme_common_pvt.count_and_get (x_count => x_message_count

2317: EXCEPTION
2318: WHEN reschedule_step_failed THEN
2319: ROLLBACK TO SAVEPOINT reschedule_step;
2320: x_batch_step_rec := NULL;
2321: gme_common_pvt.count_and_get (x_count => x_message_count
2322: ,p_encoded => fnd_api.g_false
2323: ,x_data => x_message_list);
2324: WHEN fnd_api.g_exc_error THEN
2325: ROLLBACK TO SAVEPOINT reschedule_step;

Line 2327: gme_common_pvt.count_and_get (x_count => x_message_count

2323: ,x_data => x_message_list);
2324: WHEN fnd_api.g_exc_error THEN
2325: ROLLBACK TO SAVEPOINT reschedule_step;
2326: x_return_status := fnd_api.g_ret_sts_error;
2327: gme_common_pvt.count_and_get (x_count => x_message_count
2328: ,p_encoded => fnd_api.g_false
2329: ,x_data => x_message_list);
2330: WHEN OTHERS THEN
2331: ROLLBACK TO SAVEPOINT reschedule_step;

Line 2343: := gme_common_pvt.g_max_errors

2339: /*************************************************************************/
2340: PROCEDURE create_batch_reservations (
2341: p_api_version IN NUMBER := 2.0
2342: ,p_validation_level IN NUMBER
2343: := gme_common_pvt.g_max_errors
2344: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2345: ,p_commit IN VARCHAR2 := fnd_api.g_false
2346: ,p_batch_rec IN gme_batch_header%ROWTYPE
2347: ,p_org_code IN VARCHAR2

Line 2374: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

2370: IF NOT fnd_api.compatible_api_call (2.0
2371: ,p_api_version
2372: ,'insert_batchstep_resource'
2373: ,g_pkg_name) THEN
2374: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2375: RAISE fnd_api.g_exc_error;
2376: END IF;
2377:
2378: /* Initialize message list and count if needed */

Line 2383: gme_common_pvt.set_timestamp;

2379: IF p_init_msg_list = fnd_api.g_true THEN
2380: fnd_msg_pub.initialize;
2381: END IF;
2382:
2383: gme_common_pvt.set_timestamp;
2384:
2385: /* IF p_batch_rec.batch_no IS NULL AND p_batch_rec.batch_id IS NULL THEN
2386: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
2387: RAISE fnd_api.g_exc_error;

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

2382:
2383: gme_common_pvt.set_timestamp;
2384:
2385: /* IF p_batch_rec.batch_no IS NULL AND p_batch_rec.batch_id IS NULL THEN
2386: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
2387: RAISE fnd_api.g_exc_error;
2388: END IF; */
2389: gme_common_pvt.validate_batch
2390: (p_batch_header_rec => p_batch_rec

Line 2389: gme_common_pvt.validate_batch

2385: /* IF p_batch_rec.batch_no IS NULL AND p_batch_rec.batch_id IS NULL THEN
2386: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
2387: RAISE fnd_api.g_exc_error;
2388: END IF; */
2389: gme_common_pvt.validate_batch
2390: (p_batch_header_rec => p_batch_rec
2391: ,p_org_code => p_org_code
2392: ,p_batch_type => gme_common_pvt.g_doc_type_batch
2393: ,x_batch_header_rec => l_batch_header_rec

Line 2392: ,p_batch_type => gme_common_pvt.g_doc_type_batch

2388: END IF; */
2389: gme_common_pvt.validate_batch
2390: (p_batch_header_rec => p_batch_rec
2391: ,p_org_code => p_org_code
2392: ,p_batch_type => gme_common_pvt.g_doc_type_batch
2393: ,x_batch_header_rec => l_batch_header_rec
2394: ,x_message_count => x_message_count
2395: ,x_message_list => x_message_list
2396: ,x_return_status => x_return_status );

Line 2408: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

2404: END IF;
2405:
2406: /* Verify Batch to be in pending or WIP status */
2407: IF l_batch_header_rec.batch_status NOT IN
2408: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2409: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2410: ,'PROCESS'
2411: ,'CREATE_LINE_RESERVATIONS');
2412: RAISE fnd_api.g_exc_error;

Line 2409: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'

2405:
2406: /* Verify Batch to be in pending or WIP status */
2407: IF l_batch_header_rec.batch_status NOT IN
2408: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2409: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2410: ,'PROCESS'
2411: ,'CREATE_LINE_RESERVATIONS');
2412: RAISE fnd_api.g_exc_error;
2413: END IF;

Line 2437: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

2433: END IF;
2434:
2435: gme_debug.put_line ( 'End of Create_Batch_Reservations at '
2436: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2437: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2438: EXCEPTION
2439: WHEN fnd_api.g_exc_error THEN
2440: x_return_status := fnd_api.g_ret_sts_error;
2441: ROLLBACK TO SAVEPOINT create_batch_reservations;

Line 2442: gme_common_pvt.count_and_get(x_count => x_message_count

2438: EXCEPTION
2439: WHEN fnd_api.g_exc_error THEN
2440: x_return_status := fnd_api.g_ret_sts_error;
2441: ROLLBACK TO SAVEPOINT create_batch_reservations;
2442: gme_common_pvt.count_and_get(x_count => x_message_count
2443: ,p_encoded => fnd_api.g_false
2444: ,x_data => x_message_list);
2445: WHEN OTHERS THEN
2446: ROLLBACK TO SAVEPOINT create_batch_reservations;

Line 2456: := gme_common_pvt.g_max_errors

2452: /*************************************************************************/
2453: PROCEDURE create_line_reservations (
2454: p_api_version IN NUMBER := 2.0
2455: ,p_validation_level IN NUMBER
2456: := gme_common_pvt.g_max_errors
2457: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2458: ,p_commit IN VARCHAR2 := fnd_api.g_false
2459: ,p_material_detail_id IN NUMBER
2460: ,p_org_code IN VARCHAR2

Line 2492: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

2488: IF NOT fnd_api.compatible_api_call (2.0
2489: ,p_api_version
2490: ,'insert_batchstep_resource'
2491: ,g_pkg_name) THEN
2492: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2493: RAISE fnd_api.g_exc_error;
2494: END IF;
2495:
2496: /* Initialize message list and count if needed */

Line 2501: gme_common_pvt.set_timestamp;

2497: IF p_init_msg_list = fnd_api.g_true THEN
2498: fnd_msg_pub.initialize;
2499: END IF;
2500:
2501: gme_common_pvt.set_timestamp;
2502: l_material_details_rec.material_detail_id := p_material_detail_id;
2503: l_material_details_rec.line_no := p_line_no;
2504: /* Ensure line_type is populated. Reservations only permitted for ingredient lines. */
2505: /* Line type is needed for retrieval based on key values */

Line 2508: gme_common_pvt.Validate_material_detail

2504: /* Ensure line_type is populated. Reservations only permitted for ingredient lines. */
2505: /* Line type is needed for retrieval based on key values */
2506: l_material_details_rec.line_type := -1;
2507:
2508: gme_common_pvt.Validate_material_detail
2509: (p_material_detail_rec => l_material_details_rec
2510: ,p_org_code => p_org_code
2511: ,p_batch_no => p_batch_no
2512: ,p_batch_type => 0

Line 2529: gme_common_pvt.log_message ('GME_INVALID_RSV_FOR_PHANTOM');

2525: l_material_details_rec := l_material_details_rec_out;
2526:
2527: /* Reservation cannot be against a phantom */
2528: IF l_material_details_rec.phantom_type IN (1, 2) THEN
2529: gme_common_pvt.log_message ('GME_INVALID_RSV_FOR_PHANTOM');
2530: RAISE fnd_api.g_exc_error;
2531: END IF;
2532:
2533: /* Reservation cannot be against a phantom */

Line 2535: gme_common_pvt.log_message ('GME_INVALID_LINE_FOR_RSV');

2531: END IF;
2532:
2533: /* Reservation cannot be against a phantom */
2534: IF l_material_details_rec.line_type <> -1 THEN
2535: gme_common_pvt.log_message ('GME_INVALID_LINE_FOR_RSV');
2536: RAISE fnd_api.g_exc_error;
2537: END IF;
2538:
2539: /* Verify that update_inventory is permitted for this batch */

Line 2541: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');

2537: END IF;
2538:
2539: /* Verify that update_inventory is permitted for this batch */
2540: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN
2541: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');
2542: RAISE fnd_api.g_exc_error;
2543: END IF;
2544:
2545: -- gme_debug.put_line(l_batch_header_rec.batch_status);

Line 2549: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

2545: -- gme_debug.put_line(l_batch_header_rec.batch_status);
2546:
2547: /* Verify Batch to be in pending or WIP status */
2548: IF l_batch_header_rec.batch_status NOT IN
2549: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2550: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2551: ,'PROCESS'
2552: ,'CREATE_RESERVATION');
2553: RAISE fnd_api.g_exc_error;

Line 2550: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'

2546:
2547: /* Verify Batch to be in pending or WIP status */
2548: IF l_batch_header_rec.batch_status NOT IN
2549: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2550: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2551: ,'PROCESS'
2552: ,'CREATE_RESERVATION');
2553: RAISE fnd_api.g_exc_error;
2554: END IF;

Line 2556: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

2552: ,'CREATE_RESERVATION');
2553: RAISE fnd_api.g_exc_error;
2554: END IF;
2555:
2556: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
2557: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
2558: RAISE fnd_api.g_exc_error;
2559: END IF;
2560: gme_api_main.create_line_reservations

Line 2557: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');

2553: RAISE fnd_api.g_exc_error;
2554: END IF;
2555:
2556: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
2557: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
2558: RAISE fnd_api.g_exc_error;
2559: END IF;
2560: gme_api_main.create_line_reservations
2561: (p_init_msg_list => p_init_msg_list

Line 2582: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

2578: END IF;
2579:
2580: gme_debug.put_line ( 'End of Create_Line_Reservations at '
2581: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2582: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2583: EXCEPTION
2584: WHEN fnd_api.g_exc_error THEN
2585: x_return_status := fnd_api.g_ret_sts_error;
2586: ROLLBACK TO SAVEPOINT create_line_reservations;

Line 2587: gme_common_pvt.count_and_get(x_count => x_message_count

2583: EXCEPTION
2584: WHEN fnd_api.g_exc_error THEN
2585: x_return_status := fnd_api.g_ret_sts_error;
2586: ROLLBACK TO SAVEPOINT create_line_reservations;
2587: gme_common_pvt.count_and_get(x_count => x_message_count
2588: ,p_encoded => fnd_api.g_false
2589: ,x_data => x_message_list);
2590: WHEN OTHERS THEN
2591: ROLLBACK TO SAVEPOINT create_line_reservations;

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

2639: ,p_api_version
2640: ,'Insert_process_parameter'
2641: ,g_pkg_name) THEN
2642: x_return_status := fnd_api.g_ret_sts_error;
2643: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2644: RAISE fnd_api.g_exc_error;
2645: END IF;
2646:
2647: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

Line 2647: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

2643: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2644: RAISE fnd_api.g_exc_error;
2645: END IF;
2646:
2647: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2648:
2649: IF NOT gme_common_pvt.g_setup_done THEN
2650: IF (g_debug = gme_debug.g_log_statement) THEN
2651: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');

Line 2649: IF NOT gme_common_pvt.g_setup_done THEN

2645: END IF;
2646:
2647: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2648:
2649: IF NOT gme_common_pvt.g_setup_done THEN
2650: IF (g_debug = gme_debug.g_log_statement) THEN
2651: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
2652: END IF;
2653: RAISE fnd_api.g_exc_error;

Line 2659: gme_common_pvt.set_timestamp;

2655: IF (g_debug <= gme_debug.g_log_procedure) THEN
2656: gme_debug.put_line ('Calling Insert process parameters');
2657: END IF;
2658:
2659: gme_common_pvt.set_timestamp;
2660: gme_process_parameters_pvt.insert_process_parameter
2661: (p_batch_no => p_batch_no
2662: ,p_org_code => p_org_code
2663: ,p_validate_flexfields => p_validate_flexfields

Line 2680: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

2676:
2677: IF x_return_status = fnd_api.g_ret_sts_success THEN
2678: IF p_commit = fnd_api.g_true THEN
2679: COMMIT;
2680: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2681: END IF;
2682: ELSE
2683: RAISE insert_parameter_failed;
2684: END IF;

Line 2699: gme_common_pvt.count_and_get (x_count => x_message_count

2695: EXCEPTION
2696: WHEN fnd_api.g_exc_error THEN
2697: x_return_status := fnd_api.g_ret_sts_error;
2698: ROLLBACK TO SAVEPOINT insert_process_parameter;
2699: gme_common_pvt.count_and_get (x_count => x_message_count
2700: ,p_encoded => fnd_api.g_false
2701: ,x_data => x_message_list);
2702: WHEN insert_parameter_failed THEN
2703: ROLLBACK TO SAVEPOINT insert_process_parameter;

Line 2704: gme_common_pvt.count_and_get (x_count => x_message_count

2700: ,p_encoded => fnd_api.g_false
2701: ,x_data => x_message_list);
2702: WHEN insert_parameter_failed THEN
2703: ROLLBACK TO SAVEPOINT insert_process_parameter;
2704: gme_common_pvt.count_and_get (x_count => x_message_count
2705: ,p_encoded => fnd_api.g_false
2706: ,x_data => x_message_list);
2707: WHEN OTHERS THEN
2708: ROLLBACK TO SAVEPOINT insert_process_parameter;

Line 2753: gme_common_pvt.g_error_count := 0;

2749: x_return_status := fnd_api.g_ret_sts_success;
2750:
2751: IF p_init_msg_list = fnd_api.g_true THEN
2752: fnd_msg_pub.initialize;
2753: gme_common_pvt.g_error_count := 0;
2754: END IF;
2755:
2756: -- Make sure we are call compatible
2757: IF NOT fnd_api.compatible_api_call (2.0

Line 2761: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

2757: IF NOT fnd_api.compatible_api_call (2.0
2758: ,p_api_version
2759: ,'Insert_process_parameter'
2760: ,g_pkg_name) THEN
2761: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2762: RAISE fnd_api.g_exc_error;
2763: END IF;
2764:
2765: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

Line 2765: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

2761: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2762: RAISE fnd_api.g_exc_error;
2763: END IF;
2764:
2765: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2766:
2767: IF NOT gme_common_pvt.g_setup_done THEN
2768: x_return_status := fnd_api.g_ret_sts_error;
2769: RAISE fnd_api.g_exc_error;

Line 2767: IF NOT gme_common_pvt.g_setup_done THEN

2763: END IF;
2764:
2765: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2766:
2767: IF NOT gme_common_pvt.g_setup_done THEN
2768: x_return_status := fnd_api.g_ret_sts_error;
2769: RAISE fnd_api.g_exc_error;
2770: END IF;
2771:

Line 2772: gme_common_pvt.set_timestamp;

2768: x_return_status := fnd_api.g_ret_sts_error;
2769: RAISE fnd_api.g_exc_error;
2770: END IF;
2771:
2772: gme_common_pvt.set_timestamp;
2773: gme_process_parameters_pvt.update_process_parameter
2774: (p_batch_no => p_batch_no
2775: ,p_org_code => p_org_code
2776: ,p_validate_flexfields => p_validate_flexfields

Line 2793: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

2789:
2790: IF x_return_status = fnd_api.g_ret_sts_success THEN
2791: IF p_commit = fnd_api.g_true THEN
2792: COMMIT;
2793: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2794: END IF;
2795: ELSE
2796: RAISE update_parameter_failed;
2797: END IF;

Line 2813: gme_common_pvt.count_and_get (x_count => x_message_count

2809: EXCEPTION
2810: WHEN fnd_api.g_exc_error THEN
2811: x_return_status := fnd_api.g_ret_sts_error;
2812: ROLLBACK TO SAVEPOINT update_process_parameter;
2813: gme_common_pvt.count_and_get (x_count => x_message_count
2814: ,p_encoded => fnd_api.g_false
2815: ,x_data => x_message_list);
2816: WHEN update_parameter_failed THEN
2817: ROLLBACK TO SAVEPOINT update_process_parameter;

Line 2818: gme_common_pvt.count_and_get (x_count => x_message_count

2814: ,p_encoded => fnd_api.g_false
2815: ,x_data => x_message_list);
2816: WHEN update_parameter_failed THEN
2817: ROLLBACK TO SAVEPOINT update_process_parameter;
2818: gme_common_pvt.count_and_get (x_count => x_message_count
2819: ,p_encoded => fnd_api.g_false
2820: ,x_data => x_message_list);
2821: WHEN OTHERS THEN
2822: ROLLBACK TO SAVEPOINT update_process_parameter;

Line 2865: gme_common_pvt.g_error_count := 0;

2861: x_return_status := fnd_api.g_ret_sts_success;
2862:
2863: IF p_init_msg_list = fnd_api.g_true THEN
2864: fnd_msg_pub.initialize;
2865: gme_common_pvt.g_error_count := 0;
2866: END IF;
2867:
2868: -- Make sure we are call compatible
2869: IF NOT fnd_api.compatible_api_call (2.0

Line 2873: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

2869: IF NOT fnd_api.compatible_api_call (2.0
2870: ,p_api_version
2871: ,'Insert_process_parameter'
2872: ,g_pkg_name) THEN
2873: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2874: RAISE fnd_api.g_exc_error;
2875: END IF;
2876:
2877: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

Line 2877: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

2873: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2874: RAISE fnd_api.g_exc_error;
2875: END IF;
2876:
2877: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2878:
2879: IF NOT gme_common_pvt.g_setup_done THEN
2880: x_return_status := fnd_api.g_ret_sts_error;
2881: RAISE fnd_api.g_exc_error;

Line 2879: IF NOT gme_common_pvt.g_setup_done THEN

2875: END IF;
2876:
2877: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2878:
2879: IF NOT gme_common_pvt.g_setup_done THEN
2880: x_return_status := fnd_api.g_ret_sts_error;
2881: RAISE fnd_api.g_exc_error;
2882: END IF;
2883:

Line 2888: gme_common_pvt.set_timestamp;

2884: IF (g_debug <= gme_debug.g_log_procedure) THEN
2885: gme_debug.put_line ('Calling Insert process parameters');
2886: END IF;
2887:
2888: gme_common_pvt.set_timestamp;
2889: gme_process_parameters_pvt.delete_process_parameter
2890: (p_batch_no => p_batch_no
2891: ,p_org_code => p_org_code
2892: ,p_batchstep_no => p_batchstep_no

Line 2907: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

2903:
2904: IF x_return_status = fnd_api.g_ret_sts_success THEN
2905: IF p_commit = fnd_api.g_true THEN
2906: COMMIT;
2907: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2908: END IF;
2909: ELSE
2910: RAISE delete_parameter_failed;
2911: END IF;

Line 2922: gme_common_pvt.count_and_get (x_count => x_message_count

2918: EXCEPTION
2919: WHEN fnd_api.g_exc_error THEN
2920: x_return_status := fnd_api.g_ret_sts_error;
2921: ROLLBACK TO SAVEPOINT delete_process_parameter;
2922: gme_common_pvt.count_and_get (x_count => x_message_count
2923: ,p_encoded => fnd_api.g_false
2924: ,x_data => x_message_list);
2925: WHEN delete_parameter_failed THEN
2926: ROLLBACK TO SAVEPOINT delete_process_parameter;

Line 2927: gme_common_pvt.count_and_get (x_count => x_message_count

2923: ,p_encoded => fnd_api.g_false
2924: ,x_data => x_message_list);
2925: WHEN delete_parameter_failed THEN
2926: ROLLBACK TO SAVEPOINT delete_process_parameter;
2927: gme_common_pvt.count_and_get (x_count => x_message_count
2928: ,p_encoded => fnd_api.g_false
2929: ,x_data => x_message_list);
2930: WHEN OTHERS THEN
2931: ROLLBACK TO SAVEPOINT delete_process_parameter;

Line 2942: := gme_common_pvt.g_max_errors

2938: /*************************************************************************/
2939: PROCEDURE delete_step (
2940: p_api_version IN NUMBER := 2.0
2941: ,p_validation_level IN NUMBER
2942: := gme_common_pvt.g_max_errors
2943: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2944: ,p_commit IN VARCHAR2
2945: ,p_org_code IN VARCHAR2
2946: ,p_batch_no IN VARCHAR2

Line 2965: gme_common_pvt.g_error_count := 0;

2961:
2962: /* Initialize message list and count if needed */
2963: IF p_init_msg_list = fnd_api.g_true THEN
2964: fnd_msg_pub.initialize;
2965: gme_common_pvt.g_error_count := 0;
2966: END IF;
2967:
2968: /* Setup the common constants used accross the apis */
2969: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

Line 2969: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);

2965: gme_common_pvt.g_error_count := 0;
2966: END IF;
2967:
2968: /* Setup the common constants used accross the apis */
2969: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2970:
2971: IF NOT gme_common_pvt.g_setup_done THEN
2972: RAISE fnd_api.g_exc_error;
2973: END IF;

Line 2971: IF NOT gme_common_pvt.g_setup_done THEN

2967:
2968: /* Setup the common constants used accross the apis */
2969: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2970:
2971: IF NOT gme_common_pvt.g_setup_done THEN
2972: RAISE fnd_api.g_exc_error;
2973: END IF;
2974:
2975: /* Make sure we are call compatible */

Line 2980: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

2976: IF NOT fnd_api.compatible_api_call (2
2977: ,p_api_version
2978: ,'delete_step'
2979: ,g_pkg_name) THEN
2980: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2981: RAISE fnd_api.g_exc_error;
2982: END IF;
2983: gme_api_main.delete_step (p_validation_level => p_validation_level
2984: ,p_init_msg_list => fnd_api.g_false

Line 3016: gme_common_pvt.count_and_get (x_count => x_message_count

3012: EXCEPTION
3013: WHEN fnd_api.g_exc_error THEN
3014: ROLLBACK TO SAVEPOINT delete_step;
3015: x_return_status := fnd_api.g_ret_sts_error;
3016: gme_common_pvt.count_and_get (x_count => x_message_count
3017: ,p_encoded => fnd_api.g_false
3018: ,x_data => x_message_list);
3019: WHEN delete_step_failed THEN
3020: ROLLBACK TO SAVEPOINT delete_step;

Line 3021: gme_common_pvt.count_and_get (x_count => x_message_count

3017: ,p_encoded => fnd_api.g_false
3018: ,x_data => x_message_list);
3019: WHEN delete_step_failed THEN
3020: ROLLBACK TO SAVEPOINT delete_step;
3021: gme_common_pvt.count_and_get (x_count => x_message_count
3022: ,p_encoded => fnd_api.g_false
3023: ,x_data => x_message_list);
3024: WHEN OTHERS THEN
3025: ROLLBACK TO SAVEPOINT delete_step;

Line 3043: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

3039: * Added new argument p_validate_flexfields
3040: /*************************************************************************/
3041: PROCEDURE insert_step (
3042: p_api_version IN NUMBER := 2.0
3043: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3044: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3045: ,p_commit IN VARCHAR2
3046: ,p_org_code IN VARCHAR2
3047: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

Line 3096: gme_common_pvt.g_error_count := 0;

3092:
3093: /* Initialize message list and count if needed */
3094: IF p_init_msg_list = fnd_api.g_true THEN
3095: fnd_msg_pub.initialize;
3096: gme_common_pvt.g_error_count := 0;
3097: END IF;
3098: gme_common_pvt.g_setup_done :=
3099: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3100: ,p_org_code => p_org_code);

Line 3098: gme_common_pvt.g_setup_done :=

3094: IF p_init_msg_list = fnd_api.g_true THEN
3095: fnd_msg_pub.initialize;
3096: gme_common_pvt.g_error_count := 0;
3097: END IF;
3098: gme_common_pvt.g_setup_done :=
3099: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3100: ,p_org_code => p_org_code);
3101:
3102: IF NOT gme_common_pvt.g_setup_done THEN

Line 3099: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id

3095: fnd_msg_pub.initialize;
3096: gme_common_pvt.g_error_count := 0;
3097: END IF;
3098: gme_common_pvt.g_setup_done :=
3099: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3100: ,p_org_code => p_org_code);
3101:
3102: IF NOT gme_common_pvt.g_setup_done THEN
3103: RAISE fnd_api.g_exc_error;

Line 3102: IF NOT gme_common_pvt.g_setup_done THEN

3098: gme_common_pvt.g_setup_done :=
3099: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3100: ,p_org_code => p_org_code);
3101:
3102: IF NOT gme_common_pvt.g_setup_done THEN
3103: RAISE fnd_api.g_exc_error;
3104: END IF;
3105:
3106: /* Make sure we are call compatible */

Line 3111: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

3107: IF NOT fnd_api.compatible_api_call (2
3108: ,p_api_version
3109: ,'insert_step'
3110: ,g_pkg_name) THEN
3111: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3112: RAISE fnd_api.g_exc_error;
3113: END IF;
3114:
3115: IF (p_batch_step_rec.batch_id IS NOT NULL) THEN

Line 3130: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,

3126: END IF;
3127: END IF;
3128:
3129: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3130: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3131: gme_common_pvt.g_batch_completed,
3132: gme_common_pvt.g_batch_closed) ) THEN
3133: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3134: RAISE fnd_api.g_exc_error;

Line 3131: gme_common_pvt.g_batch_completed,

3127: END IF;
3128:
3129: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3130: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3131: gme_common_pvt.g_batch_completed,
3132: gme_common_pvt.g_batch_closed) ) THEN
3133: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3134: RAISE fnd_api.g_exc_error;
3135: END IF;

Line 3132: gme_common_pvt.g_batch_closed) ) THEN

3128:
3129: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3130: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3131: gme_common_pvt.g_batch_completed,
3132: gme_common_pvt.g_batch_closed) ) THEN
3133: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3134: RAISE fnd_api.g_exc_error;
3135: END IF;
3136:

Line 3133: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');

3129: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3130: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3131: gme_common_pvt.g_batch_completed,
3132: gme_common_pvt.g_batch_closed) ) THEN
3133: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3134: RAISE fnd_api.g_exc_error;
3135: END IF;
3136:
3137: -- Bug 2979072 Stop insert if there is no routing associated with this batch.

Line 3139: gme_common_pvt.log_message

3135: END IF;
3136:
3137: -- Bug 2979072 Stop insert if there is no routing associated with this batch.
3138: IF (l_batch_header_rec.routing_id IS NULL) THEN
3139: gme_common_pvt.log_message
3140: (p_message_code => 'GME_API_NO_ROUTING_ASSOCIATED');
3141: RAISE fnd_api.g_exc_error;
3142: END IF;
3143:

Line 3146: gme_common_pvt.log_message ('GME_INVALID_STEPRELEASE');

3142: END IF;
3143:
3144: /* Punit Kumar , bringing this code from GMEVINSB.pls*/
3145: IF (p_batch_step_rec.steprelease_type NOT IN (1, 2) ) THEN
3146: gme_common_pvt.log_message ('GME_INVALID_STEPRELEASE');
3147: RAISE fnd_api.g_exc_error;
3148: END IF;
3149:
3150: /* End Bug 2397077 */

Line 3151: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)

3147: RAISE fnd_api.g_exc_error;
3148: END IF;
3149:
3150: /* End Bug 2397077 */
3151: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)
3152: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN
3153: -- Closed or cancelled batch not valid for step insert...
3154: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3155: RAISE fnd_api.g_exc_error;

Line 3152: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN

3148: END IF;
3149:
3150: /* End Bug 2397077 */
3151: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)
3152: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN
3153: -- Closed or cancelled batch not valid for step insert...
3154: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3155: RAISE fnd_api.g_exc_error;
3156: END IF;

Line 3154: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');

3150: /* End Bug 2397077 */
3151: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)
3152: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN
3153: -- Closed or cancelled batch not valid for step insert...
3154: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3155: RAISE fnd_api.g_exc_error;
3156: END IF;
3157:
3158: IF p_batch_step_rec.oprn_id IS NOT NULL THEN

Line 3207: gme_common_pvt.g_flex_validate_prof := 1;

3203: END IF;
3204: END IF;
3205:
3206: IF p_validate_flexfields = fnd_api.g_true THEN
3207: gme_common_pvt.g_flex_validate_prof := 1;
3208: ELSE
3209: gme_common_pvt.g_flex_validate_prof := 0;
3210: END IF;
3211: gme_api_main.insert_step (p_validation_level => p_validation_level

Line 3209: gme_common_pvt.g_flex_validate_prof := 0;

3205:
3206: IF p_validate_flexfields = fnd_api.g_true THEN
3207: gme_common_pvt.g_flex_validate_prof := 1;
3208: ELSE
3209: gme_common_pvt.g_flex_validate_prof := 0;
3210: END IF;
3211: gme_api_main.insert_step (p_validation_level => p_validation_level
3212: ,p_init_msg_list => fnd_api.g_false
3213: ,x_message_count => x_message_count

Line 3220: gme_common_pvt.g_flex_validate_prof := 0;

3216: ,p_batch_header_rec => l_batch_header_rec
3217: ,p_batch_step_rec => p_batch_step_rec
3218: ,x_batch_step => x_batch_step_rec);
3219:
3220: gme_common_pvt.g_flex_validate_prof := 0;
3221:
3222: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3223: RAISE insert_step_failed;
3224: ELSE

Line 3239: gme_common_pvt.count_and_get (x_count => x_message_count

3235: END IF;
3236: END IF;
3237: END IF;
3238:
3239: gme_common_pvt.count_and_get (x_count => x_message_count
3240: ,p_encoded => fnd_api.g_false
3241: ,x_data => x_message_list);
3242:
3243: IF g_debug <= gme_debug.g_log_procedure THEN

Line 3251: gme_common_pvt.count_and_get (x_count => x_message_count

3247: EXCEPTION
3248: WHEN fnd_api.g_exc_error THEN
3249: ROLLBACK TO SAVEPOINT insert_step;
3250: x_return_status := fnd_api.g_ret_sts_error;
3251: gme_common_pvt.count_and_get (x_count => x_message_count
3252: ,p_encoded => fnd_api.g_false
3253: ,x_data => x_message_list);
3254: WHEN insert_step_failed THEN
3255: ROLLBACK TO SAVEPOINT insert_step;

Line 3257: gme_common_pvt.count_and_get (x_count => x_message_count

3253: ,x_data => x_message_list);
3254: WHEN insert_step_failed THEN
3255: ROLLBACK TO SAVEPOINT insert_step;
3256: x_batch_step_rec := NULL;
3257: gme_common_pvt.count_and_get (x_count => x_message_count
3258: ,p_encoded => fnd_api.g_false
3259: ,x_data => x_message_list);
3260: WHEN OTHERS THEN
3261: ROLLBACK TO SAVEPOINT insert_step;

Line 3293: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

3289: Procedure Created
3290: ================================================================================*/
3291: PROCEDURE insert_material_line (
3292: p_api_version IN NUMBER := 2.0
3293: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3294: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3295: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3296: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3297: ,p_material_detail_rec IN gme_material_details%ROWTYPE

Line 3345: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

3341: IF NOT fnd_api.compatible_api_call (2.0
3342: ,p_api_version
3343: ,'insert_material_line'
3344: ,g_pkg_name) THEN
3345: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3346: RAISE fnd_api.g_exc_error;
3347: END IF;
3348:
3349: /* Initialize message list and count if needed */

Line 3356: gme_common_pvt.validate_batch

3352: END IF;
3353:
3354: /* intialize local variable */
3355: l_material_detail_rec := p_material_detail_rec;
3356: gme_common_pvt.validate_batch
3357: (p_batch_header_rec => p_batch_header_rec
3358: ,p_org_code => p_org_code
3359: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3360: ,x_batch_header_rec => l_batch_header_rec

Line 3359: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

3355: l_material_detail_rec := p_material_detail_rec;
3356: gme_common_pvt.validate_batch
3357: (p_batch_header_rec => p_batch_header_rec
3358: ,p_org_code => p_org_code
3359: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3360: ,x_batch_header_rec => l_batch_header_rec
3361: ,x_message_count => x_message_count
3362: ,x_message_list => x_message_list
3363: ,x_return_status => x_return_status );

Line 3376: gme_common_pvt.log_message('GME_ASQC_STEP_REQUIRED');

3372:
3373: /*for ASQC batches batchstep_no is required */
3374: IF l_batch_header_rec.automatic_step_calculation <> 0 AND
3375: p_batchstep_no IS NULL THEN
3376: gme_common_pvt.log_message('GME_ASQC_STEP_REQUIRED');
3377: RAISE fnd_api.g_exc_error;
3378: END IF;
3379:
3380: IF l_batch_header_rec.poc_ind = 'Y' AND

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

3405: OPEN c_get_locator(l_batch_header_rec.organization_id, l_material_detail_rec.subinventory);
3406: FETCH c_get_locator INTO l_locator_id;
3407: IF c_get_locator%NOTFOUND THEN
3408: CLOSE c_get_locator;
3409: gme_common_pvt.log_message(p_product_code => 'INV'
3410: ,p_message_code => 'INV_INVALID_LOCATION');
3411: RAISE fnd_api.g_exc_error;
3412: END IF;
3413: CLOSE c_get_locator;

Line 3420: gme_common_pvt.g_flex_validate_prof := 1;

3416: END IF;
3417:
3418: --setting global flex validate
3419: IF p_validate_flexfields = FND_API.G_TRUE THEN
3420: gme_common_pvt.g_flex_validate_prof := 1;
3421: ELSE
3422: gme_common_pvt.g_flex_validate_prof := 0;
3423: END IF;
3424:

Line 3422: gme_common_pvt.g_flex_validate_prof := 0;

3418: --setting global flex validate
3419: IF p_validate_flexfields = FND_API.G_TRUE THEN
3420: gme_common_pvt.g_flex_validate_prof := 1;
3421: ELSE
3422: gme_common_pvt.g_flex_validate_prof := 0;
3423: END IF;
3424:
3425: --validate individual fields
3426: gme_material_detail_pvt.validate_material_for_ins (

Line 3436: gme_common_pvt.g_flex_validate_prof := 0;

3432:
3433: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3434: RAISE fnd_api.g_exc_error;
3435: END IF;
3436: gme_common_pvt.g_flex_validate_prof := 0;
3437: gme_common_pvt.set_timestamp;
3438: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3439: --calling insert material line new API
3440: l_material_detail_rec := x_material_detail_rec;

Line 3437: gme_common_pvt.set_timestamp;

3433: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3434: RAISE fnd_api.g_exc_error;
3435: END IF;
3436: gme_common_pvt.g_flex_validate_prof := 0;
3437: gme_common_pvt.set_timestamp;
3438: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3439: --calling insert material line new API
3440: l_material_detail_rec := x_material_detail_rec;
3441:

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

3434: RAISE fnd_api.g_exc_error;
3435: END IF;
3436: gme_common_pvt.g_flex_validate_prof := 0;
3437: gme_common_pvt.set_timestamp;
3438: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3439: --calling insert material line new API
3440: l_material_detail_rec := x_material_detail_rec;
3441:
3442: gme_api_main.insert_material_line (

Line 3483: gme_common_pvt.count_and_get (x_count => x_message_count

3479: WHEN fnd_api.g_exc_error THEN
3480: ROLLBACK TO SAVEPOINT insert_material_line;
3481: x_return_status := fnd_api.g_ret_sts_error;
3482: x_material_detail_rec := NULL;
3483: gme_common_pvt.count_and_get (x_count => x_message_count
3484: ,p_encoded => fnd_api.g_false
3485: ,x_data => x_message_list);
3486: WHEN OTHERS THEN
3487: ROLLBACK TO SAVEPOINT insert_material_line;

Line 3519: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

3515: Procedure Created
3516: ================================================================================*/
3517: PROCEDURE update_material_line (
3518: p_api_version IN NUMBER := 2.0
3519: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3520: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3521: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3522: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3523: ,p_material_detail_rec IN gme_material_details%ROWTYPE

Line 3581: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

3577: IF NOT fnd_api.compatible_api_call (2.0
3578: ,p_api_version
3579: ,'update_material_line'
3580: ,g_pkg_name) THEN
3581: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3582: RAISE fnd_api.g_exc_error;
3583: END IF;
3584:
3585: /* Initialize message list and count if needed */

Line 3592: gme_common_pvt.log_message ('GME_INVALID_FIELD'

3588: END IF;
3589:
3590: /*validatep p_scale_phantom procedure */
3591: IF (p_scale_phantom NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
3592: gme_common_pvt.log_message ('GME_INVALID_FIELD'
3593: ,'FIELD'
3594: ,'p_scale_phantom');
3595: RAISE fnd_api.g_exc_error;
3596: END IF;

Line 3600: gme_common_pvt.Validate_material_detail

3596: END IF;
3597:
3598: /* assigning local variables */
3599: l_material_detail_rec := p_material_detail_rec;
3600: gme_common_pvt.Validate_material_detail
3601: (p_material_detail_rec => l_material_detail_rec
3602: ,p_org_code => p_org_code
3603: ,p_batch_no => p_batch_header_rec.batch_no
3604: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

Line 3604: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

3600: gme_common_pvt.Validate_material_detail
3601: (p_material_detail_rec => l_material_detail_rec
3602: ,p_org_code => p_org_code
3603: ,p_batch_no => p_batch_header_rec.batch_no
3604: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3605: ,x_batch_header_rec => l_batch_header_rec
3606: ,x_material_detail_rec => l_stored_material_detail_rec
3607: ,x_message_count => x_message_count
3608: ,x_message_list => x_message_list

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

3650: OPEN c_get_locator(l_stored_material_detail_rec.organization_id, l_subinventory,p_locator_code);
3651: FETCH c_get_locator INTO l_locator_id;
3652: IF c_get_locator%NOTFOUND THEN
3653: CLOSE c_get_locator;
3654: gme_common_pvt.log_message(p_product_code => 'INV'
3655: ,p_message_code => 'INV_INVALID_LOCATION');
3656: RAISE fnd_api.g_exc_error;
3657: END IF;
3658: CLOSE c_get_locator;

Line 3665: gme_common_pvt.g_flex_validate_prof := 1;

3661: END IF;
3662:
3663: --setting global flex validate
3664: IF p_validate_flexfields = FND_API.G_TRUE THEN
3665: gme_common_pvt.g_flex_validate_prof := 1;
3666: ELSE
3667: gme_common_pvt.g_flex_validate_prof := 0;
3668: END IF;
3669:

Line 3667: gme_common_pvt.g_flex_validate_prof := 0;

3663: --setting global flex validate
3664: IF p_validate_flexfields = FND_API.G_TRUE THEN
3665: gme_common_pvt.g_flex_validate_prof := 1;
3666: ELSE
3667: gme_common_pvt.g_flex_validate_prof := 0;
3668: END IF;
3669:
3670: --validate and pop material line
3671: gme_material_detail_pvt.val_and_pop_material_for_upd

Line 3680: gme_common_pvt.g_flex_validate_prof := 0;

3676: ,x_material_detail_rec => x_material_detail_rec
3677: ,x_return_status => l_return_status );
3678:
3679: --resetting global flex validate after validating
3680: gme_common_pvt.g_flex_validate_prof := 0;
3681:
3682: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3683: RAISE fnd_api.g_exc_error;
3684: END IF;

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

3681:
3682: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3683: RAISE fnd_api.g_exc_error;
3684: END IF;
3685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3686: gme_common_pvt.set_timestamp;
3687: --calling update material line new API
3688: l_material_detail_rec := x_material_detail_rec;
3689:

Line 3686: gme_common_pvt.set_timestamp;

3682: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3683: RAISE fnd_api.g_exc_error;
3684: END IF;
3685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3686: gme_common_pvt.set_timestamp;
3687: --calling update material line new API
3688: l_material_detail_rec := x_material_detail_rec;
3689:
3690: gme_api_main.update_material_line (

Line 3735: gme_common_pvt.count_and_get (x_count => x_message_count

3731: WHEN fnd_api.g_exc_error THEN
3732: ROLLBACK TO SAVEPOINT update_material_line;
3733: x_return_status := fnd_api.g_ret_sts_error;
3734: x_material_detail_rec := NULL;
3735: gme_common_pvt.count_and_get (x_count => x_message_count
3736: ,p_encoded => fnd_api.g_false
3737: ,x_data => x_message_list);
3738: WHEN OTHERS THEN
3739: ROLLBACK TO SAVEPOINT update_material_line;

Line 3767: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

3763: Procedure Created
3764: ================================================================================*/
3765: PROCEDURE delete_material_line (
3766: p_api_version IN NUMBER := 2.0
3767: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3768: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3769: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3770: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3771: ,p_material_detail_rec IN gme_material_details%ROWTYPE

Line 3811: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

3807: IF NOT fnd_api.compatible_api_call (2.0
3808: ,p_api_version
3809: ,'delete_material_line'
3810: ,g_pkg_name) THEN
3811: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3812: RAISE fnd_api.g_exc_error;
3813: END IF;
3814:
3815: /* Initialize message list and count if needed */

Line 3820: gme_common_pvt.Validate_material_detail

3816: IF p_init_msg_list = fnd_api.g_true THEN
3817: fnd_msg_pub.initialize;
3818: END IF;
3819:
3820: gme_common_pvt.Validate_material_detail
3821: (p_material_detail_rec => p_material_detail_rec
3822: ,p_org_code => p_org_code
3823: ,p_batch_no => p_batch_header_rec.batch_no
3824: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

Line 3824: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

3820: gme_common_pvt.Validate_material_detail
3821: (p_material_detail_rec => p_material_detail_rec
3822: ,p_org_code => p_org_code
3823: ,p_batch_no => p_batch_header_rec.batch_no
3824: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3825: ,x_batch_header_rec => l_batch_header_rec
3826: ,x_material_detail_rec => l_material_detail_rec
3827: ,x_message_count => x_message_count
3828: ,x_message_list => x_message_list

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

3859:
3860: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3861: RAISE fnd_api.g_exc_error;
3862: END IF;
3863: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3864: --calling delete material line
3865: gme_api_main.delete_material_line (
3866: p_validation_level => p_validation_level
3867: ,p_init_msg_list => p_init_msg_list

Line 3889: gme_common_pvt.count_and_get (x_count => x_message_count

3885: EXCEPTION
3886: WHEN fnd_api.g_exc_error THEN
3887: ROLLBACK TO SAVEPOINT delete_material_line;
3888: x_return_status := fnd_api.g_ret_sts_error;
3889: gme_common_pvt.count_and_get (x_count => x_message_count
3890: ,p_encoded => fnd_api.g_false
3891: ,x_data => x_message_list);
3892: WHEN OTHERS THEN
3893: ROLLBACK TO SAVEPOINT delete_material_line;

Line 3953: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

3949: SAVEPOINT revert_batch;
3950:
3951: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_to_wip_batch', g_pkg_name ) THEN
3952: x_return_status := FND_API.G_RET_STS_ERROR;
3953: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3954: RAISE FND_API.g_exc_error;
3955: END IF;
3956: -- fetch and validate the batch
3957: gme_common_pvt.validate_batch

Line 3957: gme_common_pvt.validate_batch

3953: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3954: RAISE FND_API.g_exc_error;
3955: END IF;
3956: -- fetch and validate the batch
3957: gme_common_pvt.validate_batch
3958: (p_batch_header_rec => p_batch_header_rec
3959: ,p_org_code => p_org_code
3960: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3961: ,x_batch_header_rec => l_batch_header_rec

Line 3960: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

3956: -- fetch and validate the batch
3957: gme_common_pvt.validate_batch
3958: (p_batch_header_rec => p_batch_header_rec
3959: ,p_org_code => p_org_code
3960: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3961: ,x_batch_header_rec => l_batch_header_rec
3962: ,x_message_count => x_message_count
3963: ,x_message_list => x_message_list
3964: ,x_return_status => x_return_status );

Line 3974: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN

3970: END IF;
3971: RAISE fnd_api.g_exc_error;
3972: END IF;
3973:
3974: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
3975: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
3976: RAISE fnd_api.g_exc_error;
3977: END IF;
3978: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN

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

3971: RAISE fnd_api.g_exc_error;
3972: END IF;
3973:
3974: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
3975: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
3976: RAISE fnd_api.g_exc_error;
3977: END IF;
3978: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
3979: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');

Line 3978: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN

3974: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
3975: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
3976: RAISE fnd_api.g_exc_error;
3977: END IF;
3978: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
3979: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
3980: RAISE fnd_api.g_exc_error;
3981: END IF;
3982: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN

Line 3979: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');

3975: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
3976: RAISE fnd_api.g_exc_error;
3977: END IF;
3978: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
3979: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
3980: RAISE fnd_api.g_exc_error;
3981: END IF;
3982: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN
3983: gme_common_pvt.log_message('GME_API_REV_WIP_TERM_ERROR');

Line 3983: gme_common_pvt.log_message('GME_API_REV_WIP_TERM_ERROR');

3979: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
3980: RAISE fnd_api.g_exc_error;
3981: END IF;
3982: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN
3983: gme_common_pvt.log_message('GME_API_REV_WIP_TERM_ERROR');
3984: RAISE fnd_api.g_exc_error;
3985: END IF;
3986:
3987: IF g_debug <= gme_debug.g_log_statement THEN

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

3987: IF g_debug <= gme_debug.g_log_statement THEN
3988: gme_debug.put_line('calling main revert');
3989: END IF;
3990: --Bug#5327296
3991: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3992: gme_api_main.revert_batch
3993: (p_validation_level => p_validation_level,
3994: p_init_msg_list => FND_API.G_FALSE,
3995: x_message_count => x_message_count,

Line 4011: p_table => gme_common_pvt.g_interface_table,

4007:
4008: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4009: IF p_commit = FND_API.G_TRUE THEN
4010: gme_api_pub.save_batch (p_header_id => NULL,
4011: p_table => gme_common_pvt.g_interface_table,
4012: p_commit => p_commit,
4013: x_return_status => x_return_status);
4014:
4015: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

Line 4025: gme_common_pvt.count_and_get (

4021: ELSE
4022: RAISE batch_revert_failure;
4023: END IF;
4024:
4025: gme_common_pvt.count_and_get (
4026: x_count => x_message_count,
4027: p_encoded => FND_API.g_false,
4028: x_data => x_message_list
4029: );

Line 4040: gme_common_pvt.count_and_get(x_count => x_message_count,

4036: EXCEPTION
4037: WHEN batch_revert_failure THEN
4038: ROLLBACK TO SAVEPOINT revert_batch;
4039: x_batch_header_rec := NULL;
4040: gme_common_pvt.count_and_get(x_count => x_message_count,
4041: p_encoded => FND_API.g_false,
4042: x_data => x_message_list);
4043: WHEN FND_API.g_exc_error THEN
4044: ROLLBACK TO SAVEPOINT revert_batch;

Line 4047: gme_common_pvt.count_and_get (x_count => x_message_count

4043: WHEN FND_API.g_exc_error THEN
4044: ROLLBACK TO SAVEPOINT revert_batch;
4045: x_return_status := fnd_api.g_ret_sts_error;
4046: x_batch_header_rec := NULL;
4047: gme_common_pvt.count_and_get (x_count => x_message_count
4048: ,p_encoded => fnd_api.g_false
4049: ,x_data => x_message_list);
4050: WHEN OTHERS THEN
4051: ROLLBACK TO SAVEPOINT revert_batch;

Line 4117: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

4113: fnd_msg_pub.initialize;
4114: END IF;
4115:
4116: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_step', g_pkg_name ) THEN
4117: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4118: RAISE fnd_api.g_exc_error;
4119: END IF;
4120:
4121: /* Validate Input parameters */

Line 4122: gme_common_pvt.Validate_batch_step (

4118: RAISE fnd_api.g_exc_error;
4119: END IF;
4120:
4121: /* Validate Input parameters */
4122: gme_common_pvt.Validate_batch_step (
4123: p_batch_step_rec => p_batch_step_rec
4124: ,p_org_code => p_org_code
4125: ,p_batch_no => p_batch_no
4126: ,x_batch_step_rec => l_batch_step_rec

Line 4141: gme_common_pvt.log_message ('GME_API_INV_BATCH_UNCERT_STEP');

4137: RAISE fnd_api.g_exc_error;
4138: END IF;
4139:
4140: IF (l_batch_header_rec.batch_status <> 2) THEN
4141: gme_common_pvt.log_message ('GME_API_INV_BATCH_UNCERT_STEP');
4142: RAISE fnd_api.g_exc_error;
4143: END IF;
4144:
4145: IF (l_batch_step_rec.step_status <> 3) THEN

Line 4146: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_UNCERT');

4142: RAISE fnd_api.g_exc_error;
4143: END IF;
4144:
4145: IF (l_batch_step_rec.step_status <> 3) THEN
4146: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_UNCERT');
4147: RAISE fnd_api.g_exc_error;
4148: END IF;
4149:
4150: --Bug#5327296

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

4147: RAISE fnd_api.g_exc_error;
4148: END IF;
4149:
4150: --Bug#5327296
4151: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4152: gme_api_main.revert_step
4153: (p_validation_level => p_validation_level,
4154: p_init_msg_list => FND_API.G_FALSE,
4155: x_message_count => x_message_count,

Line 4170: p_table => gme_common_pvt.g_interface_table,

4166:
4167: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4168: IF p_commit = FND_API.G_TRUE THEN
4169: gme_api_pub.save_batch (p_header_id => NULL,
4170: p_table => gme_common_pvt.g_interface_table,
4171: p_commit => FND_API.G_FALSE,
4172: x_return_status => x_return_status);
4173: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4174: COMMIT;

Line 4183: gme_common_pvt.count_and_get (

4179: ELSE
4180: RAISE step_revert_failure;
4181: END IF;
4182:
4183: gme_common_pvt.count_and_get (
4184: x_count => x_message_count,
4185: p_encoded => FND_API.g_false,
4186: x_data => x_message_list
4187: );

Line 4197: gme_common_pvt.count_and_get(x_count => x_message_count,

4193: EXCEPTION
4194: WHEN step_revert_failure THEN
4195: ROLLBACK TO SAVEPOINT revert_step;
4196: x_batch_step_rec := NULL;
4197: gme_common_pvt.count_and_get(x_count => x_message_count,
4198: p_encoded => FND_API.g_false,
4199: x_data => x_message_list);
4200: WHEN FND_API.g_exc_error THEN
4201: ROLLBACK TO SAVEPOINT revert_step;

Line 4204: gme_common_pvt.count_and_get (x_count => x_message_count

4200: WHEN FND_API.g_exc_error THEN
4201: ROLLBACK TO SAVEPOINT revert_step;
4202: x_batch_step_rec := NULL;
4203: x_return_status := fnd_api.g_ret_sts_error;
4204: gme_common_pvt.count_and_get (x_count => x_message_count
4205: ,p_encoded => fnd_api.g_false
4206: ,x_data => x_message_list);
4207: WHEN OTHERS THEN
4208: ROLLBACK TO SAVEPOINT revert_step;

Line 4255: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

4251: ,p_api_version
4252: ,'close_batch'
4253: ,g_pkg_name) THEN
4254: x_return_status := fnd_api.g_ret_sts_error;
4255: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4256: RAISE fnd_api.g_exc_error;
4257: END IF;
4258: gme_common_pvt.validate_batch
4259: (p_batch_header_rec => p_batch_header_rec

Line 4258: gme_common_pvt.validate_batch

4254: x_return_status := fnd_api.g_ret_sts_error;
4255: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4256: RAISE fnd_api.g_exc_error;
4257: END IF;
4258: gme_common_pvt.validate_batch
4259: (p_batch_header_rec => p_batch_header_rec
4260: ,p_org_code => p_org_code
4261: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4262: ,x_batch_header_rec => l_batch_header_rec

Line 4261: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

4257: END IF;
4258: gme_common_pvt.validate_batch
4259: (p_batch_header_rec => p_batch_header_rec
4260: ,p_org_code => p_org_code
4261: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4262: ,x_batch_header_rec => l_batch_header_rec
4263: ,x_message_count => x_message_count
4264: ,x_message_list => x_message_list
4265: ,x_return_status => x_return_status );

Line 4276: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN

4272: RAISE fnd_api.g_exc_error;
4273: END IF;
4274:
4275:
4276: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4277: gme_common_pvt.log_message ('GME_CLOSE_STATUS_ERR');
4278: RAISE fnd_api.g_exc_error;
4279: END IF;
4280:

Line 4277: gme_common_pvt.log_message ('GME_CLOSE_STATUS_ERR');

4273: END IF;
4274:
4275:
4276: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4277: gme_common_pvt.log_message ('GME_CLOSE_STATUS_ERR');
4278: RAISE fnd_api.g_exc_error;
4279: END IF;
4280:
4281: IF (p_batch_header_rec.batch_close_date IS NULL) THEN

Line 4285: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1' ,'Close

4281: IF (p_batch_header_rec.batch_close_date IS NULL) THEN
4282: l_batch_header_rec.batch_close_date := SYSDATE;
4283: ELSIF (p_batch_header_rec.batch_close_date <
4284: l_batch_header_rec.actual_cmplt_date) THEN
4285: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1' ,'Close
4286: date' ,'DATE2','completion date');
4287: RAISE fnd_api.g_exc_error;
4288: ELSIF (p_batch_header_rec.batch_close_date > SYSDATE) THEN
4289: gme_common_pvt.log_message(p_product_code => 'GMA'

Line 4289: gme_common_pvt.log_message(p_product_code => 'GMA'

4285: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1' ,'Close
4286: date' ,'DATE2','completion date');
4287: RAISE fnd_api.g_exc_error;
4288: ELSIF (p_batch_header_rec.batch_close_date > SYSDATE) THEN
4289: gme_common_pvt.log_message(p_product_code => 'GMA'
4290: ,p_message_code => 'SY_NOFUTUREDATE');
4291: RAISE fnd_api.g_exc_error;
4292: ELSE
4293: l_batch_header_rec.batch_close_date :=

Line 4348: gme_common_pvt.count_and_get (x_count => x_message_count

4344: EXCEPTION
4345: WHEN batch_close_failure THEN
4346: ROLLBACK TO SAVEPOINT close_batch_pub;
4347: x_batch_header_rec := NULL;
4348: gme_common_pvt.count_and_get (x_count => x_message_count
4349: ,p_encoded => fnd_api.g_false
4350: ,x_data => x_message_list);
4351: WHEN FND_API.g_exc_error THEN
4352: ROLLBACK TO SAVEPOINT close_batch_pub;

Line 4355: gme_common_pvt.count_and_get (x_count => x_message_count

4351: WHEN FND_API.g_exc_error THEN
4352: ROLLBACK TO SAVEPOINT close_batch_pub;
4353: x_batch_header_rec := NULL;
4354: x_return_status := fnd_api.g_ret_sts_error;
4355: gme_common_pvt.count_and_get (x_count => x_message_count
4356: ,p_encoded => fnd_api.g_false
4357: ,x_data => x_message_list);
4358: WHEN OTHERS THEN
4359: ROLLBACK TO SAVEPOINT close_batch_pub;

Line 4370: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

4366: /*************************************************************************/
4367: PROCEDURE close_step (
4368: p_api_version IN NUMBER := 2
4369: /* Punit Kumar */
4370: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4371: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4372: ,p_commit IN VARCHAR2
4373: ,x_message_count OUT NOCOPY NUMBER
4374: ,x_message_list OUT NOCOPY VARCHAR2

Line 4410: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

4406: ,p_api_version
4407: ,'close_batch_step'
4408: ,g_pkg_name) THEN
4409: x_return_status := fnd_api.g_ret_sts_error;
4410: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4411: RAISE fnd_api.g_exc_error;
4412: END IF;
4413:
4414: /* Validate Input parameters */

Line 4415: gme_common_pvt.Validate_batch_step (

4411: RAISE fnd_api.g_exc_error;
4412: END IF;
4413:
4414: /* Validate Input parameters */
4415: gme_common_pvt.Validate_batch_step (
4416: p_batch_step_rec => p_batch_step_rec
4417: ,p_org_code => p_org_code
4418: ,p_batch_no => p_batch_no
4419: ,x_batch_step_rec => l_batch_step_rec

Line 4439: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE'

4435: l_batch_step_rec.step_close_date := SYSDATE;
4436: ELSIF (p_batch_step_rec.step_close_date <
4437: NVL (l_batch_step_rec.actual_cmplt_date
4438: ,p_batch_step_rec.step_close_date) ) THEN
4439: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE'
4440: ,'DATE1'
4441: ,'Close date'
4442: ,'DATE2'
4443: ,'completion date');

Line 4446: gme_common_pvt.log_message(p_product_code => 'GMA'

4442: ,'DATE2'
4443: ,'completion date');
4444: RAISE fnd_api.g_exc_error;
4445: ELSIF (p_batch_step_rec.step_close_date > SYSDATE) THEN
4446: gme_common_pvt.log_message(p_product_code => 'GMA'
4447: ,p_message_code => 'SY_NOFUTUREDATE');
4448: RAISE fnd_api.g_exc_error;
4449: ELSE
4450: l_batch_step_rec.step_close_date := p_batch_step_rec.step_close_date;

Line 4454: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');

4450: l_batch_step_rec.step_close_date := p_batch_step_rec.step_close_date;
4451: END IF;
4452:
4453: IF (l_batch_step_rec.step_status <> 3) THEN
4454: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
4455: RAISE fnd_api.g_exc_error;
4456: END IF;
4457:
4458: gme_api_main.close_step (p_validation_level => p_validation_level

Line 4493: gme_common_pvt.count_and_get (x_count => x_message_count

4489: EXCEPTION
4490: WHEN step_close_failed THEN
4491: ROLLBACK TO SAVEPOINT close_step_pub;
4492: x_batch_step_rec := NULL;
4493: gme_common_pvt.count_and_get (x_count => x_message_count
4494: ,p_encoded => fnd_api.g_false
4495: ,x_data => x_message_list);
4496: WHEN fnd_api.g_exc_error THEN
4497: ROLLBACK TO SAVEPOINT close_step_pub;

Line 4500: gme_common_pvt.count_and_get (x_count => x_message_count

4496: WHEN fnd_api.g_exc_error THEN
4497: ROLLBACK TO SAVEPOINT close_step_pub;
4498: x_batch_step_rec := NULL;
4499: x_return_status := fnd_api.g_ret_sts_error;
4500: gme_common_pvt.count_and_get (x_count => x_message_count
4501: ,p_encoded => fnd_api.g_false
4502: ,x_data => x_message_list);
4503: WHEN OTHERS THEN
4504: ROLLBACK TO SAVEPOINT close_step_pub;

Line 4516: := gme_common_pvt.g_max_errors

4512: /*************************************************************************/
4513: PROCEDURE reopen_batch (
4514: p_api_version IN NUMBER := 2
4515: ,p_validation_level IN NUMBER
4516: := gme_common_pvt.g_max_errors
4517: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4518: ,p_commit IN VARCHAR2
4519: ,x_message_count OUT NOCOPY NUMBER
4520: ,x_message_list OUT NOCOPY VARCHAR2

Line 4547: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

4543: IF NOT fnd_api.compatible_api_call (2.0 /* Punit Kumar */
4544: ,p_api_version
4545: ,'reopen_batch'
4546: ,g_pkg_name) THEN
4547: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4548: RAISE fnd_api.g_exc_error;
4549: END IF;
4550: gme_common_pvt.validate_batch
4551: (p_batch_header_rec => p_batch_header_rec

Line 4550: gme_common_pvt.validate_batch

4546: ,g_pkg_name) THEN
4547: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4548: RAISE fnd_api.g_exc_error;
4549: END IF;
4550: gme_common_pvt.validate_batch
4551: (p_batch_header_rec => p_batch_header_rec
4552: ,p_org_code => p_org_code
4553: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4554: ,x_batch_header_rec => l_batch_header_rec

Line 4553: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

4549: END IF;
4550: gme_common_pvt.validate_batch
4551: (p_batch_header_rec => p_batch_header_rec
4552: ,p_org_code => p_org_code
4553: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4554: ,x_batch_header_rec => l_batch_header_rec
4555: ,x_message_count => x_message_count
4556: ,x_message_list => x_message_list
4557: ,x_return_status => x_return_status );

Line 4600: gme_common_pvt.count_and_get (x_count => x_message_count

4596: END IF;
4597: EXCEPTION
4598: WHEN batch_reopen_failure THEN
4599: x_batch_header_rec := NULL;
4600: gme_common_pvt.count_and_get (x_count => x_message_count
4601: ,p_encoded => fnd_api.g_false
4602: ,x_data => x_message_list);
4603: x_return_status := fnd_api.g_ret_sts_error;
4604: WHEN fnd_api.g_exc_error THEN

Line 4607: gme_common_pvt.count_and_get (x_count => x_message_count

4603: x_return_status := fnd_api.g_ret_sts_error;
4604: WHEN fnd_api.g_exc_error THEN
4605: x_batch_header_rec := NULL;
4606: x_return_status := fnd_api.g_ret_sts_error;
4607: gme_common_pvt.count_and_get (x_count => x_message_count
4608: ,p_encoded => fnd_api.g_false
4609: ,x_data => x_message_list);
4610: WHEN OTHERS THEN
4611: x_batch_header_rec := NULL;

Line 4621: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

4617:
4618: /*************************************************************************/
4619: PROCEDURE reopen_step (
4620: p_api_version IN NUMBER := 2
4621: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4622: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4623: ,p_commit IN VARCHAR2
4624: ,x_message_count OUT NOCOPY NUMBER
4625: ,x_message_list OUT NOCOPY VARCHAR2

Line 4651: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

4647: IF NOT fnd_api.compatible_api_call (2
4648: ,p_api_version
4649: ,'reopen_step'
4650: ,g_pkg_name) THEN
4651: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4652: RAISE fnd_api.g_exc_error;
4653: END IF;
4654:
4655: /* Set the success staus to success inititally*/

Line 4657: gme_common_pvt.Validate_batch_step (

4653: END IF;
4654:
4655: /* Set the success staus to success inititally*/
4656: x_return_status := fnd_api.g_ret_sts_success;
4657: gme_common_pvt.Validate_batch_step (
4658: p_batch_step_rec => p_batch_step_rec
4659: ,p_org_code => p_org_code
4660: ,p_batch_no => p_batch_header_rec.batch_no
4661: ,x_batch_step_rec => l_batch_step_rec

Line 4706: gme_common_pvt.count_and_get (x_count => x_message_count

4702: END IF;
4703: EXCEPTION
4704: WHEN step_reopen_failure THEN
4705: x_batch_step_rec := NULL;
4706: gme_common_pvt.count_and_get (x_count => x_message_count
4707: ,p_encoded => fnd_api.g_false
4708: ,x_data => x_message_list);
4709: x_return_status := fnd_api.g_ret_sts_error;
4710: WHEN fnd_api.g_exc_error THEN

Line 4713: gme_common_pvt.count_and_get (x_count => x_message_count

4709: x_return_status := fnd_api.g_ret_sts_error;
4710: WHEN fnd_api.g_exc_error THEN
4711: x_batch_step_rec := NULL;
4712: x_return_status := fnd_api.g_ret_sts_error;
4713: gme_common_pvt.count_and_get (x_count => x_message_count
4714: ,p_encoded => fnd_api.g_false
4715: ,x_data => x_message_list);
4716: WHEN OTHERS THEN
4717: x_batch_step_rec := NULL;

Line 4727: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

4723:
4724: /*************************************************************************/
4725: PROCEDURE incremental_backflush
4726: (p_api_version IN NUMBER
4727: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4728: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4729: ,p_commit IN VARCHAR2 := fnd_api.g_false
4730: ,x_message_count OUT NOCOPY NUMBER
4731: ,x_message_list OUT NOCOPY VARCHAR2

Line 4741: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

4737: ,p_qty_type IN NUMBER
4738: ,p_trans_date IN DATE
4739: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
4740: ,p_adjust_cmplt IN VARCHAR2 := fnd_api.g_true
4741: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
4742: IS
4743: l_api_name CONSTANT VARCHAR2 (30) := 'INCREMENTAL_BACKFLUSH';
4744: l_material_detail_rec gme_material_details%ROWTYPE;
4745: l_batch_header_rec gme_batch_header%ROWTYPE;

Line 4746: l_exception_material_tbl gme_common_pvt.exceptions_tab;

4742: IS
4743: l_api_name CONSTANT VARCHAR2 (30) := 'INCREMENTAL_BACKFLUSH';
4744: l_material_detail_rec gme_material_details%ROWTYPE;
4745: l_batch_header_rec gme_batch_header%ROWTYPE;
4746: l_exception_material_tbl gme_common_pvt.exceptions_tab;
4747:
4748: error_incr_backflush EXCEPTION;
4749: BEGIN
4750: IF (g_debug <> -1) THEN

Line 4769: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

4765: IF NOT fnd_api.compatible_api_call (2.0
4766: ,p_api_version
4767: ,'incremental_backflush'
4768: ,g_pkg_name) THEN
4769: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4770: RAISE fnd_api.g_exc_error;
4771: END IF;
4772:
4773: /* Retrieve Batch Header and Material Detail Record */

Line 4774: gme_common_pvt.Validate_material_detail

4770: RAISE fnd_api.g_exc_error;
4771: END IF;
4772:
4773: /* Retrieve Batch Header and Material Detail Record */
4774: gme_common_pvt.Validate_material_detail
4775: (p_material_detail_rec => p_material_detail_rec
4776: ,p_org_code => p_org_code
4777: ,p_batch_no => p_batch_header_rec.batch_no
4778: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

Line 4778: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

4774: gme_common_pvt.Validate_material_detail
4775: (p_material_detail_rec => p_material_detail_rec
4776: ,p_org_code => p_org_code
4777: ,p_batch_no => p_batch_header_rec.batch_no
4778: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4779: ,x_batch_header_rec => l_batch_header_rec
4780: ,x_material_detail_rec => l_material_detail_rec
4781: ,x_message_count => x_message_count
4782: ,x_message_list => x_message_list

Line 4794: gme_common_pvt.log_message(p_product_code => 'GMA'

4790: END IF;
4791: -- Validations
4792: IF p_trans_date IS NOT NULL THEN
4793: IF p_trans_date > SYSDATE THEN
4794: gme_common_pvt.log_message(p_product_code => 'GMA'
4795: ,p_message_code => 'SY_NOFUTUREDATE');
4796: RAISE fnd_api.g_exc_error;
4797: END IF;
4798: END IF;

Line 4808: gme_common_pvt.log_message('GME_IB_NOT_ALLOWED');

4804: IF l_batch_header_rec.batch_status = 3 THEN /*other batch status will be validated in the below validate procedure */
4805: IF (p_qty_type = 0 AND p_qty > 0) OR
4806: (p_qty_type = 1 AND p_qty > l_material_detail_rec.actual_qty) OR
4807: (p_qty_type = 2 AND (l_material_detail_rec.wip_plan_qty *p_qty/100) > l_material_detail_rec.actual_qty) THEN
4808: gme_common_pvt.log_message('GME_IB_NOT_ALLOWED');
4809: RAISE fnd_api.g_exc_error;
4810: END IF;
4811: END IF;
4812:

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

4829: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4830: RAISE fnd_api.g_exc_error;
4831: END IF;
4832:
4833: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4834:
4835: /* Invoke main */
4836: gme_api_main.incremental_backflush
4837: (p_validation_level => p_validation_level

Line 4849: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

4845: ,p_qty_type => p_qty_type
4846: ,p_trans_date => p_trans_date
4847: ,x_exception_material_tbl => l_exception_material_tbl);
4848:
4849: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
4850: x_return_status := fnd_api.g_ret_sts_success;
4851: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
4852: x_exception_material_tbl := l_exception_material_tbl;
4853: END IF;

Line 4851: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

4847: ,x_exception_material_tbl => l_exception_material_tbl);
4848:
4849: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
4850: x_return_status := fnd_api.g_ret_sts_success;
4851: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
4852: x_exception_material_tbl := l_exception_material_tbl;
4853: END IF;
4854:
4855: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 4861: (p_header_id => gme_common_pvt.g_transaction_header_id

4857: END IF;
4858:
4859: /* Invoke save_batch */
4860: gme_api_pub.save_batch
4861: (p_header_id => gme_common_pvt.g_transaction_header_id
4862: ,p_table => 1
4863: ,p_commit => p_commit
4864: ,x_return_status => x_return_status);
4865:

Line 4878: gme_common_pvt.count_and_get (x_count => x_message_count

4874: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
4875: END IF;
4876: EXCEPTION
4877: WHEN error_incr_backflush THEN
4878: gme_common_pvt.count_and_get (x_count => x_message_count
4879: ,p_encoded => fnd_api.g_false
4880: ,x_data => x_message_list);
4881: WHEN fnd_api.g_exc_error THEN
4882: x_return_status := fnd_api.g_ret_sts_error;

Line 4897: := gme_common_pvt.g_max_errors

4893: /*************************************************************************/
4894: PROCEDURE create_material_txn (
4895: p_api_version IN NUMBER := 2.0
4896: ,p_validation_level IN NUMBER
4897: := gme_common_pvt.g_max_errors
4898: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4899: ,p_commit IN VARCHAR2 := fnd_api.g_false
4900: ,x_message_count OUT NOCOPY NUMBER
4901: ,x_message_list OUT NOCOPY VARCHAR2

Line 4905: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl

4901: ,x_message_list OUT NOCOPY VARCHAR2
4902: ,x_return_status OUT NOCOPY VARCHAR2
4903: ,p_org_code IN VARCHAR2 := NULL
4904: ,p_mmti_rec IN mtl_transactions_interface%ROWTYPE
4905: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl
4906: ,p_batch_no IN VARCHAR2 := NULL
4907: ,p_line_no IN NUMBER := NULL
4908: ,p_line_type IN NUMBER := NULL
4909: ,p_create_lot IN VARCHAR2 := NULL

Line 4913: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)

4909: ,p_create_lot IN VARCHAR2 := NULL
4910: ,p_generate_lot IN VARCHAR2 := NULL
4911: ,p_generate_parent_lot IN VARCHAR2 := NULL
4912: ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE
4913: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)
4914: IS
4915: CURSOR cur_get_item_rec (v_item_id NUMBER, v_org_id NUMBER)
4916: IS
4917: SELECT *

Line 4929: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

4925: WHERE transaction_set_id = v_header_id;
4926:
4927: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_MATERIAL_TXN';
4928: l_mmti_rec mtl_transactions_interface%ROWTYPE;
4929: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
4930: l_mat_dtl_rec gme_material_details%ROWTYPE;
4931: l_mat_dtl_rec_out gme_material_details%ROWTYPE;
4932: l_batch_header_rec gme_batch_header%ROWTYPE;
4933: l_item_rec mtl_system_items_b%ROWTYPE;

Line 4974: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

4970: IF NOT fnd_api.compatible_api_call (2.0
4971: ,p_api_version
4972: ,'create_material_txn'
4973: ,g_pkg_name) THEN
4974: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4975: RAISE fnd_api.g_exc_error;
4976: END IF;
4977:
4978: l_mmti_rec := p_mmti_rec;

Line 4987: /* gme_common_pvt.g_error_count := 0;

4983: fnd_msg_pub.ADD;
4984: RAISE fnd_api.g_exc_error;
4985: END IF;
4986:
4987: /* gme_common_pvt.g_error_count := 0;
4988: gme_common_pvt.g_setup_done :=
4989: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
4990: ,p_org_code => p_org_code);
4991:

Line 4988: gme_common_pvt.g_setup_done :=

4984: RAISE fnd_api.g_exc_error;
4985: END IF;
4986:
4987: /* gme_common_pvt.g_error_count := 0;
4988: gme_common_pvt.g_setup_done :=
4989: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
4990: ,p_org_code => p_org_code);
4991:
4992: IF NOT gme_common_pvt.g_setup_done THEN

Line 4989: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id

4985: END IF;
4986:
4987: /* gme_common_pvt.g_error_count := 0;
4988: gme_common_pvt.g_setup_done :=
4989: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
4990: ,p_org_code => p_org_code);
4991:
4992: IF NOT gme_common_pvt.g_setup_done THEN
4993: RAISE fnd_api.g_exc_error;

Line 4992: IF NOT gme_common_pvt.g_setup_done THEN

4988: gme_common_pvt.g_setup_done :=
4989: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
4990: ,p_org_code => p_org_code);
4991:
4992: IF NOT gme_common_pvt.g_setup_done THEN
4993: RAISE fnd_api.g_exc_error;
4994: ELSE
4995: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;
4996: END IF;*/

Line 4995: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;

4991:
4992: IF NOT gme_common_pvt.g_setup_done THEN
4993: RAISE fnd_api.g_exc_error;
4994: ELSE
4995: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;
4996: END IF;*/
4997: gme_common_pvt.set_timestamp;
4998: /* Bug 5358129 added code so line type line no combo will also retrieve material */
4999: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;

Line 4997: gme_common_pvt.set_timestamp;

4993: RAISE fnd_api.g_exc_error;
4994: ELSE
4995: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;
4996: END IF;*/
4997: gme_common_pvt.set_timestamp;
4998: /* Bug 5358129 added code so line type line no combo will also retrieve material */
4999: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;
5000: l_mat_dtl_rec.line_no := p_line_no;
5001: l_mat_dtl_rec.line_type := p_line_type;

Line 5002: gme_common_pvt.Validate_material_detail

4998: /* Bug 5358129 added code so line type line no combo will also retrieve material */
4999: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;
5000: l_mat_dtl_rec.line_no := p_line_no;
5001: l_mat_dtl_rec.line_type := p_line_type;
5002: gme_common_pvt.Validate_material_detail
5003: (p_material_detail_rec => l_mat_dtl_rec
5004: ,p_org_code => p_org_code
5005: ,p_batch_no => p_batch_no
5006: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 5006: ,p_batch_type => gme_common_pvt.g_doc_type_batch

5002: gme_common_pvt.Validate_material_detail
5003: (p_material_detail_rec => l_mat_dtl_rec
5004: ,p_org_code => p_org_code
5005: ,p_batch_no => p_batch_no
5006: ,p_batch_type => gme_common_pvt.g_doc_type_batch
5007: ,x_batch_header_rec => l_batch_header_rec
5008: ,x_material_detail_rec => l_mat_dtl_rec_out
5009: ,x_message_count => x_message_count
5010: ,x_message_list => x_message_list

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

5024: OPEN cur_get_item_rec (l_mmti_rec.inventory_item_id, l_mmti_rec.organization_id);
5025: FETCH cur_get_item_rec INTO l_item_rec;
5026: IF cur_get_item_rec%NOTFOUND THEN
5027: CLOSE cur_get_item_rec;
5028: gme_common_pvt.log_message ('PM_INVALID_ITEM');
5029: IF (g_debug = gme_debug.g_log_statement) THEN
5030: gme_debug.put_line('Item cursor fetch no record in mtl_system_items_b: ');
5031: gme_debug.put_line('inventory_item_id = '|| TO_CHAR (l_mmti_rec.inventory_item_id) );
5032: gme_debug.put_line('organization_id = '|| TO_CHAR (l_mmti_rec.organization_id) );

Line 5041: gme_common_pvt.fetch_trans_date(

5037:
5038: /*Bug#5394232 Begin
5039: if we don't pass any date to this procedure then we have to default the trans date*/
5040: IF l_mmti_rec.transaction_date IS NULL THEN
5041: gme_common_pvt.fetch_trans_date(
5042: p_material_detail_id => l_mat_dtl_rec.material_detail_id
5043: ,p_invoke_mode => 'T'
5044: ,x_trans_date => l_trans_date
5045: ,x_return_status => l_return_status );

Line 5056: gme_common_pvt.log_message('GME_NOT_VALID_TRANS_DATE');

5052: ELSE
5053: /* transaction date can't be in future and should not be less than actual start date of the batch*/
5054: IF l_mmti_rec.transaction_date < l_batch_header_rec.actual_start_date OR
5055: l_mmti_rec.transaction_date > SYSDATE THEN
5056: gme_common_pvt.log_message('GME_NOT_VALID_TRANS_DATE');
5057: RAISE fnd_api.g_exc_error;
5058: END IF;
5059: END IF;
5060: --Bug#5394232 End

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

5176: END LOOP;
5177: END IF; -- for lot_control
5178: END IF; -- for line_type
5179:
5180: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5181: /* Bug 5554841 Migration will call this with existing header ID*/
5182: --gme_common_pvt.g_transaction_header_id := NULL;
5183: gme_transactions_pvt.create_material_txn
5184: (p_mmti_rec => l_mmti_rec

Line 5182: --gme_common_pvt.g_transaction_header_id := NULL;

5178: END IF; -- for line_type
5179:
5180: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5181: /* Bug 5554841 Migration will call this with existing header ID*/
5182: --gme_common_pvt.g_transaction_header_id := NULL;
5183: gme_transactions_pvt.create_material_txn
5184: (p_mmti_rec => l_mmti_rec
5185: ,p_mmli_tbl => l_mmli_tbl
5186: ,x_return_status => l_return_status);

Line 5191: || gme_common_pvt.g_transaction_header_id);

5187:
5188: IF l_return_status = fnd_api.g_ret_sts_success THEN
5189: IF g_debug <= gme_debug.g_log_procedure THEN
5190: gme_debug.put_line ( 'before save batch'
5191: || gme_common_pvt.g_transaction_header_id);
5192: END IF;
5193: l_header_id := gme_common_pvt.g_transaction_header_id;
5194: gme_api_pub.save_batch
5195: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 5193: l_header_id := gme_common_pvt.g_transaction_header_id;

5189: IF g_debug <= gme_debug.g_log_procedure THEN
5190: gme_debug.put_line ( 'before save batch'
5191: || gme_common_pvt.g_transaction_header_id);
5192: END IF;
5193: l_header_id := gme_common_pvt.g_transaction_header_id;
5194: gme_api_pub.save_batch
5195: (p_header_id => gme_common_pvt.g_transaction_header_id
5196: ,p_table => 1
5197: ,p_commit => p_commit

Line 5195: (p_header_id => gme_common_pvt.g_transaction_header_id

5191: || gme_common_pvt.g_transaction_header_id);
5192: END IF;
5193: l_header_id := gme_common_pvt.g_transaction_header_id;
5194: gme_api_pub.save_batch
5195: (p_header_id => gme_common_pvt.g_transaction_header_id
5196: ,p_table => 1
5197: ,p_commit => p_commit
5198: ,x_return_status => x_return_status);
5199:

Line 5236: gme_common_pvt.count_and_get (x_count => x_message_count

5232: END IF;
5233: EXCEPTION
5234: WHEN create_txn_fail THEN
5235: ROLLBACK TO SAVEPOINT create_material_txn;
5236: gme_common_pvt.count_and_get (x_count => x_message_count
5237: ,p_encoded => fnd_api.g_false
5238: ,x_data => x_message_list);
5239: /* Bug 5554841 have to set x_return_status*/
5240: x_return_status := l_return_status;

Line 5244: gme_common_pvt.count_and_get (x_count => x_message_count

5240: x_return_status := l_return_status;
5241: WHEN fnd_api.g_exc_error THEN
5242: ROLLBACK TO SAVEPOINT create_material_txn;
5243: x_return_status := fnd_api.g_ret_sts_error;
5244: gme_common_pvt.count_and_get (x_count => x_message_count
5245: ,p_encoded => fnd_api.g_false
5246: ,x_data => x_message_list);
5247: WHEN OTHERS THEN
5248: ROLLBACK TO SAVEPOINT create_material_txn;

Line 5259: := gme_common_pvt.g_max_errors

5255: /*************************************************************************/
5256: PROCEDURE update_material_txn (
5257: p_api_version IN NUMBER := 2.0
5258: ,p_validation_level IN NUMBER
5259: := gme_common_pvt.g_max_errors
5260: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5261: ,p_commit IN VARCHAR2 := fnd_api.g_false
5262: ,x_message_count OUT NOCOPY NUMBER
5263: ,x_message_list OUT NOCOPY VARCHAR2

Line 5267: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl

5263: ,x_message_list OUT NOCOPY VARCHAR2
5264: ,x_return_status OUT NOCOPY VARCHAR2
5265: ,p_transaction_id IN NUMBER
5266: ,p_mmti_rec IN mtl_transactions_interface%ROWTYPE
5267: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl
5268: ,p_create_lot IN VARCHAR2 := NULL
5269: ,p_generate_lot IN VARCHAR2 := NULL
5270: ,p_generate_parent_lot IN VARCHAR2 := NULL
5271: ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE

Line 5272: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)

5268: ,p_create_lot IN VARCHAR2 := NULL
5269: ,p_generate_lot IN VARCHAR2 := NULL
5270: ,p_generate_parent_lot IN VARCHAR2 := NULL
5271: ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE
5272: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)
5273: IS
5274: CURSOR cur_get_item_rec (v_item_id NUMBER, v_org_id NUMBER)
5275: IS
5276: SELECT *

Line 5295: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

5291:
5292: l_api_name CONSTANT VARCHAR2 (30) := 'UPDATE_MATERIAL_TXN';
5293: l_transaction_id NUMBER;
5294: l_mmt_rec mtl_material_transactions%ROWTYPE;
5295: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
5296: l_mmti_rec mtl_transactions_interface%ROWTYPE;
5297: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
5298: l_mat_dtl_rec gme_material_details%ROWTYPE;
5299: l_item_rec mtl_system_items_b%ROWTYPE;

Line 5297: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

5293: l_transaction_id NUMBER;
5294: l_mmt_rec mtl_material_transactions%ROWTYPE;
5295: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
5296: l_mmti_rec mtl_transactions_interface%ROWTYPE;
5297: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
5298: l_mat_dtl_rec gme_material_details%ROWTYPE;
5299: l_item_rec mtl_system_items_b%ROWTYPE;
5300: l_msg_count NUMBER;
5301: l_msg_data VARCHAR2 (2000);

Line 5342: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

5338: IF NOT fnd_api.compatible_api_call (2.0
5339: ,p_api_version
5340: ,'update_material_txn'
5341: ,g_pkg_name) THEN
5342: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5343: RAISE fnd_api.g_exc_error;
5344: END IF;
5345:
5346: IF (p_transaction_id IS NULL) THEN

Line 5347: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

5343: RAISE fnd_api.g_exc_error;
5344: END IF;
5345:
5346: IF (p_transaction_id IS NULL) THEN
5347: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
5348: ,'FIELD_NAME'
5349: ,'p_transaction_id');
5350: RAISE fnd_api.g_exc_error;
5351: END IF;

Line 5359: gme_common_pvt.g_error_count := 0;

5355: CLOSE cur_trans_org;
5356:
5357: l_mmti_rec := p_mmti_rec;
5358: l_mmli_tbl := p_mmli_tbl;
5359: gme_common_pvt.g_error_count := 0;
5360: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);
5361:
5362: IF NOT gme_common_pvt.g_setup_done THEN
5363: RAISE fnd_api.g_exc_error;

Line 5360: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);

5356:
5357: l_mmti_rec := p_mmti_rec;
5358: l_mmli_tbl := p_mmli_tbl;
5359: gme_common_pvt.g_error_count := 0;
5360: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);
5361:
5362: IF NOT gme_common_pvt.g_setup_done THEN
5363: RAISE fnd_api.g_exc_error;
5364: ELSE

Line 5362: IF NOT gme_common_pvt.g_setup_done THEN

5358: l_mmli_tbl := p_mmli_tbl;
5359: gme_common_pvt.g_error_count := 0;
5360: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);
5361:
5362: IF NOT gme_common_pvt.g_setup_done THEN
5363: RAISE fnd_api.g_exc_error;
5364: ELSE
5365: l_orgn_id := gme_common_pvt.g_organization_id;
5366: END IF;

Line 5365: l_orgn_id := gme_common_pvt.g_organization_id;

5361:
5362: IF NOT gme_common_pvt.g_setup_done THEN
5363: RAISE fnd_api.g_exc_error;
5364: ELSE
5365: l_orgn_id := gme_common_pvt.g_organization_id;
5366: END IF;
5367:
5368: gme_common_pvt.set_timestamp;
5369: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;

Line 5368: gme_common_pvt.set_timestamp;

5364: ELSE
5365: l_orgn_id := gme_common_pvt.g_organization_id;
5366: END IF;
5367:
5368: gme_common_pvt.set_timestamp;
5369: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;
5370:
5371: IF NOT gme_material_details_dbl.fetch_row
5372: (p_material_detail => l_mat_dtl_rec

Line 5391: gme_common_pvt.log_message ('PM_INVALID_ITEM');

5387:
5388: FETCH cur_get_item_rec INTO l_item_rec;
5389: IF cur_get_item_rec%NOTFOUND THEN
5390: CLOSE cur_get_item_rec;
5391: gme_common_pvt.log_message ('PM_INVALID_ITEM');
5392:
5393: IF (g_debug = gme_debug.g_log_statement) THEN
5394: gme_debug.put_line
5395: ('Item cursor fetch no record in mtl_system_items_b: ');

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

5517: END LOOP;
5518: END IF; -- for lot_control
5519: END IF; -- for line_type
5520:
5521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5522: gme_common_pvt.g_transaction_header_id := NULL;
5523: gme_transactions_pvt.update_material_txn
5524: (p_transaction_id => p_transaction_id
5525: ,p_mmti_rec => l_mmti_rec

Line 5522: gme_common_pvt.g_transaction_header_id := NULL;

5518: END IF; -- for lot_control
5519: END IF; -- for line_type
5520:
5521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5522: gme_common_pvt.g_transaction_header_id := NULL;
5523: gme_transactions_pvt.update_material_txn
5524: (p_transaction_id => p_transaction_id
5525: ,p_mmti_rec => l_mmti_rec
5526: ,p_mmli_tbl => l_mmli_tbl

Line 5532: || gme_common_pvt.g_transaction_header_id);

5528:
5529: IF l_return_status = fnd_api.g_ret_sts_success THEN
5530: IF g_debug <= gme_debug.g_log_procedure THEN
5531: gme_debug.put_line ( 'before save batch'
5532: || gme_common_pvt.g_transaction_header_id);
5533: END IF;
5534: l_header_id:= gme_common_pvt.g_transaction_header_id;
5535: gme_api_pub.save_batch
5536: (p_header_id => gme_common_pvt.get_txn_header_id

Line 5534: l_header_id:= gme_common_pvt.g_transaction_header_id;

5530: IF g_debug <= gme_debug.g_log_procedure THEN
5531: gme_debug.put_line ( 'before save batch'
5532: || gme_common_pvt.g_transaction_header_id);
5533: END IF;
5534: l_header_id:= gme_common_pvt.g_transaction_header_id;
5535: gme_api_pub.save_batch
5536: (p_header_id => gme_common_pvt.get_txn_header_id
5537: ,p_table => 1
5538: ,p_commit => p_commit

Line 5536: (p_header_id => gme_common_pvt.get_txn_header_id

5532: || gme_common_pvt.g_transaction_header_id);
5533: END IF;
5534: l_header_id:= gme_common_pvt.g_transaction_header_id;
5535: gme_api_pub.save_batch
5536: (p_header_id => gme_common_pvt.get_txn_header_id
5537: ,p_table => 1
5538: ,p_commit => p_commit
5539: ,x_return_status => x_return_status);
5540:

Line 5578: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');

5574: END IF;
5575: EXCEPTION
5576: WHEN update_txn_mismatch THEN
5577: ROLLBACK TO SAVEPOINT update_transaction;
5578: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
5579: x_return_status := fnd_api.g_ret_sts_error;
5580: gme_common_pvt.count_and_get (x_count => x_message_count
5581: ,p_encoded => fnd_api.g_false
5582: ,x_data => x_message_list);

Line 5580: gme_common_pvt.count_and_get (x_count => x_message_count

5576: WHEN update_txn_mismatch THEN
5577: ROLLBACK TO SAVEPOINT update_transaction;
5578: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
5579: x_return_status := fnd_api.g_ret_sts_error;
5580: gme_common_pvt.count_and_get (x_count => x_message_count
5581: ,p_encoded => fnd_api.g_false
5582: ,x_data => x_message_list);
5583: WHEN update_txn_fail THEN
5584: ROLLBACK TO SAVEPOINT update_transaction;

Line 5585: gme_common_pvt.count_and_get (x_count => x_message_count

5581: ,p_encoded => fnd_api.g_false
5582: ,x_data => x_message_list);
5583: WHEN update_txn_fail THEN
5584: ROLLBACK TO SAVEPOINT update_transaction;
5585: gme_common_pvt.count_and_get (x_count => x_message_count
5586: ,p_encoded => fnd_api.g_false
5587: ,x_data => x_message_list);
5588: WHEN fnd_api.g_exc_error THEN
5589: ROLLBACK TO SAVEPOINT update_transaction;

Line 5591: gme_common_pvt.count_and_get (x_count => x_message_count

5587: ,x_data => x_message_list);
5588: WHEN fnd_api.g_exc_error THEN
5589: ROLLBACK TO SAVEPOINT update_transaction;
5590: x_return_status := fnd_api.g_ret_sts_error;
5591: gme_common_pvt.count_and_get (x_count => x_message_count
5592: ,p_encoded => fnd_api.g_false
5593: ,x_data => x_message_list);
5594: WHEN OTHERS THEN
5595: gme_when_others ( p_api_name => l_api_name

Line 5605: := gme_common_pvt.g_max_errors

5601: /*************************************************************************/
5602: PROCEDURE delete_material_txn (
5603: p_api_version IN NUMBER := 2.0
5604: ,p_validation_level IN NUMBER
5605: := gme_common_pvt.g_max_errors
5606: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5607: ,p_commit IN VARCHAR2 := fnd_api.g_false
5608: ,x_message_count OUT NOCOPY NUMBER
5609: ,x_message_list OUT NOCOPY VARCHAR2

Line 5658: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

5654: IF NOT fnd_api.compatible_api_call (2.0
5655: ,p_api_version
5656: ,'delete_material_txn'
5657: ,g_pkg_name) THEN
5658: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5659: RAISE fnd_api.g_exc_error;
5660: END IF;
5661:
5662: IF (p_transaction_id IS NULL) THEN

Line 5663: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

5659: RAISE fnd_api.g_exc_error;
5660: END IF;
5661:
5662: IF (p_transaction_id IS NULL) THEN
5663: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
5664: ,'FIELD_NAME'
5665: ,'p_transaction_id');
5666: RAISE fnd_api.g_exc_error;
5667: END IF;

Line 5674: gme_common_pvt.g_error_count := 0;

5670: FETCH cur_trans_org INTO l_orgn_id;
5671:
5672: CLOSE cur_trans_org;
5673:
5674: gme_common_pvt.g_error_count := 0;
5675: gme_common_pvt.g_setup_done :=
5676: gme_common_pvt.setup (p_org_id => l_orgn_id);
5677:
5678: IF NOT gme_common_pvt.g_setup_done THEN

Line 5675: gme_common_pvt.g_setup_done :=

5671:
5672: CLOSE cur_trans_org;
5673:
5674: gme_common_pvt.g_error_count := 0;
5675: gme_common_pvt.g_setup_done :=
5676: gme_common_pvt.setup (p_org_id => l_orgn_id);
5677:
5678: IF NOT gme_common_pvt.g_setup_done THEN
5679: RAISE fnd_api.g_exc_error;

Line 5676: gme_common_pvt.setup (p_org_id => l_orgn_id);

5672: CLOSE cur_trans_org;
5673:
5674: gme_common_pvt.g_error_count := 0;
5675: gme_common_pvt.g_setup_done :=
5676: gme_common_pvt.setup (p_org_id => l_orgn_id);
5677:
5678: IF NOT gme_common_pvt.g_setup_done THEN
5679: RAISE fnd_api.g_exc_error;
5680: ELSE

Line 5678: IF NOT gme_common_pvt.g_setup_done THEN

5674: gme_common_pvt.g_error_count := 0;
5675: gme_common_pvt.g_setup_done :=
5676: gme_common_pvt.setup (p_org_id => l_orgn_id);
5677:
5678: IF NOT gme_common_pvt.g_setup_done THEN
5679: RAISE fnd_api.g_exc_error;
5680: ELSE
5681: l_orgn_id := gme_common_pvt.g_organization_id;
5682: END IF;

Line 5681: l_orgn_id := gme_common_pvt.g_organization_id;

5677:
5678: IF NOT gme_common_pvt.g_setup_done THEN
5679: RAISE fnd_api.g_exc_error;
5680: ELSE
5681: l_orgn_id := gme_common_pvt.g_organization_id;
5682: END IF;
5683:
5684: gme_common_pvt.set_timestamp;
5685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 5684: gme_common_pvt.set_timestamp;

5680: ELSE
5681: l_orgn_id := gme_common_pvt.g_organization_id;
5682: END IF;
5683:
5684: gme_common_pvt.set_timestamp;
5685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5686: gme_common_pvt.g_transaction_header_id := NULL;
5687: l_transaction_id := p_transaction_id;
5688: gme_transactions_pvt.delete_material_txn

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

5681: l_orgn_id := gme_common_pvt.g_organization_id;
5682: END IF;
5683:
5684: gme_common_pvt.set_timestamp;
5685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5686: gme_common_pvt.g_transaction_header_id := NULL;
5687: l_transaction_id := p_transaction_id;
5688: gme_transactions_pvt.delete_material_txn
5689: (p_transaction_id => l_transaction_id

Line 5686: gme_common_pvt.g_transaction_header_id := NULL;

5682: END IF;
5683:
5684: gme_common_pvt.set_timestamp;
5685: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5686: gme_common_pvt.g_transaction_header_id := NULL;
5687: l_transaction_id := p_transaction_id;
5688: gme_transactions_pvt.delete_material_txn
5689: (p_transaction_id => l_transaction_id
5690: ,x_return_status => x_return_status);

Line 5695: (p_header_id => gme_common_pvt.get_txn_header_id

5691:
5692: IF x_return_status = fnd_api.g_ret_sts_success THEN
5693: IF (p_commit = fnd_api.g_true) THEN
5694: gme_api_pub.save_batch
5695: (p_header_id => gme_common_pvt.get_txn_header_id
5696: ,p_table => 1
5697: ,p_commit => p_commit
5698: ,x_return_status => x_return_status);
5699:

Line 5717: gme_common_pvt.count_and_get (x_count => x_message_count

5713: END IF;
5714: EXCEPTION
5715: WHEN delete_txn_fail THEN
5716: ROLLBACK TO SAVEPOINT delete_transaction;
5717: gme_common_pvt.count_and_get (x_count => x_message_count
5718: ,p_encoded => fnd_api.g_false
5719: ,x_data => x_message_list);
5720: WHEN fnd_api.g_exc_error THEN
5721: ROLLBACK TO SAVEPOINT delete_transaction;

Line 5723: gme_common_pvt.count_and_get (x_count => x_message_count

5719: ,x_data => x_message_list);
5720: WHEN fnd_api.g_exc_error THEN
5721: ROLLBACK TO SAVEPOINT delete_transaction;
5722: x_return_status := fnd_api.g_ret_sts_error;
5723: gme_common_pvt.count_and_get (x_count => x_message_count
5724: ,p_encoded => fnd_api.g_false
5725: ,x_data => x_message_list);
5726: WHEN OTHERS THEN
5727: gme_when_others ( p_api_name => l_api_name

Line 5754: := gme_common_pvt.g_max_errors

5750: ================================================================================*/
5751: PROCEDURE reroute_batch (
5752: p_api_version IN NUMBER := 2.0
5753: ,p_validation_level IN NUMBER
5754: := gme_common_pvt.g_max_errors
5755: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
5756: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
5757: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
5758: ,p_validity_rule_id IN NUMBER

Line 5788: gme_common_pvt.g_error_count := 0;

5784: SAVEPOINT reroute_batch_pub;
5785:
5786: IF (fnd_api.to_boolean (p_init_msg_list) ) THEN
5787: fnd_msg_pub.initialize;
5788: gme_common_pvt.g_error_count := 0;
5789: END IF;
5790:
5791: -- Standard call to check for call compatibility.
5792: IF NOT fnd_api.compatible_api_call (2.0

Line 5796: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

5792: IF NOT fnd_api.compatible_api_call (2.0
5793: ,p_api_version
5794: ,l_api_name
5795: ,g_pkg_name) THEN
5796: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5797: RAISE fnd_api.g_exc_error;
5798: END IF;
5799:
5800: --FPBug#4585491 Begin

Line 5803: gme_common_pvt.log_message ('GME_INVALID_FIELD'

5799:
5800: --FPBug#4585491 Begin
5801: /* Check for p_use_workday_cal */
5802: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
5803: gme_common_pvt.log_message ('GME_INVALID_FIELD'
5804: ,'FIELD'
5805: ,'p_use_workday_cal');
5806: RAISE fnd_api.g_exc_error;
5807: END IF;

Line 5811: gme_common_pvt.log_message ('GME_INVALID_FIELD'

5807: END IF;
5808:
5809: /* Check for p_contiguity_override */
5810: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
5811: gme_common_pvt.log_message ('GME_INVALID_FIELD'
5812: ,'FIELD'
5813: ,'p_contiguity_override');
5814: RAISE fnd_api.g_exc_error;
5815: END IF;

Line 5822: gme_common_pvt.validate_batch

5818: /* Set the return status to success initially */
5819: x_return_status := fnd_api.g_ret_sts_success;
5820:
5821: /* Get the Batch header */
5822: gme_common_pvt.validate_batch
5823: (p_batch_header_rec => p_batch_header_rec
5824: ,p_org_code => p_org_code
5825: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
5826: ,x_batch_header_rec => l_batch_header_rec

Line 5825: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

5821: /* Get the Batch header */
5822: gme_common_pvt.validate_batch
5823: (p_batch_header_rec => p_batch_header_rec
5824: ,p_org_code => p_org_code
5825: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
5826: ,x_batch_header_rec => l_batch_header_rec
5827: ,x_message_count => x_message_count
5828: ,x_message_list => x_message_list
5829: ,x_return_status => x_return_status );

Line 5871: ,p_table => gme_common_pvt.g_interface_table

5867: RAISE fnd_api.g_exc_unexpected_error;
5868: END IF;
5869: gme_api_pub.save_batch
5870: (p_header_id => NULL
5871: ,p_table => gme_common_pvt.g_interface_table
5872: ,p_commit => p_commit
5873: ,x_return_status => x_return_status);
5874:
5875: IF (x_return_status = fnd_api.g_ret_sts_error) THEN

Line 5885: gme_common_pvt.count_and_get (x_count => x_message_count

5881: IF (fnd_api.to_boolean (p_commit) ) THEN
5882: COMMIT WORK;
5883: END IF;
5884:
5885: gme_common_pvt.count_and_get (x_count => x_message_count
5886: ,p_encoded => fnd_api.g_false
5887: ,x_data => x_message_list);
5888:
5889: IF g_debug <= gme_debug.g_log_procedure THEN

Line 5897: gme_common_pvt.count_and_get (x_count => x_message_count

5893: EXCEPTION
5894: WHEN reroute_batch_failed THEN
5895: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5896: x_batch_header_rec := NULL;
5897: gme_common_pvt.count_and_get (x_count => x_message_count
5898: ,p_encoded => fnd_api.g_false
5899: ,x_data => x_message_list);
5900: WHEN fnd_api.g_exc_error THEN
5901: ROLLBACK TO SAVEPOINT reroute_batch_pub;

Line 5904: gme_common_pvt.count_and_get (x_count => x_message_count

5900: WHEN fnd_api.g_exc_error THEN
5901: ROLLBACK TO SAVEPOINT reroute_batch_pub;
5902: x_batch_header_rec := NULL;
5903: x_return_status := fnd_api.g_ret_sts_error;
5904: gme_common_pvt.count_and_get (x_count => x_message_count
5905: ,p_encoded => fnd_api.g_false
5906: ,x_data => x_message_list);
5907: WHEN fnd_api.g_exc_unexpected_error THEN
5908: ROLLBACK TO SAVEPOINT reroute_batch_pub;

Line 5915: gme_common_pvt.count_and_get (x_count => x_message_count

5911:
5912: IF (g_debug > 0) THEN gme_debug.put_line ( g_pkg_name || '.' ||
5913: l_api_name || ':' || 'UNEXPECTED:' || SQLERRM);
5914: END IF;
5915: gme_common_pvt.count_and_get (x_count => x_message_count
5916: ,p_encoded => fnd_api.g_false
5917: ,x_data => x_message_list);
5918: WHEN OTHERS THEN
5919: ROLLBACK TO SAVEPOINT reroute_batch_pub;

Line 5948: := gme_common_pvt.g_max_errors

5944: ================================================================================*/
5945: PROCEDURE cancel_batch (
5946: p_api_version IN NUMBER := 2.0
5947: ,p_validation_level IN NUMBER
5948: := gme_common_pvt.g_max_errors
5949: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5950: ,p_commit IN VARCHAR2 := fnd_api.g_false
5951: ,x_message_count OUT NOCOPY NUMBER
5952: ,x_message_list OUT NOCOPY VARCHAR2

Line 5986: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

5982: IF NOT fnd_api.compatible_api_call (2.0
5983: ,p_api_version
5984: ,'cancel_batch'
5985: ,g_pkg_name) THEN
5986: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5987: RAISE fnd_api.g_exc_error;
5988: END IF;
5989:
5990: --fetch the batch

Line 5991: gme_common_pvt.validate_batch

5987: RAISE fnd_api.g_exc_error;
5988: END IF;
5989:
5990: --fetch the batch
5991: gme_common_pvt.validate_batch
5992: (p_batch_header_rec => p_batch_header_rec
5993: ,p_org_code => p_org_code
5994: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
5995: ,x_batch_header_rec => l_batch_header_rec

Line 5994: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

5990: --fetch the batch
5991: gme_common_pvt.validate_batch
5992: (p_batch_header_rec => p_batch_header_rec
5993: ,p_org_code => p_org_code
5994: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
5995: ,x_batch_header_rec => l_batch_header_rec
5996: ,x_message_count => x_message_count
5997: ,x_message_list => x_message_list
5998: ,x_return_status => x_return_status );

Line 6009: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN

6005: RAISE fnd_api.g_exc_error;
6006: END IF;
6007:
6008:
6009: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6010: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6011: RAISE fnd_api.g_exc_error;
6012: END IF;
6013:

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

6006: END IF;
6007:
6008:
6009: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6010: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6011: RAISE fnd_api.g_exc_error;
6012: END IF;
6013:
6014: gme_common_pvt.g_error_count := 0;

Line 6014: gme_common_pvt.g_error_count := 0;

6010: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6011: RAISE fnd_api.g_exc_error;
6012: END IF;
6013:
6014: gme_common_pvt.g_error_count := 0;
6015:
6016: /* Check for batch status */
6017: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
6018: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');

Line 6017: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN

6013:
6014: gme_common_pvt.g_error_count := 0;
6015:
6016: /* Check for batch status */
6017: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
6018: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');
6019: RAISE fnd_api.g_exc_error;
6020: END IF;
6021:

Line 6018: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');

6014: gme_common_pvt.g_error_count := 0;
6015:
6016: /* Check for batch status */
6017: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
6018: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');
6019: RAISE fnd_api.g_exc_error;
6020: END IF;
6021:
6022: IF g_debug <= gme_debug.g_log_statement THEN

Line 6044: ,p_table => gme_common_pvt.g_interface_table

6040: IF x_return_status = fnd_api.g_ret_sts_success THEN
6041: IF p_commit = fnd_api.g_true THEN
6042: gme_api_pub.save_batch
6043: (p_header_id => NULL
6044: ,p_table => gme_common_pvt.g_interface_table
6045: ,p_commit => p_commit
6046: ,x_return_status => x_return_status);
6047:
6048: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 6058: gme_common_pvt.count_and_get (x_count => x_message_count

6054: ELSE
6055: RAISE batch_cancel_failure;
6056: END IF;
6057:
6058: gme_common_pvt.count_and_get (x_count => x_message_count
6059: ,p_encoded => fnd_api.g_false
6060: ,x_data => x_message_list);
6061:
6062: IF g_debug <= gme_debug.g_log_procedure THEN

Line 6070: gme_common_pvt.count_and_get (x_count => x_message_count

6066: EXCEPTION
6067: WHEN batch_cancel_failure THEN
6068: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6069: x_batch_header_rec := NULL;
6070: gme_common_pvt.count_and_get (x_count => x_message_count
6071: ,p_encoded => fnd_api.g_false
6072: ,x_data => x_message_list);
6073: WHEN fnd_api.g_exc_error THEN
6074: ROLLBACK TO SAVEPOINT cancel_batch_pub;

Line 6077: gme_common_pvt.count_and_get (x_count => x_message_count

6073: WHEN fnd_api.g_exc_error THEN
6074: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6075: x_return_status := fnd_api.g_ret_sts_error;
6076: x_batch_header_rec := NULL;
6077: gme_common_pvt.count_and_get (x_count => x_message_count
6078: ,p_encoded => fnd_api.g_false
6079: ,x_data => x_message_list);
6080: WHEN OTHERS THEN
6081: ROLLBACK TO SAVEPOINT cancel_batch_pub;

Line 6112: := gme_common_pvt.g_max_errors

6108: ================================================================================*/
6109: PROCEDURE terminate_batch (
6110: p_api_version IN NUMBER := 2.0
6111: ,p_validation_level IN NUMBER
6112: := gme_common_pvt.g_max_errors
6113: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6114: ,p_commit IN VARCHAR2 := fnd_api.g_false
6115: ,x_message_count OUT NOCOPY NUMBER
6116: ,x_message_list OUT NOCOPY VARCHAR2

Line 6167: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

6163: IF NOT fnd_api.compatible_api_call (2.0
6164: ,p_api_version
6165: ,'terminate_batch'
6166: ,g_pkg_name) THEN
6167: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6168: RAISE fnd_api.g_exc_error;
6169: END IF;
6170: --Bug#5281136 Fetching the batch before checking for the reason_id or reason name.
6171: --fetch the batch

Line 6172: gme_common_pvt.validate_batch

6168: RAISE fnd_api.g_exc_error;
6169: END IF;
6170: --Bug#5281136 Fetching the batch before checking for the reason_id or reason name.
6171: --fetch the batch
6172: gme_common_pvt.validate_batch
6173: (p_batch_header_rec => p_batch_header_rec
6174: ,p_org_code => p_org_code
6175: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6176: ,x_batch_header_rec => l_batch_header_rec

Line 6175: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

6171: --fetch the batch
6172: gme_common_pvt.validate_batch
6173: (p_batch_header_rec => p_batch_header_rec
6174: ,p_org_code => p_org_code
6175: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6176: ,x_batch_header_rec => l_batch_header_rec
6177: ,x_message_count => x_message_count
6178: ,x_message_list => x_message_list
6179: ,x_return_status => x_return_status );

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

6198: IF l_reason_valid = 1 THEN
6199: l_batch_header_rec.terminate_reason_id :=
6200: p_batch_header_rec.terminate_reason_id;
6201: ELSE
6202: gme_common_pvt.log_message(p_product_code => 'INV'
6203: ,p_message_code => 'INV_LOTC_REASONID_INVALID');
6204: RAISE FND_API.g_exc_error;
6205: END IF;
6206: ELSIF p_reason_name IS NOT NULL THEN

Line 6214: gme_common_pvt.log_message('GME_REASON_NAME_NOT_UNIQUE');

6210: l_batch_header_rec.terminate_reason_id := get_rec.reason_id;
6211: END LOOP;
6212:
6213: IF i > 1 THEN
6214: gme_common_pvt.log_message('GME_REASON_NAME_NOT_UNIQUE');
6215: RAISE FND_API.g_exc_error;
6216: ELSIF i = 0 THEN
6217: gme_common_pvt.log_message('GME_INVALID_REASON_NAME');
6218: RAISE FND_API.g_exc_error;

Line 6217: gme_common_pvt.log_message('GME_INVALID_REASON_NAME');

6213: IF i > 1 THEN
6214: gme_common_pvt.log_message('GME_REASON_NAME_NOT_UNIQUE');
6215: RAISE FND_API.g_exc_error;
6216: ELSIF i = 0 THEN
6217: gme_common_pvt.log_message('GME_INVALID_REASON_NAME');
6218: RAISE FND_API.g_exc_error;
6219: END IF;
6220: END IF;
6221:

Line 6223: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN

6219: END IF;
6220: END IF;
6221:
6222:
6223: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6224: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6225: RAISE fnd_api.g_exc_error;
6226: END IF;
6227:

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

6220: END IF;
6221:
6222:
6223: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6224: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6225: RAISE fnd_api.g_exc_error;
6226: END IF;
6227:
6228: gme_common_pvt.g_error_count := 0;

Line 6228: gme_common_pvt.g_error_count := 0;

6224: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6225: RAISE fnd_api.g_exc_error;
6226: END IF;
6227:
6228: gme_common_pvt.g_error_count := 0;
6229:
6230: /* Check for batch status */
6231: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
6232: gme_common_pvt.log_message ('GME_INVALID_BSTAT_TERM');

Line 6231: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip THEN

6227:
6228: gme_common_pvt.g_error_count := 0;
6229:
6230: /* Check for batch status */
6231: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
6232: gme_common_pvt.log_message ('GME_INVALID_BSTAT_TERM');
6233:
6234: IF (g_debug <= gme_debug.g_log_statement) THEN
6235: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'

Line 6232: gme_common_pvt.log_message ('GME_INVALID_BSTAT_TERM');

6228: gme_common_pvt.g_error_count := 0;
6229:
6230: /* Check for batch status */
6231: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
6232: gme_common_pvt.log_message ('GME_INVALID_BSTAT_TERM');
6233:
6234: IF (g_debug <= gme_debug.g_log_statement) THEN
6235: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'
6236: || 'INVALID_BATCH_STATUS');

Line 6248: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1'

6244: IF p_batch_header_rec.actual_cmplt_date IS NULL THEN
6245: l_batch_header_rec.actual_cmplt_date := SYSDATE;
6246: ELSIF (p_batch_header_rec.actual_cmplt_date <
6247: l_batch_header_rec.actual_start_date) THEN
6248: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1'
6249: ,'Termination date' ,'DATE2','Start date');
6250: x_return_status := fnd_api.g_ret_sts_error;
6251: RAISE fnd_api.g_exc_error;
6252: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN

Line 6253: gme_common_pvt.log_message(p_product_code => 'GMA'

6249: ,'Termination date' ,'DATE2','Start date');
6250: x_return_status := fnd_api.g_ret_sts_error;
6251: RAISE fnd_api.g_exc_error;
6252: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN
6253: gme_common_pvt.log_message(p_product_code => 'GMA'
6254: ,p_message_code => 'SY_NOFUTUREDATE');
6255: x_return_status := fnd_api.g_ret_sts_error;
6256: RAISE fnd_api.g_exc_error;
6257: ELSE

Line 6287: ,p_table => gme_common_pvt.g_interface_table

6283: IF x_return_status = fnd_api.g_ret_sts_success THEN
6284: IF p_commit = fnd_api.g_true THEN
6285: gme_api_pub.save_batch
6286: (p_header_id => NULL
6287: ,p_table => gme_common_pvt.g_interface_table
6288: ,p_commit => p_commit
6289: ,x_return_status => x_return_status);
6290:
6291: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 6301: gme_common_pvt.count_and_get (x_count => x_message_count

6297: ELSE
6298: RAISE batch_terminate_failure;
6299: END IF;
6300:
6301: gme_common_pvt.count_and_get (x_count => x_message_count
6302: ,p_encoded => fnd_api.g_false
6303: ,x_data => x_message_list);
6304:
6305: IF g_debug <= gme_debug.g_log_procedure THEN

Line 6313: gme_common_pvt.count_and_get (x_count => x_message_count

6309: EXCEPTION
6310: WHEN batch_terminate_failure THEN
6311: ROLLBACK TO SAVEPOINT terminate_batch;
6312: x_batch_header_rec := NULL;
6313: gme_common_pvt.count_and_get (x_count => x_message_count
6314: ,p_encoded => fnd_api.g_false
6315: ,x_data => x_message_list);
6316: WHEN fnd_api.g_exc_error THEN
6317: ROLLBACK TO SAVEPOINT terminate_batch;

Line 6320: gme_common_pvt.count_and_get (x_count => x_message_count

6316: WHEN fnd_api.g_exc_error THEN
6317: ROLLBACK TO SAVEPOINT terminate_batch;
6318: x_batch_header_rec := NULL;
6319: x_return_status := fnd_api.g_ret_sts_error;
6320: gme_common_pvt.count_and_get (x_count => x_message_count
6321: ,p_encoded => fnd_api.g_false
6322: ,x_data => x_message_list);
6323: WHEN OTHERS THEN
6324: ROLLBACK TO SAVEPOINT terminate_batch;

Line 6344: := gme_common_pvt.g_max_errors

6340: /*************************************************************************/
6341: PROCEDURE convert_dtl_reservation (
6342: p_api_version IN NUMBER := 2.0
6343: ,p_validation_level IN NUMBER
6344: := gme_common_pvt.g_max_errors
6345: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6346: ,p_commit IN VARCHAR2 := fnd_api.g_false
6347: ,x_message_count OUT NOCOPY NUMBER
6348: ,x_message_list OUT NOCOPY VARCHAR2

Line 6389: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

6385: IF NOT fnd_api.compatible_api_call (2.0
6386: ,p_api_version
6387: ,'convert_dtl_reservation'
6388: ,g_pkg_name) THEN
6389: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6390: RAISE fnd_api.g_exc_error;
6391: END IF;
6392:
6393: IF g_debug <= gme_debug.g_log_statement THEN

Line 6407: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

6403:
6404: IF cur_fetch_reservation%NOTFOUND THEN
6405: CLOSE cur_fetch_reservation;
6406:
6407: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
6408: ,'TABLE_NAME'
6409: ,'MTL_RESERVATIONS');
6410:
6411: IF g_debug <= gme_debug.g_log_statement THEN gme_debug.put_line (

Line 6421: gme_common_pvt.g_setup_done :=

6417: END IF;
6418: CLOSE cur_fetch_reservation;
6419:
6420: /* Do setups appropriate to the organization */
6421: gme_common_pvt.g_setup_done :=
6422: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id
6423: ,p_org_code => NULL);
6424:
6425: IF NOT gme_common_pvt.g_setup_done THEN

Line 6422: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id

6418: CLOSE cur_fetch_reservation;
6419:
6420: /* Do setups appropriate to the organization */
6421: gme_common_pvt.g_setup_done :=
6422: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id
6423: ,p_org_code => NULL);
6424:
6425: IF NOT gme_common_pvt.g_setup_done THEN
6426: RAISE fnd_api.g_exc_error;

Line 6425: IF NOT gme_common_pvt.g_setup_done THEN

6421: gme_common_pvt.g_setup_done :=
6422: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id
6423: ,p_org_code => NULL);
6424:
6425: IF NOT gme_common_pvt.g_setup_done THEN
6426: RAISE fnd_api.g_exc_error;
6427: END IF;
6428:
6429: gme_common_pvt.set_timestamp;

Line 6429: gme_common_pvt.set_timestamp;

6425: IF NOT gme_common_pvt.g_setup_done THEN
6426: RAISE fnd_api.g_exc_error;
6427: END IF;
6428:
6429: gme_common_pvt.set_timestamp;
6430: /* Verify that we have a valid row in gme_material_details */
6431: l_material_details_rec.material_detail_id :=
6432: l_reservation_rec.demand_source_line_id;
6433:

Line 6502: (p_header_id => gme_common_pvt.g_transaction_header_id

6498: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6499: RAISE detail_reservation_error;
6500: END IF;
6501: gme_api_pub.save_batch
6502: (p_header_id => gme_common_pvt.g_transaction_header_id
6503: ,p_table => 1
6504: ,p_commit => p_commit
6505: ,x_return_status => x_return_status);
6506:

Line 6529: gme_common_pvt.count_and_get (x_count => x_message_count

6525: END IF;
6526: EXCEPTION
6527: WHEN detail_reservation_error THEN
6528: ROLLBACK TO SAVEPOINT convert_dtl_reservation;
6529: gme_common_pvt.count_and_get (x_count => x_message_count
6530: ,p_encoded => fnd_api.g_false
6531: ,x_data => x_message_list);
6532: WHEN OTHERS THEN
6533: ROLLBACK TO SAVEPOINT convert_dtl_reservation;

Line 6544: := gme_common_pvt.g_max_errors

6540: /*************************************************************************/
6541: PROCEDURE insert_batchstep_resource (
6542: p_api_version IN NUMBER
6543: ,p_validation_level IN NUMBER
6544: := gme_common_pvt.g_max_errors
6545: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6546: ,p_commit IN VARCHAR2 := fnd_api.g_false
6547: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
6548: ,p_org_code IN VARCHAR2 := NULL

Line 6638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

6634: IF NOT fnd_api.compatible_api_call (2.0
6635: ,p_api_version
6636: ,'insert_batchstep_resource'
6637: ,g_pkg_name) THEN
6638: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6639: RAISE fnd_api.g_exc_error;
6640: END IF;
6641:
6642: /* Initialize message list and count if needed */

Line 6645: gme_common_pvt.g_error_count := 0;

6641:
6642: /* Initialize message list and count if needed */
6643: IF p_init_msg_list = fnd_api.g_true THEN
6644: fnd_msg_pub.initialize;
6645: gme_common_pvt.g_error_count := 0;
6646: END IF;
6647:
6648: /* Setup the common constants used across the apis */
6649: /* This will raise an error if both organization_id and org_code are null values */

Line 6657: gme_common_pvt.g_setup_done :=

6653: p_batchstep_resource_rec.organization_id ||
6654: ' org_code ' || p_org_code);
6655: END IF;
6656:
6657: gme_common_pvt.g_setup_done :=
6658: gme_common_pvt.setup
6659: (p_org_id => p_batchstep_resource_rec.organization_id
6660: ,p_org_code => p_org_code);
6661:

Line 6658: gme_common_pvt.setup

6654: ' org_code ' || p_org_code);
6655: END IF;
6656:
6657: gme_common_pvt.g_setup_done :=
6658: gme_common_pvt.setup
6659: (p_org_id => p_batchstep_resource_rec.organization_id
6660: ,p_org_code => p_org_code);
6661:
6662: IF NOT gme_common_pvt.g_setup_done THEN

Line 6662: IF NOT gme_common_pvt.g_setup_done THEN

6658: gme_common_pvt.setup
6659: (p_org_id => p_batchstep_resource_rec.organization_id
6660: ,p_org_code => p_org_code);
6661:
6662: IF NOT gme_common_pvt.g_setup_done THEN
6663: RAISE fnd_api.g_exc_error;
6664: END IF;
6665:
6666: gme_common_pvt.set_timestamp;

Line 6666: gme_common_pvt.set_timestamp;

6662: IF NOT gme_common_pvt.g_setup_done THEN
6663: RAISE fnd_api.g_exc_error;
6664: END IF;
6665:
6666: gme_common_pvt.set_timestamp;
6667: gme_common_pvt.g_check_primary_rsrc := 1;
6668: l_batchstep_resource_rec := p_batchstep_resource_rec;
6669: l_batchstep_resource_rec.organization_id :=
6670: gme_common_pvt.g_organization_id;

Line 6667: gme_common_pvt.g_check_primary_rsrc := 1;

6663: RAISE fnd_api.g_exc_error;
6664: END IF;
6665:
6666: gme_common_pvt.set_timestamp;
6667: gme_common_pvt.g_check_primary_rsrc := 1;
6668: l_batchstep_resource_rec := p_batchstep_resource_rec;
6669: l_batchstep_resource_rec.organization_id :=
6670: gme_common_pvt.g_organization_id;
6671:

Line 6670: gme_common_pvt.g_organization_id;

6666: gme_common_pvt.set_timestamp;
6667: gme_common_pvt.g_check_primary_rsrc := 1;
6668: l_batchstep_resource_rec := p_batchstep_resource_rec;
6669: l_batchstep_resource_rec.organization_id :=
6670: gme_common_pvt.g_organization_id;
6671:
6672: IF l_batchstep_resource_rec.resources IS NULL THEN
6673: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
6674: ,'FIELD_NAME'

Line 6673: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

6669: l_batchstep_resource_rec.organization_id :=
6670: gme_common_pvt.g_organization_id;
6671:
6672: IF l_batchstep_resource_rec.resources IS NULL THEN
6673: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
6674: ,'FIELD_NAME'
6675: ,'RESOURCES');
6676: RAISE fnd_api.g_exc_error;
6677: END IF;

Line 6699: gme_common_pvt.log_message

6695:
6696: IF cur_validate_activity%NOTFOUND THEN
6697: CLOSE cur_validate_activity;
6698:
6699: gme_common_pvt.log_message
6700: ('GME_ACTID_NOT_FOUND'
6701: ,'BATCHSTEP_ACT_ID'
6702: ,l_batchstep_resource_rec.batchstep_activity_id);
6703: RAISE fnd_api.g_exc_error;

Line 6725: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');

6721:
6722: IF cur_validate_batch_type%FOUND THEN
6723: CLOSE cur_validate_batch_type;
6724:
6725: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');
6726: RAISE fnd_api.g_exc_error;
6727: END IF;
6728:
6729: CLOSE cur_validate_batch_type;

Line 6742: (p_org_code => gme_common_pvt.g_organization_code

6738: || ' Invoke validate_param');
6739: END IF;
6740:
6741: gme_batchstep_rsrc_pvt.validate_param
6742: (p_org_code => gme_common_pvt.g_organization_code
6743: ,p_batch_no => p_batch_no
6744: ,p_batchstep_no => p_batchstep_no
6745: ,p_activity => p_activity
6746: ,p_resource => l_batchstep_resource_rec.resources

Line 6838: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

6834:
6835: IF cur_get_step_status%NOTFOUND THEN
6836: CLOSE cur_get_step_status;
6837:
6838: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
6839: ,'TABLE_NAME'
6840: ,'GME_BATCH_STEPS');
6841: RAISE fnd_api.g_exc_error;
6842: END IF;

Line 6860: gme_common_pvt.g_flex_validate_prof := 1;

6856: END IF;
6857:
6858: --FPBug#4395561 Start setting global flex validate variable
6859: IF p_validate_flexfields = FND_API.G_TRUE THEN
6860: gme_common_pvt.g_flex_validate_prof := 1;
6861: ELSE
6862: gme_common_pvt.g_flex_validate_prof := 0;
6863: END IF;
6864: --FPBug#4395561 End

Line 6862: gme_common_pvt.g_flex_validate_prof := 0;

6858: --FPBug#4395561 Start setting global flex validate variable
6859: IF p_validate_flexfields = FND_API.G_TRUE THEN
6860: gme_common_pvt.g_flex_validate_prof := 1;
6861: ELSE
6862: gme_common_pvt.g_flex_validate_prof := 0;
6863: END IF;
6864: --FPBug#4395561 End
6865:
6866: gme_batchstep_rsrc_pvt.validate_rsrc_param

Line 6885: gme_common_pvt.g_flex_validate_prof := 0;

6881: || l_return_status);
6882: END IF;
6883:
6884: --FPBug#4395561 resetting globla flex field variable
6885: gme_common_pvt.g_flex_validate_prof := 0;
6886:
6887: IF l_return_status <> fnd_api.g_ret_sts_success THEN
6888: RAISE fnd_api.g_exc_error;
6889: END IF;

Line 6963: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

6959: gme_debug.put_line ( ' Completed ' || g_pkg_name || '.' || l_api_name
6960: || ' at ' || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
6961: END IF;
6962:
6963: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
6964: gme_common_pvt.count_and_get(x_count => x_message_count
6965: ,p_encoded => fnd_api.g_false
6966: ,x_data => x_message_list);
6967: EXCEPTION

Line 6964: gme_common_pvt.count_and_get(x_count => x_message_count

6960: || ' at ' || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
6961: END IF;
6962:
6963: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
6964: gme_common_pvt.count_and_get(x_count => x_message_count
6965: ,p_encoded => fnd_api.g_false
6966: ,x_data => x_message_list);
6967: EXCEPTION
6968: WHEN insert_rsrc_failed THEN

Line 6970: gme_common_pvt.count_and_get(x_count => x_message_count

6966: ,x_data => x_message_list);
6967: EXCEPTION
6968: WHEN insert_rsrc_failed THEN
6969: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6970: gme_common_pvt.count_and_get(x_count => x_message_count
6971: ,p_encoded => fnd_api.g_false
6972: ,x_data => x_message_list);
6973: WHEN fnd_api.g_exc_error THEN
6974: x_return_status := fnd_api.g_ret_sts_error;

Line 6976: gme_common_pvt.count_and_get(x_count => x_message_count

6972: ,x_data => x_message_list);
6973: WHEN fnd_api.g_exc_error THEN
6974: x_return_status := fnd_api.g_ret_sts_error;
6975: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
6976: gme_common_pvt.count_and_get(x_count => x_message_count
6977: ,p_encoded => fnd_api.g_false
6978: ,x_data => x_message_list);
6979: WHEN OTHERS THEN
6980: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;

Line 6990: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors

6986:
6987: /*************************************************************************/
6988: PROCEDURE update_batchstep_resource (
6989: p_api_version IN NUMBER
6990: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
6991: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6992: ,p_commit IN VARCHAR2 := fnd_api.g_false
6993: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
6994: ,p_org_code IN VARCHAR2 := NULL

Line 7044: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

7040: IF NOT fnd_api.compatible_api_call (2.0
7041: ,p_api_version
7042: ,'update_batchstep_resource'
7043: ,g_pkg_name) THEN
7044: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7045: RAISE fnd_api.g_exc_error;
7046: END IF;
7047:
7048: gme_common_pvt.set_timestamp;

Line 7048: gme_common_pvt.set_timestamp;

7044: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7045: RAISE fnd_api.g_exc_error;
7046: END IF;
7047:
7048: gme_common_pvt.set_timestamp;
7049:
7050: /* Initialize message list and count if needed */
7051: IF p_init_msg_list = fnd_api.g_true THEN
7052: fnd_msg_pub.initialize;

Line 7053: gme_common_pvt.g_error_count := 0;

7049:
7050: /* Initialize message list and count if needed */
7051: IF p_init_msg_list = fnd_api.g_true THEN
7052: fnd_msg_pub.initialize;
7053: gme_common_pvt.g_error_count := 0;
7054: END IF;
7055:
7056: l_batchstep_resource_rec := p_batchstep_resource_rec;
7057: gme_common_pvt.g_check_primary_rsrc := 1;

Line 7057: gme_common_pvt.g_check_primary_rsrc := 1;

7053: gme_common_pvt.g_error_count := 0;
7054: END IF;
7055:
7056: l_batchstep_resource_rec := p_batchstep_resource_rec;
7057: gme_common_pvt.g_check_primary_rsrc := 1;
7058:
7059: /* Retrieve the row to be updated */
7060: IF g_debug <= gme_debug.g_log_statement THEN
7061: gme_debug.put_line ( g_pkg_name

Line 7067: IF NOT gme_common_pvt.get_batchstep_rsrc

7063: || l_api_name
7064: || 'Invoke get_batchstep_rsrc');
7065: END IF;
7066:
7067: IF NOT gme_common_pvt.get_batchstep_rsrc
7068: (p_batchstep_rsrc_rec => l_batchstep_resource_rec
7069: ,p_org_code => p_org_code
7070: ,p_batch_no => p_batch_no
7071: ,p_batchstep_no => p_batchstep_no

Line 7120: gme_common_pvt.g_setup_done :=

7116: || ' org_code '
7117: || p_org_code);
7118: END IF;
7119:
7120: gme_common_pvt.g_setup_done :=
7121: gme_common_pvt.setup
7122: (p_org_id => l_batchstep_resource_rec.organization_id
7123: ,p_org_code => p_org_code);
7124:

Line 7121: gme_common_pvt.setup

7117: || p_org_code);
7118: END IF;
7119:
7120: gme_common_pvt.g_setup_done :=
7121: gme_common_pvt.setup
7122: (p_org_id => l_batchstep_resource_rec.organization_id
7123: ,p_org_code => p_org_code);
7124:
7125: IF NOT gme_common_pvt.g_setup_done THEN

Line 7125: IF NOT gme_common_pvt.g_setup_done THEN

7121: gme_common_pvt.setup
7122: (p_org_id => l_batchstep_resource_rec.organization_id
7123: ,p_org_code => p_org_code);
7124:
7125: IF NOT gme_common_pvt.g_setup_done THEN
7126: IF g_debug <= gme_debug.g_log_statement THEN
7127: gme_debug.put_line ( g_pkg_name
7128: || '.'
7129: || l_api_name

Line 7154: gme_common_pvt.log_message ('GME_BATCH_STEP_NOT_FOUND'

7150:
7151: IF cur_get_batchstep_status%NOTFOUND THEN
7152: CLOSE cur_get_batchstep_status;
7153:
7154: gme_common_pvt.log_message ('GME_BATCH_STEP_NOT_FOUND'
7155: ,'STEP_ID'
7156: ,l_batchstep_resource_rec.batchstep_id);
7157: RAISE fnd_api.g_exc_error;
7158: END IF;

Line 7172: gme_common_pvt.g_flex_validate_prof := 1;

7168: CLOSE cur_get_batchstep_status;
7169:
7170: --FPBug#4395561 Start setting global flex validate variable
7171: IF p_validate_flexfields = FND_API.G_TRUE THEN
7172: gme_common_pvt.g_flex_validate_prof := 1;
7173: ELSE
7174: gme_common_pvt.g_flex_validate_prof := 0;
7175: END IF;
7176: --FPBug#4395561 End

Line 7174: gme_common_pvt.g_flex_validate_prof := 0;

7170: --FPBug#4395561 Start setting global flex validate variable
7171: IF p_validate_flexfields = FND_API.G_TRUE THEN
7172: gme_common_pvt.g_flex_validate_prof := 1;
7173: ELSE
7174: gme_common_pvt.g_flex_validate_prof := 0;
7175: END IF;
7176: --FPBug#4395561 End
7177:
7178: gme_batchstep_rsrc_pvt.validate_rsrc_param

Line 7193: gme_common_pvt.g_flex_validate_prof := 0;

7189: gme_debug.put_line ('val rsrc param returns ' || l_return_status);
7190: END IF;
7191:
7192: --FPBug#4395561 resetting global flex field validate
7193: gme_common_pvt.g_flex_validate_prof := 0;
7194:
7195: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7196: RAISE fnd_api.g_exc_error;
7197: END IF;

Line 7232: (p_header_id => gme_common_pvt.g_transaction_header_id

7228: || p_commit);
7229: END IF;
7230:
7231: gme_api_pub.save_batch
7232: (p_header_id => gme_common_pvt.g_transaction_header_id
7233: ,p_table => null
7234: ,p_commit => p_commit
7235: ,x_return_status => x_return_status);
7236:

Line 7252: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

7248: ELSE
7249: RAISE update_rsrc_failed;
7250: END IF;
7251:
7252: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7253: gme_common_pvt.count_and_get(x_count => x_message_count
7254: ,p_encoded => fnd_api.g_false
7255: ,x_data => x_message_list);
7256:

Line 7253: gme_common_pvt.count_and_get(x_count => x_message_count

7249: RAISE update_rsrc_failed;
7250: END IF;
7251:
7252: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7253: gme_common_pvt.count_and_get(x_count => x_message_count
7254: ,p_encoded => fnd_api.g_false
7255: ,x_data => x_message_list);
7256:
7257: IF g_debug <= gme_debug.g_log_procedure THEN

Line 7264: gme_common_pvt.count_and_get(x_count => x_message_count

7260: END IF;
7261: EXCEPTION
7262: WHEN update_rsrc_failed THEN
7263: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7264: gme_common_pvt.count_and_get(x_count => x_message_count
7265: ,p_encoded => fnd_api.g_false
7266: ,x_data => x_message_list);
7267: WHEN fnd_api.g_exc_error THEN
7268: x_return_status := fnd_api.g_ret_sts_error;

Line 7270: gme_common_pvt.count_and_get(x_count => x_message_count

7266: ,x_data => x_message_list);
7267: WHEN fnd_api.g_exc_error THEN
7268: x_return_status := fnd_api.g_ret_sts_error;
7269: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7270: gme_common_pvt.count_and_get(x_count => x_message_count
7271: ,p_encoded => fnd_api.g_false
7272: ,x_data => x_message_list);
7273: WHEN OTHERS THEN
7274: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;

Line 7285: := gme_common_pvt.g_max_errors

7281: /*************************************************************************/
7282: PROCEDURE delete_batchstep_resource (
7283: p_api_version IN NUMBER := 2.0
7284: ,p_validation_level IN NUMBER
7285: := gme_common_pvt.g_max_errors
7286: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7287: ,p_commit IN VARCHAR2 := fnd_api.g_false
7288: ,p_batchstep_resource_id IN NUMBER := NULL
7289: ,p_org_code IN VARCHAR2 := NULL

Line 7352: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

7348: IF NOT fnd_api.compatible_api_call (2.0
7349: ,p_api_version
7350: ,'delete_batchstep_resource'
7351: ,g_pkg_name) THEN
7352: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7353: RAISE fnd_api.g_exc_error;
7354: END IF;
7355:
7356: gme_common_pvt.set_timestamp;

Line 7356: gme_common_pvt.set_timestamp;

7352: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7353: RAISE fnd_api.g_exc_error;
7354: END IF;
7355:
7356: gme_common_pvt.set_timestamp;
7357:
7358: /* Initialize message list and count if needed */
7359: IF p_init_msg_list = fnd_api.g_true THEN
7360: fnd_msg_pub.initialize;

Line 7361: gme_common_pvt.g_error_count := 0;

7357:
7358: /* Initialize message list and count if needed */
7359: IF p_init_msg_list = fnd_api.g_true THEN
7360: fnd_msg_pub.initialize;
7361: gme_common_pvt.g_error_count := 0;
7362: END IF;
7363:
7364: gme_common_pvt.g_check_primary_rsrc := 1;
7365:

Line 7364: gme_common_pvt.g_check_primary_rsrc := 1;

7360: fnd_msg_pub.initialize;
7361: gme_common_pvt.g_error_count := 0;
7362: END IF;
7363:
7364: gme_common_pvt.g_check_primary_rsrc := 1;
7365:
7366: IF (g_debug <= gme_debug.g_log_statement) THEN
7367: gme_debug.put_line ( g_pkg_name
7368: || '.'

Line 7379: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

7375: END IF;
7376:
7377: /* Report error if insufficient data to pinpoint batchstep resource */
7378: IF (p_batchstep_resource_id IS NULL AND p_resource IS NULL) THEN
7379: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
7380: ,'FIELD_NAME'
7381: ,'RESOURCES');
7382: RAISE fnd_api.g_exc_error;
7383: END IF;

Line 7451: gme_common_pvt.log_message ('GME_INVALID_RSRC_ID');

7447:
7448: IF cur_get_step_dtl%NOTFOUND THEN
7449: CLOSE cur_get_step_dtl;
7450:
7451: gme_common_pvt.log_message ('GME_INVALID_RSRC_ID');
7452: RAISE fnd_api.g_exc_error;
7453: END IF;
7454:
7455: CLOSE cur_get_step_dtl;

Line 7469: gme_common_pvt.g_setup_done :=

7465: || ' and org_code => '
7466: || p_org_code);
7467: END IF;
7468:
7469: gme_common_pvt.g_setup_done :=
7470: gme_common_pvt.setup (p_org_id => l_organization_id
7471: ,p_org_code => p_org_code);
7472:
7473: IF NOT gme_common_pvt.g_setup_done THEN

Line 7470: gme_common_pvt.setup (p_org_id => l_organization_id

7466: || p_org_code);
7467: END IF;
7468:
7469: gme_common_pvt.g_setup_done :=
7470: gme_common_pvt.setup (p_org_id => l_organization_id
7471: ,p_org_code => p_org_code);
7472:
7473: IF NOT gme_common_pvt.g_setup_done THEN
7474: RAISE fnd_api.g_exc_error;

Line 7473: IF NOT gme_common_pvt.g_setup_done THEN

7469: gme_common_pvt.g_setup_done :=
7470: gme_common_pvt.setup (p_org_id => l_organization_id
7471: ,p_org_code => p_org_code);
7472:
7473: IF NOT gme_common_pvt.g_setup_done THEN
7474: RAISE fnd_api.g_exc_error;
7475: END IF;
7476:
7477: /* Validations prior to deletion */

Line 7493: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');

7489: INTO l_dummy;
7490:
7491: IF cur_validate_batch_type%FOUND THEN
7492: CLOSE cur_validate_batch_type;
7493: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');
7494: RAISE fnd_api.g_exc_error;
7495: END IF;
7496:
7497: CLOSE cur_validate_batch_type;

Line 7512: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN

7508: || ' validate step_status of '
7509: || l_step_status);
7510: END IF;
7511:
7512: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7513: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7514: RAISE fnd_api.g_exc_error;
7515: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7516: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');

Line 7513: gme_common_pvt.log_message ('PM_WRONG_STATUS');

7509: || l_step_status);
7510: END IF;
7511:
7512: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7513: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7514: RAISE fnd_api.g_exc_error;
7515: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7516: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7517: RAISE fnd_api.g_exc_error;

Line 7515: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN

7511:
7512: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7513: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7514: RAISE fnd_api.g_exc_error;
7515: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7516: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7517: RAISE fnd_api.g_exc_error;
7518: END IF;
7519:

Line 7516: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');

7512: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7513: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7514: RAISE fnd_api.g_exc_error;
7515: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7516: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7517: RAISE fnd_api.g_exc_error;
7518: END IF;
7519:
7520: /* Ensure that the batchstep_resource_rec is sufficiently populated for deletion to proceed */

Line 7558: (p_header_id => gme_common_pvt.g_transaction_header_id

7554: save_batch tith commit set ' || p_commit);
7555: END IF;
7556:
7557: gme_api_pub.save_batch
7558: (p_header_id => gme_common_pvt.g_transaction_header_id
7559: ,p_table => null
7560: ,p_commit => p_commit
7561: ,x_return_status => x_return_status);
7562:

Line 7580: gme_common_pvt.log_message ('PM_SAVED_CHANGES');

7576: IF g_debug <= gme_debug.g_log_procedure THEN
7577: gme_debug.put_line ( ' Completed ' || l_api_name || ' at '
7578: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
7579: END IF;
7580: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7581: gme_common_pvt.count_and_get(x_count => x_message_count
7582: ,p_encoded => fnd_api.g_false
7583: ,x_data => x_message_list);
7584: EXCEPTION

Line 7581: gme_common_pvt.count_and_get(x_count => x_message_count

7577: gme_debug.put_line ( ' Completed ' || l_api_name || ' at '
7578: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
7579: END IF;
7580: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7581: gme_common_pvt.count_and_get(x_count => x_message_count
7582: ,p_encoded => fnd_api.g_false
7583: ,x_data => x_message_list);
7584: EXCEPTION
7585: WHEN delete_rsrc_failed THEN

Line 7587: gme_common_pvt.count_and_get(x_count => x_message_count

7583: ,x_data => x_message_list);
7584: EXCEPTION
7585: WHEN delete_rsrc_failed THEN
7586: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7587: gme_common_pvt.count_and_get(x_count => x_message_count
7588: ,p_encoded => fnd_api.g_false
7589: ,x_data => x_message_list);
7590: WHEN fnd_api.g_exc_error THEN
7591: x_return_status := fnd_api.g_ret_sts_error;

Line 7593: gme_common_pvt.count_and_get(x_count => x_message_count

7589: ,x_data => x_message_list);
7590: WHEN fnd_api.g_exc_error THEN
7591: x_return_status := fnd_api.g_ret_sts_error;
7592: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
7593: gme_common_pvt.count_and_get(x_count => x_message_count
7594: ,p_encoded => fnd_api.g_false
7595: ,x_data => x_message_list);
7596: WHEN OTHERS THEN
7597: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;

Line 7608: := gme_common_pvt.g_max_errors

7604: /*************************************************************************/
7605: PROCEDURE auto_detail_line (
7606: p_api_version IN NUMBER := 2.0
7607: ,p_validation_level IN NUMBER
7608: := gme_common_pvt.g_max_errors
7609: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7610: ,p_commit IN VARCHAR2 := fnd_api.g_false
7611: ,x_message_count OUT NOCOPY NUMBER
7612: ,x_message_list OUT NOCOPY VARCHAR2

Line 7656: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

7652: IF NOT fnd_api.compatible_api_call (2.0
7653: ,p_api_version
7654: ,'auto_detail_line'
7655: ,g_pkg_name) THEN
7656: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7657: RAISE fnd_api.g_exc_error;
7658: END IF;
7659:
7660: IF g_debug <= gme_debug.g_log_statement THEN

Line 7673: gme_common_pvt.Validate_material_detail

7669: l_material_details_rec.material_detail_id := p_material_detail_id;
7670: l_material_details_rec.line_no := p_line_no;
7671: /* Ensure line_type is populated. Reservations only permitted for ingredient lines. */
7672: l_material_details_rec.line_type := -1;
7673: gme_common_pvt.Validate_material_detail
7674: (p_material_detail_rec => l_material_details_rec
7675: ,p_org_code => p_org_code
7676: ,p_batch_no => p_batch_no
7677: ,p_batch_type => 0

Line 7692: gme_common_pvt.set_timestamp;

7688: RAISE fnd_api.g_exc_error;
7689: ELSE
7690: l_material_details_rec := l_material_details_rec_out;
7691: END IF;
7692: gme_common_pvt.set_timestamp;
7693:
7694: /* Validate the demand source - it must be a valid ingredient line */
7695: IF g_debug <= gme_debug.g_log_statement THEN
7696: gme_debug.put_line

Line 7774: gme_common_pvt.count_and_get (x_count => x_message_count

7770: END IF;
7771: EXCEPTION
7772: WHEN auto_detail_error THEN
7773: ROLLBACK TO SAVEPOINT auto_detail_line;
7774: gme_common_pvt.count_and_get (x_count => x_message_count
7775: ,p_encoded => fnd_api.g_false
7776: ,x_data => x_message_list);
7777: WHEN fnd_api.g_exc_error THEN
7778: x_return_status := fnd_api.g_ret_sts_error;

Line 7780: gme_common_pvt.count_and_get (x_count => x_message_count

7776: ,x_data => x_message_list);
7777: WHEN fnd_api.g_exc_error THEN
7778: x_return_status := fnd_api.g_ret_sts_error;
7779: ROLLBACK TO SAVEPOINT auto_detail_line;
7780: gme_common_pvt.count_and_get (x_count => x_message_count
7781: ,p_encoded => fnd_api.g_false
7782: ,x_data => x_message_list);
7783: WHEN OTHERS THEN
7784: ROLLBACK TO SAVEPOINT auto_detail_line;

Line 7829: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

7825: IF NOT FND_API.compatible_api_call(2.0
7826: ,p_api_version
7827: ,'auto_detail_batch'
7828: ,g_pkg_name ) THEN
7829: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7830: RAISE fnd_api.g_exc_error;
7831: END IF;
7832:
7833: IF g_debug <= gme_debug.g_log_statement THEN

Line 7851: gme_common_pvt.g_setup_done :=

7847:
7848: l_batch_rec := p_batch_rec;
7849: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
7850: IF p_org_code is NOT NULL and p_batch_rec.organization_id is NULL THEN
7851: gme_common_pvt.g_setup_done :=
7852: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7853: p_org_code => p_org_code);
7854:
7855: IF NOT gme_common_pvt.g_setup_done THEN

Line 7852: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,

7848: l_batch_rec := p_batch_rec;
7849: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
7850: IF p_org_code is NOT NULL and p_batch_rec.organization_id is NULL THEN
7851: gme_common_pvt.g_setup_done :=
7852: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7853: p_org_code => p_org_code);
7854:
7855: IF NOT gme_common_pvt.g_setup_done THEN
7856: RAISE fnd_api.g_exc_error;

Line 7855: IF NOT gme_common_pvt.g_setup_done THEN

7851: gme_common_pvt.g_setup_done :=
7852: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7853: p_org_code => p_org_code);
7854:
7855: IF NOT gme_common_pvt.g_setup_done THEN
7856: RAISE fnd_api.g_exc_error;
7857: ELSE
7858: l_batch_rec.organization_id := gme_common_pvt.g_organization_id;
7859: IF g_debug <= gme_debug.g_log_statement THEN

Line 7858: l_batch_rec.organization_id := gme_common_pvt.g_organization_id;

7854:
7855: IF NOT gme_common_pvt.g_setup_done THEN
7856: RAISE fnd_api.g_exc_error;
7857: ELSE
7858: l_batch_rec.organization_id := gme_common_pvt.g_organization_id;
7859: IF g_debug <= gme_debug.g_log_statement THEN
7860: gme_debug.put_line( g_pkg_name
7861: ||'.'
7862: ||l_api_name

Line 7864: ||gme_common_pvt.g_organization_id);

7860: gme_debug.put_line( g_pkg_name
7861: ||'.'
7862: ||l_api_name
7863: || ' Organization_id set to '
7864: ||gme_common_pvt.g_organization_id);
7865: END IF;
7866: END IF;
7867: END IF;
7868:

Line 7870: l_batch_rec.batch_type := gme_common_pvt.g_doc_type_batch;

7866: END IF;
7867: END IF;
7868:
7869: IF l_batch_rec.batch_type is NULL THEN
7870: l_batch_rec.batch_type := gme_common_pvt.g_doc_type_batch;
7871: END IF;
7872:
7873: IF (NOT gme_batch_header_dbl.fetch_row (l_batch_rec,
7874: l_batch_header_rec) ) THEN

Line 7886: gme_common_pvt.g_setup_done :=

7882: RAISE fnd_api.g_exc_error;
7883: END IF;
7884:
7885: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
7886: gme_common_pvt.g_setup_done :=
7887: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7888: p_org_code => p_org_code);
7889:
7890: IF NOT gme_common_pvt.g_setup_done THEN

Line 7887: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,

7883: END IF;
7884:
7885: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
7886: gme_common_pvt.g_setup_done :=
7887: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7888: p_org_code => p_org_code);
7889:
7890: IF NOT gme_common_pvt.g_setup_done THEN
7891: RAISE fnd_api.g_exc_error;

Line 7890: IF NOT gme_common_pvt.g_setup_done THEN

7886: gme_common_pvt.g_setup_done :=
7887: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
7888: p_org_code => p_org_code);
7889:
7890: IF NOT gme_common_pvt.g_setup_done THEN
7891: RAISE fnd_api.g_exc_error;
7892: END IF;
7893:
7894: /* Verify that update_inventory is permitted for this batch */

Line 7896: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');

7892: END IF;
7893:
7894: /* Verify that update_inventory is permitted for this batch */
7895: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN
7896: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');
7897: RAISE fnd_api.g_exc_error;
7898: END IF;
7899:
7900: /* Verify Batch to be in pending or WIP status */

Line 7902: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

7898: END IF;
7899:
7900: /* Verify Batch to be in pending or WIP status */
7901: IF l_batch_header_rec.batch_status NOT IN
7902: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
7903: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS','PROCESS','AUTO_DETAIL_BATCH');
7904: RAISE fnd_api.g_exc_error;
7905: END IF;
7906:

Line 7903: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS','PROCESS','AUTO_DETAIL_BATCH');

7899:
7900: /* Verify Batch to be in pending or WIP status */
7901: IF l_batch_header_rec.batch_status NOT IN
7902: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
7903: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS','PROCESS','AUTO_DETAIL_BATCH');
7904: RAISE fnd_api.g_exc_error;
7905: END IF;
7906:
7907: /* Reservations not permitted for FPOs */

Line 7908: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

7904: RAISE fnd_api.g_exc_error;
7905: END IF;
7906:
7907: /* Reservations not permitted for FPOs */
7908: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
7909: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
7910: RAISE fnd_api.g_exc_error;
7911: END IF;
7912:

Line 7909: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');

7905: END IF;
7906:
7907: /* Reservations not permitted for FPOs */
7908: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
7909: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
7910: RAISE fnd_api.g_exc_error;
7911: END IF;
7912:
7913: gme_common_pvt.set_timestamp;

Line 7913: gme_common_pvt.set_timestamp;

7909: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
7910: RAISE fnd_api.g_exc_error;
7911: END IF;
7912:
7913: gme_common_pvt.set_timestamp;
7914:
7915: /* Invoke auto_detail_batch to create detailed level reservations */
7916: GME_API_MAIN.Auto_Detail_Batch(p_init_msg_list => FND_API.G_FALSE
7917: ,x_message_count => x_message_count

Line 7951: gme_common_pvt.count_and_get(x_count => x_message_count,

7947:
7948: EXCEPTION
7949: WHEN auto_detail_error THEN
7950: ROLLBACK TO SAVEPOINT auto_detail_batch;
7951: gme_common_pvt.count_and_get(x_count => x_message_count,
7952: p_encoded => FND_API.g_false,
7953: x_data => x_message_list);
7954: WHEN fnd_api.g_exc_error THEN
7955: x_return_status := FND_API.g_ret_sts_error;

Line 7957: gme_common_pvt.count_and_get(x_count => x_message_count,

7953: x_data => x_message_list);
7954: WHEN fnd_api.g_exc_error THEN
7955: x_return_status := FND_API.g_ret_sts_error;
7956: ROLLBACK TO SAVEPOINT auto_detail_batch;
7957: gme_common_pvt.count_and_get(x_count => x_message_count,
7958: p_encoded => FND_API.g_false,
7959: x_data => x_message_list);
7960: WHEN OTHERS THEN
7961: ROLLBACK TO SAVEPOINT auto_detail_batch;

Line 7994: := gme_common_pvt.g_max_errors,

7990: ================================================================================*/
7991: PROCEDURE insert_batchstep_activity (
7992: p_api_version IN NUMBER ,
7993: p_validation_level IN NUMBER
7994: := gme_common_pvt.g_max_errors,
7995: p_init_msg_list IN VARCHAR2
7996: DEFAULT fnd_api.g_false,
7997: p_commit IN VARCHAR2
7998: DEFAULT fnd_api.g_false,

Line 8034: gme_common_pvt.g_error_count := 0;

8030:
8031: IF (fnd_api.to_boolean (p_init_msg_list))
8032: THEN
8033: fnd_msg_pub.initialize;
8034: gme_common_pvt.g_error_count := 0;
8035: END IF;
8036:
8037: -- Standard call to check for call compatibility.
8038: IF NOT fnd_api.compatible_api_call (2.0,

Line 8043: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

8039: p_api_version,
8040: l_api_name,
8041: g_pkg_name
8042: ) THEN
8043: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8044: RAISE fnd_api.g_exc_error;
8045: END IF;
8046:
8047: /* Set the return status to success initially */

Line 8051: IF (NOT gme_common_pvt.setup (p_org_id => NULL,

8047: /* Set the return status to success initially */
8048: x_return_status := fnd_api.g_ret_sts_success;
8049:
8050: /* Setup the common constants used accross the apis */
8051: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8052: p_org_code => p_org_code)
8053: )THEN
8054: RAISE fnd_api.g_exc_error;
8055: END IF;

Line 8059: gme_common_pvt.g_flex_validate_prof := 1;

8055: END IF;
8056:
8057: --FPBug#4395561 Start setting global flex validate variable
8058: IF p_validate_flexfield = FND_API.G_TRUE THEN
8059: gme_common_pvt.g_flex_validate_prof := 1;
8060: ELSE
8061: gme_common_pvt.g_flex_validate_prof := 0;
8062: END IF;
8063: --FPBug#4395561 End

Line 8061: gme_common_pvt.g_flex_validate_prof := 0;

8057: --FPBug#4395561 Start setting global flex validate variable
8058: IF p_validate_flexfield = FND_API.G_TRUE THEN
8059: gme_common_pvt.g_flex_validate_prof := 1;
8060: ELSE
8061: gme_common_pvt.g_flex_validate_prof := 0;
8062: END IF;
8063: --FPBug#4395561 End
8064:
8065: gme_common_pvt.set_timestamp;

Line 8065: gme_common_pvt.set_timestamp;

8061: gme_common_pvt.g_flex_validate_prof := 0;
8062: END IF;
8063: --FPBug#4395561 End
8064:
8065: gme_common_pvt.set_timestamp;
8066: gme_batchstep_act_pvt.insert_batchstep_activity (p_batchstep_activity_rec => p_batchstep_activity_rec,
8067: p_batchstep_resource_tbl => p_batchstep_resource_tbl,
8068: p_org_code => p_org_code,
8069: p_batch_no => p_batch_no,

Line 8077: gme_common_pvt.g_flex_validate_prof := 0;

8073: x_batchstep_activity_rec => x_batchstep_activity_rec,
8074: x_return_status => x_return_status
8075: );
8076: --FPBug#4395561 resetting global flex field validate
8077: gme_common_pvt.g_flex_validate_prof := 0;
8078:
8079: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
8080: RAISE insert_activity_failed;
8081: END IF;

Line 8091: gme_common_pvt.count_and_get (x_count => x_message_count,

8087: ELSE
8088: RAISE fnd_api.g_exc_error;
8089: END IF;
8090:
8091: gme_common_pvt.count_and_get (x_count => x_message_count,
8092: p_encoded => fnd_api.g_false,
8093: x_data => x_message_list
8094: );
8095:

Line 8103: gme_common_pvt.count_and_get (x_count => x_message_count,

8099: END IF;
8100: EXCEPTION
8101: WHEN insert_activity_failed THEN
8102: ROLLBACK TO SAVEPOINT insert_activity_pub;
8103: gme_common_pvt.count_and_get (x_count => x_message_count,
8104: p_encoded => fnd_api.g_false,
8105: x_data => x_message_list
8106: );
8107: WHEN fnd_api.g_exc_error THEN

Line 8110: gme_common_pvt.count_and_get (x_count => x_message_count,

8106: );
8107: WHEN fnd_api.g_exc_error THEN
8108: ROLLBACK TO SAVEPOINT insert_activity_pub;
8109: x_return_status := fnd_api.g_ret_sts_error;
8110: gme_common_pvt.count_and_get (x_count => x_message_count,
8111: p_encoded => fnd_api.g_false,
8112: x_data => x_message_list
8113: );
8114: WHEN OTHERS THEN

Line 8146: := gme_common_pvt.g_max_errors,

8142: ================================================================================*/
8143: PROCEDURE update_batchstep_activity (
8144: p_api_version IN NUMBER ,
8145: p_validation_level IN NUMBER
8146: := gme_common_pvt.g_max_errors,
8147: p_init_msg_list IN VARCHAR2
8148: DEFAULT fnd_api.g_false,
8149: p_commit IN VARCHAR2
8150: DEFAULT fnd_api.g_false,

Line 8179: gme_common_pvt.g_error_count := 0;

8175: END IF;
8176:
8177: IF (fnd_api.to_boolean (p_init_msg_list)) THEN
8178: fnd_msg_pub.initialize;
8179: gme_common_pvt.g_error_count := 0;
8180: END IF;
8181:
8182: -- Standard call to check for call compatibility.
8183: IF NOT fnd_api.compatible_api_call (2.0,

Line 8188: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

8184: p_api_version,
8185: l_api_name,
8186: g_pkg_name
8187: ) THEN
8188: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8189: RAISE fnd_api.g_exc_error;
8190: END IF;
8191:
8192: /* Set the return status to success initially */

Line 8196: IF (NOT gme_common_pvt.setup (p_org_id => NULL,

8192: /* Set the return status to success initially */
8193: x_return_status := fnd_api.g_ret_sts_success;
8194:
8195: /* Setup the common constants used accross the apis */
8196: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8197: p_org_code => p_org_code)) THEN
8198: RAISE fnd_api.g_exc_error;
8199: END IF;
8200:

Line 8203: gme_common_pvt.g_flex_validate_prof := 1;

8199: END IF;
8200:
8201: --FPBug#4395561 Start setting global flex validate variable
8202: IF p_validate_flexfield = FND_API.G_TRUE THEN
8203: gme_common_pvt.g_flex_validate_prof := 1;
8204: ELSE
8205: gme_common_pvt.g_flex_validate_prof := 0;
8206: END IF;
8207: --FPBug#4395561 End

Line 8205: gme_common_pvt.g_flex_validate_prof := 0;

8201: --FPBug#4395561 Start setting global flex validate variable
8202: IF p_validate_flexfield = FND_API.G_TRUE THEN
8203: gme_common_pvt.g_flex_validate_prof := 1;
8204: ELSE
8205: gme_common_pvt.g_flex_validate_prof := 0;
8206: END IF;
8207: --FPBug#4395561 End
8208:
8209: gme_common_pvt.set_timestamp;

Line 8209: gme_common_pvt.set_timestamp;

8205: gme_common_pvt.g_flex_validate_prof := 0;
8206: END IF;
8207: --FPBug#4395561 End
8208:
8209: gme_common_pvt.set_timestamp;
8210: gme_batchstep_act_pvt.update_batchstep_activity (p_batchstep_activity_rec => p_batchstep_activity_rec,
8211: p_org_code => p_org_code,
8212: p_batch_no => p_batch_no,
8213: p_batchstep_no => p_batchstep_no,

Line 8219: gme_common_pvt.g_flex_validate_prof := 0;

8215: x_batchstep_activity_rec => x_batchstep_activity_rec,
8216: x_return_status => x_return_status
8217: );
8218: --FPBug#4395561 resetting global flex-field validate variable
8219: gme_common_pvt.g_flex_validate_prof := 0;
8220:
8221: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
8222: RAISE update_activity_failed;
8223: END IF;

Line 8233: gme_common_pvt.count_and_get (x_count => x_message_count,

8229: ELSE
8230: RAISE fnd_api.g_exc_error;
8231: END IF;
8232:
8233: gme_common_pvt.count_and_get (x_count => x_message_count,
8234: p_encoded => fnd_api.g_false,
8235: x_data => x_message_list
8236: );
8237: IF g_debug <= gme_debug.g_log_procedure THEN

Line 8244: gme_common_pvt.count_and_get (x_count => x_message_count,

8240: END IF;
8241: EXCEPTION
8242: WHEN update_activity_failed THEN
8243: ROLLBACK TO SAVEPOINT update_activity_pub;
8244: gme_common_pvt.count_and_get (x_count => x_message_count,
8245: p_encoded => fnd_api.g_false,
8246: x_data => x_message_list
8247: );
8248: WHEN fnd_api.g_exc_error THEN

Line 8251: gme_common_pvt.count_and_get (x_count => x_message_count,

8247: );
8248: WHEN fnd_api.g_exc_error THEN
8249: ROLLBACK TO SAVEPOINT update_activity_pub;
8250: x_return_status := fnd_api.g_ret_sts_error;
8251: gme_common_pvt.count_and_get (x_count => x_message_count,
8252: p_encoded => fnd_api.g_false,
8253: x_data => x_message_list
8254: );
8255: WHEN OTHERS THEN

Line 8285: := gme_common_pvt.g_max_errors,

8281: ================================================================================*/
8282: PROCEDURE delete_batchstep_activity (
8283: p_api_version IN NUMBER := 2.0,
8284: p_validation_level IN NUMBER
8285: := gme_common_pvt.g_max_errors,
8286: p_init_msg_list IN VARCHAR2
8287: DEFAULT fnd_api.g_false,
8288: p_commit IN VARCHAR2
8289: DEFAULT fnd_api.g_false,

Line 8319: gme_common_pvt.g_error_count := 0;

8315:
8316: IF (fnd_api.to_boolean (p_init_msg_list))
8317: THEN
8318: fnd_msg_pub.initialize;
8319: gme_common_pvt.g_error_count := 0;
8320: END IF;
8321:
8322: -- Standard call to check for call compatibility.
8323: IF NOT fnd_api.compatible_api_call (2.0,

Line 8327: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

8323: IF NOT fnd_api.compatible_api_call (2.0,
8324: p_api_version,
8325: l_api_name,
8326: g_pkg_name) THEN
8327: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8328: RAISE fnd_api.g_exc_error;
8329: END IF;
8330:
8331: /* Set the return status to success initially */

Line 8335: IF (NOT gme_common_pvt.setup (p_org_id => NULL,

8331: /* Set the return status to success initially */
8332: x_return_status := fnd_api.g_ret_sts_success;
8333:
8334: /* Setup the common constants used accross the apis */
8335: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8336: p_org_code => p_org_code)) THEN
8337: RAISE fnd_api.g_exc_error;
8338: END IF;
8339:

Line 8340: gme_common_pvt.set_timestamp;

8336: p_org_code => p_org_code)) THEN
8337: RAISE fnd_api.g_exc_error;
8338: END IF;
8339:
8340: gme_common_pvt.set_timestamp;
8341: gme_batchstep_act_pvt.delete_batchstep_activity (p_batchstep_activity_id => p_batchstep_activity_id,
8342: p_org_code => p_org_code,
8343: p_batch_no => p_batch_no,
8344: p_batchstep_no => p_batchstep_no,

Line 8360: gme_common_pvt.count_and_get (x_count => x_message_count,

8356: ELSE
8357: RAISE fnd_api.g_exc_error;
8358: END IF;
8359:
8360: gme_common_pvt.count_and_get (x_count => x_message_count,
8361: p_encoded => fnd_api.g_false,
8362: x_data => x_message_list
8363: );
8364:

Line 8372: gme_common_pvt.count_and_get (x_count => x_message_count,

8368: END IF;
8369: EXCEPTION
8370: WHEN delete_activity_failed THEN
8371: ROLLBACK TO SAVEPOINT delete_activity_pub;
8372: gme_common_pvt.count_and_get (x_count => x_message_count,
8373: p_encoded => fnd_api.g_false,
8374: x_data => x_message_list
8375: );
8376: WHEN fnd_api.g_exc_error THEN

Line 8379: gme_common_pvt.count_and_get (x_count => x_message_count,

8375: );
8376: WHEN fnd_api.g_exc_error THEN
8377: ROLLBACK TO SAVEPOINT delete_activity_pub;
8378: x_return_status := fnd_api.g_ret_sts_error;
8379: gme_common_pvt.count_and_get (x_count => x_message_count,
8380: p_encoded => fnd_api.g_false,
8381: x_data => x_message_list
8382: );
8383: WHEN OTHERS THEN

Line 8394: p_validation_level IN NUMBER := gme_common_pvt.g_max_errors,

8390:
8391: /*************************************************************************/
8392: PROCEDURE convert_fpo (
8393: p_api_version IN NUMBER := 2.0,
8394: p_validation_level IN NUMBER := gme_common_pvt.g_max_errors,
8395: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
8396: p_commit IN VARCHAR2 := fnd_api.g_false,
8397: x_message_count OUT NOCOPY NUMBER,
8398: x_message_list OUT NOCOPY VARCHAR2,

Line 8407: p_validity_rule_tab IN gme_common_pvt.recipe_validity_rule_tab,

8403: x_batch_header OUT NOCOPY gme_batch_header%ROWTYPE,
8404: p_batch_size IN NUMBER,
8405: p_num_batches IN NUMBER,
8406: p_validity_rule_id IN NUMBER,
8407: p_validity_rule_tab IN gme_common_pvt.recipe_validity_rule_tab,
8408: p_leadtime IN NUMBER DEFAULT 0,
8409: p_batch_offset IN NUMBER DEFAULT 0,
8410: p_offset_type IN NUMBER DEFAULT 0,
8411: p_plan_start_date IN gme_batch_header.plan_start_date%TYPE,

Line 8445: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

8441: IF NOT fnd_api.compatible_api_call (2.0
8442: ,p_api_version
8443: ,'convertFPO'
8444: ,g_pkg_name) THEN
8445: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8446: RAISE fnd_api.g_exc_error;
8447: END IF;
8448:
8449:

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

8461: IF gme_phantom_pvt.is_phantom (
8462: p_batch_header => l_batch_header,
8463: x_return_status => x_return_status
8464: ) THEN
8465: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
8466: RAISE fnd_api.g_exc_error;
8467: ELSIF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8468: RAISE fnd_api.g_exc_error;
8469: END IF;

Line 8482: gme_common_pvt.g_setup_done :=

8478: l_batch_header.organization_id);
8479: END IF;
8480:
8481: /* Setup the common constants used accross the apis */
8482: gme_common_pvt.g_setup_done :=
8483: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
8484: ,p_org_code => p_org_code);
8485:
8486: IF NOT gme_common_pvt.g_setup_done THEN

Line 8483: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id

8479: END IF;
8480:
8481: /* Setup the common constants used accross the apis */
8482: gme_common_pvt.g_setup_done :=
8483: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
8484: ,p_org_code => p_org_code);
8485:
8486: IF NOT gme_common_pvt.g_setup_done THEN
8487: RAISE fnd_api.g_exc_error;

Line 8486: IF NOT gme_common_pvt.g_setup_done THEN

8482: gme_common_pvt.g_setup_done :=
8483: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
8484: ,p_org_code => p_org_code);
8485:
8486: IF NOT gme_common_pvt.g_setup_done THEN
8487: RAISE fnd_api.g_exc_error;
8488: ELSE
8489: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
8490: END IF;

Line 8489: l_batch_header.organization_id := gme_common_pvt.g_organization_id;

8485:
8486: IF NOT gme_common_pvt.g_setup_done THEN
8487: RAISE fnd_api.g_exc_error;
8488: ELSE
8489: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
8490: END IF;
8491:
8492: gme_common_pvt.set_timestamp;
8493:

Line 8492: gme_common_pvt.set_timestamp;

8488: ELSE
8489: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
8490: END IF;
8491:
8492: gme_common_pvt.set_timestamp;
8493:
8494: gme_convert_fpo_pvt.convert_fpo_main (
8495: p_batch_header => l_batch_header,
8496: p_batch_size => p_batch_size,

Line 8523: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');

8519:
8520: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8521: RAISE fnd_api.g_exc_error;
8522: ELSE
8523: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
8524: END IF;
8525: END IF;
8526: ELSE
8527: RAISE convert_fpo_failed;

Line 8530: gme_common_pvt.count_and_get (x_count => x_message_count,

8526: ELSE
8527: RAISE convert_fpo_failed;
8528: END IF;
8529:
8530: gme_common_pvt.count_and_get (x_count => x_message_count,
8531: p_encoded => FND_API.g_false,
8532: x_data => x_message_list);
8533: IF g_debug <= gme_debug.g_log_procedure THEN
8534: gme_debug.put_line ( 'Completed ' || l_api_name || ' at ' || TO_CHAR

Line 8541: gme_common_pvt.count_and_get (x_count => x_message_count,

8537: EXCEPTION
8538: WHEN convert_fpo_failed THEN
8539: ROLLBACK TO SAVEPOINT convert_fpo;
8540: x_batch_header := NULL;
8541: gme_common_pvt.count_and_get (x_count => x_message_count,
8542: p_encoded => FND_API.g_false,
8543: x_data => x_message_list);
8544: WHEN fnd_api.g_exc_error THEN
8545: ROLLBACK TO SAVEPOINT convert_fpo;

Line 8548: gme_common_pvt.count_and_get (x_count => x_message_count,

8544: WHEN fnd_api.g_exc_error THEN
8545: ROLLBACK TO SAVEPOINT convert_fpo;
8546: x_batch_header := NULL;
8547: x_return_status := fnd_api.g_ret_sts_error;
8548: gme_common_pvt.count_and_get (x_count => x_message_count,
8549: p_encoded => FND_API.g_false,
8550: x_data => x_message_list);
8551: WHEN OTHERS THEN
8552: ROLLBACK TO SAVEPOINT convert_fpo;

Line 8598: := gme_common_pvt.g_max_errors

8594:
8595: PROCEDURE create_pending_product_lot
8596: (p_api_version IN NUMBER
8597: ,p_validation_level IN NUMBER
8598: := gme_common_pvt.g_max_errors
8599: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
8600: ,p_commit IN VARCHAR2 := fnd_api.g_false
8601: ,x_message_count OUT NOCOPY NUMBER
8602: ,x_message_list OUT NOCOPY VARCHAR2

Line 8649: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

8645: IF NOT fnd_api.compatible_api_call (2.0
8646: ,p_api_version
8647: ,'create_pending_prod_lot'
8648: ,g_pkg_name) THEN
8649: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8650: RAISE fnd_api.g_exc_error;
8651: END IF;
8652:
8653: l_batch_id := NVL(p_pending_product_lots_rec.batch_id,

Line 8662: gme_common_pvt.Validate_material_detail

8658: l_in_material_detail_rec.batch_id := l_batch_id;
8659: l_in_material_detail_rec.material_detail_id := l_matl_dtl_id;
8660:
8661: /* Retrieve Batch Header and Material Detail Record */
8662: gme_common_pvt.Validate_material_detail
8663: (p_material_detail_rec => l_in_material_detail_rec
8664: ,p_org_code => p_org_code
8665: ,p_batch_no => p_batch_header_rec.batch_no
8666: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 8666: ,p_batch_type => gme_common_pvt.g_doc_type_batch

8662: gme_common_pvt.Validate_material_detail
8663: (p_material_detail_rec => l_in_material_detail_rec
8664: ,p_org_code => p_org_code
8665: ,p_batch_no => p_batch_header_rec.batch_no
8666: ,p_batch_type => gme_common_pvt.g_doc_type_batch
8667: ,x_batch_header_rec => l_batch_header_rec
8668: ,x_material_detail_rec => l_material_detail_rec
8669: ,x_message_count => x_message_count
8670: ,x_message_list => x_message_list

Line 8731: (p_header_id => gme_common_pvt.g_transaction_header_id

8727: RAISE error_create_pp_lot;
8728: END IF;
8729:
8730: gme_api_pub.save_batch
8731: (p_header_id => gme_common_pvt.g_transaction_header_id
8732: ,p_table => 1
8733: ,p_commit => p_commit
8734: ,x_return_status => x_return_status);
8735:

Line 8759: gme_common_pvt.count_and_get (x_count => x_message_count

8755:
8756: EXCEPTION
8757: WHEN error_create_pp_lot THEN
8758: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8759: gme_common_pvt.count_and_get (x_count => x_message_count
8760: ,p_encoded => fnd_api.g_false
8761: ,x_data => x_message_list);
8762: WHEN fnd_api.g_exc_error THEN
8763: ROLLBACK TO SAVEPOINT create_pending_product_lot;

Line 8765: gme_common_pvt.count_and_get (x_count => x_message_count

8761: ,x_data => x_message_list);
8762: WHEN fnd_api.g_exc_error THEN
8763: ROLLBACK TO SAVEPOINT create_pending_product_lot;
8764: x_return_status := fnd_api.g_ret_sts_error;
8765: gme_common_pvt.count_and_get (x_count => x_message_count
8766: ,p_encoded => fnd_api.g_false
8767: ,x_data => x_message_list);
8768: WHEN OTHERS THEN
8769: ROLLBACK TO SAVEPOINT create_pending_product_lot;

Line 8801: := gme_common_pvt.g_max_errors

8797:
8798: PROCEDURE update_pending_product_lot
8799: (p_api_version IN NUMBER
8800: ,p_validation_level IN NUMBER
8801: := gme_common_pvt.g_max_errors
8802: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
8803: ,p_commit IN VARCHAR2 := fnd_api.g_false
8804: ,x_message_count OUT NOCOPY NUMBER
8805: ,x_message_list OUT NOCOPY VARCHAR2

Line 8849: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

8845: IF NOT fnd_api.compatible_api_call (2.0
8846: ,p_api_version
8847: ,'update_pending_prod_lot'
8848: ,g_pkg_name) THEN
8849: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8850: RAISE fnd_api.g_exc_error;
8851: END IF;
8852:
8853: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN

Line 8863: gme_common_pvt.Validate_material_detail

8859: END IF;
8860:
8861: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;
8862: l_in_material_detail_rec.batch_id := l_db_pending_product_lots_rec.batch_id;
8863: gme_common_pvt.Validate_material_detail
8864: (p_material_detail_rec => l_in_material_detail_rec
8865: ,p_org_code => NULL
8866: ,p_batch_no => NULL
8867: ,p_batch_type => NULL

Line 8891: gme_common_pvt.Validate_material_detail

8887: l_in_material_detail_rec.batch_id := l_batch_id;
8888: l_in_material_detail_rec.material_detail_id := l_matl_dtl_id;
8889:
8890: /* Retrieve Batch Header and Material Detail Record */
8891: gme_common_pvt.Validate_material_detail
8892: (p_material_detail_rec => l_in_material_detail_rec
8893: ,p_org_code => p_org_code
8894: ,p_batch_no => p_batch_header_rec.batch_no
8895: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 8895: ,p_batch_type => gme_common_pvt.g_doc_type_batch

8891: gme_common_pvt.Validate_material_detail
8892: (p_material_detail_rec => l_in_material_detail_rec
8893: ,p_org_code => p_org_code
8894: ,p_batch_no => p_batch_header_rec.batch_no
8895: ,p_batch_type => gme_common_pvt.g_doc_type_batch
8896: ,x_batch_header_rec => l_batch_header_rec
8897: ,x_material_detail_rec => l_material_detail_rec
8898: ,x_message_count => x_message_count
8899: ,x_message_list => x_message_list

Line 8963: || gme_common_pvt.g_transaction_header_id);

8959: ( g_pkg_name
8960: || '.'
8961: || l_api_name
8962: || ' About to invoke save_batch with header_id of '
8963: || gme_common_pvt.g_transaction_header_id);
8964: END IF;
8965:
8966: gme_api_pub.save_batch
8967: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 8967: (p_header_id => gme_common_pvt.g_transaction_header_id

8963: || gme_common_pvt.g_transaction_header_id);
8964: END IF;
8965:
8966: gme_api_pub.save_batch
8967: (p_header_id => gme_common_pvt.g_transaction_header_id
8968: ,p_table => 1
8969: ,p_commit => p_commit
8970: ,x_return_status => x_return_status);
8971:

Line 8995: gme_common_pvt.count_and_get (x_count => x_message_count

8991: EXCEPTION
8992: WHEN error_update_pp_lot THEN
8993: ROLLBACK TO SAVEPOINT update_pending_product_lot;
8994: x_pending_product_lots_rec := NULL;
8995: gme_common_pvt.count_and_get (x_count => x_message_count
8996: ,p_encoded => fnd_api.g_false
8997: ,x_data => x_message_list);
8998: WHEN fnd_api.g_exc_error THEN
8999: ROLLBACK TO SAVEPOINT update_pending_product_lot;

Line 9002: gme_common_pvt.count_and_get (x_count => x_message_count

8998: WHEN fnd_api.g_exc_error THEN
8999: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9000: x_pending_product_lots_rec := NULL;
9001: x_return_status := fnd_api.g_ret_sts_error;
9002: gme_common_pvt.count_and_get (x_count => x_message_count
9003: ,p_encoded => fnd_api.g_false
9004: ,x_data => x_message_list);
9005: WHEN OTHERS THEN
9006: ROLLBACK TO SAVEPOINT update_pending_product_lot;

Line 9039: := gme_common_pvt.g_max_errors

9035:
9036: PROCEDURE delete_pending_product_lot
9037: (p_api_version IN NUMBER
9038: ,p_validation_level IN NUMBER
9039: := gme_common_pvt.g_max_errors
9040: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9041: ,p_commit IN VARCHAR2 := fnd_api.g_false
9042: ,x_message_count OUT NOCOPY NUMBER
9043: ,x_message_list OUT NOCOPY VARCHAR2

Line 9092: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

9088: IF NOT fnd_api.compatible_api_call (2.0
9089: ,p_api_version
9090: ,'delete_pending_prod_lot'
9091: ,g_pkg_name) THEN
9092: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9093: RAISE fnd_api.g_exc_error;
9094: END IF;
9095:
9096: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN

Line 9106: gme_common_pvt.Validate_material_detail

9102: END IF;
9103:
9104: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;
9105: l_in_material_detail_rec.batch_id := l_db_pending_product_lots_rec.batch_id;
9106: gme_common_pvt.Validate_material_detail
9107: (p_material_detail_rec => l_in_material_detail_rec
9108: ,p_org_code => NULL
9109: ,p_batch_no => NULL
9110: ,p_batch_type => NULL

Line 9133: gme_common_pvt.Validate_material_detail

9129: l_in_material_detail_rec.batch_id := l_batch_id;
9130: l_in_material_detail_rec.material_detail_id := l_matl_dtl_id;
9131:
9132: /* Retrieve Batch Header and Material Detail Record */
9133: gme_common_pvt.Validate_material_detail
9134: (p_material_detail_rec => l_in_material_detail_rec
9135: ,p_org_code => p_org_code
9136: ,p_batch_no => p_batch_header_rec.batch_no
9137: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 9137: ,p_batch_type => gme_common_pvt.g_doc_type_batch

9133: gme_common_pvt.Validate_material_detail
9134: (p_material_detail_rec => l_in_material_detail_rec
9135: ,p_org_code => p_org_code
9136: ,p_batch_no => p_batch_header_rec.batch_no
9137: ,p_batch_type => gme_common_pvt.g_doc_type_batch
9138: ,x_batch_header_rec => l_batch_header_rec
9139: ,x_material_detail_rec => l_material_detail_rec
9140: ,x_message_count => x_message_count
9141: ,x_message_list => x_message_list

Line 9203: || gme_common_pvt.g_transaction_header_id);

9199: ( g_pkg_name
9200: || '.'
9201: || l_api_name
9202: || ' About to invoke save_batch with header_id of '
9203: || gme_common_pvt.g_transaction_header_id);
9204: END IF;
9205:
9206: gme_api_pub.save_batch
9207: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 9207: (p_header_id => gme_common_pvt.g_transaction_header_id

9203: || gme_common_pvt.g_transaction_header_id);
9204: END IF;
9205:
9206: gme_api_pub.save_batch
9207: (p_header_id => gme_common_pvt.g_transaction_header_id
9208: ,p_table => 1
9209: ,p_commit => p_commit
9210: ,x_return_status => x_return_status);
9211:

Line 9235: gme_common_pvt.count_and_get (x_count => x_message_count

9231:
9232: EXCEPTION
9233: WHEN error_delete_pp_lot THEN
9234: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9235: gme_common_pvt.count_and_get (x_count => x_message_count
9236: ,p_encoded => fnd_api.g_false
9237: ,x_data => x_message_list);
9238: WHEN fnd_api.g_exc_error THEN
9239: ROLLBACK TO SAVEPOINT delete_pending_product_lot;

Line 9241: gme_common_pvt.count_and_get (x_count => x_message_count

9237: ,x_data => x_message_list);
9238: WHEN fnd_api.g_exc_error THEN
9239: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9240: x_return_status := fnd_api.g_ret_sts_error;
9241: gme_common_pvt.count_and_get (x_count => x_message_count
9242: ,p_encoded => fnd_api.g_false
9243: ,x_data => x_message_list);
9244: WHEN OTHERS THEN
9245: ROLLBACK TO SAVEPOINT delete_pending_product_lot;

Line 9276: := gme_common_pvt.g_max_errors

9272: ================================================================================*/
9273: PROCEDURE unrelease_batch
9274: (p_api_version IN NUMBER
9275: ,p_validation_level IN NUMBER
9276: := gme_common_pvt.g_max_errors
9277: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9278: ,p_commit IN VARCHAR2 := fnd_api.g_false
9279: ,x_message_count OUT NOCOPY NUMBER
9280: ,x_message_list OUT NOCOPY VARCHAR2

Line 9317: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

9313: IF NOT fnd_api.compatible_api_call (2.0
9314: ,p_api_version
9315: ,'unrelease_batch'
9316: ,g_pkg_name) THEN
9317: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9318: RAISE fnd_api.g_exc_error;
9319: END IF;
9320:
9321:

Line 9322: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;

9318: RAISE fnd_api.g_exc_error;
9319: END IF;
9320:
9321:
9322: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9323: gme_common_pvt.validate_batch
9324: (p_batch_header_rec => p_batch_header_rec
9325: ,p_org_code => p_org_code
9326: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

Line 9323: gme_common_pvt.validate_batch

9319: END IF;
9320:
9321:
9322: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9323: gme_common_pvt.validate_batch
9324: (p_batch_header_rec => p_batch_header_rec
9325: ,p_org_code => p_org_code
9326: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
9327: ,x_batch_header_rec => l_batch_header_rec

Line 9326: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

9322: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9323: gme_common_pvt.validate_batch
9324: (p_batch_header_rec => p_batch_header_rec
9325: ,p_org_code => p_org_code
9326: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
9327: ,x_batch_header_rec => l_batch_header_rec
9328: ,x_message_count => x_message_count
9329: ,x_message_list => x_message_list
9330: ,x_return_status => x_return_status );

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

9346: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9347: RAISE fnd_api.g_exc_error;
9348: END IF;
9349:
9350: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9351:
9352: /* Invoke main */
9353: gme_api_main.unrelease_batch
9354: (p_validation_level => p_validation_level

Line 9374: (p_header_id => gme_common_pvt.g_transaction_header_id

9370: END IF;
9371:
9372: /* Invoke save_batch */
9373: gme_api_pub.save_batch
9374: (p_header_id => gme_common_pvt.g_transaction_header_id
9375: ,p_table => 1
9376: ,p_commit => p_commit
9377: ,x_return_status => x_return_status);
9378:

Line 9398: gme_common_pvt.count_and_get (x_count => x_message_count

9394: EXCEPTION
9395: WHEN error_unrelease_batch THEN
9396: ROLLBACK TO SAVEPOINT unrelease_batch;
9397: x_batch_header_rec := NULL;
9398: gme_common_pvt.count_and_get (x_count => x_message_count
9399: ,p_encoded => fnd_api.g_false
9400: ,x_data => x_message_list);
9401: WHEN fnd_api.g_exc_error THEN
9402: ROLLBACK TO SAVEPOINT unrelease_batch;

Line 9405: gme_common_pvt.count_and_get (x_count => x_message_count

9401: WHEN fnd_api.g_exc_error THEN
9402: ROLLBACK TO SAVEPOINT unrelease_batch;
9403: x_batch_header_rec := NULL;
9404: x_return_status := fnd_api.g_ret_sts_error;
9405: gme_common_pvt.count_and_get (x_count => x_message_count
9406: ,p_encoded => fnd_api.g_false
9407: ,x_data => x_message_list);
9408: WHEN OTHERS THEN
9409: ROLLBACK TO SAVEPOINT unrelease_batch;

Line 9444: := gme_common_pvt.g_max_errors

9440: ================================================================================*/
9441: PROCEDURE unrelease_step
9442: (p_api_version IN NUMBER
9443: ,p_validation_level IN NUMBER
9444: := gme_common_pvt.g_max_errors
9445: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9446: ,p_commit IN VARCHAR2 := fnd_api.g_false
9447: ,x_message_count OUT NOCOPY NUMBER
9448: ,x_message_list OUT NOCOPY VARCHAR2

Line 9488: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

9484: IF NOT fnd_api.compatible_api_call (2.0
9485: ,p_api_version
9486: ,'unrelease_step'
9487: ,g_pkg_name) THEN
9488: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9489: RAISE fnd_api.g_exc_error;
9490: END IF;
9491:
9492: /* Validate Input parameters */

Line 9493: gme_common_pvt.Validate_batch_step (

9489: RAISE fnd_api.g_exc_error;
9490: END IF;
9491:
9492: /* Validate Input parameters */
9493: gme_common_pvt.Validate_batch_step (
9494: p_batch_step_rec => p_batch_step_rec
9495: ,p_org_code => p_org_code
9496: ,p_batch_no => p_batch_no
9497: ,x_batch_step_rec => l_batch_step_rec

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

9517: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9518: RAISE fnd_api.g_exc_error;
9519: END IF;
9520:
9521: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9522:
9523: /* Invoke main */
9524: gme_api_main.unrelease_step
9525: (p_validation_level => p_validation_level

Line 9555: || gme_common_pvt.g_transaction_header_id);

9551: ( g_pkg_name
9552: || '.'
9553: || l_api_name
9554: || ' About to invoke save_batch with header_id of '
9555: || gme_common_pvt.g_transaction_header_id);
9556: END IF;
9557:
9558: gme_api_pub.save_batch
9559: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 9559: (p_header_id => gme_common_pvt.g_transaction_header_id

9555: || gme_common_pvt.g_transaction_header_id);
9556: END IF;
9557:
9558: gme_api_pub.save_batch
9559: (p_header_id => gme_common_pvt.g_transaction_header_id
9560: ,p_table => 1
9561: ,p_commit => p_commit
9562: ,x_return_status => x_return_status);
9563:

Line 9588: gme_common_pvt.count_and_get (x_count => x_message_count

9584: EXCEPTION
9585: WHEN error_unrelease_step THEN
9586: ROLLBACK TO SAVEPOINT unrelease_step;
9587: x_batch_step_rec := NULL;
9588: gme_common_pvt.count_and_get (x_count => x_message_count
9589: ,p_encoded => fnd_api.g_false
9590: ,x_data => x_message_list);
9591: WHEN fnd_api.g_exc_error THEN
9592: ROLLBACK TO SAVEPOINT unrelease_step;

Line 9595: gme_common_pvt.count_and_get (x_count => x_message_count

9591: WHEN fnd_api.g_exc_error THEN
9592: ROLLBACK TO SAVEPOINT unrelease_step;
9593: x_batch_step_rec := NULL;
9594: x_return_status := fnd_api.g_ret_sts_error;
9595: gme_common_pvt.count_and_get (x_count => x_message_count
9596: ,p_encoded => fnd_api.g_false
9597: ,x_data => x_message_list);
9598: WHEN OTHERS THEN
9599: ROLLBACK TO SAVEPOINT unrelease_step;

Line 9634: := gme_common_pvt.g_max_errors

9630: ================================================================================*/
9631: PROCEDURE complete_batch
9632: (p_api_version IN NUMBER
9633: ,p_validation_level IN NUMBER
9634: := gme_common_pvt.g_max_errors
9635: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9636: ,p_commit IN VARCHAR2 := fnd_api.g_false
9637: ,x_message_count OUT NOCOPY NUMBER
9638: ,x_message_list OUT NOCOPY VARCHAR2

Line 9645: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

9641: ,p_org_code IN VARCHAR2
9642: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
9643: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
9644: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
9645: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
9646: IS
9647: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_BATCH';
9648:
9649: l_in_batch_header_rec gme_batch_header%ROWTYPE;

Line 9651: l_exception_material_tbl gme_common_pvt.exceptions_tab;

9647: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_BATCH';
9648:
9649: l_in_batch_header_rec gme_batch_header%ROWTYPE;
9650: l_batch_header_rec gme_batch_header%ROWTYPE;
9651: l_exception_material_tbl gme_common_pvt.exceptions_tab;
9652:
9653: error_complete_batch EXCEPTION;
9654: BEGIN
9655: IF (g_debug <> -1) THEN

Line 9678: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

9674: IF NOT fnd_api.compatible_api_call (2.0
9675: ,p_api_version
9676: ,'complete_batch'
9677: ,g_pkg_name) THEN
9678: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9679: RAISE fnd_api.g_exc_error;
9680: END IF;
9681:
9682:

Line 9683: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;

9679: RAISE fnd_api.g_exc_error;
9680: END IF;
9681:
9682:
9683: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9684: gme_common_pvt.validate_batch
9685: (p_batch_header_rec => p_batch_header_rec
9686: ,p_org_code => p_org_code
9687: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

Line 9684: gme_common_pvt.validate_batch

9680: END IF;
9681:
9682:
9683: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9684: gme_common_pvt.validate_batch
9685: (p_batch_header_rec => p_batch_header_rec
9686: ,p_org_code => p_org_code
9687: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
9688: ,x_batch_header_rec => l_batch_header_rec

Line 9687: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

9683: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9684: gme_common_pvt.validate_batch
9685: (p_batch_header_rec => p_batch_header_rec
9686: ,p_org_code => p_org_code
9687: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
9688: ,x_batch_header_rec => l_batch_header_rec
9689: ,x_message_count => x_message_count
9690: ,x_message_list => x_message_list
9691: ,x_return_status => x_return_status );

Line 9702: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

9698: RAISE fnd_api.g_exc_error;
9699: END IF;
9700:
9701: -- Validations
9702: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
9703: IF p_validate_flexfields = fnd_api.g_true THEN
9704: gme_common_pvt.g_flex_validate_prof := 1;
9705: ELSE
9706: gme_common_pvt.g_flex_validate_prof := 0;

Line 9704: gme_common_pvt.g_flex_validate_prof := 1;

9700:
9701: -- Validations
9702: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
9703: IF p_validate_flexfields = fnd_api.g_true THEN
9704: gme_common_pvt.g_flex_validate_prof := 1;
9705: ELSE
9706: gme_common_pvt.g_flex_validate_prof := 0;
9707: END IF;
9708:

Line 9706: gme_common_pvt.g_flex_validate_prof := 0;

9702: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
9703: IF p_validate_flexfields = fnd_api.g_true THEN
9704: gme_common_pvt.g_flex_validate_prof := 1;
9705: ELSE
9706: gme_common_pvt.g_flex_validate_prof := 0;
9707: END IF;
9708:
9709: l_in_batch_header_rec := l_batch_header_rec;
9710: l_in_batch_header_rec.actual_start_date := p_batch_header_rec.actual_start_date;

Line 9719: gme_common_pvt.g_flex_validate_prof := 0;

9715: RAISE fnd_api.g_exc_error;
9716: END IF;
9717:
9718: -- reset flex global
9719: gme_common_pvt.g_flex_validate_prof := 0;
9720: END IF;
9721:
9722: l_in_batch_header_rec := l_batch_header_rec;
9723: -- Bug 6828656

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

9733: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9734: RAISE fnd_api.g_exc_error;
9735: END IF;
9736:
9737: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9738:
9739: /* Invoke main */
9740: gme_api_main.complete_batch
9741: (p_validation_level => p_validation_level

Line 9760: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

9756: || ' Return status from gme_api_main.complete_batch is '
9757: || x_return_status);
9758: END IF;
9759:
9760: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
9761: x_return_status := fnd_api.g_ret_sts_success;
9762: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
9763: x_exception_material_tbl := l_exception_material_tbl;
9764: END IF;

Line 9762: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

9758: END IF;
9759:
9760: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
9761: x_return_status := fnd_api.g_ret_sts_success;
9762: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
9763: x_exception_material_tbl := l_exception_material_tbl;
9764: END IF;
9765:
9766: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 9777: || gme_common_pvt.g_transaction_header_id);

9773: ( g_pkg_name
9774: || '.'
9775: || l_api_name
9776: || ' About to invoke save_batch with header_id of '
9777: || gme_common_pvt.g_transaction_header_id);
9778: END IF;
9779:
9780: gme_api_pub.save_batch
9781: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 9781: (p_header_id => gme_common_pvt.g_transaction_header_id

9777: || gme_common_pvt.g_transaction_header_id);
9778: END IF;
9779:
9780: gme_api_pub.save_batch
9781: (p_header_id => gme_common_pvt.g_transaction_header_id
9782: ,p_table => 1
9783: ,p_commit => p_commit
9784: ,x_return_status => x_return_status);
9785:

Line 9810: gme_common_pvt.count_and_get (x_count => x_message_count

9806: EXCEPTION
9807: WHEN error_complete_batch THEN
9808: ROLLBACK TO SAVEPOINT complete_batch;
9809: x_batch_header_rec := NULL;
9810: gme_common_pvt.count_and_get (x_count => x_message_count
9811: ,p_encoded => fnd_api.g_false
9812: ,x_data => x_message_list);
9813: WHEN fnd_api.g_exc_error THEN
9814: ROLLBACK TO SAVEPOINT complete_batch;

Line 9817: gme_common_pvt.count_and_get (x_count => x_message_count

9813: WHEN fnd_api.g_exc_error THEN
9814: ROLLBACK TO SAVEPOINT complete_batch;
9815: x_batch_header_rec := NULL;
9816: x_return_status := fnd_api.g_ret_sts_error;
9817: gme_common_pvt.count_and_get (x_count => x_message_count
9818: ,p_encoded => fnd_api.g_false
9819: ,x_data => x_message_list);
9820: WHEN OTHERS THEN
9821: ROLLBACK TO SAVEPOINT complete_batch;

Line 9858: := gme_common_pvt.g_max_errors

9854: ================================================================================*/
9855: PROCEDURE complete_step
9856: (p_api_version IN NUMBER
9857: ,p_validation_level IN NUMBER
9858: := gme_common_pvt.g_max_errors
9859: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9860: ,p_commit IN VARCHAR2 := fnd_api.g_false
9861: ,x_message_count OUT NOCOPY NUMBER
9862: ,x_message_list OUT NOCOPY VARCHAR2

Line 9871: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

9867: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
9868: ,p_override_quality IN VARCHAR2 := fnd_api.g_false
9869: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
9870: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
9871: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
9872: IS
9873: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_STEP';
9874:
9875: l_in_batch_step_rec gme_batch_steps%ROWTYPE;

Line 9881: l_exception_material_tbl gme_common_pvt.exceptions_tab;

9877: l_in_batch_header_rec gme_batch_header%ROWTYPE;
9878: l_batch_header_rec gme_batch_header%ROWTYPE;
9879: l_calc_batch_start_date DATE;
9880:
9881: l_exception_material_tbl gme_common_pvt.exceptions_tab;
9882:
9883: error_complete_step EXCEPTION;
9884: BEGIN
9885: IF (g_debug <> -1) THEN

Line 9908: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

9904: IF NOT fnd_api.compatible_api_call (2.0
9905: ,p_api_version
9906: ,'complete_step'
9907: ,g_pkg_name) THEN
9908: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9909: RAISE fnd_api.g_exc_error;
9910: END IF;
9911:
9912: /* Validate Input parameters */

Line 9913: gme_common_pvt.Validate_batch_step (

9909: RAISE fnd_api.g_exc_error;
9910: END IF;
9911:
9912: /* Validate Input parameters */
9913: gme_common_pvt.Validate_batch_step (
9914: p_batch_step_rec => p_batch_step_rec
9915: ,p_org_code => p_org_code
9916: ,p_batch_no => p_batch_no
9917: ,x_batch_step_rec => l_batch_step_rec

Line 9932: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

9928: RAISE fnd_api.g_exc_error;
9929: END IF;
9930: -- Validations
9931:
9932: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
9933: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
9934: RAISE fnd_api.g_exc_error;
9935: END IF;
9936:

Line 9933: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');

9929: END IF;
9930: -- Validations
9931:
9932: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
9933: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
9934: RAISE fnd_api.g_exc_error;
9935: END IF;
9936:
9937: -- current Step Status must be Pending or WIP

Line 9938: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN

9934: RAISE fnd_api.g_exc_error;
9935: END IF;
9936:
9937: -- current Step Status must be Pending or WIP
9938: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN
9939: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_CERT');
9940: RAISE fnd_api.g_exc_error;
9941: END IF;
9942:

Line 9939: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_CERT');

9935: END IF;
9936:
9937: -- current Step Status must be Pending or WIP
9938: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN
9939: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_CERT');
9940: RAISE fnd_api.g_exc_error;
9941: END IF;
9942:
9943: IF l_batch_header_rec.batch_status NOT IN

Line 9944: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

9940: RAISE fnd_api.g_exc_error;
9941: END IF;
9942:
9943: IF l_batch_header_rec.batch_status NOT IN
9944: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
9945: gme_common_pvt.log_message ('GME_API_INV_BATCH_CERT_STEP');
9946: RAISE fnd_api.g_exc_error;
9947: END IF;
9948:

Line 9945: gme_common_pvt.log_message ('GME_API_INV_BATCH_CERT_STEP');

9941: END IF;
9942:
9943: IF l_batch_header_rec.batch_status NOT IN
9944: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
9945: gme_common_pvt.log_message ('GME_API_INV_BATCH_CERT_STEP');
9946: RAISE fnd_api.g_exc_error;
9947: END IF;
9948:
9949: --Bug#5109119 checking for parameter value 1 instead of Y

Line 9950: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND

9946: RAISE fnd_api.g_exc_error;
9947: END IF;
9948:
9949: --Bug#5109119 checking for parameter value 1 instead of Y
9950: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
9951: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
9952: l_batch_header_rec.parentline_id IS NOT NULL) THEN
9953: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');
9954: RAISE fnd_api.g_exc_error;

Line 9951: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR

9947: END IF;
9948:
9949: --Bug#5109119 checking for parameter value 1 instead of Y
9950: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
9951: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
9952: l_batch_header_rec.parentline_id IS NOT NULL) THEN
9953: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');
9954: RAISE fnd_api.g_exc_error;
9955: END IF;

Line 9953: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');

9949: --Bug#5109119 checking for parameter value 1 instead of Y
9950: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
9951: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
9952: l_batch_header_rec.parentline_id IS NOT NULL) THEN
9953: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');
9954: RAISE fnd_api.g_exc_error;
9955: END IF;
9956:
9957: l_in_batch_step_rec := l_batch_step_rec;

Line 9971: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN

9967: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9968: RAISE fnd_api.g_exc_error;
9969: END IF;
9970:
9971: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
9972: -- call release step validation; use step actual cmplt date
9973: -- if step actual start date is NULL and batch is Pending
9974: NULL;
9975: END IF; -- IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending

Line 9975: END IF; -- IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending

9971: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
9972: -- call release step validation; use step actual cmplt date
9973: -- if step actual start date is NULL and batch is Pending
9974: NULL;
9975: END IF; -- IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending
9976:
9977: gme_complete_batch_step_pvt.validate_step_cmplt_date
9978: (p_batch_step_rec => l_batch_step_rec
9979: ,p_batch_header_rec => l_batch_header_rec

Line 9989: gme_common_pvt.g_flex_validate_prof := 1;

9985: END IF;
9986:
9987: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
9988: IF p_validate_flexfields = fnd_api.g_true THEN
9989: gme_common_pvt.g_flex_validate_prof := 1;
9990: ELSE
9991: gme_common_pvt.g_flex_validate_prof := 0;
9992: END IF;
9993:

Line 9991: gme_common_pvt.g_flex_validate_prof := 0;

9987: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
9988: IF p_validate_flexfields = fnd_api.g_true THEN
9989: gme_common_pvt.g_flex_validate_prof := 1;
9990: ELSE
9991: gme_common_pvt.g_flex_validate_prof := 0;
9992: END IF;
9993:
9994: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
9995: l_in_batch_header_rec := l_batch_header_rec;

Line 9994: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

9990: ELSE
9991: gme_common_pvt.g_flex_validate_prof := 0;
9992: END IF;
9993:
9994: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
9995: l_in_batch_header_rec := l_batch_header_rec;
9996: l_in_batch_header_rec.actual_start_date := l_calc_batch_start_date;
9997: -- call release batch validation...
9998: NULL;

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

10001: RAISE fnd_api.g_exc_error;
10002: END IF;
10003: END IF;
10004:
10005: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10006:
10007: /* Invoke main */
10008: gme_api_main.complete_step
10009: (p_validation_level => p_validation_level

Line 10029: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

10025: || ' Return status from gme_api_main.complete_step is '
10026: || x_return_status);
10027: END IF;
10028:
10029: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10030: x_return_status := fnd_api.g_ret_sts_success;
10031: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10032: x_exception_material_tbl := l_exception_material_tbl;
10033: END IF;

Line 10031: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

10027: END IF;
10028:
10029: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10030: x_return_status := fnd_api.g_ret_sts_success;
10031: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10032: x_exception_material_tbl := l_exception_material_tbl;
10033: END IF;
10034:
10035: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 10039: gme_common_pvt.g_flex_validate_prof := 0;

10035: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10036: RAISE error_complete_step;
10037: END IF;
10038: -- reset flex global
10039: gme_common_pvt.g_flex_validate_prof := 0;
10040:
10041: /* Invoke save_batch */
10042: gme_api_pub.save_batch
10043: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 10043: (p_header_id => gme_common_pvt.g_transaction_header_id

10039: gme_common_pvt.g_flex_validate_prof := 0;
10040:
10041: /* Invoke save_batch */
10042: gme_api_pub.save_batch
10043: (p_header_id => gme_common_pvt.g_transaction_header_id
10044: ,p_table => 1
10045: ,p_commit => p_commit
10046: ,x_return_status => x_return_status);
10047:

Line 10071: gme_common_pvt.count_and_get (x_count => x_message_count

10067: EXCEPTION
10068: WHEN error_complete_step THEN
10069: ROLLBACK TO SAVEPOINT complete_step;
10070: x_batch_step_rec := NULL;
10071: gme_common_pvt.count_and_get (x_count => x_message_count
10072: ,p_encoded => fnd_api.g_false
10073: ,x_data => x_message_list);
10074: WHEN fnd_api.g_exc_error THEN
10075: ROLLBACK TO SAVEPOINT complete_step;

Line 10078: gme_common_pvt.count_and_get (x_count => x_message_count

10074: WHEN fnd_api.g_exc_error THEN
10075: ROLLBACK TO SAVEPOINT complete_step;
10076: x_batch_step_rec := NULL;
10077: x_return_status := fnd_api.g_ret_sts_error;
10078: gme_common_pvt.count_and_get (x_count => x_message_count
10079: ,p_encoded => fnd_api.g_false
10080: ,x_data => x_message_list);
10081: WHEN OTHERS THEN
10082: ROLLBACK TO SAVEPOINT complete_step;

Line 10116: := gme_common_pvt.g_max_errors

10112: ================================================================================*/
10113: PROCEDURE release_batch
10114: (p_api_version IN NUMBER
10115: ,p_validation_level IN NUMBER
10116: := gme_common_pvt.g_max_errors
10117: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10118: ,p_commit IN VARCHAR2 := fnd_api.g_false
10119: ,x_message_count OUT NOCOPY NUMBER
10120: ,x_message_list OUT NOCOPY VARCHAR2

Line 10127: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

10123: ,p_org_code IN VARCHAR2
10124: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10125: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10126: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
10127: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10128: IS
10129: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_BATCH';
10130:
10131: l_in_batch_header_rec gme_batch_header%ROWTYPE;

Line 10133: l_exception_material_tbl gme_common_pvt.exceptions_tab;

10129: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_BATCH';
10130:
10131: l_in_batch_header_rec gme_batch_header%ROWTYPE;
10132: l_batch_header_rec gme_batch_header%ROWTYPE;
10133: l_exception_material_tbl gme_common_pvt.exceptions_tab;
10134:
10135: error_release_batch EXCEPTION;
10136: BEGIN
10137: IF (g_debug <> -1) THEN

Line 10160: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

10156: IF NOT fnd_api.compatible_api_call (2.0
10157: ,p_api_version
10158: ,'release_batch'
10159: ,g_pkg_name) THEN
10160: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10161: RAISE fnd_api.g_exc_error;
10162: END IF;
10163:
10164: gme_common_pvt.validate_batch

Line 10164: gme_common_pvt.validate_batch

10160: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10161: RAISE fnd_api.g_exc_error;
10162: END IF;
10163:
10164: gme_common_pvt.validate_batch
10165: (p_batch_header_rec => p_batch_header_rec
10166: ,p_org_code => p_org_code
10167: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
10168: ,x_batch_header_rec => l_batch_header_rec

Line 10167: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

10163:
10164: gme_common_pvt.validate_batch
10165: (p_batch_header_rec => p_batch_header_rec
10166: ,p_org_code => p_org_code
10167: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
10168: ,x_batch_header_rec => l_batch_header_rec
10169: ,x_message_count => x_message_count
10170: ,x_message_list => x_message_list
10171: ,x_return_status => x_return_status );

Line 10182: gme_common_pvt.g_flex_validate_prof := 1;

10178: RAISE fnd_api.g_exc_error;
10179: END IF;
10180: -- Validations
10181: IF p_validate_flexfields = fnd_api.g_true THEN
10182: gme_common_pvt.g_flex_validate_prof := 1;
10183: ELSE
10184: gme_common_pvt.g_flex_validate_prof := 0;
10185: END IF;
10186:

Line 10184: gme_common_pvt.g_flex_validate_prof := 0;

10180: -- Validations
10181: IF p_validate_flexfields = fnd_api.g_true THEN
10182: gme_common_pvt.g_flex_validate_prof := 1;
10183: ELSE
10184: gme_common_pvt.g_flex_validate_prof := 0;
10185: END IF;
10186:
10187: l_in_batch_header_rec := l_batch_header_rec;
10188: l_in_batch_header_rec.actual_start_date := p_batch_header_rec.actual_start_date;

Line 10201: gme_common_pvt.g_flex_validate_prof := 0;

10197: RAISE fnd_api.g_exc_error;
10198: END IF;
10199:
10200: -- reset flex global
10201: gme_common_pvt.g_flex_validate_prof := 0;
10202:
10203: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10204: IF g_debug <= gme_debug.g_log_statement THEN
10205: gme_debug.put_line ( g_pkg_name || '.' || l_api_name

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

10199:
10200: -- reset flex global
10201: gme_common_pvt.g_flex_validate_prof := 0;
10202:
10203: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10204: IF g_debug <= gme_debug.g_log_statement THEN
10205: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
10206: || 'batch_id '||l_batch_header_rec.batch_id);
10207: END IF;

Line 10226: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

10222: ' Return status from gme_api_main.release_batch is '
10223: || x_return_status);
10224: END IF;
10225:
10226: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10227: x_return_status := fnd_api.g_ret_sts_success;
10228: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10229: x_exception_material_tbl := l_exception_material_tbl;
10230: END IF;

Line 10228: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

10224: END IF;
10225:
10226: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10227: x_return_status := fnd_api.g_ret_sts_success;
10228: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10229: x_exception_material_tbl := l_exception_material_tbl;
10230: END IF;
10231:
10232: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 10239: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);

10235:
10236: /* Invoke save_batch */
10237: IF g_debug <= gme_debug.g_log_statement THEN
10238: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' About to
10239: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);
10240: END IF;
10241:
10242: gme_api_pub.save_batch
10243: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 10243: (p_header_id => gme_common_pvt.g_transaction_header_id

10239: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);
10240: END IF;
10241:
10242: gme_api_pub.save_batch
10243: (p_header_id => gme_common_pvt.g_transaction_header_id
10244: ,p_table => 1
10245: ,p_commit => p_commit
10246: ,x_return_status => x_return_status);
10247:

Line 10265: gme_common_pvt.count_and_get (x_count => x_message_count

10261: EXCEPTION
10262: WHEN error_release_batch THEN
10263: ROLLBACK TO SAVEPOINT release_batch;
10264: x_batch_header_rec := NULL;
10265: gme_common_pvt.count_and_get (x_count => x_message_count
10266: ,p_encoded => fnd_api.g_false
10267: ,x_data => x_message_list);
10268: WHEN fnd_api.g_exc_error THEN
10269: ROLLBACK TO SAVEPOINT release_batch;

Line 10272: gme_common_pvt.count_and_get (x_count => x_message_count

10268: WHEN fnd_api.g_exc_error THEN
10269: ROLLBACK TO SAVEPOINT release_batch;
10270: x_batch_header_rec := NULL;
10271: x_return_status := fnd_api.g_ret_sts_error;
10272: gme_common_pvt.count_and_get (x_count => x_message_count
10273: ,p_encoded => fnd_api.g_false
10274: ,x_data => x_message_list);
10275: WHEN OTHERS THEN
10276: ROLLBACK TO SAVEPOINT release_batch;

Line 10312: := gme_common_pvt.g_max_errors

10308: ================================================================================*/
10309: PROCEDURE release_step
10310: (p_api_version IN NUMBER
10311: ,p_validation_level IN NUMBER
10312: := gme_common_pvt.g_max_errors
10313: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10314: ,p_commit IN VARCHAR2 := fnd_api.g_false
10315: ,x_message_count OUT NOCOPY NUMBER
10316: ,x_message_list OUT NOCOPY VARCHAR2

Line 10324: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

10320: ,p_org_code IN VARCHAR2
10321: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10322: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10323: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
10324: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10325: IS
10326: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_STEP';
10327:
10328: l_in_batch_step_rec gme_batch_steps%ROWTYPE;

Line 10333: l_exception_material_tbl gme_common_pvt.exceptions_tab;

10329: l_batch_step_rec gme_batch_steps%ROWTYPE;
10330: l_in_batch_header_rec gme_batch_header%ROWTYPE;
10331: l_batch_header_rec gme_batch_header%ROWTYPE;
10332:
10333: l_exception_material_tbl gme_common_pvt.exceptions_tab;
10334:
10335: error_release_step EXCEPTION;
10336: BEGIN
10337: IF (g_debug <> -1) THEN

Line 10360: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

10356: IF NOT fnd_api.compatible_api_call (2.0
10357: ,p_api_version
10358: ,'release_step'
10359: ,g_pkg_name) THEN
10360: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10361: RAISE fnd_api.g_exc_error;
10362: END IF;
10363: /* Validate Input parameters */
10364: gme_common_pvt.Validate_batch_step (

Line 10364: gme_common_pvt.Validate_batch_step (

10360: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10361: RAISE fnd_api.g_exc_error;
10362: END IF;
10363: /* Validate Input parameters */
10364: gme_common_pvt.Validate_batch_step (
10365: p_batch_step_rec => p_batch_step_rec
10366: ,p_org_code => p_org_code
10367: ,p_batch_no => p_batch_no
10368: ,x_batch_step_rec => l_batch_step_rec

Line 10382: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN

10378: END IF;
10379: RAISE fnd_api.g_exc_error;
10380: END IF;
10381: -- Validations
10382: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
10383: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386: -- current Step Status must be Pending

Line 10383: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');

10379: RAISE fnd_api.g_exc_error;
10380: END IF;
10381: -- Validations
10382: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
10383: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386: -- current Step Status must be Pending
10387: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN

Line 10387: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN

10383: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386: -- current Step Status must be Pending
10387: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN
10388: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');
10389: RAISE fnd_api.g_exc_error;
10390: END IF;
10391:

Line 10388: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');

10384: RAISE fnd_api.g_exc_error;
10385: END IF;
10386: -- current Step Status must be Pending
10387: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN
10388: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');
10389: RAISE fnd_api.g_exc_error;
10390: END IF;
10391:
10392: IF l_batch_header_rec.batch_status NOT IN

Line 10393: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN

10389: RAISE fnd_api.g_exc_error;
10390: END IF;
10391:
10392: IF l_batch_header_rec.batch_status NOT IN
10393: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
10394: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
10395: RAISE fnd_api.g_exc_error;
10396: END IF;
10397:

Line 10394: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');

10390: END IF;
10391:
10392: IF l_batch_header_rec.batch_status NOT IN
10393: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
10394: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
10395: RAISE fnd_api.g_exc_error;
10396: END IF;
10397:
10398: --Pawan kumar changed to number for g_step_controls_batch_sts

Line 10399: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND

10395: RAISE fnd_api.g_exc_error;
10396: END IF;
10397:
10398: --Pawan kumar changed to number for g_step_controls_batch_sts
10399: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
10400: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
10401: l_batch_header_rec.parentline_id IS NOT NULL) THEN
10402: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
10403: RAISE fnd_api.g_exc_error;

Line 10400: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR

10396: END IF;
10397:
10398: --Pawan kumar changed to number for g_step_controls_batch_sts
10399: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
10400: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
10401: l_batch_header_rec.parentline_id IS NOT NULL) THEN
10402: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
10403: RAISE fnd_api.g_exc_error;
10404: END IF;

Line 10402: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');

10398: --Pawan kumar changed to number for g_step_controls_batch_sts
10399: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
10400: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
10401: l_batch_header_rec.parentline_id IS NOT NULL) THEN
10402: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
10403: RAISE fnd_api.g_exc_error;
10404: END IF;
10405:
10406: l_in_batch_step_rec := l_batch_step_rec;

Line 10421: gme_common_pvt.g_flex_validate_prof := 1;

10417: END IF;
10418:
10419: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
10420: IF p_validate_flexfields = fnd_api.g_true THEN
10421: gme_common_pvt.g_flex_validate_prof := 1;
10422: ELSE
10423: gme_common_pvt.g_flex_validate_prof := 0;
10424: END IF;
10425:

Line 10423: gme_common_pvt.g_flex_validate_prof := 0;

10419: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
10420: IF p_validate_flexfields = fnd_api.g_true THEN
10421: gme_common_pvt.g_flex_validate_prof := 1;
10422: ELSE
10423: gme_common_pvt.g_flex_validate_prof := 0;
10424: END IF;
10425:
10426: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
10427: l_in_batch_header_rec := l_batch_header_rec;

Line 10426: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

10422: ELSE
10423: gme_common_pvt.g_flex_validate_prof := 0;
10424: END IF;
10425:
10426: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
10427: l_in_batch_header_rec := l_batch_header_rec;
10428: l_in_batch_header_rec.actual_start_date := l_batch_step_rec.actual_start_date;
10429:
10430: -- call release batch validation... output batch header will have actual start date filled in

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

10437: RAISE fnd_api.g_exc_error;
10438: END IF;
10439: END IF;
10440:
10441: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10442:
10443: /* Invoke main */
10444: gme_api_main.release_step
10445: (p_validation_level => p_validation_level

Line 10462: gme_common_pvt.g_flex_validate_prof := 0;

10458: status from gme_api_main.release_step is ' || x_return_status);
10459: END IF;
10460:
10461: -- reset flex global
10462: gme_common_pvt.g_flex_validate_prof := 0;
10463:
10464: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10465: x_return_status := fnd_api.g_ret_sts_success;
10466: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

Line 10464: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN

10460:
10461: -- reset flex global
10462: gme_common_pvt.g_flex_validate_prof := 0;
10463:
10464: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10465: x_return_status := fnd_api.g_ret_sts_success;
10466: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10467: x_exception_material_tbl := l_exception_material_tbl;
10468: END IF;

Line 10466: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

10462: gme_common_pvt.g_flex_validate_prof := 0;
10463:
10464: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10465: x_return_status := fnd_api.g_ret_sts_success;
10466: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10467: x_exception_material_tbl := l_exception_material_tbl;
10468: END IF;
10469:
10470: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 10477: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);

10473:
10474: /* Invoke save_batch */
10475: IF g_debug <= gme_debug.g_log_statement THEN
10476: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' About to
10477: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);
10478: END IF;
10479:
10480: gme_api_pub.save_batch
10481: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 10481: (p_header_id => gme_common_pvt.g_transaction_header_id

10477: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);
10478: END IF;
10479:
10480: gme_api_pub.save_batch
10481: (p_header_id => gme_common_pvt.g_transaction_header_id
10482: ,p_table => 1
10483: ,p_commit => p_commit
10484: ,x_return_status => x_return_status);
10485:

Line 10504: gme_common_pvt.count_and_get (x_count => x_message_count

10500: EXCEPTION
10501: WHEN error_release_step THEN
10502: ROLLBACK TO SAVEPOINT release_step;
10503: x_batch_step_rec := NULL;
10504: gme_common_pvt.count_and_get (x_count => x_message_count
10505: ,p_encoded => fnd_api.g_false
10506: ,x_data => x_message_list);
10507: WHEN fnd_api.g_exc_error THEN
10508: ROLLBACK TO SAVEPOINT release_step;

Line 10511: gme_common_pvt.count_and_get (x_count => x_message_count

10507: WHEN fnd_api.g_exc_error THEN
10508: ROLLBACK TO SAVEPOINT release_step;
10509: x_batch_step_rec := NULL;
10510: x_return_status := fnd_api.g_ret_sts_error;
10511: gme_common_pvt.count_and_get (x_count => x_message_count
10512: ,p_encoded => fnd_api.g_false
10513: ,x_data => x_message_list);
10514: WHEN OTHERS THEN
10515: ROLLBACK TO SAVEPOINT release_step;

Line 10548: := gme_common_pvt.g_max_errors

10544: ================================================================================*/
10545: PROCEDURE process_group
10546: (p_api_version IN NUMBER
10547: ,p_validation_level IN NUMBER
10548: := gme_common_pvt.g_max_errors
10549: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10550: ,p_commit IN VARCHAR2 := fnd_api.g_false
10551: ,p_group_name IN VARCHAR2
10552: ,p_org_code IN VARCHAR2

Line 10569: l_exception_material_tbl gme_common_pvt.exceptions_tab;

10565: success_count NUMBER := 0;
10566: failed_count NUMBER := 0;
10567: l_batch_header_rec gme_batch_header%ROWTYPE;
10568: l_in_batch_header_rec gme_batch_header%ROWTYPE;
10569: l_exception_material_tbl gme_common_pvt.exceptions_tab;
10570: error_process_group EXCEPTION;
10571:
10572: CURSOR get_organization (l_org_code IN VARCHAR2)
10573: IS

Line 10628: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');

10624: IF NOT fnd_api.compatible_api_call (2.0
10625: ,p_api_version
10626: ,'process_group'
10627: ,g_pkg_name) THEN
10628: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10629: RAISE fnd_api.g_exc_error;
10630: END IF;
10631:
10632: /* Validate Input parameters */

Line 10665: gme_common_pvt.log_message ('GME_INVALID_ORG');

10661: FETCH get_organization INTO l_org_id;
10662:
10663: IF get_organization%NOTFOUND THEN
10664: CLOSE get_organization;
10665: gme_common_pvt.log_message ('GME_INVALID_ORG');
10666: RAISE fnd_api.g_exc_error;
10667: END IF;
10668:
10669: CLOSE get_organization;

Line 10677: gme_common_pvt.log_message ('GME_INVALID_GROUP');

10673: FETCH get_group_id INTO l_group_id;
10674:
10675: IF get_group_id%NOTFOUND THEN
10676: CLOSE get_group_id;
10677: gme_common_pvt.log_message ('GME_INVALID_GROUP');
10678: RAISE fnd_api.g_exc_error;
10679: END IF;
10680:
10681: CLOSE get_group_id;

Line 10688: gme_common_pvt.log_message ('GME_INVALID_GROUP_ACTION');

10684: FETCH validate_lookup_code INTO l_action;
10685:
10686: IF validate_lookup_code%NOTFOUND THEN
10687: CLOSE validate_lookup_code;
10688: gme_common_pvt.log_message ('GME_INVALID_GROUP_ACTION');
10689: RAISE fnd_api.g_exc_error;
10690: END IF;
10691:
10692: CLOSE validate_lookup_code;

Line 10695: gme_common_pvt.log_message ('GME_INVALID_ERR_FLAG');

10691:
10692: CLOSE validate_lookup_code;
10693:
10694: IF (p_on_error_flag <> 'STOP' AND p_on_error_flag <> 'CONTINUE') THEN
10695: gme_common_pvt.log_message ('GME_INVALID_ERR_FLAG');
10696: RAISE fnd_api.g_exc_error;
10697: END IF;
10698:
10699: i := 0;

Line 10835: gme_common_pvt.count_and_get (x_count => x_message_count

10831:
10832: -- DBMS_OUTPUT.put_line ('return status is = ' || x_return_status);
10833: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10834: failed_count := failed_count + 1;
10835: gme_common_pvt.count_and_get (x_count => x_message_count
10836: ,p_encoded => fnd_api.g_false
10837: ,x_data => x_message_list);
10838: -- DBMS_OUTPUT.put_line('Error ' || x_message_list);
10839: IF (p_on_error_flag = 'STOP') THEN

Line 10849: gme_common_pvt.count_and_get (x_count => x_message_count

10845:
10846: EXCEPTION
10847: WHEN OTHERS THEN
10848: failed_count := failed_count + 1;
10849: gme_common_pvt.count_and_get (x_count => x_message_count
10850: ,p_encoded => fnd_api.g_false
10851: ,x_data => x_message_list);
10852: -- DBMS_OUTPUT.put_line('Error ' || x_message_list);
10853: IF (p_on_error_flag = 'STOP') THEN

Line 10860: gme_common_pvt.log_message ('GME_NO_GROUP_ASSOC');

10856: END;
10857: END LOOP;
10858:
10859: IF i=0 THEN
10860: gme_common_pvt.log_message ('GME_NO_GROUP_ASSOC');
10861: RAISE fnd_api.g_exc_error;
10862: ELSE
10863: -- DBMS_OUTPUT.put_line('Total ' || i);
10864: -- DBMS_OUTPUT.put_line('Success ' || success_count);

Line 10866: gme_common_pvt.log_message

10862: ELSE
10863: -- DBMS_OUTPUT.put_line('Total ' || i);
10864: -- DBMS_OUTPUT.put_line('Success ' || success_count);
10865: -- DBMS_OUTPUT.put_line('Failed ' || failed_count);
10866: gme_common_pvt.log_message
10867: ( p_message_code => 'GME_GROUP_ASSOC_TOTAL'
10868: ,p_product_code => 'GME'
10869: ,p_token1_name => 'TOTAL_COUNT'
10870: ,p_token1_value => i

Line 10872: gme_common_pvt.log_message

10868: ,p_product_code => 'GME'
10869: ,p_token1_name => 'TOTAL_COUNT'
10870: ,p_token1_value => i
10871: );
10872: gme_common_pvt.log_message
10873: ( p_message_code => 'GME_GROUP_ASSOC_SUCCESS'
10874: ,p_product_code => 'GME'
10875: ,p_token1_name => 'SUCCESS_COUNT'
10876: ,p_token1_value => success_count

Line 10879: gme_common_pvt.log_message

10875: ,p_token1_name => 'SUCCESS_COUNT'
10876: ,p_token1_value => success_count
10877: );
10878:
10879: gme_common_pvt.log_message
10880: ( p_message_code => 'GME_GROUP_ASSOC_FAIL'
10881: ,p_product_code => 'GME'
10882: ,p_token1_name => 'FAILED_COUNT'
10883: ,p_token1_value => failed_count

Line 10890: gme_common_pvt.count_and_get (x_count => x_message_count

10886:
10887: EXCEPTION
10888:
10889: WHEN error_process_group THEN
10890: gme_common_pvt.count_and_get (x_count => x_message_count
10891: ,p_encoded => fnd_api.g_false
10892: ,x_data => x_message_list);
10893: WHEN fnd_api.g_exc_error THEN
10894: x_return_status := fnd_api.g_ret_sts_error;

Line 10895: gme_common_pvt.count_and_get (x_count => x_message_count

10891: ,p_encoded => fnd_api.g_false
10892: ,x_data => x_message_list);
10893: WHEN fnd_api.g_exc_error THEN
10894: x_return_status := fnd_api.g_ret_sts_error;
10895: gme_common_pvt.count_and_get (x_count => x_message_count
10896: ,p_encoded => fnd_api.g_false
10897: ,x_data => x_message_list);
10898: WHEN OTHERS THEN
10899: gme_when_others ( p_api_name => l_api_name