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 34: This api procedure is used for resetting gme_common_pvt.g_transaction_header_id.

30: /*================================================================================
31: Procedure
32: reset_txn_header_id
33: Description
34: This api procedure is used for resetting gme_common_pvt.g_transaction_header_id.
35:
36: Parameters
37:
38: History:

Line 49: gme_common_pvt.reset_txn_header_id;

45: IF g_debug <= gme_debug.g_log_procedure THEN
46: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
47: || l_api_name);
48: END IF;
49: gme_common_pvt.reset_txn_header_id;
50:
51: END reset_txn_header_id ;
52:
53: /*************************************************************************/

Line 94: gme_common_pvt.set_timestamp;

90: --
91: -- bug 13256866
92: -- Reiniitalizaing the timestamp before saving
93: --
94: gme_common_pvt.set_timestamp;
95:
96: FOR header_row IN header_cursor LOOP
97: -- Check that there is one and only one primary resource
98: IF gme_common_pvt.g_check_primary_rsrc = 1

Line 98: IF gme_common_pvt.g_check_primary_rsrc = 1

94: gme_common_pvt.set_timestamp;
95:
96: FOR header_row IN header_cursor LOOP
97: -- Check that there is one and only one primary resource
98: IF gme_common_pvt.g_check_primary_rsrc = 1
99: AND p_commit = fnd_api.g_true THEN
100: gme_resource_engine_pvt.check_primary_resource
101: (p_batch_id => header_row.batch_id
102: ,p_batchstep_id => NULL

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

104:
105: IF x_return_status <> fnd_api.g_ret_sts_success THEN
106: RAISE error_save_batch;
107: END IF;
108: END IF; -- IF gme_common_pvt.g_check_primary_rsrc = 1 THEN
109:
110: gme_resource_engine_pvt.consolidate_batch_resources
111: (header_row.batch_id
112: ,x_return_status);

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

122: END IF;
123:
124: END LOOP;
125:
126: l_header_id := NVL (p_header_id, gme_common_pvt.g_transaction_header_id);
127:
128:
129: IF (NVL (l_header_id, 0) <> 0) THEN
130: /* Bug 5255959 added p_clear_qty_cache parameter */

Line 167: gme_common_pvt.count_and_get (x_count => l_msg_count

163: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
164: END IF;
165: EXCEPTION
166: WHEN error_save_batch THEN
167: gme_common_pvt.count_and_get (x_count => l_msg_count
168: ,p_encoded => fnd_api.g_false
169: ,x_data => l_msg_data);
170: WHEN OTHERS THEN
171: gme_when_others ( p_api_name => l_api_name

Line 181: := gme_common_pvt.g_max_errors

177: /*************************************************************************/
178: PROCEDURE create_batch (
179: p_api_version IN NUMBER
180: ,p_validation_level IN NUMBER
181: := gme_common_pvt.g_max_errors
182: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
183: ,p_commit IN VARCHAR2 := fnd_api.g_false
184: ,x_message_count OUT NOCOPY NUMBER
185: ,x_message_list OUT NOCOPY VARCHAR2

Line 204: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

200: ,p_ignore_qty_below_cap IN VARCHAR2 := fnd_api.g_true
201: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
202: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
203: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
204: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
205: IS
206: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_BATCH';
207: l_batch_header gme_batch_header%ROWTYPE;
208: l_return_status VARCHAR2 (1);

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

274: RAISE fnd_api.g_exc_error;
275: END IF;
276:
277: IF (l_batch_header.batch_type NOT IN
278: (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo) ) THEN
279: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
280: RAISE fnd_api.g_exc_error;
281: END IF;
282:

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

275: END IF;
276:
277: IF (l_batch_header.batch_type NOT IN
278: (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo) ) THEN
279: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
280: RAISE fnd_api.g_exc_error;
281: END IF;
282:
283: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN

Line 284: gme_common_pvt.log_message ('GME_INVALID_FIELD'

280: RAISE fnd_api.g_exc_error;
281: END IF;
282:
283: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
284: gme_common_pvt.log_message ('GME_INVALID_FIELD'
285: ,'FIELD'
286: ,'p_contiguity_override');
287: RAISE fnd_api.g_exc_error;
288: ELSE

Line 293: gme_common_pvt.log_message ('GME_INVALID_FIELD'

289: l_contiguity_override := p_contiguity_override;
290: END IF;
291:
292: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
293: gme_common_pvt.log_message ('GME_INVALID_FIELD'
294: ,'FIELD'
295: ,'p_use_workday_cal');
296: RAISE fnd_api.g_exc_error;
297: END IF;

Line 300: gme_common_pvt.log_message ('GME_INVALID_FIELD'

296: RAISE fnd_api.g_exc_error;
297: END IF;
298:
299: IF (p_ignore_qty_below_cap NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
300: gme_common_pvt.log_message ('GME_INVALID_FIELD'
301: ,'FIELD'
302: ,'p_ignore_qty_below_cap');
303: RAISE fnd_api.g_exc_error;
304: END IF;

Line 307: gme_common_pvt.log_message ('GME_API_UNSUPPORTED_MODE'

303: RAISE fnd_api.g_exc_error;
304: END IF;
305:
306: IF (p_creation_mode NOT IN ('INPUT', 'OUTPUT', 'RECIPE', 'PRODUCT') ) THEN
307: gme_common_pvt.log_message ('GME_API_UNSUPPORTED_MODE'
308: ,'MODE'
309: ,p_creation_mode);
310: RAISE fnd_api.g_exc_error;
311: ELSIF (p_creation_mode IN ('INPUT', 'OUTPUT', 'PRODUCT') ) THEN

Line 313: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

309: ,p_creation_mode);
310: RAISE fnd_api.g_exc_error;
311: ELSIF (p_creation_mode IN ('INPUT', 'OUTPUT', 'PRODUCT') ) THEN
312: IF (p_batch_size IS NULL) THEN
313: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
314: ,'FIELD_NAME'
315: ,'p_batch_size');
316: RAISE fnd_api.g_exc_error;
317: ELSIF (p_batch_size < 0) THEN

Line 318: gme_common_pvt.log_message ('GME_INVALID_FIELD'

314: ,'FIELD_NAME'
315: ,'p_batch_size');
316: RAISE fnd_api.g_exc_error;
317: ELSIF (p_batch_size < 0) THEN
318: gme_common_pvt.log_message ('GME_INVALID_FIELD'
319: ,'FIELD'
320: ,'p_batch_size');
321: RAISE fnd_api.g_exc_error;
322: END IF;

Line 325: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

321: RAISE fnd_api.g_exc_error;
322: END IF;
323:
324: IF (p_batch_size_uom IS NULL) THEN
325: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
326: ,'FIELD_NAME'
327: ,'p_batch_size_uom');
328: RAISE fnd_api.g_exc_error;
329: ELSE

Line 331: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

327: ,'p_batch_size_uom');
328: RAISE fnd_api.g_exc_error;
329: ELSE
330: --added by qzeng no need to check if done in bulk validation
331: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
332: OPEN cur_validate_uom (p_batch_size_uom);
333:
334: FETCH cur_validate_uom
335: INTO l_exists;

Line 338: gme_common_pvt.log_message ('GME_INVALID_FIELD'

334: FETCH cur_validate_uom
335: INTO l_exists;
336:
337: IF (cur_validate_uom%NOTFOUND) THEN
338: gme_common_pvt.log_message ('GME_INVALID_FIELD'
339: ,'FIELD'
340: ,'p_batch_size_uom');
341: CLOSE cur_validate_uom;
342: RAISE fnd_api.g_exc_error;

Line 354: gme_common_pvt.g_error_count := 0;

350: IF g_debug <= gme_debug.g_log_statement THEN
351: gme_debug.put_line ('Finished parameter validation');
352: END IF;
353:
354: gme_common_pvt.g_error_count := 0;
355: gme_common_pvt.g_setup_done :=
356: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
357: ,p_org_code => p_org_code);
358:

Line 355: gme_common_pvt.g_setup_done :=

351: gme_debug.put_line ('Finished parameter validation');
352: END IF;
353:
354: gme_common_pvt.g_error_count := 0;
355: gme_common_pvt.g_setup_done :=
356: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
357: ,p_org_code => p_org_code);
358:
359: IF NOT gme_common_pvt.g_setup_done THEN

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

352: END IF;
353:
354: gme_common_pvt.g_error_count := 0;
355: gme_common_pvt.g_setup_done :=
356: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
357: ,p_org_code => p_org_code);
358:
359: IF NOT gme_common_pvt.g_setup_done THEN
360: RAISE fnd_api.g_exc_error;

Line 359: IF NOT gme_common_pvt.g_setup_done THEN

355: gme_common_pvt.g_setup_done :=
356: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
357: ,p_org_code => p_org_code);
358:
359: IF NOT gme_common_pvt.g_setup_done THEN
360: RAISE fnd_api.g_exc_error;
361: ELSE
362: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
363: END IF;

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

358:
359: IF NOT gme_common_pvt.g_setup_done THEN
360: RAISE fnd_api.g_exc_error;
361: ELSE
362: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
363: END IF;
364:
365: IF g_debug <= gme_debug.g_log_statement THEN
366: gme_debug.put_line ('Finished setup');

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

365: IF g_debug <= gme_debug.g_log_statement THEN
366: gme_debug.put_line ('Finished setup');
367: END IF;
368:
369: IF (gme_common_pvt.g_lab_ind = 0 AND l_batch_header.laboratory_ind = 1) THEN
370: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');
371: RAISE fnd_api.g_exc_error;
372: END IF;
373:

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

366: gme_debug.put_line ('Finished setup');
367: END IF;
368:
369: IF (gme_common_pvt.g_lab_ind = 0 AND l_batch_header.laboratory_ind = 1) THEN
370: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');
371: RAISE fnd_api.g_exc_error;
372: END IF;
373:
374: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN

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

370: gme_common_pvt.log_message ('GME_NOT_LAB_ORG');
371: RAISE fnd_api.g_exc_error;
372: END IF;
373:
374: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN
375: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');
376: RAISE fnd_api.g_exc_error;
377: END IF;
378:

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

371: RAISE fnd_api.g_exc_error;
372: END IF;
373:
374: IF (gme_common_pvt.g_plant_ind = 0 AND l_batch_header.batch_type = 10) THEN
375: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');
376: RAISE fnd_api.g_exc_error;
377: END IF;
378:
379: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN

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

375: gme_common_pvt.log_message ('GME_FPO_NO_CREATE');
376: RAISE fnd_api.g_exc_error;
377: END IF;
378:
379: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN
380: IF (l_batch_header.laboratory_ind = 1) THEN
381: l_object_type := 'L';
382: ELSE
383: IF (l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo) THEN

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

379: IF (gme_common_pvt.g_lab_ind = 1 AND gme_common_pvt.g_plant_ind = 1) THEN
380: IF (l_batch_header.laboratory_ind = 1) THEN
381: l_object_type := 'L';
382: ELSE
383: IF (l_batch_header.batch_type = gme_common_pvt.g_doc_type_fpo) THEN
384: l_object_type := fnd_api.g_false;
385: ELSE
386: l_object_type := 'P';
387: END IF;

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

385: ELSE
386: l_object_type := 'P';
387: END IF;
388: END IF;
389: ELSIF (gme_common_pvt.g_lab_ind = 1) THEN
390: l_object_type := 'L';
391: ELSIF (gme_common_pvt.g_plant_ind = 1) THEN
392: IF (l_batch_header.batch_type = 10) THEN
393: l_object_type := fnd_api.g_false;

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

387: END IF;
388: END IF;
389: ELSIF (gme_common_pvt.g_lab_ind = 1) THEN
390: l_object_type := 'L';
391: ELSIF (gme_common_pvt.g_plant_ind = 1) THEN
392: IF (l_batch_header.batch_type = 10) THEN
393: l_object_type := fnd_api.g_false;
394: ELSE
395: l_object_type := 'P';

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

399: IF g_debug <= gme_debug.g_log_statement THEN
400: gme_debug.put_line ('Finished lab_ind plant_ind setup');
401: END IF;
402:
403: IF NVL (gme_common_pvt.g_validate_plan_dates_ind, 0) = 1 THEN
404: l_cmplt_date := NULL;
405: ELSE
406: l_cmplt_date := p_batch_header_rec.plan_cmplt_date;
407: END IF;

Line 421: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

417: CLOSE get_item_id;
418: ELSIF p_product_id IS NOT NULL THEN
419: l_item_id := p_product_id;
420: ELSE
421: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
422: ,'FIELD_NAME'
423: ,'p_product_no or p_product_id');
424: RAISE fnd_api.g_exc_error;
425: END IF;

Line 491: IF NOT (gme_common_pvt.validate_validity_rule

487: ELSE
488: l_item_id := p_product_id;
489: END IF;
490:
491: IF NOT (gme_common_pvt.validate_validity_rule
492: (p_validity_rule_id => l_batch_header.recipe_validity_rule_id
493: ,p_organization_id => l_batch_header.organization_id
494: ,p_prim_product_id => l_item_id
495: ,p_qty => p_batch_size

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

509: IF p_use_workday_cal IS NOT NULL THEN
510: l_use := p_use_workday_cal;
511:
512: IF l_use = fnd_api.g_true THEN
513: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
514: IF (p_batch_header_rec.plan_start_date IS NOT NULL) THEN
515: IF NOT gmp_calendar_api.is_working_daytime
516: (1.0
517: ,FALSE

Line 518: ,gme_common_pvt.g_calendar_code

514: IF (p_batch_header_rec.plan_start_date IS NOT NULL) THEN
515: IF NOT gmp_calendar_api.is_working_daytime
516: (1.0
517: ,FALSE
518: ,gme_common_pvt.g_calendar_code
519: ,p_batch_header_rec.plan_start_date
520: ,0
521: ,l_return_status) THEN
522: gme_common_pvt.log_message

Line 522: gme_common_pvt.log_message

518: ,gme_common_pvt.g_calendar_code
519: ,p_batch_header_rec.plan_start_date
520: ,0
521: ,l_return_status) THEN
522: gme_common_pvt.log_message
523: ('GME_NON_WORKING_TIME'
524: ,'PDATE'
525: ,fnd_date.date_to_displaydt
526: (p_batch_header_rec.plan_start_date) );

Line 535: ,gme_common_pvt.g_calendar_code

531: IF (p_batch_header_rec.plan_cmplt_date IS NOT NULL) THEN
532: IF NOT gmp_calendar_api.is_working_daytime
533: (1.0
534: ,FALSE
535: ,gme_common_pvt.g_calendar_code
536: ,p_batch_header_rec.plan_cmplt_date
537: ,1
538: ,l_return_status) THEN
539: gme_common_pvt.log_message

Line 539: gme_common_pvt.log_message

535: ,gme_common_pvt.g_calendar_code
536: ,p_batch_header_rec.plan_cmplt_date
537: ,1
538: ,l_return_status) THEN
539: gme_common_pvt.log_message
540: ('GME_NON_WORKING_TIME'
541: ,'PDATE'
542: ,TO_CHAR (p_batch_header_rec.plan_cmplt_date
543: ,'DD-MON-YYYY HH24:MI:SS') );

Line 553: ,gme_common_pvt.g_calendar_code

549: AND p_batch_header_rec.plan_start_date IS NULL THEN
550: IF NOT gmp_calendar_api.is_working_daytime
551: (1.0
552: ,FALSE
553: ,gme_common_pvt.g_calendar_code
554: ,SYSDATE
555: ,0
556: ,l_return_status) THEN
557: gme_common_pvt.log_message

Line 557: gme_common_pvt.log_message

553: ,gme_common_pvt.g_calendar_code
554: ,SYSDATE
555: ,0
556: ,l_return_status) THEN
557: gme_common_pvt.log_message
558: ('GME_NON_WORKING_TIME'
559: ,'PDATE'
560: ,TO_CHAR (SYSDATE
561: ,'DD-MON-YYYY HH24:MI:SS') );

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

593: ,p_use_least_cost_validity_rule => p_use_least_cost_validity_rule
594: ,x_exception_material_tbl => x_exception_material_tbl);
595:
596: IF ( x_return_status <> fnd_api.g_ret_sts_success
597: AND x_return_status <> gme_common_pvt.g_inv_short_err) THEN
598: RAISE fnd_api.g_exc_error;
599: END IF;
600:
601: IF (p_commit = fnd_api.g_true) THEN

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

601: IF (p_commit = fnd_api.g_true) THEN
602: COMMIT;
603: END IF;
604:
605: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
606: gme_common_pvt.count_and_get (x_count => x_message_count
607: ,p_encoded => fnd_api.g_false
608: ,x_data => x_message_list);
609:

Line 606: gme_common_pvt.count_and_get (x_count => x_message_count

602: COMMIT;
603: END IF;
604:
605: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
606: gme_common_pvt.count_and_get (x_count => x_message_count
607: ,p_encoded => fnd_api.g_false
608: ,x_data => x_message_list);
609:
610: IF g_debug <= gme_debug.g_log_procedure THEN

Line 618: gme_common_pvt.count_and_get (x_count => x_message_count

614: EXCEPTION
615: WHEN fnd_api.g_exc_error THEN
616: x_batch_header_rec := NULL;
617: x_return_status := fnd_api.g_ret_sts_error;
618: gme_common_pvt.count_and_get (x_count => x_message_count
619: ,p_encoded => fnd_api.g_false
620: ,x_data => x_message_list);
621: WHEN OTHERS THEN
622: x_batch_header_rec := NULL;

Line 633: := gme_common_pvt.g_max_errors

629: /*************************************************************************/
630: PROCEDURE create_phantom (
631: p_api_version IN NUMBER
632: ,p_validation_level IN NUMBER
633: := gme_common_pvt.g_max_errors
634: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
635: ,p_commit IN VARCHAR2 := fnd_api.g_false
636: ,x_message_count OUT NOCOPY NUMBER
637: ,x_message_list OUT NOCOPY VARCHAR2

Line 648: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

644: ,p_validity_rule_id IN NUMBER
645: ,p_use_workday_cal IN VARCHAR2 := fnd_api.g_true
646: ,p_contiguity_override IN VARCHAR2 := fnd_api.g_true
647: ,p_use_least_cost_validity_rule IN VARCHAR2 := fnd_api.g_false
648: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
649: IS
650: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_PHANTOM';
651: phantom_creation_failure EXCEPTION;
652: l_batch_header gme_batch_header%ROWTYPE;

Line 671: gme_common_pvt.g_error_count := 0;

667: SAVEPOINT create_phantom;
668:
669: IF p_init_msg_list = fnd_api.g_true THEN
670: fnd_msg_pub.initialize;
671: gme_common_pvt.g_error_count := 0;
672: END IF;
673:
674: IF NOT fnd_api.compatible_api_call (2.0
675: ,p_api_version

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

674: IF NOT fnd_api.compatible_api_call (2.0
675: ,p_api_version
676: ,'create_phantom'
677: ,g_pkg_name) THEN
678: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
679: RAISE fnd_api.g_exc_error;
680: END IF;
681:
682: IF (p_material_detail_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

Line 689: gme_common_pvt.log_message ('GME_INVALID_FIELD'

685: RAISE fnd_api.g_exc_error;
686: END IF;
687:
688: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
689: gme_common_pvt.log_message ('GME_INVALID_FIELD'
690: ,'FIELD'
691: ,'p_contiguity_override');
692: RAISE fnd_api.g_exc_error;
693: END IF;

Line 696: gme_common_pvt.log_message ('GME_INVALID_FIELD'

692: RAISE fnd_api.g_exc_error;
693: END IF;
694:
695: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
696: gme_common_pvt.log_message ('GME_INVALID_FIELD'
697: ,'FIELD'
698: ,'p_use_workday_cal');
699: RAISE fnd_api.g_exc_error;
700: END IF;

Line 703: gme_common_pvt.g_setup_done :=

699: RAISE fnd_api.g_exc_error;
700: END IF;
701:
702: l_material_detail := p_material_detail_rec;
703: gme_common_pvt.g_setup_done :=
704: gme_common_pvt.setup (p_material_detail_rec.organization_id
705: ,p_org_code);
706:
707: IF NOT gme_common_pvt.g_setup_done THEN

Line 704: gme_common_pvt.setup (p_material_detail_rec.organization_id

700: END IF;
701:
702: l_material_detail := p_material_detail_rec;
703: gme_common_pvt.g_setup_done :=
704: gme_common_pvt.setup (p_material_detail_rec.organization_id
705: ,p_org_code);
706:
707: IF NOT gme_common_pvt.g_setup_done THEN
708: RAISE fnd_api.g_exc_error;

Line 707: IF NOT gme_common_pvt.g_setup_done THEN

703: gme_common_pvt.g_setup_done :=
704: gme_common_pvt.setup (p_material_detail_rec.organization_id
705: ,p_org_code);
706:
707: IF NOT gme_common_pvt.g_setup_done THEN
708: RAISE fnd_api.g_exc_error;
709: ELSE
710: l_material_detail.organization_id :=
711: gme_common_pvt.g_organization_id;

Line 711: gme_common_pvt.g_organization_id;

707: IF NOT gme_common_pvt.g_setup_done THEN
708: RAISE fnd_api.g_exc_error;
709: ELSE
710: l_material_detail.organization_id :=
711: gme_common_pvt.g_organization_id;
712: END IF;
713:
714: gme_api_main.create_phantom
715: (p_validation_level => p_validation_level

Line 746: gme_common_pvt.count_and_get (x_count => x_message_count

742: EXCEPTION
743: WHEN phantom_creation_failure THEN
744: ROLLBACK TO SAVEPOINT create_phantom;
745: x_material_detail_rec := NULL;
746: gme_common_pvt.count_and_get (x_count => x_message_count
747: ,p_encoded => fnd_api.g_false
748: ,x_data => x_message_list);
749: WHEN fnd_api.g_exc_error THEN
750: ROLLBACK TO SAVEPOINT create_phantom;

Line 753: gme_common_pvt.count_and_get (x_count => x_message_count

749: WHEN fnd_api.g_exc_error THEN
750: ROLLBACK TO SAVEPOINT create_phantom;
751: x_material_detail_rec := NULL;
752: x_return_status := fnd_api.g_ret_sts_error;
753: gme_common_pvt.count_and_get (x_count => x_message_count
754: ,p_encoded => fnd_api.g_false
755: ,x_data => x_message_list);
756: WHEN OTHERS THEN
757: ROLLBACK TO SAVEPOINT create_phantom;

Line 780: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab

776: ,p_qty_type IN NUMBER
777: ,p_recalc_dates IN VARCHAR2
778: ,p_use_workday_cal IN VARCHAR2
779: ,p_contiguity_override IN VARCHAR2
780: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab
781: ,x_message_count OUT NOCOPY NUMBER
782: ,x_message_list OUT NOCOPY VARCHAR2
783: ,x_return_status OUT NOCOPY VARCHAR2
784: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE)

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

813: IF NOT fnd_api.compatible_api_call (2.0
814: ,p_api_version
815: ,'scale_batch'
816: ,g_pkg_name) THEN
817: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
818: RAISE fnd_api.g_exc_error;
819: END IF;
820: gme_common_pvt.validate_batch
821: (p_batch_header_rec => p_batch_header_rec

Line 820: gme_common_pvt.validate_batch

816: ,g_pkg_name) THEN
817: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
818: RAISE fnd_api.g_exc_error;
819: END IF;
820: gme_common_pvt.validate_batch
821: (p_batch_header_rec => p_batch_header_rec
822: ,p_org_code => p_org_code
823: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
824: ,x_batch_header_rec => l_batch_header_rec

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

819: END IF;
820: gme_common_pvt.validate_batch
821: (p_batch_header_rec => p_batch_header_rec
822: ,p_org_code => p_org_code
823: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
824: ,x_batch_header_rec => l_batch_header_rec
825: ,x_message_count => x_message_count
826: ,x_message_list => x_message_list
827: ,x_return_status => x_return_status );

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

835: END IF;
836:
837: /* Check for p_qty_type */
838: IF (p_qty_type NOT IN (0, 1) ) THEN
839: gme_common_pvt.log_message ('GME_INVALID_QUANTITY_TYPE');
840: RAISE fnd_api.g_exc_error;
841: END IF;
842:
843: /* Check for p_recalc_dates */

Line 845: gme_common_pvt.log_message ('GME_INVALID_FIELD'

841: END IF;
842:
843: /* Check for p_recalc_dates */
844: IF (p_recalc_dates NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
845: gme_common_pvt.log_message ('GME_INVALID_FIELD'
846: ,'FIELD'
847: ,'p_recalc_dates');
848: RAISE fnd_api.g_exc_error;
849: END IF;

Line 853: gme_common_pvt.log_message ('GME_INVALID_FIELD'

849: END IF;
850:
851: /* Check for p_use_workday_cal */
852: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
853: gme_common_pvt.log_message ('GME_INVALID_FIELD'
854: ,'FIELD'
855: ,'p_use_workday_cal');
856: RAISE fnd_api.g_exc_error;
857: END IF;

Line 861: gme_common_pvt.log_message ('GME_INVALID_FIELD'

857: END IF;
858:
859: /* Check for p_contiguity_override */
860: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
861: gme_common_pvt.log_message ('GME_INVALID_FIELD'
862: ,'FIELD'
863: ,'p_contiguity_override');
864: RAISE fnd_api.g_exc_error;
865: END IF;

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

900: RAISE scale_batch_failed;
901: END IF;
902: --Bug#5459105 End
903:
904: gme_common_pvt.log_message ('GME_SCALE_SUCCESS');
905: gme_common_pvt.count_and_get (x_count => x_message_count
906: ,p_encoded => fnd_api.g_false
907: ,x_data => x_message_list);
908:

Line 905: gme_common_pvt.count_and_get (x_count => x_message_count

901: END IF;
902: --Bug#5459105 End
903:
904: gme_common_pvt.log_message ('GME_SCALE_SUCCESS');
905: gme_common_pvt.count_and_get (x_count => x_message_count
906: ,p_encoded => fnd_api.g_false
907: ,x_data => x_message_list);
908:
909: IF g_debug <= gme_debug.g_log_procedure THEN

Line 917: gme_common_pvt.count_and_get (x_count => x_message_count

913: EXCEPTION
914: WHEN scale_batch_failed THEN
915: ROLLBACK TO SAVEPOINT scale_batch;
916: x_batch_header_rec := NULL;
917: gme_common_pvt.count_and_get (x_count => x_message_count
918: ,p_encoded => fnd_api.g_false
919: ,x_data => x_message_list);
920: WHEN fnd_api.g_exc_error THEN
921: ROLLBACK TO SAVEPOINT scale_batch;

Line 924: gme_common_pvt.count_and_get (x_count => x_message_count

920: WHEN fnd_api.g_exc_error THEN
921: ROLLBACK TO SAVEPOINT scale_batch;
922: x_batch_header_rec := NULL;
923: x_return_status := fnd_api.g_ret_sts_error;
924: gme_common_pvt.count_and_get (x_count => x_message_count
925: ,p_encoded => fnd_api.g_false
926: ,x_data => x_message_list);
927: WHEN OTHERS THEN
928: ROLLBACK TO SAVEPOINT scale_batch;

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

976: IF NOT fnd_api.compatible_api_call (2.0
977: ,p_api_version
978: ,'theoretical_yield_batch'
979: ,g_pkg_name) THEN
980: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
981: RAISE fnd_api.g_exc_error;
982: END IF;
983: gme_common_pvt.validate_batch
984: (p_batch_header_rec => p_batch_header_rec

Line 983: gme_common_pvt.validate_batch

979: ,g_pkg_name) THEN
980: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
981: RAISE fnd_api.g_exc_error;
982: END IF;
983: gme_common_pvt.validate_batch
984: (p_batch_header_rec => p_batch_header_rec
985: ,p_org_code => p_org_code
986: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
987: ,x_batch_header_rec => l_batch_header_rec

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

982: END IF;
983: gme_common_pvt.validate_batch
984: (p_batch_header_rec => p_batch_header_rec
985: ,p_org_code => p_org_code
986: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
987: ,x_batch_header_rec => l_batch_header_rec
988: ,x_message_count => x_message_count
989: ,x_message_list => x_message_list
990: ,x_return_status => x_return_status );

Line 1035: gme_common_pvt.count_and_get (x_count => x_message_count

1031: EXCEPTION
1032: WHEN fnd_api.g_exc_error THEN
1033: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
1034: x_return_status := fnd_api.g_ret_sts_error;
1035: gme_common_pvt.count_and_get (x_count => x_message_count
1036: ,p_encoded => fnd_api.g_false
1037: ,x_data => x_message_list);
1038: WHEN theoretical_yield_failed THEN
1039: ROLLBACK TO SAVEPOINT theoretical_yield_batch;

Line 1040: gme_common_pvt.count_and_get (x_count => x_message_count

1036: ,p_encoded => fnd_api.g_false
1037: ,x_data => x_message_list);
1038: WHEN theoretical_yield_failed THEN
1039: ROLLBACK TO SAVEPOINT theoretical_yield_batch;
1040: gme_common_pvt.count_and_get (x_count => x_message_count
1041: ,p_encoded => fnd_api.g_false
1042: ,x_data => x_message_list);
1043: WHEN OTHERS THEN
1044: ROLLBACK TO SAVEPOINT theoretical_yield_batch;

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

1057: # 10-MAR-2005 Punit Kumar Convergence changes
1058: #########################################################################*/
1059: PROCEDURE update_actual_rsrc_usage (
1060: p_api_version IN NUMBER := 2.0
1061: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1062: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1063: ,p_commit IN VARCHAR2 := fnd_api.g_false
1064: ,p_org_code IN VARCHAR2
1065: ,p_batch_no IN VARCHAR2 := NULL

Line 1109: gme_common_pvt.g_error_count := 0;

1105: x_return_status := fnd_api.g_ret_sts_success;
1106: /* Initialize message list and count if needed */
1107: IF p_init_msg_list = fnd_api.g_true THEN
1108: fnd_msg_pub.initialize;
1109: gme_common_pvt.g_error_count := 0;
1110: END IF;
1111:
1112: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1113: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

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

1110: END IF;
1111:
1112: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1113: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1114: gme_common_pvt.log_message(p_product_code => 'INV'
1115: ,p_message_code => 'INV_ORG_REQUIRED');
1116: RAISE fnd_api.g_exc_error;
1117: END IF;
1118: /* Setup the common constants used accross the apis */

Line 1119: gme_common_pvt.g_setup_done :=

1115: ,p_message_code => 'INV_ORG_REQUIRED');
1116: RAISE fnd_api.g_exc_error;
1117: END IF;
1118: /* Setup the common constants used accross the apis */
1119: gme_common_pvt.g_setup_done :=
1120: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1121: ,p_org_code => p_org_code);
1122:
1123: IF NOT gme_common_pvt.g_setup_done THEN

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

1116: RAISE fnd_api.g_exc_error;
1117: END IF;
1118: /* Setup the common constants used accross the apis */
1119: gme_common_pvt.g_setup_done :=
1120: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1121: ,p_org_code => p_org_code);
1122:
1123: IF NOT gme_common_pvt.g_setup_done THEN
1124: RAISE fnd_api.g_exc_error;

Line 1123: IF NOT gme_common_pvt.g_setup_done THEN

1119: gme_common_pvt.g_setup_done :=
1120: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1121: ,p_org_code => p_org_code);
1122:
1123: IF NOT gme_common_pvt.g_setup_done THEN
1124: RAISE fnd_api.g_exc_error;
1125: ELSE
1126: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1127: END IF;

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

1122:
1123: IF NOT gme_common_pvt.g_setup_done THEN
1124: RAISE fnd_api.g_exc_error;
1125: ELSE
1126: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1127: END IF;
1128:
1129: /* Make sure we are call compatible */
1130: IF NOT fnd_api.compatible_api_call (2.0

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

1130: IF NOT fnd_api.compatible_api_call (2.0
1131: ,p_api_version
1132: ,'update_actual_resource_usage'
1133: ,g_pkg_name) THEN
1134: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1135: RAISE fnd_api.g_exc_error;
1136: END IF;
1137:
1138: IF p_validate_flexfields = 'T' THEN

Line 1139: gme_common_pvt.g_flex_validate_prof := 1;

1135: RAISE fnd_api.g_exc_error;
1136: END IF;
1137:
1138: IF p_validate_flexfields = 'T' THEN
1139: gme_common_pvt.g_flex_validate_prof := 1;
1140: ELSE
1141: gme_common_pvt.g_flex_validate_prof := 0;
1142: END IF;
1143: gme_common_pvt.set_timestamp;

Line 1141: gme_common_pvt.g_flex_validate_prof := 0;

1137:
1138: IF p_validate_flexfields = 'T' THEN
1139: gme_common_pvt.g_flex_validate_prof := 1;
1140: ELSE
1141: gme_common_pvt.g_flex_validate_prof := 0;
1142: END IF;
1143: gme_common_pvt.set_timestamp;
1144:
1145: IF g_debug <= gme_debug.g_log_procedure THEN

Line 1143: gme_common_pvt.set_timestamp;

1139: gme_common_pvt.g_flex_validate_prof := 1;
1140: ELSE
1141: gme_common_pvt.g_flex_validate_prof := 0;
1142: END IF;
1143: gme_common_pvt.set_timestamp;
1144:
1145: IF g_debug <= gme_debug.g_log_procedure THEN
1146: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1147: ||'BEFORE CALLING gme_resource_engine_pvt.update_actual_resource_usagep ' );

Line 1162: gme_common_pvt.g_flex_validate_prof := 0;

1158: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1159: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1160: ,x_return_status => x_return_status);
1161:
1162: gme_common_pvt.g_flex_validate_prof := 0;
1163:
1164: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1165:
1166: IF x_return_status = fnd_api.g_ret_sts_success THEN

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

1205: gme_debug.put_line ( 'Actual rsrc usage at '
1206: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1207: END IF;
1208:
1209: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1210: gme_common_pvt.count_and_get (x_count => x_message_count
1211: ,p_encoded => fnd_api.g_false
1212: ,x_data => x_message_list);
1213: EXCEPTION

Line 1210: gme_common_pvt.count_and_get (x_count => x_message_count

1206: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1207: END IF;
1208:
1209: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1210: gme_common_pvt.count_and_get (x_count => x_message_count
1211: ,p_encoded => fnd_api.g_false
1212: ,x_data => x_message_list);
1213: EXCEPTION
1214: WHEN fnd_api.g_exc_error THEN

Line 1217: gme_common_pvt.count_and_get (x_count => x_message_count

1213: EXCEPTION
1214: WHEN fnd_api.g_exc_error THEN
1215: x_return_status := fnd_api.g_ret_sts_error;
1216: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1217: gme_common_pvt.count_and_get (x_count => x_message_count
1218: ,p_encoded => fnd_api.g_false
1219: ,x_data => x_message_list);
1220: WHEN update_rsrc_usage THEN
1221: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;

Line 1222: gme_common_pvt.count_and_get (x_count => x_message_count

1218: ,p_encoded => fnd_api.g_false
1219: ,x_data => x_message_list);
1220: WHEN update_rsrc_usage THEN
1221: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;
1222: gme_common_pvt.count_and_get (x_count => x_message_count
1223: ,p_encoded => fnd_api.g_false
1224: ,x_data => x_message_list);
1225: WHEN OTHERS THEN
1226: ROLLBACK TO SAVEPOINT update_actual_rsrc_usage;

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

1239: # Convergence changes
1240: #########################################################################*/
1241: PROCEDURE insert_incr_actual_rsrc_txn (
1242: p_api_version IN NUMBER := 2.0
1243: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1244: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1245: ,p_commit IN VARCHAR2 := fnd_api.g_false
1246: ,p_org_code IN VARCHAR2
1247: ,p_batch_no IN VARCHAR2 := NULL

Line 1275: gme_common_pvt.g_error_count := 0;

1271: x_return_status := fnd_api.g_ret_sts_success;
1272: /* Initialize message list and count if needed */
1273: IF p_init_msg_list = fnd_api.g_true THEN
1274: fnd_msg_pub.initialize;
1275: gme_common_pvt.g_error_count := 0;
1276: END IF;
1277:
1278: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1279: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN

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

1276: END IF;
1277:
1278: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1279: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1280: gme_common_pvt.log_message(p_product_code => 'INV'
1281: ,p_message_code => 'INV_ORG_REQUIRED');
1282: RAISE fnd_api.g_exc_error;
1283: END IF;
1284: gme_common_pvt.g_setup_done :=

Line 1284: gme_common_pvt.g_setup_done :=

1280: gme_common_pvt.log_message(p_product_code => 'INV'
1281: ,p_message_code => 'INV_ORG_REQUIRED');
1282: RAISE fnd_api.g_exc_error;
1283: END IF;
1284: gme_common_pvt.g_setup_done :=
1285: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1286: ,p_org_code => p_org_code);
1287:
1288: IF NOT gme_common_pvt.g_setup_done THEN

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

1281: ,p_message_code => 'INV_ORG_REQUIRED');
1282: RAISE fnd_api.g_exc_error;
1283: END IF;
1284: gme_common_pvt.g_setup_done :=
1285: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1286: ,p_org_code => p_org_code);
1287:
1288: IF NOT gme_common_pvt.g_setup_done THEN
1289: RAISE fnd_api.g_exc_error;

Line 1288: IF NOT gme_common_pvt.g_setup_done THEN

1284: gme_common_pvt.g_setup_done :=
1285: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1286: ,p_org_code => p_org_code);
1287:
1288: IF NOT gme_common_pvt.g_setup_done THEN
1289: RAISE fnd_api.g_exc_error;
1290: ELSE
1291: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1292: END IF;

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

1287:
1288: IF NOT gme_common_pvt.g_setup_done THEN
1289: RAISE fnd_api.g_exc_error;
1290: ELSE
1291: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1292: END IF;
1293:
1294: /* Make sure we are call compatible */
1295: IF NOT fnd_api.compatible_api_call (2.0

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

1295: IF NOT fnd_api.compatible_api_call (2.0
1296: ,p_api_version
1297: ,'insert_incr_actual_rsrc_txn'
1298: ,g_pkg_name) THEN
1299: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1300: RAISE fnd_api.g_exc_error;
1301: END IF;
1302:
1303: /*Validate if org_code or organization_id is passed, or give error.*/

Line 1305: gme_common_pvt.g_flex_validate_prof := 1;

1301: END IF;
1302:
1303: /*Validate if org_code or organization_id is passed, or give error.*/
1304: IF p_validate_flexfields = 'T' THEN
1305: gme_common_pvt.g_flex_validate_prof := 1;
1306: ELSE
1307: gme_common_pvt.g_flex_validate_prof := 0;
1308: END IF;
1309: gme_common_pvt.set_timestamp;

Line 1307: gme_common_pvt.g_flex_validate_prof := 0;

1303: /*Validate if org_code or organization_id is passed, or give error.*/
1304: IF p_validate_flexfields = 'T' THEN
1305: gme_common_pvt.g_flex_validate_prof := 1;
1306: ELSE
1307: gme_common_pvt.g_flex_validate_prof := 0;
1308: END IF;
1309: gme_common_pvt.set_timestamp;
1310: IF g_debug <= gme_debug.g_log_procedure THEN
1311: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1309: gme_common_pvt.set_timestamp;

1305: gme_common_pvt.g_flex_validate_prof := 1;
1306: ELSE
1307: gme_common_pvt.g_flex_validate_prof := 0;
1308: END IF;
1309: gme_common_pvt.set_timestamp;
1310: IF g_debug <= gme_debug.g_log_procedure THEN
1311: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
1312: ||'BEFORE CALLING gme_resource_engine_pvt.insert_incr_actual_rsrc_txnp ' );
1313: END IF;

Line 1326: gme_common_pvt.g_flex_validate_prof := 0;

1322: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1323: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1324: ,x_return_status => x_return_status);
1325: --Reset flex global
1326: gme_common_pvt.g_flex_validate_prof := 0;
1327: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1328:
1329: IF x_return_status = fnd_api.g_ret_sts_success THEN
1330: IF p_commit = fnd_api.g_true THEN

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

1347: gme_debug.put_line ( 'Insert Incr Actual rsrc usage at '
1348: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1349: END IF;
1350:
1351: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1352: gme_common_pvt.count_and_get (x_count => x_message_count
1353: ,p_encoded => fnd_api.g_false
1354: ,x_data => x_message_list);
1355: EXCEPTION

Line 1352: gme_common_pvt.count_and_get (x_count => x_message_count

1348: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1349: END IF;
1350:
1351: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1352: gme_common_pvt.count_and_get (x_count => x_message_count
1353: ,p_encoded => fnd_api.g_false
1354: ,x_data => x_message_list);
1355: EXCEPTION
1356: WHEN fnd_api.g_exc_error THEN

Line 1359: gme_common_pvt.count_and_get (x_count => x_message_count

1355: EXCEPTION
1356: WHEN fnd_api.g_exc_error THEN
1357: x_return_status := fnd_api.g_ret_sts_error;
1358: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;
1359: gme_common_pvt.count_and_get (x_count => x_message_count
1360: ,p_encoded => fnd_api.g_false
1361: ,x_data => x_message_list);
1362: WHEN OTHERS THEN
1363: ROLLBACK TO SAVEPOINT insert_incr_actual_rsrc_txn;

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

1378: # Convergence changes
1379: #########################################################################*/
1380: PROCEDURE insert_timed_actual_rsrc_txn (
1381: p_api_version IN NUMBER := 2.0
1382: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1383: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1384: ,p_commit IN VARCHAR2 := fnd_api.g_false
1385: ,p_org_code IN VARCHAR2
1386: ,p_batch_no IN VARCHAR2 := NULL

Line 1415: gme_common_pvt.g_error_count := 0;

1411:
1412: /* Initialize message list and count if needed */
1413: IF p_init_msg_list = fnd_api.g_true THEN
1414: fnd_msg_pub.initialize;
1415: gme_common_pvt.g_error_count := 0;
1416: END IF;
1417: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1418: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1419: gme_common_pvt.log_message(p_product_code => 'INV'

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

1415: gme_common_pvt.g_error_count := 0;
1416: END IF;
1417: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1418: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1419: gme_common_pvt.log_message(p_product_code => 'INV'
1420: ,p_message_code => 'INV_ORG_REQUIRED');
1421: RAISE fnd_api.g_exc_error;
1422: END IF;
1423:

Line 1424: gme_common_pvt.g_setup_done :=

1420: ,p_message_code => 'INV_ORG_REQUIRED');
1421: RAISE fnd_api.g_exc_error;
1422: END IF;
1423:
1424: gme_common_pvt.g_setup_done :=
1425: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1426: ,p_org_code => p_org_code);
1427:
1428: IF NOT gme_common_pvt.g_setup_done THEN

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

1421: RAISE fnd_api.g_exc_error;
1422: END IF;
1423:
1424: gme_common_pvt.g_setup_done :=
1425: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1426: ,p_org_code => p_org_code);
1427:
1428: IF NOT gme_common_pvt.g_setup_done THEN
1429: RAISE fnd_api.g_exc_error;

Line 1428: IF NOT gme_common_pvt.g_setup_done THEN

1424: gme_common_pvt.g_setup_done :=
1425: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1426: ,p_org_code => p_org_code);
1427:
1428: IF NOT gme_common_pvt.g_setup_done THEN
1429: RAISE fnd_api.g_exc_error;
1430: ELSE
1431: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1432: END IF;

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

1427:
1428: IF NOT gme_common_pvt.g_setup_done THEN
1429: RAISE fnd_api.g_exc_error;
1430: ELSE
1431: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1432: END IF;
1433:
1434: /* Make sure we are call compatible */
1435: IF NOT fnd_api.compatible_api_call (2.0

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

1435: IF NOT fnd_api.compatible_api_call (2.0
1436: ,p_api_version
1437: ,'insert_timed_actual_rsrc_txn'
1438: ,g_pkg_name) THEN
1439: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1440: RAISE fnd_api.g_exc_error;
1441: END IF;
1442:
1443: gme_common_pvt.set_timestamp;

Line 1443: gme_common_pvt.set_timestamp;

1439: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1440: RAISE fnd_api.g_exc_error;
1441: END IF;
1442:
1443: gme_common_pvt.set_timestamp;
1444:
1445: IF p_validate_flexfields = 'T' THEN
1446: gme_common_pvt.g_flex_validate_prof := 1;
1447: ELSE

Line 1446: gme_common_pvt.g_flex_validate_prof := 1;

1442:
1443: gme_common_pvt.set_timestamp;
1444:
1445: IF p_validate_flexfields = 'T' THEN
1446: gme_common_pvt.g_flex_validate_prof := 1;
1447: ELSE
1448: gme_common_pvt.g_flex_validate_prof := 0;
1449: END IF;
1450:

Line 1448: gme_common_pvt.g_flex_validate_prof := 0;

1444:
1445: IF p_validate_flexfields = 'T' THEN
1446: gme_common_pvt.g_flex_validate_prof := 1;
1447: ELSE
1448: gme_common_pvt.g_flex_validate_prof := 0;
1449: END IF;
1450:
1451: IF g_debug <= gme_debug.g_log_procedure THEN
1452: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1468: gme_common_pvt.g_flex_validate_prof := 0;

1464: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1465: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1466: ,x_return_status => x_return_status);
1467: --Reset flex global
1468: gme_common_pvt.g_flex_validate_prof := 0;
1469: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1470:
1471: IF x_return_status = fnd_api.g_ret_sts_success THEN
1472: IF p_commit = fnd_api.g_true THEN

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

1489: gme_debug.put_line ( 'Insert timed Actual rsrc usage at '
1490: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1491: END IF;
1492:
1493: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1494: gme_common_pvt.count_and_get (x_count => x_message_count
1495: ,p_encoded => fnd_api.g_false
1496: ,x_data => x_message_list);
1497: EXCEPTION

Line 1494: gme_common_pvt.count_and_get (x_count => x_message_count

1490: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1491: END IF;
1492:
1493: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1494: gme_common_pvt.count_and_get (x_count => x_message_count
1495: ,p_encoded => fnd_api.g_false
1496: ,x_data => x_message_list);
1497: EXCEPTION
1498: WHEN fnd_api.g_exc_error THEN

Line 1501: gme_common_pvt.count_and_get (x_count => x_message_count

1497: EXCEPTION
1498: WHEN fnd_api.g_exc_error THEN
1499: x_return_status := fnd_api.g_ret_sts_error;
1500: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;
1501: gme_common_pvt.count_and_get (x_count => x_message_count
1502: ,p_encoded => fnd_api.g_false
1503: ,x_data => x_message_list);
1504: WHEN OTHERS THEN
1505: ROLLBACK TO SAVEPOINT insert_timed_actual_rsrc_txn;

Line 1530: := gme_common_pvt.g_max_errors

1526: #########################################################################*/
1527: PROCEDURE start_cmplt_actual_rsrc_txn (
1528: p_api_version IN NUMBER := 2.0
1529: ,p_validation_level IN NUMBER
1530: := gme_common_pvt.g_max_errors
1531: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1532: ,p_commit IN VARCHAR2 := fnd_api.g_false
1533: ,p_org_code IN VARCHAR2
1534: ,p_batch_no IN VARCHAR2 := NULL

Line 1563: gme_common_pvt.g_error_count := 0;

1559:
1560: /* Initialize message list and count if needed */
1561: IF p_init_msg_list = fnd_api.g_true THEN
1562: fnd_msg_pub.initialize;
1563: gme_common_pvt.g_error_count := 0;
1564: END IF;
1565: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1566: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1567: gme_common_pvt.log_message(p_product_code => 'INV'

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

1563: gme_common_pvt.g_error_count := 0;
1564: END IF;
1565: l_rsrc_txn_rec := p_rsrc_txn_rec ;
1566: IF (l_rsrc_txn_rec.organization_id IS NULL AND p_org_code IS NULL) THEN
1567: gme_common_pvt.log_message(p_product_code => 'INV'
1568: ,p_message_code => 'INV_ORG_REQUIRED');
1569: RAISE fnd_api.g_exc_error;
1570: END IF;
1571: gme_common_pvt.g_setup_done :=

Line 1571: gme_common_pvt.g_setup_done :=

1567: gme_common_pvt.log_message(p_product_code => 'INV'
1568: ,p_message_code => 'INV_ORG_REQUIRED');
1569: RAISE fnd_api.g_exc_error;
1570: END IF;
1571: gme_common_pvt.g_setup_done :=
1572: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1573: ,p_org_code => p_org_code);
1574: IF NOT gme_common_pvt.g_setup_done THEN
1575: RAISE fnd_api.g_exc_error;

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

1568: ,p_message_code => 'INV_ORG_REQUIRED');
1569: RAISE fnd_api.g_exc_error;
1570: END IF;
1571: gme_common_pvt.g_setup_done :=
1572: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1573: ,p_org_code => p_org_code);
1574: IF NOT gme_common_pvt.g_setup_done THEN
1575: RAISE fnd_api.g_exc_error;
1576: ELSE

Line 1574: IF NOT gme_common_pvt.g_setup_done THEN

1570: END IF;
1571: gme_common_pvt.g_setup_done :=
1572: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1573: ,p_org_code => p_org_code);
1574: IF NOT gme_common_pvt.g_setup_done THEN
1575: RAISE fnd_api.g_exc_error;
1576: ELSE
1577: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1578: END IF;

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

1573: ,p_org_code => p_org_code);
1574: IF NOT gme_common_pvt.g_setup_done THEN
1575: RAISE fnd_api.g_exc_error;
1576: ELSE
1577: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1578: END IF;
1579:
1580: /* Make sure we are call compatible */
1581: IF NOT fnd_api.compatible_api_call (2.0,p_api_version,

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

1579:
1580: /* Make sure we are call compatible */
1581: IF NOT fnd_api.compatible_api_call (2.0,p_api_version,
1582: 'start_cmplt_actual_rsrc_txn',g_pkg_name) THEN
1583: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1584: RAISE fnd_api.g_exc_error;
1585: END IF;
1586: gme_common_pvt.set_timestamp;
1587: IF p_validate_flexfields = 'T' THEN

Line 1586: gme_common_pvt.set_timestamp;

1582: 'start_cmplt_actual_rsrc_txn',g_pkg_name) THEN
1583: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1584: RAISE fnd_api.g_exc_error;
1585: END IF;
1586: gme_common_pvt.set_timestamp;
1587: IF p_validate_flexfields = 'T' THEN
1588: gme_common_pvt.g_flex_validate_prof := 1;
1589: ELSE
1590: gme_common_pvt.g_flex_validate_prof := 0;

Line 1588: gme_common_pvt.g_flex_validate_prof := 1;

1584: RAISE fnd_api.g_exc_error;
1585: END IF;
1586: gme_common_pvt.set_timestamp;
1587: IF p_validate_flexfields = 'T' THEN
1588: gme_common_pvt.g_flex_validate_prof := 1;
1589: ELSE
1590: gme_common_pvt.g_flex_validate_prof := 0;
1591: END IF;
1592:

Line 1590: gme_common_pvt.g_flex_validate_prof := 0;

1586: gme_common_pvt.set_timestamp;
1587: IF p_validate_flexfields = 'T' THEN
1588: gme_common_pvt.g_flex_validate_prof := 1;
1589: ELSE
1590: gme_common_pvt.g_flex_validate_prof := 0;
1591: END IF;
1592:
1593: IF g_debug <= gme_debug.g_log_procedure THEN
1594: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1610: gme_common_pvt.g_flex_validate_prof := 0;

1606: ,p_rsrc_txn_rec => l_rsrc_txn_rec
1607: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1608: ,x_return_status => x_return_status);
1609: -----Reset flex global
1610: gme_common_pvt.g_flex_validate_prof := 0;
1611: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1612:
1613: /*end */
1614: IF x_return_status = fnd_api.g_ret_sts_success THEN

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

1632: gme_debug.put_line ( 'start Actual rsrc txn at '
1633: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1634: END IF;
1635:
1636: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1637: gme_common_pvt.count_and_get (x_count => x_message_count
1638: ,p_encoded => fnd_api.g_false
1639: ,x_data => x_message_list);
1640: EXCEPTION

Line 1637: gme_common_pvt.count_and_get (x_count => x_message_count

1633: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1634: END IF;
1635:
1636: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1637: gme_common_pvt.count_and_get (x_count => x_message_count
1638: ,p_encoded => fnd_api.g_false
1639: ,x_data => x_message_list);
1640: EXCEPTION
1641: WHEN fnd_api.g_exc_error THEN

Line 1644: gme_common_pvt.count_and_get (x_count => x_message_count

1640: EXCEPTION
1641: WHEN fnd_api.g_exc_error THEN
1642: x_return_status := fnd_api.g_ret_sts_error;
1643: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;
1644: gme_common_pvt.count_and_get (x_count => x_message_count
1645: ,p_encoded => fnd_api.g_false
1646: ,x_data => x_message_list);
1647: WHEN OTHERS THEN
1648: ROLLBACK TO SAVEPOINT start_cmplt_actual_rsrc_txn;

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

1664: # Convergence changes
1665: #########################################################################*/
1666: PROCEDURE end_cmplt_actual_rsrc_txn (
1667: p_api_version IN NUMBER := 2.0
1668: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
1669: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1670: ,p_commit IN VARCHAR2 := fnd_api.g_false
1671: ,p_instance_no IN NUMBER := NULL
1672: ,p_reason_name IN VARCHAR2 := NULL

Line 1694: gme_common_pvt.g_error_count := 0;

1690:
1691: /* Initialize message list and count if needed */
1692: IF p_init_msg_list = fnd_api.g_true THEN
1693: fnd_msg_pub.initialize;
1694: gme_common_pvt.g_error_count := 0;
1695: END IF;
1696: /* Set the return status to success initially */
1697: x_return_status := fnd_api.g_ret_sts_success;
1698: l_rsrc_txn_rec := p_rsrc_txn_rec;

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

1696: /* Set the return status to success initially */
1697: x_return_status := fnd_api.g_ret_sts_success;
1698: l_rsrc_txn_rec := p_rsrc_txn_rec;
1699: IF (l_rsrc_txn_rec.organization_id IS NULL ) THEN
1700: gme_common_pvt.log_message(p_product_code => 'INV'
1701: ,p_message_code => 'INV_ORG_REQUIRED');
1702: RAISE fnd_api.g_exc_error;
1703: END IF;
1704: /* Setup the common constants used accross the apis */

Line 1705: gme_common_pvt.g_setup_done :=

1701: ,p_message_code => 'INV_ORG_REQUIRED');
1702: RAISE fnd_api.g_exc_error;
1703: END IF;
1704: /* Setup the common constants used accross the apis */
1705: gme_common_pvt.g_setup_done :=
1706: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1707: ,p_org_code => null);
1708:
1709: IF NOT gme_common_pvt.g_setup_done THEN

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

1702: RAISE fnd_api.g_exc_error;
1703: END IF;
1704: /* Setup the common constants used accross the apis */
1705: gme_common_pvt.g_setup_done :=
1706: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1707: ,p_org_code => null);
1708:
1709: IF NOT gme_common_pvt.g_setup_done THEN
1710: RAISE fnd_api.g_exc_error;

Line 1709: IF NOT gme_common_pvt.g_setup_done THEN

1705: gme_common_pvt.g_setup_done :=
1706: gme_common_pvt.setup (p_org_id => l_rsrc_txn_rec.organization_id
1707: ,p_org_code => null);
1708:
1709: IF NOT gme_common_pvt.g_setup_done THEN
1710: RAISE fnd_api.g_exc_error;
1711: ELSE
1712: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1713: END IF;

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

1708:
1709: IF NOT gme_common_pvt.g_setup_done THEN
1710: RAISE fnd_api.g_exc_error;
1711: ELSE
1712: l_rsrc_txn_rec.organization_id := gme_common_pvt.g_organization_id;
1713: END IF;
1714:
1715: /* Make sure we are call compatible */
1716: IF NOT fnd_api.compatible_api_call (2.0

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

1716: IF NOT fnd_api.compatible_api_call (2.0
1717: ,p_api_version
1718: ,'end_cmplt_actual_rsrc_txn'
1719: ,g_pkg_name) THEN
1720: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1721: RAISE fnd_api.g_exc_error;
1722: END IF;
1723: gme_common_pvt.set_timestamp;
1724: IF p_validate_flexfields = 'T' THEN

Line 1723: gme_common_pvt.set_timestamp;

1719: ,g_pkg_name) THEN
1720: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1721: RAISE fnd_api.g_exc_error;
1722: END IF;
1723: gme_common_pvt.set_timestamp;
1724: IF p_validate_flexfields = 'T' THEN
1725: gme_common_pvt.g_flex_validate_prof := 1;
1726: ELSE
1727: gme_common_pvt.g_flex_validate_prof := 0;

Line 1725: gme_common_pvt.g_flex_validate_prof := 1;

1721: RAISE fnd_api.g_exc_error;
1722: END IF;
1723: gme_common_pvt.set_timestamp;
1724: IF p_validate_flexfields = 'T' THEN
1725: gme_common_pvt.g_flex_validate_prof := 1;
1726: ELSE
1727: gme_common_pvt.g_flex_validate_prof := 0;
1728: END IF;
1729:

Line 1727: gme_common_pvt.g_flex_validate_prof := 0;

1723: gme_common_pvt.set_timestamp;
1724: IF p_validate_flexfields = 'T' THEN
1725: gme_common_pvt.g_flex_validate_prof := 1;
1726: ELSE
1727: gme_common_pvt.g_flex_validate_prof := 0;
1728: END IF;
1729:
1730: IF g_debug <= gme_debug.g_log_procedure THEN
1731: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'

Line 1742: gme_common_pvt.g_flex_validate_prof := 0;

1738: ,p_rsrc_txn_rec => p_rsrc_txn_rec
1739: ,x_rsrc_txn_rec => x_rsrc_txn_rec
1740: ,x_return_status => x_return_status);
1741:
1742: gme_common_pvt.g_flex_validate_prof := 0;
1743: l_batch_header.batch_id := x_rsrc_txn_rec.doc_id;
1744:
1745: /* end */
1746: IF x_return_status = fnd_api.g_ret_sts_success THEN

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

1764: gme_debug.put_line ( 'Insert Incr Actual rsrc usage at '
1765: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1766: END IF;
1767:
1768: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1769: gme_common_pvt.count_and_get (x_count => x_message_count
1770: ,p_encoded => fnd_api.g_false
1771: ,x_data => x_message_list);
1772: EXCEPTION

Line 1769: gme_common_pvt.count_and_get (x_count => x_message_count

1765: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
1766: END IF;
1767:
1768: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
1769: gme_common_pvt.count_and_get (x_count => x_message_count
1770: ,p_encoded => fnd_api.g_false
1771: ,x_data => x_message_list);
1772: EXCEPTION
1773: WHEN fnd_api.g_exc_error THEN

Line 1776: gme_common_pvt.count_and_get (x_count => x_message_count

1772: EXCEPTION
1773: WHEN fnd_api.g_exc_error THEN
1774: x_return_status := fnd_api.g_ret_sts_error;
1775: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;
1776: gme_common_pvt.count_and_get (x_count => x_message_count
1777: ,p_encoded => fnd_api.g_false
1778: ,x_data => x_message_list);
1779: WHEN OTHERS THEN
1780: ROLLBACK TO SAVEPOINT end_cmplt_actual_rsrc_txn;

Line 1828: gme_common_pvt.validate_batch

1824: /* Initialize message list and count if needed */
1825: IF p_init_msg_list = fnd_api.g_true THEN
1826: fnd_msg_pub.initialize;
1827: END IF;
1828: gme_common_pvt.validate_batch
1829: (p_batch_header_rec => p_batch_header_rec
1830: ,p_org_code => p_org_code
1831: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
1832: ,x_batch_header_rec => l_batch_header_rec

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

1827: END IF;
1828: gme_common_pvt.validate_batch
1829: (p_batch_header_rec => p_batch_header_rec
1830: ,p_org_code => p_org_code
1831: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
1832: ,x_batch_header_rec => l_batch_header_rec
1833: ,x_message_count => x_message_count
1834: ,x_message_list => x_message_list
1835: ,x_return_status => x_return_status );

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

1846: IF NOT fnd_api.compatible_api_call (2.0
1847: ,p_api_version
1848: ,'reschedule_batch'
1849: ,g_pkg_name) THEN
1850: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
1851: RAISE fnd_api.g_exc_error;
1852: END IF;
1853:
1854: -- Bug 8218955 - Note: l_batch_header_rec is the record stored in the database not what was passed in.

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

1879:
1880: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1881: IF p_batch_header_rec.plan_start_date IS NULL
1882: AND p_batch_header_rec.plan_cmplt_date IS NULL THEN
1883: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
1884: RAISE fnd_api.g_exc_error;
1885: END IF;
1886:
1887: /* Check plan_start_date > plan_cmplt_date if batch_status = pending */

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

1884: RAISE fnd_api.g_exc_error;
1885: END IF;
1886:
1887: /* Check plan_start_date > plan_cmplt_date if batch_status = pending */
1888: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending) THEN
1889: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1890: IF p_batch_header_rec.plan_start_date IS NOT NULL
1891: AND p_batch_header_rec.plan_cmplt_date IS NOT NULL
1892: AND p_batch_header_rec.plan_start_date >

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

1891: AND p_batch_header_rec.plan_cmplt_date IS NOT NULL
1892: AND p_batch_header_rec.plan_start_date >
1893: p_batch_header_rec.plan_cmplt_date THEN
1894: --Bug#5439736 replaced the message
1895: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1896: RAISE fnd_api.g_exc_error;
1897: END IF;
1898: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1899: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.

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

1894: --Bug#5439736 replaced the message
1895: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1896: RAISE fnd_api.g_exc_error;
1897: END IF;
1898: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1899: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1900: IF p_batch_header_rec.plan_cmplt_date IS NULL THEN
1901: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
1902: RAISE fnd_api.g_exc_error;

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

1897: END IF;
1898: ELSIF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_wip) THEN
1899: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1900: IF p_batch_header_rec.plan_cmplt_date IS NULL THEN
1901: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
1902: RAISE fnd_api.g_exc_error;
1903: ELSE
1904: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1905: IF NVL (p_batch_header_rec.plan_start_date

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

1904: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1905: IF NVL (p_batch_header_rec.plan_start_date
1906: ,l_batch_header_rec.plan_start_date) <>
1907: l_batch_header_rec.plan_start_date THEN
1908: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');
1909: RAISE fnd_api.g_exc_error;
1910: END IF;
1911:
1912: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.

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

1911:
1912: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1913: IF p_batch_header_rec.plan_cmplt_date <
1914: l_batch_header_rec.plan_start_date THEN
1915: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
1916: RAISE fnd_api.g_exc_error;
1917: END IF;
1918: END IF;
1919: ELSE /* batch status other than pending, WIP */

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

1917: END IF;
1918: END IF;
1919: ELSE /* batch status other than pending, WIP */
1920: -- Batch cannot be rescheduled. Batch must have a status of pending or WIP to be rescheduled.
1921: gme_common_pvt.log_message ('GME_API_INV_BATCH_RESCHED');
1922: RAISE fnd_api.g_exc_error;
1923: END IF;
1924:
1925: IF p_use_workday_cal IS NOT NULL THEN

Line 1929: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

1925: IF p_use_workday_cal IS NOT NULL THEN
1926: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN
1927: l_use := p_use_workday_cal;
1928: ELSE
1929: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1930: ,'FIELD_NAME'
1931: ,'p_use_workday_cal');
1932: RAISE fnd_api.g_exc_error;
1933: END IF;

Line 1937: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

1933: END IF;
1934: IF p_contiguity_override IS NOT NULL THEN
1935: IF p_contiguity_override NOT IN
1936: (fnd_api.g_true, fnd_api.g_false) THEN
1937: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
1938: ,'FIELD_NAME'
1939: ,'p_contiguity_override');
1940: RAISE fnd_api.g_exc_error;
1941: END IF;

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

1944: l_use := fnd_api.g_false;
1945: END IF; /* p_use_workday_cal IS NOT NULL */
1946:
1947: IF l_use = fnd_api.g_true THEN
1948: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
1949: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1950: -- Check if plan_start_date falls on non working day for pending batch.
1951: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
1952: p_batch_header_rec.plan_start_date IS NOT NULL THEN

Line 1951: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND

1947: IF l_use = fnd_api.g_true THEN
1948: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
1949: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1950: -- Check if plan_start_date falls on non working day for pending batch.
1951: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
1952: p_batch_header_rec.plan_start_date IS NOT NULL THEN
1953: IF NOT gmp_calendar_api.is_working_daytime
1954: (1.0
1955: ,FALSE

Line 1956: ,gme_common_pvt.g_calendar_code

1952: p_batch_header_rec.plan_start_date IS NOT NULL THEN
1953: IF NOT gmp_calendar_api.is_working_daytime
1954: (1.0
1955: ,FALSE
1956: ,gme_common_pvt.g_calendar_code
1957: ,p_batch_header_rec.plan_start_date
1958: ,0
1959: ,l_return_status) THEN
1960: gme_common_pvt.log_message

Line 1960: gme_common_pvt.log_message

1956: ,gme_common_pvt.g_calendar_code
1957: ,p_batch_header_rec.plan_start_date
1958: ,0
1959: ,l_return_status) THEN
1960: gme_common_pvt.log_message
1961: ('GME_NON_WORKING_TIME'
1962: ,'PDATE'
1963: ,TO_CHAR (p_batch_header_rec.plan_start_date
1964: ,'DD-MON-YYYY HH24:MI:SS') );

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

1965: RAISE fnd_api.g_exc_error;
1966: END IF;
1967: END IF;
1968:
1969: /* l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending */
1970:
1971: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1972: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch.
1973: IF l_batch_header_rec.batch_status IN

Line 1974: (gme_common_pvt.g_batch_pending

1970:
1971: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1972: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch.
1973: IF l_batch_header_rec.batch_status IN
1974: (gme_common_pvt.g_batch_pending
1975: ,gme_common_pvt.g_batch_wip)
1976: AND p_batch_header_rec.plan_cmplt_date IS NOT NULL THEN
1977: IF NOT gmp_calendar_api.is_working_daytime
1978: (1.0

Line 1975: ,gme_common_pvt.g_batch_wip)

1971: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1972: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch.
1973: IF l_batch_header_rec.batch_status IN
1974: (gme_common_pvt.g_batch_pending
1975: ,gme_common_pvt.g_batch_wip)
1976: AND p_batch_header_rec.plan_cmplt_date IS NOT NULL THEN
1977: IF NOT gmp_calendar_api.is_working_daytime
1978: (1.0
1979: ,FALSE

Line 1980: ,gme_common_pvt.g_calendar_code

1976: AND p_batch_header_rec.plan_cmplt_date IS NOT NULL THEN
1977: IF NOT gmp_calendar_api.is_working_daytime
1978: (1.0
1979: ,FALSE
1980: ,gme_common_pvt.g_calendar_code
1981: ,p_batch_header_rec.plan_cmplt_date
1982: ,1
1983: ,l_return_status) THEN
1984: gme_common_pvt.log_message

Line 1984: gme_common_pvt.log_message

1980: ,gme_common_pvt.g_calendar_code
1981: ,p_batch_header_rec.plan_cmplt_date
1982: ,1
1983: ,l_return_status) THEN
1984: gme_common_pvt.log_message
1985: ('GME_NON_WORKING_TIME'
1986: ,'PDATE'
1987: ,TO_CHAR (p_batch_header_rec.plan_cmplt_date
1988: ,'DD-MON-YYYY HH24:MI:SS') );

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

1990: END IF;
1991: END IF;
1992:
1993: -- Bug 8218955 - Change l_batch_header_rec to p_batch_header_rec so we can validate what was passed in.
1994: /* l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) */
1995: IF p_batch_header_rec.plan_cmplt_date IS NULL AND
1996: p_batch_header_rec.plan_start_date IS NULL THEN
1997: IF NOT gmp_calendar_api.is_working_daytime
1998: (1.0

Line 2000: ,gme_common_pvt.g_calendar_code

1996: p_batch_header_rec.plan_start_date IS NULL THEN
1997: IF NOT gmp_calendar_api.is_working_daytime
1998: (1.0
1999: ,FALSE
2000: ,gme_common_pvt.g_calendar_code
2001: ,SYSDATE
2002: ,0
2003: ,l_return_status) THEN
2004: gme_common_pvt.log_message ('GME_NON_WORKING_TIME' ,'PDATE'

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

2000: ,gme_common_pvt.g_calendar_code
2001: ,SYSDATE
2002: ,0
2003: ,l_return_status) THEN
2004: gme_common_pvt.log_message ('GME_NON_WORKING_TIME' ,'PDATE'
2005: ,TO_CHAR (SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
2006: RAISE fnd_api.g_exc_error;
2007: END IF;
2008: END IF; /* p_batch_header_rec.plan_cmplt_date IS NULL */

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

2005: ,TO_CHAR (SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
2006: RAISE fnd_api.g_exc_error;
2007: END IF;
2008: END IF; /* p_batch_header_rec.plan_cmplt_date IS NULL */
2009: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
2010: END IF; /* l_use = FND_API.G_TRUE */
2011:
2012: IF (g_debug = gme_debug.g_log_statement) THEN
2013: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'

Line 2065: gme_common_pvt.count_and_get (x_count => x_message_count

2061: WHEN fnd_api.g_exc_error THEN
2062: ROLLBACK TO SAVEPOINT reschedule_batch;
2063: x_batch_header_rec := NULL;
2064: x_return_status := fnd_api.g_ret_sts_error;
2065: gme_common_pvt.count_and_get (x_count => x_message_count
2066: ,p_encoded => fnd_api.g_false
2067: ,x_data => x_message_list);
2068: WHEN reschedule_batch_failed THEN
2069: ROLLBACK TO SAVEPOINT reschedule_batch;

Line 2071: gme_common_pvt.count_and_get (x_count => x_message_count

2067: ,x_data => x_message_list);
2068: WHEN reschedule_batch_failed THEN
2069: ROLLBACK TO SAVEPOINT reschedule_batch;
2070: x_batch_header_rec := NULL;
2071: gme_common_pvt.count_and_get (x_count => x_message_count
2072: ,p_encoded => fnd_api.g_false
2073: ,x_data => x_message_list);
2074: WHEN OTHERS THEN
2075: ROLLBACK TO SAVEPOINT reschedule_batch;

Line 2135: gme_common_pvt.Validate_batch_step (

2131: fnd_msg_pub.initialize;
2132: END IF;
2133:
2134: /* Validate Input parameters */
2135: gme_common_pvt.Validate_batch_step (
2136: p_batch_step_rec => p_batch_step_rec
2137: ,p_org_code => p_org_code
2138: ,p_batch_no => p_batch_no
2139: ,x_batch_step_rec => l_batch_step_rec

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

2154: IF NOT fnd_api.compatible_api_call (2.0
2155: ,p_api_version
2156: ,'reschedule_batch_step'
2157: ,g_pkg_name) THEN
2158: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2159: RAISE fnd_api.g_exc_error;
2160: END IF;
2161:
2162: /* 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 2166: gme_common_pvt.log_message ('GME_NO_NULL_DATES');

2162: /* Navin: Check whether both l_batch_step_rec.plan_start_date, l_batch_step_rec.plan_cmplt_date are null. If so, RAISE error; */
2163: IF p_batch_step_rec.plan_start_date IS NULL
2164: AND p_batch_step_rec.plan_cmplt_date IS NULL THEN
2165: -- Both planned start and planned completion dates cannot be null.
2166: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
2167: RAISE fnd_api.g_exc_error;
2168: END IF;
2169:
2170: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN

Line 2170: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN

2166: gme_common_pvt.log_message ('GME_NO_NULL_DATES');
2167: RAISE fnd_api.g_exc_error;
2168: END IF;
2169:
2170: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN
2171: -- You cannot reschedule steps for firm planned orders.
2172: gme_common_pvt.log_message ('GME_FPO_STEP_RESCH_ERR');
2173: -- Navin: PENDING: New Message
2174: RAISE fnd_api.g_exc_error;

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

2168: END IF;
2169:
2170: IF p_batch_type = gme_common_pvt.g_doc_type_fpo THEN
2171: -- You cannot reschedule steps for firm planned orders.
2172: gme_common_pvt.log_message ('GME_FPO_STEP_RESCH_ERR');
2173: -- Navin: PENDING: New Message
2174: RAISE fnd_api.g_exc_error;
2175: END IF;
2176:

Line 2178: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

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

Line 2185: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

2181: RAISE fnd_api.g_exc_error;
2182: END IF;
2183:
2184: IF p_reschedule_succeeding NOT IN (fnd_api.g_true, fnd_api.g_false) THEN
2185: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2186: ,'FIELD_NAME'
2187: ,'p_reschedule_succeeding');
2188: RAISE fnd_api.g_exc_error;
2189: END IF;

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

2190:
2191: l_batch_step_rec.plan_start_date := p_batch_step_rec.plan_start_date;
2192: l_batch_step_rec.plan_cmplt_date := p_batch_step_rec.plan_cmplt_date;
2193: /* Navin: Check plan_start_date > plan_cmplt_date if step_status = pending */
2194: IF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_pending) THEN
2195: IF l_batch_step_rec.plan_start_date IS NOT NULL
2196: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL
2197: AND l_batch_step_rec.plan_start_date >
2198: l_batch_step_rec.plan_cmplt_date THEN

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

2196: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL
2197: AND l_batch_step_rec.plan_start_date >
2198: l_batch_step_rec.plan_cmplt_date THEN
2199: -- The planned start cannot be greater than the planned completion date.
2200: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2201: -- Navin: PENDING: New Message
2202: RAISE fnd_api.g_exc_error;
2203: END IF;
2204: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN

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

2200: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2201: -- Navin: PENDING: New Message
2202: RAISE fnd_api.g_exc_error;
2203: END IF;
2204: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN
2205: IF l_batch_step_rec.plan_cmplt_date IS NULL THEN
2206: -- Planned completion dates cannot be null for a batch with status of WIP.
2207: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
2208: -- Navin: PENDING: New Message

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

2203: END IF;
2204: ELSIF (l_batch_step_rec.step_status = gme_common_pvt.g_batch_wip) THEN
2205: IF l_batch_step_rec.plan_cmplt_date IS NULL THEN
2206: -- Planned completion dates cannot be null for a batch with status of WIP.
2207: gme_common_pvt.log_message ('GME_NO_CMPLTDATE_FOR_WIP');
2208: -- Navin: PENDING: New Message
2209: RAISE fnd_api.g_exc_error;
2210: ELSE
2211: IF NVL (l_batch_step_rec.plan_start_date

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

2211: IF NVL (l_batch_step_rec.plan_start_date
2212: ,l_batch_step_rec.plan_start_date) <>
2213: l_batch_step_rec.plan_start_date THEN
2214: -- Cannot update planned start date.
2215: gme_common_pvt.log_message ('GME_NO_PLAN_DT_UPD');
2216: -- Navin: PENDING: New Message
2217: RAISE fnd_api.g_exc_error;
2218: END IF;
2219:

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

2219:
2220: IF l_batch_step_rec.plan_cmplt_date <
2221: l_batch_step_rec.plan_start_date THEN
2222: -- Planned completion date cannot be earlier than the planned start date.
2223: gme_common_pvt.log_message ('GME_CMPLT_START_DT');
2224: -- Navin: PENDING: New Message
2225: RAISE fnd_api.g_exc_error;
2226: END IF;
2227: END IF;

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

2226: END IF;
2227: END IF;
2228: ELSE /*step status other than pending, WIP */
2229: --Bug#5439736
2230: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_RESCH');
2231: RAISE fnd_api.g_exc_error;
2232: END IF;
2233:
2234: -- When enforce_step_dependency option is enforced then override Reschedule_preceding, Reschedule_succeeding fields.

Line 2247: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

2243: IF p_use_workday_cal IS NOT NULL THEN
2244: IF p_use_workday_cal IN (fnd_api.g_true, fnd_api.g_false) THEN
2245: l_use := p_use_workday_cal;
2246: ELSE
2247: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2248: ,'FIELD_NAME'
2249: ,'p_use_workday_cal');
2250: RAISE fnd_api.g_exc_error;
2251: END IF;

Line 2256: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'

2252:
2253: IF p_contiguity_override IS NOT NULL THEN
2254: IF p_contiguity_override NOT IN
2255: (fnd_api.g_true, fnd_api.g_false) THEN
2256: gme_common_pvt.log_message ('GME_INVALID_VALUE_SPECIFIED'
2257: ,'FIELD_NAME'
2258: ,'p_contiguity_override');
2259: RAISE fnd_api.g_exc_error;
2260: END IF;

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

2263: l_use := fnd_api.g_false;
2264: END IF; /* p_use_workday_cal IS NOT NULL */
2265:
2266: IF l_use = fnd_api.g_true THEN
2267: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
2268: -- Check if plan_start_date falls on non working day for pending batch step.
2269: IF l_batch_step_rec.step_status =
2270: gme_common_pvt.g_step_pending
2271: AND l_batch_step_rec.plan_start_date IS NOT NULL THEN

Line 2270: gme_common_pvt.g_step_pending

2266: IF l_use = fnd_api.g_true THEN
2267: IF (gme_common_pvt.g_calendar_code IS NOT NULL) THEN
2268: -- Check if plan_start_date falls on non working day for pending batch step.
2269: IF l_batch_step_rec.step_status =
2270: gme_common_pvt.g_step_pending
2271: AND l_batch_step_rec.plan_start_date IS NOT NULL THEN
2272: IF NOT gmp_calendar_api.is_working_daytime
2273: (1.0
2274: ,FALSE

Line 2275: ,gme_common_pvt.g_calendar_code

2271: AND l_batch_step_rec.plan_start_date IS NOT NULL THEN
2272: IF NOT gmp_calendar_api.is_working_daytime
2273: (1.0
2274: ,FALSE
2275: ,gme_common_pvt.g_calendar_code
2276: ,l_batch_step_rec.plan_start_date
2277: ,0
2278: ,l_return_status) THEN
2279: gme_common_pvt.log_message

Line 2279: gme_common_pvt.log_message

2275: ,gme_common_pvt.g_calendar_code
2276: ,l_batch_step_rec.plan_start_date
2277: ,0
2278: ,l_return_status) THEN
2279: gme_common_pvt.log_message
2280: ('GME_NON_WORKING_TIME'
2281: ,'PDATE'
2282: ,TO_CHAR (l_batch_step_rec.plan_start_date
2283: ,'DD-MON-YYYY HH24:MI:SS') );

Line 2290: (gme_common_pvt.g_step_pending

2286: END IF;
2287:
2288: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch step.
2289: IF l_batch_step_rec.step_status IN
2290: (gme_common_pvt.g_step_pending
2291: ,gme_common_pvt.g_step_wip)
2292: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL THEN
2293: gme_debug.put_line ('in cmplt');
2294:

Line 2291: ,gme_common_pvt.g_step_wip)

2287:
2288: -- Check if plan_cmplt_date falls on non working day for pending and WIP batch step.
2289: IF l_batch_step_rec.step_status IN
2290: (gme_common_pvt.g_step_pending
2291: ,gme_common_pvt.g_step_wip)
2292: AND l_batch_step_rec.plan_cmplt_date IS NOT NULL THEN
2293: gme_debug.put_line ('in cmplt');
2294:
2295: IF NOT gmp_calendar_api.is_working_daytime

Line 2298: ,gme_common_pvt.g_calendar_code

2294:
2295: IF NOT gmp_calendar_api.is_working_daytime
2296: (1.0
2297: ,FALSE
2298: ,gme_common_pvt.g_calendar_code
2299: ,l_batch_step_rec.plan_cmplt_date
2300: ,1
2301: ,l_return_status) THEN
2302: gme_common_pvt.log_message

Line 2302: gme_common_pvt.log_message

2298: ,gme_common_pvt.g_calendar_code
2299: ,l_batch_step_rec.plan_cmplt_date
2300: ,1
2301: ,l_return_status) THEN
2302: gme_common_pvt.log_message
2303: ('GME_NON_WORKING_TIME'
2304: ,'PDATE'
2305: ,TO_CHAR (l_batch_step_rec.plan_cmplt_date
2306: ,'DD-MON-YYYY HH24:MI:SS') );

Line 2316: ,gme_common_pvt.g_calendar_code

2312: AND l_batch_step_rec.plan_start_date IS NULL THEN
2313: IF NOT gmp_calendar_api.is_working_daytime
2314: (1.0
2315: ,FALSE
2316: ,gme_common_pvt.g_calendar_code
2317: ,SYSDATE
2318: ,0
2319: ,l_return_status) THEN
2320: gme_common_pvt.log_message

Line 2320: gme_common_pvt.log_message

2316: ,gme_common_pvt.g_calendar_code
2317: ,SYSDATE
2318: ,0
2319: ,l_return_status) THEN
2320: gme_common_pvt.log_message
2321: ('GME_NON_WORKING_TIME'
2322: ,'PDATE'
2323: ,TO_CHAR (SYSDATE
2324: ,'DD-MON-YYYY HH24:MI:SS') );

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

2324: ,'DD-MON-YYYY HH24:MI:SS') );
2325: RAISE fnd_api.g_exc_error;
2326: END IF;
2327: END IF; /* l_batch_step_rec.plan_cmplt_date IS NULL */
2328: END IF; /* (gme_common_pvt.g_calendar_code IS NOT NULL) */
2329: END IF; /* l_use = FND_API.G_TRUE */
2330:
2331: IF (g_debug = gme_debug.g_log_statement) THEN
2332: gme_debug.put_line ( g_pkg_name

Line 2390: gme_common_pvt.count_and_get (x_count => x_message_count

2386: EXCEPTION
2387: WHEN reschedule_step_failed THEN
2388: ROLLBACK TO SAVEPOINT reschedule_step;
2389: x_batch_step_rec := NULL;
2390: gme_common_pvt.count_and_get (x_count => x_message_count
2391: ,p_encoded => fnd_api.g_false
2392: ,x_data => x_message_list);
2393: WHEN fnd_api.g_exc_error THEN
2394: ROLLBACK TO SAVEPOINT reschedule_step;

Line 2396: gme_common_pvt.count_and_get (x_count => x_message_count

2392: ,x_data => x_message_list);
2393: WHEN fnd_api.g_exc_error THEN
2394: ROLLBACK TO SAVEPOINT reschedule_step;
2395: x_return_status := fnd_api.g_ret_sts_error;
2396: gme_common_pvt.count_and_get (x_count => x_message_count
2397: ,p_encoded => fnd_api.g_false
2398: ,x_data => x_message_list);
2399: WHEN OTHERS THEN
2400: ROLLBACK TO SAVEPOINT reschedule_step;

Line 2412: := gme_common_pvt.g_max_errors

2408: /*************************************************************************/
2409: PROCEDURE create_batch_reservations (
2410: p_api_version IN NUMBER := 2.0
2411: ,p_validation_level IN NUMBER
2412: := gme_common_pvt.g_max_errors
2413: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2414: ,p_commit IN VARCHAR2 := fnd_api.g_false
2415: ,p_batch_rec IN gme_batch_header%ROWTYPE
2416: ,p_org_code IN VARCHAR2

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

2439: IF NOT fnd_api.compatible_api_call (2.0
2440: ,p_api_version
2441: ,'insert_batchstep_resource'
2442: ,g_pkg_name) THEN
2443: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2444: RAISE fnd_api.g_exc_error;
2445: END IF;
2446:
2447: /* Initialize message list and count if needed */

Line 2452: gme_common_pvt.set_timestamp;

2448: IF p_init_msg_list = fnd_api.g_true THEN
2449: fnd_msg_pub.initialize;
2450: END IF;
2451:
2452: gme_common_pvt.set_timestamp;
2453:
2454: /* IF p_batch_rec.batch_no IS NULL AND p_batch_rec.batch_id IS NULL THEN
2455: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
2456: RAISE fnd_api.g_exc_error;

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

2451:
2452: gme_common_pvt.set_timestamp;
2453:
2454: /* IF p_batch_rec.batch_no IS NULL AND p_batch_rec.batch_id IS NULL THEN
2455: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
2456: RAISE fnd_api.g_exc_error;
2457: END IF; */
2458: gme_common_pvt.validate_batch
2459: (p_batch_header_rec => p_batch_rec

Line 2458: gme_common_pvt.validate_batch

2454: /* IF p_batch_rec.batch_no IS NULL AND p_batch_rec.batch_id IS NULL THEN
2455: gme_common_pvt.log_message ('GME_MISSING_BATCH_IDENTIFIER');
2456: RAISE fnd_api.g_exc_error;
2457: END IF; */
2458: gme_common_pvt.validate_batch
2459: (p_batch_header_rec => p_batch_rec
2460: ,p_org_code => p_org_code
2461: ,p_batch_type => gme_common_pvt.g_doc_type_batch
2462: ,x_batch_header_rec => l_batch_header_rec

Line 2461: ,p_batch_type => gme_common_pvt.g_doc_type_batch

2457: END IF; */
2458: gme_common_pvt.validate_batch
2459: (p_batch_header_rec => p_batch_rec
2460: ,p_org_code => p_org_code
2461: ,p_batch_type => gme_common_pvt.g_doc_type_batch
2462: ,x_batch_header_rec => l_batch_header_rec
2463: ,x_message_count => x_message_count
2464: ,x_message_list => x_message_list
2465: ,x_return_status => x_return_status );

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

2473: END IF;
2474:
2475: /* Verify Batch to be in pending or WIP status */
2476: IF l_batch_header_rec.batch_status NOT IN
2477: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2478: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2479: ,'PROCESS'
2480: ,'CREATE_LINE_RESERVATIONS');
2481: RAISE fnd_api.g_exc_error;

Line 2478: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'

2474:
2475: /* Verify Batch to be in pending or WIP status */
2476: IF l_batch_header_rec.batch_status NOT IN
2477: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2478: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2479: ,'PROCESS'
2480: ,'CREATE_LINE_RESERVATIONS');
2481: RAISE fnd_api.g_exc_error;
2482: END IF;

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

2502: END IF;
2503:
2504: gme_debug.put_line ( 'End of Create_Batch_Reservations at '
2505: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2506: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2507: EXCEPTION
2508: WHEN fnd_api.g_exc_error THEN
2509: x_return_status := fnd_api.g_ret_sts_error;
2510: ROLLBACK TO SAVEPOINT create_batch_reservations;

Line 2511: gme_common_pvt.count_and_get(x_count => x_message_count

2507: EXCEPTION
2508: WHEN fnd_api.g_exc_error THEN
2509: x_return_status := fnd_api.g_ret_sts_error;
2510: ROLLBACK TO SAVEPOINT create_batch_reservations;
2511: gme_common_pvt.count_and_get(x_count => x_message_count
2512: ,p_encoded => fnd_api.g_false
2513: ,x_data => x_message_list);
2514: WHEN OTHERS THEN
2515: ROLLBACK TO SAVEPOINT create_batch_reservations;

Line 2525: := gme_common_pvt.g_max_errors

2521: /*************************************************************************/
2522: PROCEDURE create_line_reservations (
2523: p_api_version IN NUMBER := 2.0
2524: ,p_validation_level IN NUMBER
2525: := gme_common_pvt.g_max_errors
2526: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
2527: ,p_commit IN VARCHAR2 := fnd_api.g_false
2528: ,p_material_detail_id IN NUMBER
2529: ,p_org_code IN VARCHAR2

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

2557: IF NOT fnd_api.compatible_api_call (2.0
2558: ,p_api_version
2559: ,'insert_batchstep_resource'
2560: ,g_pkg_name) THEN
2561: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2562: RAISE fnd_api.g_exc_error;
2563: END IF;
2564:
2565: /* Initialize message list and count if needed */

Line 2570: gme_common_pvt.set_timestamp;

2566: IF p_init_msg_list = fnd_api.g_true THEN
2567: fnd_msg_pub.initialize;
2568: END IF;
2569:
2570: gme_common_pvt.set_timestamp;
2571: l_material_details_rec.material_detail_id := p_material_detail_id;
2572: l_material_details_rec.line_no := p_line_no;
2573: /* Ensure line_type is populated. Reservations only permitted for ingredient lines. */
2574: /* Line type is needed for retrieval based on key values */

Line 2577: gme_common_pvt.Validate_material_detail

2573: /* Ensure line_type is populated. Reservations only permitted for ingredient lines. */
2574: /* Line type is needed for retrieval based on key values */
2575: l_material_details_rec.line_type := -1;
2576:
2577: gme_common_pvt.Validate_material_detail
2578: (p_material_detail_rec => l_material_details_rec
2579: ,p_org_code => p_org_code
2580: ,p_batch_no => p_batch_no
2581: ,p_batch_type => 0

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

2594: l_material_details_rec := l_material_details_rec_out;
2595:
2596: /* Reservation cannot be against a phantom */
2597: IF l_material_details_rec.phantom_type IN (1, 2) THEN
2598: gme_common_pvt.log_message ('GME_INVALID_RSV_FOR_PHANTOM');
2599: RAISE fnd_api.g_exc_error;
2600: END IF;
2601:
2602: /* Reservation cannot be against a phantom */

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

2600: END IF;
2601:
2602: /* Reservation cannot be against a phantom */
2603: IF l_material_details_rec.line_type <> -1 THEN
2604: gme_common_pvt.log_message ('GME_INVALID_LINE_FOR_RSV');
2605: RAISE fnd_api.g_exc_error;
2606: END IF;
2607:
2608: /* Verify that update_inventory is permitted for this batch */

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

2606: END IF;
2607:
2608: /* Verify that update_inventory is permitted for this batch */
2609: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN
2610: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');
2611: RAISE fnd_api.g_exc_error;
2612: END IF;
2613:
2614: -- gme_debug.put_line(l_batch_header_rec.batch_status);

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

2614: -- gme_debug.put_line(l_batch_header_rec.batch_status);
2615:
2616: /* Verify Batch to be in pending or WIP status */
2617: IF l_batch_header_rec.batch_status NOT IN
2618: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2619: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2620: ,'PROCESS'
2621: ,'CREATE_RESERVATION');
2622: RAISE fnd_api.g_exc_error;

Line 2619: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'

2615:
2616: /* Verify Batch to be in pending or WIP status */
2617: IF l_batch_header_rec.batch_status NOT IN
2618: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
2619: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS'
2620: ,'PROCESS'
2621: ,'CREATE_RESERVATION');
2622: RAISE fnd_api.g_exc_error;
2623: END IF;

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

2621: ,'CREATE_RESERVATION');
2622: RAISE fnd_api.g_exc_error;
2623: END IF;
2624:
2625: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
2626: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
2627: RAISE fnd_api.g_exc_error;
2628: END IF;
2629: gme_api_main.create_line_reservations

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

2622: RAISE fnd_api.g_exc_error;
2623: END IF;
2624:
2625: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
2626: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
2627: RAISE fnd_api.g_exc_error;
2628: END IF;
2629: gme_api_main.create_line_reservations
2630: (p_init_msg_list => p_init_msg_list

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

2647: END IF;
2648:
2649: gme_debug.put_line ( 'End of Create_Line_Reservations at '
2650: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
2651: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2652: EXCEPTION
2653: WHEN fnd_api.g_exc_error THEN
2654: x_return_status := fnd_api.g_ret_sts_error;
2655: ROLLBACK TO SAVEPOINT create_line_reservations;

Line 2656: gme_common_pvt.count_and_get(x_count => x_message_count

2652: EXCEPTION
2653: WHEN fnd_api.g_exc_error THEN
2654: x_return_status := fnd_api.g_ret_sts_error;
2655: ROLLBACK TO SAVEPOINT create_line_reservations;
2656: gme_common_pvt.count_and_get(x_count => x_message_count
2657: ,p_encoded => fnd_api.g_false
2658: ,x_data => x_message_list);
2659: WHEN OTHERS THEN
2660: ROLLBACK TO SAVEPOINT create_line_reservations;

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

2708: ,p_api_version
2709: ,'Insert_process_parameter'
2710: ,g_pkg_name) THEN
2711: x_return_status := fnd_api.g_ret_sts_error;
2712: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2713: RAISE fnd_api.g_exc_error;
2714: END IF;
2715: --added by qzeng no need to check if done in bulk validation
2716: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

Line 2716: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

2712: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
2713: RAISE fnd_api.g_exc_error;
2714: END IF;
2715: --added by qzeng no need to check if done in bulk validation
2716: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2717: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2718:
2719: IF NOT gme_common_pvt.g_setup_done THEN
2720: IF (g_debug = gme_debug.g_log_statement) THEN

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

2713: RAISE fnd_api.g_exc_error;
2714: END IF;
2715: --added by qzeng no need to check if done in bulk validation
2716: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2717: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2718:
2719: IF NOT gme_common_pvt.g_setup_done THEN
2720: IF (g_debug = gme_debug.g_log_statement) THEN
2721: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');

Line 2719: IF NOT gme_common_pvt.g_setup_done THEN

2715: --added by qzeng no need to check if done in bulk validation
2716: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2717: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2718:
2719: IF NOT gme_common_pvt.g_setup_done THEN
2720: IF (g_debug = gme_debug.g_log_statement) THEN
2721: gme_debug.put_line (g_pkg_name||'.'||l_api_name|| ':set up problem ');
2722: END IF;
2723: RAISE fnd_api.g_exc_error;

Line 2730: gme_common_pvt.set_timestamp;

2726: IF (g_debug <= gme_debug.g_log_procedure) THEN
2727: gme_debug.put_line ('Calling Insert process parameters');
2728: END IF;
2729:
2730: gme_common_pvt.set_timestamp;
2731: gme_process_parameters_pvt.insert_process_parameter
2732: (p_batch_no => p_batch_no
2733: ,p_org_code => p_org_code
2734: ,p_validate_flexfields => p_validate_flexfields

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

2747:
2748: IF x_return_status = fnd_api.g_ret_sts_success THEN
2749: IF p_commit = fnd_api.g_true THEN
2750: COMMIT;
2751: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2752: END IF;
2753: ELSE
2754: RAISE insert_parameter_failed;
2755: END IF;

Line 2770: gme_common_pvt.count_and_get (x_count => x_message_count

2766: EXCEPTION
2767: WHEN fnd_api.g_exc_error THEN
2768: x_return_status := fnd_api.g_ret_sts_error;
2769: ROLLBACK TO SAVEPOINT insert_process_parameter;
2770: gme_common_pvt.count_and_get (x_count => x_message_count
2771: ,p_encoded => fnd_api.g_false
2772: ,x_data => x_message_list);
2773: WHEN insert_parameter_failed THEN
2774: ROLLBACK TO SAVEPOINT insert_process_parameter;

Line 2775: gme_common_pvt.count_and_get (x_count => x_message_count

2771: ,p_encoded => fnd_api.g_false
2772: ,x_data => x_message_list);
2773: WHEN insert_parameter_failed THEN
2774: ROLLBACK TO SAVEPOINT insert_process_parameter;
2775: gme_common_pvt.count_and_get (x_count => x_message_count
2776: ,p_encoded => fnd_api.g_false
2777: ,x_data => x_message_list);
2778: WHEN OTHERS THEN
2779: ROLLBACK TO SAVEPOINT insert_process_parameter;

Line 2824: gme_common_pvt.g_error_count := 0;

2820: x_return_status := fnd_api.g_ret_sts_success;
2821:
2822: IF p_init_msg_list = fnd_api.g_true THEN
2823: fnd_msg_pub.initialize;
2824: gme_common_pvt.g_error_count := 0;
2825: END IF;
2826:
2827: -- Make sure we are call compatible
2828: IF NOT fnd_api.compatible_api_call (2.0

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

2828: IF NOT fnd_api.compatible_api_call (2.0
2829: ,p_api_version
2830: ,'Insert_process_parameter'
2831: ,g_pkg_name) THEN
2832: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2833: RAISE fnd_api.g_exc_error;
2834: END IF;
2835: --added by qzeng no need to check if done in bulk validation
2836: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

Line 2836: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

2832: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2833: RAISE fnd_api.g_exc_error;
2834: END IF;
2835: --added by qzeng no need to check if done in bulk validation
2836: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2837: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2838:
2839: IF NOT gme_common_pvt.g_setup_done THEN
2840: x_return_status := fnd_api.g_ret_sts_error;

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

2833: RAISE fnd_api.g_exc_error;
2834: END IF;
2835: --added by qzeng no need to check if done in bulk validation
2836: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2837: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2838:
2839: IF NOT gme_common_pvt.g_setup_done THEN
2840: x_return_status := fnd_api.g_ret_sts_error;
2841: RAISE fnd_api.g_exc_error;

Line 2839: IF NOT gme_common_pvt.g_setup_done THEN

2835: --added by qzeng no need to check if done in bulk validation
2836: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2837: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2838:
2839: IF NOT gme_common_pvt.g_setup_done THEN
2840: x_return_status := fnd_api.g_ret_sts_error;
2841: RAISE fnd_api.g_exc_error;
2842: END IF;
2843: END IF;

Line 2844: gme_common_pvt.set_timestamp;

2840: x_return_status := fnd_api.g_ret_sts_error;
2841: RAISE fnd_api.g_exc_error;
2842: END IF;
2843: END IF;
2844: gme_common_pvt.set_timestamp;
2845: gme_process_parameters_pvt.update_process_parameter
2846: (p_batch_no => p_batch_no
2847: ,p_org_code => p_org_code
2848: ,p_validate_flexfields => p_validate_flexfields

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

2861:
2862: IF x_return_status = fnd_api.g_ret_sts_success THEN
2863: IF p_commit = fnd_api.g_true THEN
2864: COMMIT;
2865: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2866: END IF;
2867: ELSE
2868: RAISE update_parameter_failed;
2869: END IF;

Line 2885: gme_common_pvt.count_and_get (x_count => x_message_count

2881: EXCEPTION
2882: WHEN fnd_api.g_exc_error THEN
2883: x_return_status := fnd_api.g_ret_sts_error;
2884: ROLLBACK TO SAVEPOINT update_process_parameter;
2885: gme_common_pvt.count_and_get (x_count => x_message_count
2886: ,p_encoded => fnd_api.g_false
2887: ,x_data => x_message_list);
2888: WHEN update_parameter_failed THEN
2889: ROLLBACK TO SAVEPOINT update_process_parameter;

Line 2890: gme_common_pvt.count_and_get (x_count => x_message_count

2886: ,p_encoded => fnd_api.g_false
2887: ,x_data => x_message_list);
2888: WHEN update_parameter_failed THEN
2889: ROLLBACK TO SAVEPOINT update_process_parameter;
2890: gme_common_pvt.count_and_get (x_count => x_message_count
2891: ,p_encoded => fnd_api.g_false
2892: ,x_data => x_message_list);
2893: WHEN OTHERS THEN
2894: ROLLBACK TO SAVEPOINT update_process_parameter;

Line 2937: gme_common_pvt.g_error_count := 0;

2933: x_return_status := fnd_api.g_ret_sts_success;
2934:
2935: IF p_init_msg_list = fnd_api.g_true THEN
2936: fnd_msg_pub.initialize;
2937: gme_common_pvt.g_error_count := 0;
2938: END IF;
2939:
2940: -- Make sure we are call compatible
2941: IF NOT fnd_api.compatible_api_call (2.0

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

2941: IF NOT fnd_api.compatible_api_call (2.0
2942: ,p_api_version
2943: ,'Insert_process_parameter'
2944: ,g_pkg_name) THEN
2945: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
2946: RAISE fnd_api.g_exc_error;
2947: END IF;
2948:
2949: --added by qzeng no need to check if done in bulk validation

Line 2950: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

2946: RAISE fnd_api.g_exc_error;
2947: END IF;
2948:
2949: --added by qzeng no need to check if done in bulk validation
2950: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2951: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2952:
2953: IF NOT gme_common_pvt.g_setup_done THEN
2954: x_return_status := fnd_api.g_ret_sts_error;

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

2947: END IF;
2948:
2949: --added by qzeng no need to check if done in bulk validation
2950: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2951: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2952:
2953: IF NOT gme_common_pvt.g_setup_done THEN
2954: x_return_status := fnd_api.g_ret_sts_error;
2955: RAISE fnd_api.g_exc_error;

Line 2953: IF NOT gme_common_pvt.g_setup_done THEN

2949: --added by qzeng no need to check if done in bulk validation
2950: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
2951: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
2952:
2953: IF NOT gme_common_pvt.g_setup_done THEN
2954: x_return_status := fnd_api.g_ret_sts_error;
2955: RAISE fnd_api.g_exc_error;
2956: END IF;
2957: END IF;

Line 2963: gme_common_pvt.set_timestamp;

2959: IF (g_debug <= gme_debug.g_log_procedure) THEN
2960: gme_debug.put_line ('Calling Insert process parameters');
2961: END IF;
2962:
2963: gme_common_pvt.set_timestamp;
2964: gme_process_parameters_pvt.delete_process_parameter
2965: (p_batch_no => p_batch_no
2966: ,p_org_code => p_org_code
2967: ,p_batchstep_no => p_batchstep_no

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

2978:
2979: IF x_return_status = fnd_api.g_ret_sts_success THEN
2980: IF p_commit = fnd_api.g_true THEN
2981: COMMIT;
2982: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
2983: END IF;
2984: ELSE
2985: RAISE delete_parameter_failed;
2986: END IF;

Line 2997: gme_common_pvt.count_and_get (x_count => x_message_count

2993: EXCEPTION
2994: WHEN fnd_api.g_exc_error THEN
2995: x_return_status := fnd_api.g_ret_sts_error;
2996: ROLLBACK TO SAVEPOINT delete_process_parameter;
2997: gme_common_pvt.count_and_get (x_count => x_message_count
2998: ,p_encoded => fnd_api.g_false
2999: ,x_data => x_message_list);
3000: WHEN delete_parameter_failed THEN
3001: ROLLBACK TO SAVEPOINT delete_process_parameter;

Line 3002: gme_common_pvt.count_and_get (x_count => x_message_count

2998: ,p_encoded => fnd_api.g_false
2999: ,x_data => x_message_list);
3000: WHEN delete_parameter_failed THEN
3001: ROLLBACK TO SAVEPOINT delete_process_parameter;
3002: gme_common_pvt.count_and_get (x_count => x_message_count
3003: ,p_encoded => fnd_api.g_false
3004: ,x_data => x_message_list);
3005: WHEN OTHERS THEN
3006: ROLLBACK TO SAVEPOINT delete_process_parameter;

Line 3017: := gme_common_pvt.g_max_errors

3013: /*************************************************************************/
3014: PROCEDURE delete_step (
3015: p_api_version IN NUMBER := 2.0
3016: ,p_validation_level IN NUMBER
3017: := gme_common_pvt.g_max_errors
3018: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3019: ,p_commit IN VARCHAR2
3020: ,p_org_code IN VARCHAR2
3021: ,p_batch_no IN VARCHAR2

Line 3040: gme_common_pvt.g_error_count := 0;

3036:
3037: /* Initialize message list and count if needed */
3038: IF p_init_msg_list = fnd_api.g_true THEN
3039: fnd_msg_pub.initialize;
3040: gme_common_pvt.g_error_count := 0;
3041: END IF;
3042:
3043: --added by qzeng no need to check if done in bulk validation
3044: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

Line 3044: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

3040: gme_common_pvt.g_error_count := 0;
3041: END IF;
3042:
3043: --added by qzeng no need to check if done in bulk validation
3044: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
3045: /* Setup the common constants used accross the apis */
3046: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
3047:
3048: IF NOT gme_common_pvt.g_setup_done THEN

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

3042:
3043: --added by qzeng no need to check if done in bulk validation
3044: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
3045: /* Setup the common constants used accross the apis */
3046: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
3047:
3048: IF NOT gme_common_pvt.g_setup_done THEN
3049: RAISE fnd_api.g_exc_error;
3050: END IF;

Line 3048: IF NOT gme_common_pvt.g_setup_done THEN

3044: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
3045: /* Setup the common constants used accross the apis */
3046: gme_common_pvt.g_setup_done := gme_common_pvt.setup (p_org_code => p_org_code);
3047:
3048: IF NOT gme_common_pvt.g_setup_done THEN
3049: RAISE fnd_api.g_exc_error;
3050: END IF;
3051: END IF;
3052: /* Make sure we are call compatible */

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

3053: IF NOT fnd_api.compatible_api_call (2
3054: ,p_api_version
3055: ,'delete_step'
3056: ,g_pkg_name) THEN
3057: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3058: RAISE fnd_api.g_exc_error;
3059: END IF;
3060: gme_api_main.delete_step (p_validation_level => p_validation_level
3061: ,p_init_msg_list => fnd_api.g_false

Line 3093: gme_common_pvt.count_and_get (x_count => x_message_count

3089: EXCEPTION
3090: WHEN fnd_api.g_exc_error THEN
3091: ROLLBACK TO SAVEPOINT delete_step;
3092: x_return_status := fnd_api.g_ret_sts_error;
3093: gme_common_pvt.count_and_get (x_count => x_message_count
3094: ,p_encoded => fnd_api.g_false
3095: ,x_data => x_message_list);
3096: WHEN delete_step_failed THEN
3097: ROLLBACK TO SAVEPOINT delete_step;

Line 3098: gme_common_pvt.count_and_get (x_count => x_message_count

3094: ,p_encoded => fnd_api.g_false
3095: ,x_data => x_message_list);
3096: WHEN delete_step_failed THEN
3097: ROLLBACK TO SAVEPOINT delete_step;
3098: gme_common_pvt.count_and_get (x_count => x_message_count
3099: ,p_encoded => fnd_api.g_false
3100: ,x_data => x_message_list);
3101: WHEN OTHERS THEN
3102: ROLLBACK TO SAVEPOINT delete_step;

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

3116: * Added new argument p_validate_flexfields
3117: /*************************************************************************/
3118: PROCEDURE insert_step (
3119: p_api_version IN NUMBER := 2.0
3120: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3121: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3122: ,p_commit IN VARCHAR2
3123: ,p_org_code IN VARCHAR2
3124: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false

Line 3173: gme_common_pvt.g_error_count := 0;

3169:
3170: /* Initialize message list and count if needed */
3171: IF p_init_msg_list = fnd_api.g_true THEN
3172: fnd_msg_pub.initialize;
3173: gme_common_pvt.g_error_count := 0;
3174: END IF;
3175: gme_common_pvt.g_setup_done :=
3176: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3177: ,p_org_code => p_org_code);

Line 3175: gme_common_pvt.g_setup_done :=

3171: IF p_init_msg_list = fnd_api.g_true THEN
3172: fnd_msg_pub.initialize;
3173: gme_common_pvt.g_error_count := 0;
3174: END IF;
3175: gme_common_pvt.g_setup_done :=
3176: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3177: ,p_org_code => p_org_code);
3178:
3179: IF NOT gme_common_pvt.g_setup_done THEN

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

3172: fnd_msg_pub.initialize;
3173: gme_common_pvt.g_error_count := 0;
3174: END IF;
3175: gme_common_pvt.g_setup_done :=
3176: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3177: ,p_org_code => p_org_code);
3178:
3179: IF NOT gme_common_pvt.g_setup_done THEN
3180: RAISE fnd_api.g_exc_error;

Line 3179: IF NOT gme_common_pvt.g_setup_done THEN

3175: gme_common_pvt.g_setup_done :=
3176: gme_common_pvt.setup (p_org_id => p_batch_header_rec.organization_id
3177: ,p_org_code => p_org_code);
3178:
3179: IF NOT gme_common_pvt.g_setup_done THEN
3180: RAISE fnd_api.g_exc_error;
3181: END IF;
3182:
3183: /* Make sure we are call compatible */

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

3184: IF NOT fnd_api.compatible_api_call (2
3185: ,p_api_version
3186: ,'insert_step'
3187: ,g_pkg_name) THEN
3188: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3189: RAISE fnd_api.g_exc_error;
3190: END IF;
3191:
3192: IF (p_batch_step_rec.batch_id IS NOT NULL) THEN

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

3203: END IF;
3204: END IF;
3205:
3206: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3207: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3208: gme_common_pvt.g_batch_completed,
3209: gme_common_pvt.g_batch_closed) ) THEN
3210: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3211: RAISE fnd_api.g_exc_error;

Line 3208: gme_common_pvt.g_batch_completed,

3204: END IF;
3205:
3206: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3207: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3208: gme_common_pvt.g_batch_completed,
3209: gme_common_pvt.g_batch_closed) ) THEN
3210: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3211: RAISE fnd_api.g_exc_error;
3212: END IF;

Line 3209: gme_common_pvt.g_batch_closed) ) THEN

3205:
3206: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3207: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3208: gme_common_pvt.g_batch_completed,
3209: gme_common_pvt.g_batch_closed) ) THEN
3210: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3211: RAISE fnd_api.g_exc_error;
3212: END IF;
3213:

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

3206: /* Bug 2766460 Added check not to allow insert step if batch is completed/closed or cancelled */
3207: IF (l_batch_header_rec.batch_status IN (gme_common_pvt.g_batch_cancelled,
3208: gme_common_pvt.g_batch_completed,
3209: gme_common_pvt.g_batch_closed) ) THEN
3210: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3211: RAISE fnd_api.g_exc_error;
3212: END IF;
3213:
3214: -- Bug 2979072 Stop insert if there is no routing associated with this batch.

Line 3216: gme_common_pvt.log_message

3212: END IF;
3213:
3214: -- Bug 2979072 Stop insert if there is no routing associated with this batch.
3215: IF (l_batch_header_rec.routing_id IS NULL) THEN
3216: gme_common_pvt.log_message
3217: (p_message_code => 'GME_API_NO_ROUTING_ASSOCIATED');
3218: RAISE fnd_api.g_exc_error;
3219: END IF;
3220:

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

3219: END IF;
3220:
3221: /* Punit Kumar , bringing this code from GMEVINSB.pls*/
3222: IF (p_batch_step_rec.steprelease_type NOT IN (1, 2) ) THEN
3223: gme_common_pvt.log_message ('GME_INVALID_STEPRELEASE');
3224: RAISE fnd_api.g_exc_error;
3225: END IF;
3226:
3227: /* End Bug 2397077 */

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

3224: RAISE fnd_api.g_exc_error;
3225: END IF;
3226:
3227: /* End Bug 2397077 */
3228: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)
3229: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN
3230: -- Closed or cancelled batch not valid for step insert...
3231: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3232: RAISE fnd_api.g_exc_error;

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

3225: END IF;
3226:
3227: /* End Bug 2397077 */
3228: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)
3229: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN
3230: -- Closed or cancelled batch not valid for step insert...
3231: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3232: RAISE fnd_api.g_exc_error;
3233: END IF;

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

3227: /* End Bug 2397077 */
3228: IF (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_closed)
3229: OR (l_batch_header_rec.batch_status = gme_common_pvt.g_batch_cancelled) THEN
3230: -- Closed or cancelled batch not valid for step insert...
3231: gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
3232: RAISE fnd_api.g_exc_error;
3233: END IF;
3234:
3235: IF p_batch_step_rec.oprn_id IS NOT NULL THEN

Line 3237: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

3233: END IF;
3234:
3235: IF p_batch_step_rec.oprn_id IS NOT NULL THEN
3236: --added by qzeng no need to check if done in bulk validation
3237: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
3238: OPEN get_oprn (p_batch_step_rec.oprn_id);
3239:
3240: FETCH get_oprn
3241: INTO l_oprn_no, l_oprn_vers;

Line 3288: gme_common_pvt.g_flex_validate_prof := 1;

3284: END IF;
3285: END IF;
3286:
3287: IF p_validate_flexfields = fnd_api.g_true THEN
3288: gme_common_pvt.g_flex_validate_prof := 1;
3289: ELSE
3290: gme_common_pvt.g_flex_validate_prof := 0;
3291: END IF;
3292: gme_api_main.insert_step (p_validation_level => p_validation_level

Line 3290: gme_common_pvt.g_flex_validate_prof := 0;

3286:
3287: IF p_validate_flexfields = fnd_api.g_true THEN
3288: gme_common_pvt.g_flex_validate_prof := 1;
3289: ELSE
3290: gme_common_pvt.g_flex_validate_prof := 0;
3291: END IF;
3292: gme_api_main.insert_step (p_validation_level => p_validation_level
3293: ,p_init_msg_list => fnd_api.g_false
3294: ,x_message_count => x_message_count

Line 3301: gme_common_pvt.g_flex_validate_prof := 0;

3297: ,p_batch_header_rec => l_batch_header_rec
3298: ,p_batch_step_rec => p_batch_step_rec
3299: ,x_batch_step => x_batch_step_rec);
3300:
3301: gme_common_pvt.g_flex_validate_prof := 0;
3302:
3303: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3304: RAISE insert_step_failed;
3305: ELSE

Line 3320: gme_common_pvt.count_and_get (x_count => x_message_count

3316: END IF;
3317: END IF;
3318: END IF;
3319:
3320: gme_common_pvt.count_and_get (x_count => x_message_count
3321: ,p_encoded => fnd_api.g_false
3322: ,x_data => x_message_list);
3323:
3324: IF g_debug <= gme_debug.g_log_procedure THEN

Line 3332: gme_common_pvt.count_and_get (x_count => x_message_count

3328: EXCEPTION
3329: WHEN fnd_api.g_exc_error THEN
3330: ROLLBACK TO SAVEPOINT insert_step;
3331: x_return_status := fnd_api.g_ret_sts_error;
3332: gme_common_pvt.count_and_get (x_count => x_message_count
3333: ,p_encoded => fnd_api.g_false
3334: ,x_data => x_message_list);
3335: WHEN insert_step_failed THEN
3336: ROLLBACK TO SAVEPOINT insert_step;

Line 3338: gme_common_pvt.count_and_get (x_count => x_message_count

3334: ,x_data => x_message_list);
3335: WHEN insert_step_failed THEN
3336: ROLLBACK TO SAVEPOINT insert_step;
3337: x_batch_step_rec := NULL;
3338: gme_common_pvt.count_and_get (x_count => x_message_count
3339: ,p_encoded => fnd_api.g_false
3340: ,x_data => x_message_list);
3341: WHEN OTHERS THEN
3342: ROLLBACK TO SAVEPOINT insert_step;

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

3374: Added parameter p_check_phantom when calling validate_batch.
3375: ================================================================================*/
3376: PROCEDURE insert_material_line (
3377: p_api_version IN NUMBER := 2.0
3378: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3379: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3380: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3381: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3382: ,p_material_detail_rec IN gme_material_details%ROWTYPE

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

3426: IF NOT fnd_api.compatible_api_call (2.0
3427: ,p_api_version
3428: ,'insert_material_line'
3429: ,g_pkg_name) THEN
3430: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3431: RAISE fnd_api.g_exc_error;
3432: END IF;
3433:
3434: /* Initialize message list and count if needed */

Line 3442: gme_common_pvt.validate_batch

3438:
3439: /* intialize local variable */
3440: l_material_detail_rec := p_material_detail_rec;
3441: -- Bug 7562848 - This api is ok for phantoms so bypass phantom check.
3442: gme_common_pvt.validate_batch
3443: (p_batch_header_rec => p_batch_header_rec
3444: ,p_org_code => p_org_code
3445: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3446: ,p_check_phantom => 'N'

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

3441: -- Bug 7562848 - This api is ok for phantoms so bypass phantom check.
3442: gme_common_pvt.validate_batch
3443: (p_batch_header_rec => p_batch_header_rec
3444: ,p_org_code => p_org_code
3445: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3446: ,p_check_phantom => 'N'
3447: ,x_batch_header_rec => l_batch_header_rec
3448: ,x_message_count => x_message_count
3449: ,x_message_list => x_message_list

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

3459:
3460: /*for ASQC batches batchstep_no is required */
3461: IF l_batch_header_rec.automatic_step_calculation <> 0 AND
3462: p_batchstep_no IS NULL THEN
3463: gme_common_pvt.log_message('GME_ASQC_STEP_REQUIRED');
3464: RAISE fnd_api.g_exc_error;
3465: END IF;
3466:
3467: IF l_batch_header_rec.poc_ind = 'Y' AND

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

3492: OPEN c_get_locator(l_batch_header_rec.organization_id, l_material_detail_rec.subinventory);
3493: FETCH c_get_locator INTO l_locator_id;
3494: IF c_get_locator%NOTFOUND THEN
3495: CLOSE c_get_locator;
3496: gme_common_pvt.log_message(p_product_code => 'INV'
3497: ,p_message_code => 'INV_INVALID_LOCATION');
3498: RAISE fnd_api.g_exc_error;
3499: END IF;
3500: CLOSE c_get_locator;

Line 3507: gme_common_pvt.g_flex_validate_prof := 1;

3503: END IF;
3504:
3505: --setting global flex validate
3506: IF p_validate_flexfields = FND_API.G_TRUE THEN
3507: gme_common_pvt.g_flex_validate_prof := 1;
3508: ELSE
3509: gme_common_pvt.g_flex_validate_prof := 0;
3510: END IF;
3511:

Line 3509: gme_common_pvt.g_flex_validate_prof := 0;

3505: --setting global flex validate
3506: IF p_validate_flexfields = FND_API.G_TRUE THEN
3507: gme_common_pvt.g_flex_validate_prof := 1;
3508: ELSE
3509: gme_common_pvt.g_flex_validate_prof := 0;
3510: END IF;
3511:
3512: --validate individual fields
3513: gme_material_detail_pvt.validate_material_for_ins (

Line 3523: gme_common_pvt.g_flex_validate_prof := 0;

3519:
3520: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3521: RAISE fnd_api.g_exc_error;
3522: END IF;
3523: gme_common_pvt.g_flex_validate_prof := 0;
3524: gme_common_pvt.set_timestamp;
3525: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3526: --calling insert material line new API
3527: l_material_detail_rec := x_material_detail_rec;

Line 3524: gme_common_pvt.set_timestamp;

3520: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3521: RAISE fnd_api.g_exc_error;
3522: END IF;
3523: gme_common_pvt.g_flex_validate_prof := 0;
3524: gme_common_pvt.set_timestamp;
3525: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3526: --calling insert material line new API
3527: l_material_detail_rec := x_material_detail_rec;
3528:

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

3521: RAISE fnd_api.g_exc_error;
3522: END IF;
3523: gme_common_pvt.g_flex_validate_prof := 0;
3524: gme_common_pvt.set_timestamp;
3525: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3526: --calling insert material line new API
3527: l_material_detail_rec := x_material_detail_rec;
3528:
3529: gme_api_main.insert_material_line (

Line 3570: gme_common_pvt.count_and_get (x_count => x_message_count

3566: WHEN fnd_api.g_exc_error THEN
3567: ROLLBACK TO SAVEPOINT insert_material_line;
3568: x_return_status := fnd_api.g_ret_sts_error;
3569: x_material_detail_rec := NULL;
3570: gme_common_pvt.count_and_get (x_count => x_message_count
3571: ,p_encoded => fnd_api.g_false
3572: ,x_data => x_message_list);
3573: WHEN OTHERS THEN
3574: ROLLBACK TO SAVEPOINT insert_material_line;

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

3602: Procedure Created
3603: ================================================================================*/
3604: PROCEDURE update_material_line (
3605: p_api_version IN NUMBER := 2.0
3606: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3607: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3608: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3609: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3610: ,p_material_detail_rec IN gme_material_details%ROWTYPE

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

3664: IF NOT fnd_api.compatible_api_call (2.0
3665: ,p_api_version
3666: ,'update_material_line'
3667: ,g_pkg_name) THEN
3668: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3669: RAISE fnd_api.g_exc_error;
3670: END IF;
3671:
3672: /* Initialize message list and count if needed */

Line 3679: gme_common_pvt.log_message ('GME_INVALID_FIELD'

3675: END IF;
3676:
3677: /*validatep p_scale_phantom procedure */
3678: IF (p_scale_phantom NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
3679: gme_common_pvt.log_message ('GME_INVALID_FIELD'
3680: ,'FIELD'
3681: ,'p_scale_phantom');
3682: RAISE fnd_api.g_exc_error;
3683: END IF;

Line 3687: gme_common_pvt.Validate_material_detail

3683: END IF;
3684:
3685: /* assigning local variables */
3686: l_material_detail_rec := p_material_detail_rec;
3687: gme_common_pvt.Validate_material_detail
3688: (p_material_detail_rec => l_material_detail_rec
3689: ,p_org_code => p_org_code
3690: ,p_batch_no => p_batch_header_rec.batch_no
3691: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

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

3687: gme_common_pvt.Validate_material_detail
3688: (p_material_detail_rec => l_material_detail_rec
3689: ,p_org_code => p_org_code
3690: ,p_batch_no => p_batch_header_rec.batch_no
3691: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3692: ,x_batch_header_rec => l_batch_header_rec
3693: ,x_material_detail_rec => l_stored_material_detail_rec
3694: ,x_message_count => x_message_count
3695: ,x_message_list => x_message_list

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

3737: OPEN c_get_locator(l_stored_material_detail_rec.organization_id, l_subinventory,p_locator_code);
3738: FETCH c_get_locator INTO l_locator_id;
3739: IF c_get_locator%NOTFOUND THEN
3740: CLOSE c_get_locator;
3741: gme_common_pvt.log_message(p_product_code => 'INV'
3742: ,p_message_code => 'INV_INVALID_LOCATION');
3743: RAISE fnd_api.g_exc_error;
3744: END IF;
3745: CLOSE c_get_locator;

Line 3752: gme_common_pvt.g_flex_validate_prof := 1;

3748: END IF;
3749:
3750: --setting global flex validate
3751: IF p_validate_flexfields = FND_API.G_TRUE THEN
3752: gme_common_pvt.g_flex_validate_prof := 1;
3753: ELSE
3754: gme_common_pvt.g_flex_validate_prof := 0;
3755: END IF;
3756:

Line 3754: gme_common_pvt.g_flex_validate_prof := 0;

3750: --setting global flex validate
3751: IF p_validate_flexfields = FND_API.G_TRUE THEN
3752: gme_common_pvt.g_flex_validate_prof := 1;
3753: ELSE
3754: gme_common_pvt.g_flex_validate_prof := 0;
3755: END IF;
3756:
3757: --validate and pop material line
3758: gme_material_detail_pvt.val_and_pop_material_for_upd

Line 3767: gme_common_pvt.g_flex_validate_prof := 0;

3763: ,x_material_detail_rec => x_material_detail_rec
3764: ,x_return_status => l_return_status );
3765:
3766: --resetting global flex validate after validating
3767: gme_common_pvt.g_flex_validate_prof := 0;
3768:
3769: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3770: RAISE fnd_api.g_exc_error;
3771: END IF;

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

3768:
3769: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3770: RAISE fnd_api.g_exc_error;
3771: END IF;
3772: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3773: gme_common_pvt.set_timestamp;
3774: --calling update material line new API
3775: l_material_detail_rec := x_material_detail_rec;
3776:

Line 3773: gme_common_pvt.set_timestamp;

3769: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3770: RAISE fnd_api.g_exc_error;
3771: END IF;
3772: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3773: gme_common_pvt.set_timestamp;
3774: --calling update material line new API
3775: l_material_detail_rec := x_material_detail_rec;
3776:
3777: gme_api_main.update_material_line (

Line 3822: gme_common_pvt.count_and_get (x_count => x_message_count

3818: WHEN fnd_api.g_exc_error THEN
3819: ROLLBACK TO SAVEPOINT update_material_line;
3820: x_return_status := fnd_api.g_ret_sts_error;
3821: x_material_detail_rec := NULL;
3822: gme_common_pvt.count_and_get (x_count => x_message_count
3823: ,p_encoded => fnd_api.g_false
3824: ,x_data => x_message_list);
3825: WHEN OTHERS THEN
3826: ROLLBACK TO SAVEPOINT update_material_line;

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

3850: Procedure Created
3851: ================================================================================*/
3852: PROCEDURE delete_material_line (
3853: p_api_version IN NUMBER := 2.0
3854: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
3855: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
3856: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
3857: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
3858: ,p_material_detail_rec IN gme_material_details%ROWTYPE

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

3894: IF NOT fnd_api.compatible_api_call (2.0
3895: ,p_api_version
3896: ,'delete_material_line'
3897: ,g_pkg_name) THEN
3898: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
3899: RAISE fnd_api.g_exc_error;
3900: END IF;
3901:
3902: /* Initialize message list and count if needed */

Line 3907: gme_common_pvt.Validate_material_detail

3903: IF p_init_msg_list = fnd_api.g_true THEN
3904: fnd_msg_pub.initialize;
3905: END IF;
3906:
3907: gme_common_pvt.Validate_material_detail
3908: (p_material_detail_rec => p_material_detail_rec
3909: ,p_org_code => p_org_code
3910: ,p_batch_no => p_batch_header_rec.batch_no
3911: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

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

3907: gme_common_pvt.Validate_material_detail
3908: (p_material_detail_rec => p_material_detail_rec
3909: ,p_org_code => p_org_code
3910: ,p_batch_no => p_batch_header_rec.batch_no
3911: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
3912: ,x_batch_header_rec => l_batch_header_rec
3913: ,x_material_detail_rec => l_material_detail_rec
3914: ,x_message_count => x_message_count
3915: ,x_message_list => x_message_list

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

3946:
3947: IF x_return_status <> fnd_api.g_ret_sts_success THEN
3948: RAISE fnd_api.g_exc_error;
3949: END IF;
3950: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
3951: --calling delete material line
3952: gme_api_main.delete_material_line (
3953: p_validation_level => p_validation_level
3954: ,p_init_msg_list => p_init_msg_list

Line 3976: gme_common_pvt.count_and_get (x_count => x_message_count

3972: EXCEPTION
3973: WHEN fnd_api.g_exc_error THEN
3974: ROLLBACK TO SAVEPOINT delete_material_line;
3975: x_return_status := fnd_api.g_ret_sts_error;
3976: gme_common_pvt.count_and_get (x_count => x_message_count
3977: ,p_encoded => fnd_api.g_false
3978: ,x_data => x_message_list);
3979: WHEN OTHERS THEN
3980: ROLLBACK TO SAVEPOINT delete_material_line;

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

4057: SAVEPOINT revert_batch;
4058:
4059: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_to_wip_batch', g_pkg_name ) THEN
4060: x_return_status := FND_API.G_RET_STS_ERROR;
4061: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4062: RAISE FND_API.g_exc_error;
4063: END IF;
4064: -- fetch and validate the batch
4065: gme_common_pvt.validate_batch

Line 4065: gme_common_pvt.validate_batch

4061: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4062: RAISE FND_API.g_exc_error;
4063: END IF;
4064: -- fetch and validate the batch
4065: gme_common_pvt.validate_batch
4066: (p_batch_header_rec => p_batch_header_rec
4067: ,p_org_code => p_org_code
4068: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4069: ,x_batch_header_rec => l_batch_header_rec

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

4064: -- fetch and validate the batch
4065: gme_common_pvt.validate_batch
4066: (p_batch_header_rec => p_batch_header_rec
4067: ,p_org_code => p_org_code
4068: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4069: ,x_batch_header_rec => l_batch_header_rec
4070: ,x_message_count => x_message_count
4071: ,x_message_list => x_message_list
4072: ,x_return_status => x_return_status );

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

4078: END IF;
4079: RAISE fnd_api.g_exc_error;
4080: END IF;
4081:
4082: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
4083: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
4084: RAISE fnd_api.g_exc_error;
4085: END IF;
4086: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN

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

4079: RAISE fnd_api.g_exc_error;
4080: END IF;
4081:
4082: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
4083: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
4084: RAISE fnd_api.g_exc_error;
4085: END IF;
4086: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4087: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');

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

4082: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
4083: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
4084: RAISE fnd_api.g_exc_error;
4085: END IF;
4086: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4087: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
4088: RAISE fnd_api.g_exc_error;
4089: END IF;
4090: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN

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

4083: gme_common_pvt.log_message('GME_INVALID_BATCH_TYPE');
4084: RAISE fnd_api.g_exc_error;
4085: END IF;
4086: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4087: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
4088: RAISE fnd_api.g_exc_error;
4089: END IF;
4090: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN
4091: gme_common_pvt.log_message('GME_API_REV_WIP_TERM_ERROR');

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

4087: gme_common_pvt.log_message('GME_API_INVALID_BATCH_UNCERT');
4088: RAISE fnd_api.g_exc_error;
4089: END IF;
4090: IF (NVL(l_batch_header_rec.terminated_ind, 0) = 1) THEN
4091: gme_common_pvt.log_message('GME_API_REV_WIP_TERM_ERROR');
4092: RAISE fnd_api.g_exc_error;
4093: END IF;
4094:
4095: IF g_debug <= gme_debug.g_log_statement THEN

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

4095: IF g_debug <= gme_debug.g_log_statement THEN
4096: gme_debug.put_line('calling main revert');
4097: END IF;
4098: --Bug#5327296
4099: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4100: /* Bug 6437252 Check for LPN txns */
4101: /*Added by Shalchen 02/28/2013
4102: Add IF condition to bypass LPN
4103: validition for batch open interface project*/

Line 4104: IF NVL(gme_common_pvt.g_bulk_validation_done,'N') = 'N' THEN

4100: /* Bug 6437252 Check for LPN txns */
4101: /*Added by Shalchen 02/28/2013
4102: Add IF condition to bypass LPN
4103: validition for batch open interface project*/
4104: IF NVL(gme_common_pvt.g_bulk_validation_done,'N') = 'N' THEN
4105: OPEN get_lpn_txns (l_batch_header_rec.batch_id);
4106: FETCH get_lpn_txns INTO x_lpn_txns;
4107: CLOSE get_lpn_txns;
4108:

Line 4111: gme_common_pvt.log_message ('GME_LPN_TRANS_EXISTS');

4107: CLOSE get_lpn_txns;
4108:
4109: IF ( NVL(x_lpn_txns, 0) > 0) THEN
4110: IF p_continue_lpn_txn = 'N' THEN
4111: gme_common_pvt.log_message ('GME_LPN_TRANS_EXISTS');
4112: RAISE fnd_api.g_exc_error;
4113: END IF;
4114: END IF;
4115: END IF;

Line 4144: p_table => gme_common_pvt.g_interface_table,

4140: || l_batch_header_rec.batch_id);
4141: END IF;
4142:
4143: gme_api_pub.save_batch (p_header_id => NULL,
4144: p_table => gme_common_pvt.g_interface_table,
4145: p_commit => p_commit,
4146: x_return_status => x_return_status);
4147:
4148: IF g_debug <= gme_debug.g_log_statement THEN

Line 4162: gme_common_pvt.count_and_get (

4158: ELSE
4159: RAISE fnd_api.g_exc_error;
4160: END IF;
4161:
4162: gme_common_pvt.count_and_get (
4163: x_count => x_message_count,
4164: p_encoded => FND_API.g_false,
4165: x_data => x_message_list
4166: );

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

4173: EXCEPTION
4174: WHEN batch_revert_failure THEN
4175: ROLLBACK TO SAVEPOINT revert_batch;
4176: x_batch_header_rec := NULL;
4177: gme_common_pvt.count_and_get(x_count => x_message_count,
4178: p_encoded => FND_API.g_false,
4179: x_data => x_message_list);
4180: WHEN FND_API.g_exc_error THEN
4181: ROLLBACK TO SAVEPOINT revert_batch;

Line 4184: gme_common_pvt.count_and_get (x_count => x_message_count

4180: WHEN FND_API.g_exc_error THEN
4181: ROLLBACK TO SAVEPOINT revert_batch;
4182: x_return_status := fnd_api.g_ret_sts_error;
4183: x_batch_header_rec := NULL;
4184: gme_common_pvt.count_and_get (x_count => x_message_count
4185: ,p_encoded => fnd_api.g_false
4186: ,x_data => x_message_list);
4187: WHEN OTHERS THEN
4188: ROLLBACK TO SAVEPOINT revert_batch;

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

4250: fnd_msg_pub.initialize;
4251: END IF;
4252:
4253: IF NOT FND_API.compatible_api_call(2.0, p_api_version, 'revert_step', g_pkg_name ) THEN
4254: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4255: RAISE fnd_api.g_exc_error;
4256: END IF;
4257:
4258: /* Validate Input parameters */

Line 4259: gme_common_pvt.Validate_batch_step (

4255: RAISE fnd_api.g_exc_error;
4256: END IF;
4257:
4258: /* Validate Input parameters */
4259: gme_common_pvt.Validate_batch_step (
4260: p_batch_step_rec => p_batch_step_rec
4261: ,p_org_code => p_org_code
4262: ,p_batch_no => p_batch_no
4263: ,x_batch_step_rec => l_batch_step_rec

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

4274: RAISE fnd_api.g_exc_error;
4275: END IF;
4276:
4277: IF (l_batch_header_rec.batch_status <> 2) THEN
4278: gme_common_pvt.log_message ('GME_API_INV_BATCH_UNCERT_STEP');
4279: RAISE fnd_api.g_exc_error;
4280: END IF;
4281:
4282: IF (l_batch_step_rec.step_status <> 3) THEN

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

4279: RAISE fnd_api.g_exc_error;
4280: END IF;
4281:
4282: IF (l_batch_step_rec.step_status <> 3) THEN
4283: gme_common_pvt.log_message ('GME_API_INV_STEP_STAT_UNCERT');
4284: RAISE fnd_api.g_exc_error;
4285: END IF;
4286:
4287: --Bug#5327296

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

4284: RAISE fnd_api.g_exc_error;
4285: END IF;
4286:
4287: --Bug#5327296
4288: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4289: gme_api_main.revert_step
4290: (p_validation_level => p_validation_level,
4291: p_init_msg_list => FND_API.G_FALSE,
4292: x_message_count => x_message_count,

Line 4307: p_table => gme_common_pvt.g_interface_table,

4303:
4304: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4305: IF p_commit = FND_API.G_TRUE THEN
4306: gme_api_pub.save_batch (p_header_id => NULL,
4307: p_table => gme_common_pvt.g_interface_table,
4308: p_commit => FND_API.G_FALSE,
4309: x_return_status => x_return_status);
4310: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
4311: COMMIT;

Line 4320: gme_common_pvt.count_and_get (

4316: ELSE
4317: RAISE step_revert_failure;
4318: END IF;
4319:
4320: gme_common_pvt.count_and_get (
4321: x_count => x_message_count,
4322: p_encoded => FND_API.g_false,
4323: x_data => x_message_list
4324: );

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

4330: EXCEPTION
4331: WHEN step_revert_failure THEN
4332: ROLLBACK TO SAVEPOINT revert_step;
4333: x_batch_step_rec := NULL;
4334: gme_common_pvt.count_and_get(x_count => x_message_count,
4335: p_encoded => FND_API.g_false,
4336: x_data => x_message_list);
4337: WHEN FND_API.g_exc_error THEN
4338: ROLLBACK TO SAVEPOINT revert_step;

Line 4341: gme_common_pvt.count_and_get (x_count => x_message_count

4337: WHEN FND_API.g_exc_error THEN
4338: ROLLBACK TO SAVEPOINT revert_step;
4339: x_batch_step_rec := NULL;
4340: x_return_status := fnd_api.g_ret_sts_error;
4341: gme_common_pvt.count_and_get (x_count => x_message_count
4342: ,p_encoded => fnd_api.g_false
4343: ,x_data => x_message_list);
4344: WHEN OTHERS THEN
4345: ROLLBACK TO SAVEPOINT revert_step;

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

4388: ,p_api_version
4389: ,'close_batch'
4390: ,g_pkg_name) THEN
4391: x_return_status := fnd_api.g_ret_sts_error;
4392: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4393: RAISE fnd_api.g_exc_error;
4394: END IF;
4395: gme_common_pvt.validate_batch
4396: (p_batch_header_rec => p_batch_header_rec

Line 4395: gme_common_pvt.validate_batch

4391: x_return_status := fnd_api.g_ret_sts_error;
4392: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4393: RAISE fnd_api.g_exc_error;
4394: END IF;
4395: gme_common_pvt.validate_batch
4396: (p_batch_header_rec => p_batch_header_rec
4397: ,p_org_code => p_org_code
4398: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4399: ,x_batch_header_rec => l_batch_header_rec

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

4394: END IF;
4395: gme_common_pvt.validate_batch
4396: (p_batch_header_rec => p_batch_header_rec
4397: ,p_org_code => p_org_code
4398: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4399: ,x_batch_header_rec => l_batch_header_rec
4400: ,x_message_count => x_message_count
4401: ,x_message_list => x_message_list
4402: ,x_return_status => x_return_status );

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

4409: RAISE fnd_api.g_exc_error;
4410: END IF;
4411:
4412:
4413: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4414: gme_common_pvt.log_message ('GME_CLOSE_STATUS_ERR');
4415: RAISE fnd_api.g_exc_error;
4416: END IF;
4417:

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

4410: END IF;
4411:
4412:
4413: IF (l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_completed) THEN
4414: gme_common_pvt.log_message ('GME_CLOSE_STATUS_ERR');
4415: RAISE fnd_api.g_exc_error;
4416: END IF;
4417:
4418: IF (p_batch_header_rec.batch_close_date IS NULL) THEN

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

4418: IF (p_batch_header_rec.batch_close_date IS NULL) THEN
4419: l_batch_header_rec.batch_close_date := SYSDATE;
4420: ELSIF (p_batch_header_rec.batch_close_date <
4421: l_batch_header_rec.actual_cmplt_date) THEN
4422: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1' ,'Close
4423: date' ,'DATE2','completion date');
4424: RAISE fnd_api.g_exc_error;
4425: ELSIF (p_batch_header_rec.batch_close_date > SYSDATE) THEN
4426: gme_common_pvt.log_message(p_product_code => 'GMA'

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

4422: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1' ,'Close
4423: date' ,'DATE2','completion date');
4424: RAISE fnd_api.g_exc_error;
4425: ELSIF (p_batch_header_rec.batch_close_date > SYSDATE) THEN
4426: gme_common_pvt.log_message(p_product_code => 'GMA'
4427: ,p_message_code => 'SY_NOFUTUREDATE');
4428: RAISE fnd_api.g_exc_error;
4429: ELSE
4430: l_batch_header_rec.batch_close_date :=

Line 4485: gme_common_pvt.count_and_get (x_count => x_message_count

4481: EXCEPTION
4482: WHEN batch_close_failure THEN
4483: ROLLBACK TO SAVEPOINT close_batch_pub;
4484: x_batch_header_rec := NULL;
4485: gme_common_pvt.count_and_get (x_count => x_message_count
4486: ,p_encoded => fnd_api.g_false
4487: ,x_data => x_message_list);
4488: WHEN FND_API.g_exc_error THEN
4489: ROLLBACK TO SAVEPOINT close_batch_pub;

Line 4492: gme_common_pvt.count_and_get (x_count => x_message_count

4488: WHEN FND_API.g_exc_error THEN
4489: ROLLBACK TO SAVEPOINT close_batch_pub;
4490: x_batch_header_rec := NULL;
4491: x_return_status := fnd_api.g_ret_sts_error;
4492: gme_common_pvt.count_and_get (x_count => x_message_count
4493: ,p_encoded => fnd_api.g_false
4494: ,x_data => x_message_list);
4495: WHEN OTHERS THEN
4496: ROLLBACK TO SAVEPOINT close_batch_pub;

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

4503: /*************************************************************************/
4504: PROCEDURE close_step (
4505: p_api_version IN NUMBER := 2
4506: /* Punit Kumar */
4507: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4508: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4509: ,p_commit IN VARCHAR2
4510: ,x_message_count OUT NOCOPY NUMBER
4511: ,x_message_list OUT NOCOPY VARCHAR2

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

4543: ,p_api_version
4544: ,'close_batch_step'
4545: ,g_pkg_name) THEN
4546: x_return_status := fnd_api.g_ret_sts_error;
4547: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4548: RAISE fnd_api.g_exc_error;
4549: END IF;
4550:
4551: /* Validate Input parameters */

Line 4552: gme_common_pvt.Validate_batch_step (

4548: RAISE fnd_api.g_exc_error;
4549: END IF;
4550:
4551: /* Validate Input parameters */
4552: gme_common_pvt.Validate_batch_step (
4553: p_batch_step_rec => p_batch_step_rec
4554: ,p_org_code => p_org_code
4555: ,p_batch_no => p_batch_no
4556: ,x_batch_step_rec => l_batch_step_rec

Line 4576: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE'

4572: l_batch_step_rec.step_close_date := SYSDATE;
4573: ELSIF (p_batch_step_rec.step_close_date <
4574: NVL (l_batch_step_rec.actual_cmplt_date
4575: ,p_batch_step_rec.step_close_date) ) THEN
4576: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE'
4577: ,'DATE1'
4578: ,'Close date'
4579: ,'DATE2'
4580: ,'completion date');

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

4579: ,'DATE2'
4580: ,'completion date');
4581: RAISE fnd_api.g_exc_error;
4582: ELSIF (p_batch_step_rec.step_close_date > SYSDATE) THEN
4583: gme_common_pvt.log_message(p_product_code => 'GMA'
4584: ,p_message_code => 'SY_NOFUTUREDATE');
4585: RAISE fnd_api.g_exc_error;
4586: ELSE
4587: l_batch_step_rec.step_close_date := p_batch_step_rec.step_close_date;

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

4587: l_batch_step_rec.step_close_date := p_batch_step_rec.step_close_date;
4588: END IF;
4589:
4590: IF (l_batch_step_rec.step_status <> 3) THEN
4591: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
4592: RAISE fnd_api.g_exc_error;
4593: END IF;
4594:
4595: gme_api_main.close_step (p_validation_level => p_validation_level

Line 4630: gme_common_pvt.count_and_get (x_count => x_message_count

4626: EXCEPTION
4627: WHEN step_close_failed THEN
4628: ROLLBACK TO SAVEPOINT close_step_pub;
4629: x_batch_step_rec := NULL;
4630: gme_common_pvt.count_and_get (x_count => x_message_count
4631: ,p_encoded => fnd_api.g_false
4632: ,x_data => x_message_list);
4633: WHEN fnd_api.g_exc_error THEN
4634: ROLLBACK TO SAVEPOINT close_step_pub;

Line 4637: gme_common_pvt.count_and_get (x_count => x_message_count

4633: WHEN fnd_api.g_exc_error THEN
4634: ROLLBACK TO SAVEPOINT close_step_pub;
4635: x_batch_step_rec := NULL;
4636: x_return_status := fnd_api.g_ret_sts_error;
4637: gme_common_pvt.count_and_get (x_count => x_message_count
4638: ,p_encoded => fnd_api.g_false
4639: ,x_data => x_message_list);
4640: WHEN OTHERS THEN
4641: ROLLBACK TO SAVEPOINT close_step_pub;

Line 4653: := gme_common_pvt.g_max_errors

4649: /*************************************************************************/
4650: PROCEDURE reopen_batch (
4651: p_api_version IN NUMBER := 2
4652: ,p_validation_level IN NUMBER
4653: := gme_common_pvt.g_max_errors
4654: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4655: ,p_commit IN VARCHAR2
4656: ,x_message_count OUT NOCOPY NUMBER
4657: ,x_message_list OUT NOCOPY VARCHAR2

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

4680: IF NOT fnd_api.compatible_api_call (2.0 /* Punit Kumar */
4681: ,p_api_version
4682: ,'reopen_batch'
4683: ,g_pkg_name) THEN
4684: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4685: RAISE fnd_api.g_exc_error;
4686: END IF;
4687: gme_common_pvt.validate_batch
4688: (p_batch_header_rec => p_batch_header_rec

Line 4687: gme_common_pvt.validate_batch

4683: ,g_pkg_name) THEN
4684: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4685: RAISE fnd_api.g_exc_error;
4686: END IF;
4687: gme_common_pvt.validate_batch
4688: (p_batch_header_rec => p_batch_header_rec
4689: ,p_org_code => p_org_code
4690: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4691: ,x_batch_header_rec => l_batch_header_rec

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

4686: END IF;
4687: gme_common_pvt.validate_batch
4688: (p_batch_header_rec => p_batch_header_rec
4689: ,p_org_code => p_org_code
4690: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4691: ,x_batch_header_rec => l_batch_header_rec
4692: ,x_message_count => x_message_count
4693: ,x_message_list => x_message_list
4694: ,x_return_status => x_return_status );

Line 4737: gme_common_pvt.count_and_get (x_count => x_message_count

4733: END IF;
4734: EXCEPTION
4735: WHEN batch_reopen_failure THEN
4736: x_batch_header_rec := NULL;
4737: gme_common_pvt.count_and_get (x_count => x_message_count
4738: ,p_encoded => fnd_api.g_false
4739: ,x_data => x_message_list);
4740: x_return_status := fnd_api.g_ret_sts_error;
4741: WHEN fnd_api.g_exc_error THEN

Line 4744: gme_common_pvt.count_and_get (x_count => x_message_count

4740: x_return_status := fnd_api.g_ret_sts_error;
4741: WHEN fnd_api.g_exc_error THEN
4742: x_batch_header_rec := NULL;
4743: x_return_status := fnd_api.g_ret_sts_error;
4744: gme_common_pvt.count_and_get (x_count => x_message_count
4745: ,p_encoded => fnd_api.g_false
4746: ,x_data => x_message_list);
4747: WHEN OTHERS THEN
4748: x_batch_header_rec := NULL;

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

4754:
4755: /*************************************************************************/
4756: PROCEDURE reopen_step (
4757: p_api_version IN NUMBER := 2
4758: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4759: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4760: ,p_commit IN VARCHAR2
4761: ,x_message_count OUT NOCOPY NUMBER
4762: ,x_message_list OUT NOCOPY VARCHAR2

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

4784: IF NOT fnd_api.compatible_api_call (2
4785: ,p_api_version
4786: ,'reopen_step'
4787: ,g_pkg_name) THEN
4788: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4789: RAISE fnd_api.g_exc_error;
4790: END IF;
4791:
4792: /* Set the success staus to success inititally*/

Line 4794: gme_common_pvt.Validate_batch_step (

4790: END IF;
4791:
4792: /* Set the success staus to success inititally*/
4793: x_return_status := fnd_api.g_ret_sts_success;
4794: gme_common_pvt.Validate_batch_step (
4795: p_batch_step_rec => p_batch_step_rec
4796: ,p_org_code => p_org_code
4797: ,p_batch_no => p_batch_header_rec.batch_no
4798: ,x_batch_step_rec => l_batch_step_rec

Line 4843: gme_common_pvt.count_and_get (x_count => x_message_count

4839: END IF;
4840: EXCEPTION
4841: WHEN step_reopen_failure THEN
4842: x_batch_step_rec := NULL;
4843: gme_common_pvt.count_and_get (x_count => x_message_count
4844: ,p_encoded => fnd_api.g_false
4845: ,x_data => x_message_list);
4846: x_return_status := fnd_api.g_ret_sts_error;
4847: WHEN fnd_api.g_exc_error THEN

Line 4850: gme_common_pvt.count_and_get (x_count => x_message_count

4846: x_return_status := fnd_api.g_ret_sts_error;
4847: WHEN fnd_api.g_exc_error THEN
4848: x_batch_step_rec := NULL;
4849: x_return_status := fnd_api.g_ret_sts_error;
4850: gme_common_pvt.count_and_get (x_count => x_message_count
4851: ,p_encoded => fnd_api.g_false
4852: ,x_data => x_message_list);
4853: WHEN OTHERS THEN
4854: x_batch_step_rec := NULL;

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

4860:
4861: /*************************************************************************/
4862: PROCEDURE incremental_backflush
4863: (p_api_version IN NUMBER
4864: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
4865: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
4866: ,p_commit IN VARCHAR2 := fnd_api.g_false
4867: ,x_message_count OUT NOCOPY NUMBER
4868: ,x_message_list OUT NOCOPY VARCHAR2

Line 4878: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

4874: ,p_qty_type IN NUMBER
4875: ,p_trans_date IN DATE
4876: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
4877: ,p_adjust_cmplt IN VARCHAR2 := fnd_api.g_true
4878: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
4879: IS
4880: l_api_name CONSTANT VARCHAR2 (30) := 'INCREMENTAL_BACKFLUSH';
4881: l_material_detail_rec gme_material_details%ROWTYPE;
4882: l_batch_header_rec gme_batch_header%ROWTYPE;

Line 4883: l_exception_material_tbl gme_common_pvt.exceptions_tab;

4879: IS
4880: l_api_name CONSTANT VARCHAR2 (30) := 'INCREMENTAL_BACKFLUSH';
4881: l_material_detail_rec gme_material_details%ROWTYPE;
4882: l_batch_header_rec gme_batch_header%ROWTYPE;
4883: l_exception_material_tbl gme_common_pvt.exceptions_tab;
4884:
4885: error_incr_backflush EXCEPTION;
4886: BEGIN
4887: IF (g_debug <> -1) THEN

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

4902: IF NOT fnd_api.compatible_api_call (2.0
4903: ,p_api_version
4904: ,'incremental_backflush'
4905: ,g_pkg_name) THEN
4906: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
4907: RAISE fnd_api.g_exc_error;
4908: END IF;
4909:
4910: /* Retrieve Batch Header and Material Detail Record */

Line 4911: gme_common_pvt.Validate_material_detail

4907: RAISE fnd_api.g_exc_error;
4908: END IF;
4909:
4910: /* Retrieve Batch Header and Material Detail Record */
4911: gme_common_pvt.Validate_material_detail
4912: (p_material_detail_rec => p_material_detail_rec
4913: ,p_org_code => p_org_code
4914: ,p_batch_no => p_batch_header_rec.batch_no
4915: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

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

4911: gme_common_pvt.Validate_material_detail
4912: (p_material_detail_rec => p_material_detail_rec
4913: ,p_org_code => p_org_code
4914: ,p_batch_no => p_batch_header_rec.batch_no
4915: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
4916: ,x_batch_header_rec => l_batch_header_rec
4917: ,x_material_detail_rec => l_material_detail_rec
4918: ,x_message_count => x_message_count
4919: ,x_message_list => x_message_list

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

4927: END IF;
4928: -- Validations
4929: IF p_trans_date IS NOT NULL THEN
4930: IF p_trans_date > SYSDATE THEN
4931: gme_common_pvt.log_message(p_product_code => 'GMA'
4932: ,p_message_code => 'SY_NOFUTUREDATE');
4933: RAISE fnd_api.g_exc_error;
4934: END IF;
4935: END IF;

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

4941: IF l_batch_header_rec.batch_status = 3 THEN /*other batch status will be validated in the below validate procedure */
4942: IF (p_qty_type = 0 AND p_qty > 0) OR
4943: (p_qty_type = 1 AND p_qty > l_material_detail_rec.actual_qty) OR
4944: (p_qty_type = 2 AND (l_material_detail_rec.wip_plan_qty *p_qty/100) > l_material_detail_rec.actual_qty) THEN
4945: gme_common_pvt.log_message('GME_IB_NOT_ALLOWED');
4946: RAISE fnd_api.g_exc_error;
4947: END IF;
4948: END IF;
4949:

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

4966: IF x_return_status <> fnd_api.g_ret_sts_success THEN
4967: RAISE fnd_api.g_exc_error;
4968: END IF;
4969:
4970: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
4971:
4972: /* Invoke main */
4973: gme_api_main.incremental_backflush
4974: (p_validation_level => p_validation_level

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

4982: ,p_qty_type => p_qty_type
4983: ,p_trans_date => p_trans_date
4984: ,x_exception_material_tbl => l_exception_material_tbl);
4985:
4986: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
4987: x_return_status := fnd_api.g_ret_sts_success;
4988: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
4989: x_exception_material_tbl := l_exception_material_tbl;
4990: END IF;

Line 4988: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

4984: ,x_exception_material_tbl => l_exception_material_tbl);
4985:
4986: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
4987: x_return_status := fnd_api.g_ret_sts_success;
4988: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
4989: x_exception_material_tbl := l_exception_material_tbl;
4990: END IF;
4991:
4992: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 4998: (p_header_id => gme_common_pvt.g_transaction_header_id

4994: END IF;
4995:
4996: /* Invoke save_batch */
4997: gme_api_pub.save_batch
4998: (p_header_id => gme_common_pvt.g_transaction_header_id
4999: ,p_table => 1
5000: ,p_commit => p_commit
5001: ,x_return_status => x_return_status);
5002:

Line 5015: gme_common_pvt.count_and_get (x_count => x_message_count

5011: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
5012: END IF;
5013: EXCEPTION
5014: WHEN error_incr_backflush THEN
5015: gme_common_pvt.count_and_get (x_count => x_message_count
5016: ,p_encoded => fnd_api.g_false
5017: ,x_data => x_message_list);
5018: WHEN fnd_api.g_exc_error THEN
5019: x_return_status := fnd_api.g_ret_sts_error;

Line 5034: := gme_common_pvt.g_max_errors

5030: /*************************************************************************/
5031: PROCEDURE create_material_txn (
5032: p_api_version IN NUMBER := 2.0
5033: ,p_validation_level IN NUMBER
5034: := gme_common_pvt.g_max_errors
5035: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5036: ,p_commit IN VARCHAR2 := fnd_api.g_false
5037: ,p_save_batch IN VARCHAR2 := fnd_api.g_true -- Bug 14685438
5038: ,x_message_count OUT NOCOPY NUMBER

Line 5043: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl

5039: ,x_message_list OUT NOCOPY VARCHAR2
5040: ,x_return_status OUT NOCOPY VARCHAR2
5041: ,p_org_code IN VARCHAR2 := NULL
5042: ,p_mmti_rec IN mtl_transactions_interface%ROWTYPE
5043: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl
5044: ,p_batch_no IN VARCHAR2 := NULL
5045: ,p_line_no IN NUMBER := NULL
5046: ,p_line_type IN NUMBER := NULL
5047: ,p_create_lot IN VARCHAR2 := NULL

Line 5051: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)

5047: ,p_create_lot IN VARCHAR2 := NULL
5048: ,p_generate_lot IN VARCHAR2 := NULL
5049: ,p_generate_parent_lot IN VARCHAR2 := NULL
5050: ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE
5051: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)
5052: IS
5053: CURSOR cur_get_item_rec (v_item_id NUMBER, v_org_id NUMBER)
5054: IS
5055: SELECT *

Line 5067: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

5063: WHERE transaction_set_id = v_header_id;
5064:
5065: l_api_name CONSTANT VARCHAR2 (30) := 'CREATE_MATERIAL_TXN';
5066: l_mmti_rec mtl_transactions_interface%ROWTYPE;
5067: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
5068: l_mat_dtl_rec gme_material_details%ROWTYPE;
5069: l_mat_dtl_rec_out gme_material_details%ROWTYPE;
5070: l_batch_header_rec gme_batch_header%ROWTYPE;
5071: l_item_rec mtl_system_items_b%ROWTYPE;

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

5121: IF NOT fnd_api.compatible_api_call (2.0
5122: ,p_api_version
5123: ,'create_material_txn'
5124: ,g_pkg_name) THEN
5125: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5126: RAISE fnd_api.g_exc_error;
5127: END IF;
5128:
5129: l_mmti_rec := p_mmti_rec;

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

5134: fnd_msg_pub.ADD;
5135: RAISE fnd_api.g_exc_error;
5136: END IF;
5137:
5138: /* gme_common_pvt.g_error_count := 0;
5139: gme_common_pvt.g_setup_done :=
5140: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
5141: ,p_org_code => p_org_code);
5142:

Line 5139: gme_common_pvt.g_setup_done :=

5135: RAISE fnd_api.g_exc_error;
5136: END IF;
5137:
5138: /* gme_common_pvt.g_error_count := 0;
5139: gme_common_pvt.g_setup_done :=
5140: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
5141: ,p_org_code => p_org_code);
5142:
5143: IF NOT gme_common_pvt.g_setup_done THEN

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

5136: END IF;
5137:
5138: /* gme_common_pvt.g_error_count := 0;
5139: gme_common_pvt.g_setup_done :=
5140: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
5141: ,p_org_code => p_org_code);
5142:
5143: IF NOT gme_common_pvt.g_setup_done THEN
5144: RAISE fnd_api.g_exc_error;

Line 5143: IF NOT gme_common_pvt.g_setup_done THEN

5139: gme_common_pvt.g_setup_done :=
5140: gme_common_pvt.setup (p_org_id => l_mmti_rec.organization_id
5141: ,p_org_code => p_org_code);
5142:
5143: IF NOT gme_common_pvt.g_setup_done THEN
5144: RAISE fnd_api.g_exc_error;
5145: ELSE
5146: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;
5147: END IF;*/

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

5142:
5143: IF NOT gme_common_pvt.g_setup_done THEN
5144: RAISE fnd_api.g_exc_error;
5145: ELSE
5146: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;
5147: END IF;*/
5148: gme_common_pvt.set_timestamp;
5149: /* Bug 5358129 added code so line type line no combo will also retrieve material */
5150: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;

Line 5148: gme_common_pvt.set_timestamp;

5144: RAISE fnd_api.g_exc_error;
5145: ELSE
5146: l_mmti_rec.organization_id := gme_common_pvt.g_organization_id;
5147: END IF;*/
5148: gme_common_pvt.set_timestamp;
5149: /* Bug 5358129 added code so line type line no combo will also retrieve material */
5150: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;
5151: l_mat_dtl_rec.line_no := p_line_no;
5152: l_mat_dtl_rec.line_type := p_line_type;

Line 5153: gme_common_pvt.Validate_material_detail

5149: /* Bug 5358129 added code so line type line no combo will also retrieve material */
5150: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;
5151: l_mat_dtl_rec.line_no := p_line_no;
5152: l_mat_dtl_rec.line_type := p_line_type;
5153: gme_common_pvt.Validate_material_detail
5154: (p_material_detail_rec => l_mat_dtl_rec
5155: ,p_org_code => p_org_code
5156: ,p_batch_no => p_batch_no
5157: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 5157: ,p_batch_type => gme_common_pvt.g_doc_type_batch

5153: gme_common_pvt.Validate_material_detail
5154: (p_material_detail_rec => l_mat_dtl_rec
5155: ,p_org_code => p_org_code
5156: ,p_batch_no => p_batch_no
5157: ,p_batch_type => gme_common_pvt.g_doc_type_batch
5158: ,x_batch_header_rec => l_batch_header_rec
5159: ,x_material_detail_rec => l_mat_dtl_rec_out
5160: ,x_message_count => x_message_count
5161: ,x_message_list => x_message_list

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

5176: OPEN cur_get_item_rec (l_mmti_rec.inventory_item_id, l_mmti_rec.organization_id);
5177: FETCH cur_get_item_rec INTO l_item_rec;
5178: IF cur_get_item_rec%NOTFOUND THEN
5179: CLOSE cur_get_item_rec;
5180: gme_common_pvt.log_message ('PM_INVALID_ITEM');
5181: IF (g_debug = gme_debug.g_log_statement) THEN
5182: gme_debug.put_line('Item cursor fetch no record in mtl_system_items_b: ');
5183: gme_debug.put_line('inventory_item_id = '|| TO_CHAR (l_mmti_rec.inventory_item_id) );
5184: gme_debug.put_line('organization_id = '|| TO_CHAR (l_mmti_rec.organization_id) );

Line 5193: gme_common_pvt.fetch_trans_date(

5189:
5190: /*Bug#5394232 Begin
5191: if we don't pass any date to this procedure then we have to default the trans date*/
5192: IF l_mmti_rec.transaction_date IS NULL THEN
5193: gme_common_pvt.fetch_trans_date(
5194: p_material_detail_id => l_mat_dtl_rec.material_detail_id
5195: ,p_invoke_mode => 'T'
5196: ,x_trans_date => l_trans_date
5197: ,x_return_status => l_return_status );

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

5204: ELSE
5205: /* transaction date can't be in future and should not be less than actual start date of the batch*/
5206: IF l_mmti_rec.transaction_date < l_batch_header_rec.actual_start_date OR
5207: l_mmti_rec.transaction_date > SYSDATE THEN
5208: gme_common_pvt.log_message('GME_NOT_VALID_TRANS_DATE');
5209: RAISE fnd_api.g_exc_error;
5210: END IF;
5211: END IF;
5212: --Bug#5394232 End

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

5493: END LOOP;
5494: END IF; -- for lot_control
5495: END IF; -- for line_type
5496:
5497: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5498: /* Bug 5554841 Migration will call this with existing header ID*/
5499: --gme_common_pvt.g_transaction_header_id := NULL;
5500: gme_transactions_pvt.create_material_txn
5501: (p_mmti_rec => l_mmti_rec

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

5495: END IF; -- for line_type
5496:
5497: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5498: /* Bug 5554841 Migration will call this with existing header ID*/
5499: --gme_common_pvt.g_transaction_header_id := NULL;
5500: gme_transactions_pvt.create_material_txn
5501: (p_mmti_rec => l_mmti_rec
5502: ,p_mmli_tbl => l_mmli_tbl
5503: ,x_return_status => l_return_status);

Line 5508: || gme_common_pvt.g_transaction_header_id);

5504:
5505: IF l_return_status = fnd_api.g_ret_sts_success THEN
5506: IF g_debug <= gme_debug.g_log_procedure THEN
5507: gme_debug.put_line ( 'before save batch'
5508: || gme_common_pvt.g_transaction_header_id);
5509: END IF;
5510:
5511: l_header_id := gme_common_pvt.g_transaction_header_id;
5512:

Line 5511: l_header_id := gme_common_pvt.g_transaction_header_id;

5507: gme_debug.put_line ( 'before save batch'
5508: || gme_common_pvt.g_transaction_header_id);
5509: END IF;
5510:
5511: l_header_id := gme_common_pvt.g_transaction_header_id;
5512:
5513: -- Bug 14685438 - Conditionalize call to save_batch based on p_save_batch.
5514: IF (p_save_batch = fnd_api.g_true) THEN
5515: gme_api_pub.save_batch

Line 5516: (p_header_id => gme_common_pvt.g_transaction_header_id

5512:
5513: -- Bug 14685438 - Conditionalize call to save_batch based on p_save_batch.
5514: IF (p_save_batch = fnd_api.g_true) THEN
5515: gme_api_pub.save_batch
5516: (p_header_id => gme_common_pvt.g_transaction_header_id
5517: ,p_table => 1
5518: ,p_commit => p_commit
5519: ,x_return_status => x_return_status);
5520:

Line 5562: gme_common_pvt.count_and_get (x_count => x_message_count

5558: END IF;
5559: EXCEPTION
5560: WHEN create_txn_fail OR deviation_fail THEN
5561: ROLLBACK TO SAVEPOINT create_material_txn;
5562: gme_common_pvt.count_and_get (x_count => x_message_count
5563: ,p_encoded => fnd_api.g_false
5564: ,x_data => x_message_list);
5565: /* Bug 5554841 have to set x_return_status*/
5566: x_return_status := l_return_status;

Line 5575: gme_common_pvt.count_and_get (x_count => x_message_count

5571: x_return_status := fnd_api.g_ret_sts_error;
5572: WHEN fnd_api.g_exc_error THEN
5573: ROLLBACK TO SAVEPOINT create_material_txn;
5574: x_return_status := fnd_api.g_ret_sts_error;
5575: gme_common_pvt.count_and_get (x_count => x_message_count
5576: ,p_encoded => fnd_api.g_false
5577: ,x_data => x_message_list);
5578: WHEN OTHERS THEN
5579: ROLLBACK TO SAVEPOINT create_material_txn;

Line 5590: := gme_common_pvt.g_max_errors

5586: /*************************************************************************/
5587: PROCEDURE update_material_txn (
5588: p_api_version IN NUMBER := 2.0
5589: ,p_validation_level IN NUMBER
5590: := gme_common_pvt.g_max_errors
5591: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5592: ,p_commit IN VARCHAR2 := fnd_api.g_false
5593: ,x_message_count OUT NOCOPY NUMBER
5594: ,x_message_list OUT NOCOPY VARCHAR2

Line 5598: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl

5594: ,x_message_list OUT NOCOPY VARCHAR2
5595: ,x_return_status OUT NOCOPY VARCHAR2
5596: ,p_transaction_id IN NUMBER
5597: ,p_mmti_rec IN mtl_transactions_interface%ROWTYPE
5598: ,p_mmli_tbl IN gme_common_pvt.mtl_trans_lots_inter_tbl
5599: ,p_create_lot IN VARCHAR2 := NULL
5600: ,p_generate_lot IN VARCHAR2 := NULL
5601: ,p_generate_parent_lot IN VARCHAR2 := NULL
5602: ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE

Line 5603: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)

5599: ,p_create_lot IN VARCHAR2 := NULL
5600: ,p_generate_lot IN VARCHAR2 := NULL
5601: ,p_generate_parent_lot IN VARCHAR2 := NULL
5602: ,x_mmt_rec OUT NOCOPY mtl_material_transactions%ROWTYPE
5603: ,x_mmln_tbl OUT NOCOPY gme_common_pvt.mtl_trans_lots_num_tbl)
5604: IS
5605: CURSOR cur_get_item_rec (v_item_id NUMBER, v_org_id NUMBER)
5606: IS
5607: SELECT *

Line 5626: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;

5622:
5623: l_api_name CONSTANT VARCHAR2 (30) := 'UPDATE_MATERIAL_TXN';
5624: l_transaction_id NUMBER;
5625: l_mmt_rec mtl_material_transactions%ROWTYPE;
5626: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
5627: l_mmti_rec mtl_transactions_interface%ROWTYPE;
5628: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
5629: l_mat_dtl_rec gme_material_details%ROWTYPE;
5630: l_item_rec mtl_system_items_b%ROWTYPE;

Line 5628: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;

5624: l_transaction_id NUMBER;
5625: l_mmt_rec mtl_material_transactions%ROWTYPE;
5626: l_mmln_tbl gme_common_pvt.mtl_trans_lots_num_tbl;
5627: l_mmti_rec mtl_transactions_interface%ROWTYPE;
5628: l_mmli_tbl gme_common_pvt.mtl_trans_lots_inter_tbl;
5629: l_mat_dtl_rec gme_material_details%ROWTYPE;
5630: l_item_rec mtl_system_items_b%ROWTYPE;
5631: l_msg_count NUMBER;
5632: l_msg_data VARCHAR2 (2000);

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

5669: IF NOT fnd_api.compatible_api_call (2.0
5670: ,p_api_version
5671: ,'update_material_txn'
5672: ,g_pkg_name) THEN
5673: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5674: RAISE fnd_api.g_exc_error;
5675: END IF;
5676:
5677: IF (p_transaction_id IS NULL) THEN

Line 5678: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

5674: RAISE fnd_api.g_exc_error;
5675: END IF;
5676:
5677: IF (p_transaction_id IS NULL) THEN
5678: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
5679: ,'FIELD_NAME'
5680: ,'p_transaction_id');
5681: RAISE fnd_api.g_exc_error;
5682: END IF;

Line 5690: gme_common_pvt.g_error_count := 0;

5686: CLOSE cur_trans_org;
5687:
5688: l_mmti_rec := p_mmti_rec;
5689: l_mmli_tbl := p_mmli_tbl;
5690: gme_common_pvt.g_error_count := 0;
5691: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);
5692:
5693: IF NOT gme_common_pvt.g_setup_done THEN
5694: RAISE fnd_api.g_exc_error;

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

5687:
5688: l_mmti_rec := p_mmti_rec;
5689: l_mmli_tbl := p_mmli_tbl;
5690: gme_common_pvt.g_error_count := 0;
5691: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);
5692:
5693: IF NOT gme_common_pvt.g_setup_done THEN
5694: RAISE fnd_api.g_exc_error;
5695: ELSE

Line 5693: IF NOT gme_common_pvt.g_setup_done THEN

5689: l_mmli_tbl := p_mmli_tbl;
5690: gme_common_pvt.g_error_count := 0;
5691: gme_common_pvt.g_setup_done := gme_common_pvt.setup(p_org_id => l_orgn_id);
5692:
5693: IF NOT gme_common_pvt.g_setup_done THEN
5694: RAISE fnd_api.g_exc_error;
5695: ELSE
5696: l_orgn_id := gme_common_pvt.g_organization_id;
5697: END IF;

Line 5696: l_orgn_id := gme_common_pvt.g_organization_id;

5692:
5693: IF NOT gme_common_pvt.g_setup_done THEN
5694: RAISE fnd_api.g_exc_error;
5695: ELSE
5696: l_orgn_id := gme_common_pvt.g_organization_id;
5697: END IF;
5698:
5699: gme_common_pvt.set_timestamp;
5700: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;

Line 5699: gme_common_pvt.set_timestamp;

5695: ELSE
5696: l_orgn_id := gme_common_pvt.g_organization_id;
5697: END IF;
5698:
5699: gme_common_pvt.set_timestamp;
5700: l_mat_dtl_rec.material_detail_id := l_mmti_rec.trx_source_line_id;
5701:
5702: IF NOT gme_material_details_dbl.fetch_row
5703: (p_material_detail => l_mat_dtl_rec

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

5718:
5719: FETCH cur_get_item_rec INTO l_item_rec;
5720: IF cur_get_item_rec%NOTFOUND THEN
5721: CLOSE cur_get_item_rec;
5722: gme_common_pvt.log_message ('PM_INVALID_ITEM');
5723:
5724: IF (g_debug = gme_debug.g_log_statement) THEN
5725: gme_debug.put_line
5726: ('Item cursor fetch no record in mtl_system_items_b: ');

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

5851: END LOOP;
5852: END IF; -- for lot_control
5853: END IF; -- for line_type
5854:
5855: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5856: gme_common_pvt.g_transaction_header_id := NULL;
5857: gme_transactions_pvt.update_material_txn
5858: (p_transaction_id => p_transaction_id
5859: ,p_mmti_rec => l_mmti_rec

Line 5856: gme_common_pvt.g_transaction_header_id := NULL;

5852: END IF; -- for lot_control
5853: END IF; -- for line_type
5854:
5855: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
5856: gme_common_pvt.g_transaction_header_id := NULL;
5857: gme_transactions_pvt.update_material_txn
5858: (p_transaction_id => p_transaction_id
5859: ,p_mmti_rec => l_mmti_rec
5860: ,p_mmli_tbl => l_mmli_tbl

Line 5866: || gme_common_pvt.g_transaction_header_id);

5862:
5863: IF l_return_status = fnd_api.g_ret_sts_success THEN
5864: IF g_debug <= gme_debug.g_log_procedure THEN
5865: gme_debug.put_line ( 'before save batch'
5866: || gme_common_pvt.g_transaction_header_id);
5867: END IF;
5868: l_header_id:= gme_common_pvt.g_transaction_header_id;
5869: gme_api_pub.save_batch
5870: (p_header_id => gme_common_pvt.get_txn_header_id

Line 5868: l_header_id:= gme_common_pvt.g_transaction_header_id;

5864: IF g_debug <= gme_debug.g_log_procedure THEN
5865: gme_debug.put_line ( 'before save batch'
5866: || gme_common_pvt.g_transaction_header_id);
5867: END IF;
5868: l_header_id:= gme_common_pvt.g_transaction_header_id;
5869: gme_api_pub.save_batch
5870: (p_header_id => gme_common_pvt.get_txn_header_id
5871: ,p_table => 1
5872: ,p_commit => p_commit

Line 5870: (p_header_id => gme_common_pvt.get_txn_header_id

5866: || gme_common_pvt.g_transaction_header_id);
5867: END IF;
5868: l_header_id:= gme_common_pvt.g_transaction_header_id;
5869: gme_api_pub.save_batch
5870: (p_header_id => gme_common_pvt.get_txn_header_id
5871: ,p_table => 1
5872: ,p_commit => p_commit
5873: ,x_return_status => x_return_status);
5874:

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

5908: END IF;
5909: EXCEPTION
5910: WHEN update_txn_mismatch THEN
5911: ROLLBACK TO SAVEPOINT update_transaction;
5912: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
5913: x_return_status := fnd_api.g_ret_sts_error;
5914: gme_common_pvt.count_and_get (x_count => x_message_count
5915: ,p_encoded => fnd_api.g_false
5916: ,x_data => x_message_list);

Line 5914: gme_common_pvt.count_and_get (x_count => x_message_count

5910: WHEN update_txn_mismatch THEN
5911: ROLLBACK TO SAVEPOINT update_transaction;
5912: gme_common_pvt.log_message('GME_TXN_UPDATE_MISMATCH');
5913: x_return_status := fnd_api.g_ret_sts_error;
5914: gme_common_pvt.count_and_get (x_count => x_message_count
5915: ,p_encoded => fnd_api.g_false
5916: ,x_data => x_message_list);
5917: WHEN update_txn_fail THEN
5918: ROLLBACK TO SAVEPOINT update_transaction;

Line 5919: gme_common_pvt.count_and_get (x_count => x_message_count

5915: ,p_encoded => fnd_api.g_false
5916: ,x_data => x_message_list);
5917: WHEN update_txn_fail THEN
5918: ROLLBACK TO SAVEPOINT update_transaction;
5919: gme_common_pvt.count_and_get (x_count => x_message_count
5920: ,p_encoded => fnd_api.g_false
5921: ,x_data => x_message_list);
5922: WHEN fnd_api.g_exc_error THEN
5923: ROLLBACK TO SAVEPOINT update_transaction;

Line 5925: gme_common_pvt.count_and_get (x_count => x_message_count

5921: ,x_data => x_message_list);
5922: WHEN fnd_api.g_exc_error THEN
5923: ROLLBACK TO SAVEPOINT update_transaction;
5924: x_return_status := fnd_api.g_ret_sts_error;
5925: gme_common_pvt.count_and_get (x_count => x_message_count
5926: ,p_encoded => fnd_api.g_false
5927: ,x_data => x_message_list);
5928: WHEN OTHERS THEN
5929: gme_when_others ( p_api_name => l_api_name

Line 5939: := gme_common_pvt.g_max_errors

5935: /*************************************************************************/
5936: PROCEDURE delete_material_txn (
5937: p_api_version IN NUMBER := 2.0
5938: ,p_validation_level IN NUMBER
5939: := gme_common_pvt.g_max_errors
5940: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
5941: ,p_commit IN VARCHAR2 := fnd_api.g_false
5942: ,x_message_count OUT NOCOPY NUMBER
5943: ,x_message_list OUT NOCOPY VARCHAR2

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

5988: IF NOT fnd_api.compatible_api_call (2.0
5989: ,p_api_version
5990: ,'delete_material_txn'
5991: ,g_pkg_name) THEN
5992: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
5993: RAISE fnd_api.g_exc_error;
5994: END IF;
5995:
5996: IF (p_transaction_id IS NULL) THEN

Line 5997: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

5993: RAISE fnd_api.g_exc_error;
5994: END IF;
5995:
5996: IF (p_transaction_id IS NULL) THEN
5997: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
5998: ,'FIELD_NAME'
5999: ,'p_transaction_id');
6000: RAISE fnd_api.g_exc_error;
6001: END IF;

Line 6008: gme_common_pvt.g_error_count := 0;

6004: FETCH cur_trans_org INTO l_orgn_id;
6005:
6006: CLOSE cur_trans_org;
6007:
6008: gme_common_pvt.g_error_count := 0;
6009: gme_common_pvt.g_setup_done :=
6010: gme_common_pvt.setup (p_org_id => l_orgn_id);
6011:
6012: IF NOT gme_common_pvt.g_setup_done THEN

Line 6009: gme_common_pvt.g_setup_done :=

6005:
6006: CLOSE cur_trans_org;
6007:
6008: gme_common_pvt.g_error_count := 0;
6009: gme_common_pvt.g_setup_done :=
6010: gme_common_pvt.setup (p_org_id => l_orgn_id);
6011:
6012: IF NOT gme_common_pvt.g_setup_done THEN
6013: RAISE fnd_api.g_exc_error;

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

6006: CLOSE cur_trans_org;
6007:
6008: gme_common_pvt.g_error_count := 0;
6009: gme_common_pvt.g_setup_done :=
6010: gme_common_pvt.setup (p_org_id => l_orgn_id);
6011:
6012: IF NOT gme_common_pvt.g_setup_done THEN
6013: RAISE fnd_api.g_exc_error;
6014: ELSE

Line 6012: IF NOT gme_common_pvt.g_setup_done THEN

6008: gme_common_pvt.g_error_count := 0;
6009: gme_common_pvt.g_setup_done :=
6010: gme_common_pvt.setup (p_org_id => l_orgn_id);
6011:
6012: IF NOT gme_common_pvt.g_setup_done THEN
6013: RAISE fnd_api.g_exc_error;
6014: ELSE
6015: l_orgn_id := gme_common_pvt.g_organization_id;
6016: END IF;

Line 6015: l_orgn_id := gme_common_pvt.g_organization_id;

6011:
6012: IF NOT gme_common_pvt.g_setup_done THEN
6013: RAISE fnd_api.g_exc_error;
6014: ELSE
6015: l_orgn_id := gme_common_pvt.g_organization_id;
6016: END IF;
6017:
6018: gme_common_pvt.set_timestamp;
6019: gme_common_pvt.g_move_to_temp := fnd_api.g_false;

Line 6018: gme_common_pvt.set_timestamp;

6014: ELSE
6015: l_orgn_id := gme_common_pvt.g_organization_id;
6016: END IF;
6017:
6018: gme_common_pvt.set_timestamp;
6019: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
6020: gme_common_pvt.g_transaction_header_id := NULL;
6021: l_transaction_id := p_transaction_id;
6022: gme_transactions_pvt.delete_material_txn

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

6015: l_orgn_id := gme_common_pvt.g_organization_id;
6016: END IF;
6017:
6018: gme_common_pvt.set_timestamp;
6019: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
6020: gme_common_pvt.g_transaction_header_id := NULL;
6021: l_transaction_id := p_transaction_id;
6022: gme_transactions_pvt.delete_material_txn
6023: (p_transaction_id => l_transaction_id

Line 6020: gme_common_pvt.g_transaction_header_id := NULL;

6016: END IF;
6017:
6018: gme_common_pvt.set_timestamp;
6019: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
6020: gme_common_pvt.g_transaction_header_id := NULL;
6021: l_transaction_id := p_transaction_id;
6022: gme_transactions_pvt.delete_material_txn
6023: (p_transaction_id => l_transaction_id
6024: ,x_return_status => x_return_status);

Line 6029: (p_header_id => gme_common_pvt.get_txn_header_id

6025:
6026: IF x_return_status = fnd_api.g_ret_sts_success THEN
6027: IF (p_commit = fnd_api.g_true) THEN
6028: gme_api_pub.save_batch
6029: (p_header_id => gme_common_pvt.get_txn_header_id
6030: ,p_table => 1
6031: ,p_commit => p_commit
6032: ,x_return_status => x_return_status);
6033:

Line 6051: gme_common_pvt.count_and_get (x_count => x_message_count

6047: END IF;
6048: EXCEPTION
6049: WHEN delete_txn_fail THEN
6050: ROLLBACK TO SAVEPOINT delete_transaction;
6051: gme_common_pvt.count_and_get (x_count => x_message_count
6052: ,p_encoded => fnd_api.g_false
6053: ,x_data => x_message_list);
6054: WHEN fnd_api.g_exc_error THEN
6055: ROLLBACK TO SAVEPOINT delete_transaction;

Line 6057: gme_common_pvt.count_and_get (x_count => x_message_count

6053: ,x_data => x_message_list);
6054: WHEN fnd_api.g_exc_error THEN
6055: ROLLBACK TO SAVEPOINT delete_transaction;
6056: x_return_status := fnd_api.g_ret_sts_error;
6057: gme_common_pvt.count_and_get (x_count => x_message_count
6058: ,p_encoded => fnd_api.g_false
6059: ,x_data => x_message_list);
6060: WHEN OTHERS THEN
6061: gme_when_others ( p_api_name => l_api_name

Line 6088: := gme_common_pvt.g_max_errors

6084: ================================================================================*/
6085: PROCEDURE reroute_batch (
6086: p_api_version IN NUMBER := 2.0
6087: ,p_validation_level IN NUMBER
6088: := gme_common_pvt.g_max_errors
6089: ,p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false
6090: ,p_commit IN VARCHAR2 DEFAULT fnd_api.g_false
6091: ,p_batch_header_rec IN gme_batch_header%ROWTYPE
6092: ,p_validity_rule_id IN NUMBER

Line 6122: gme_common_pvt.g_error_count := 0;

6118: SAVEPOINT reroute_batch_pub;
6119:
6120: IF (fnd_api.to_boolean (p_init_msg_list) ) THEN
6121: fnd_msg_pub.initialize;
6122: gme_common_pvt.g_error_count := 0;
6123: END IF;
6124:
6125: -- Standard call to check for call compatibility.
6126: IF NOT fnd_api.compatible_api_call (2.0

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

6126: IF NOT fnd_api.compatible_api_call (2.0
6127: ,p_api_version
6128: ,l_api_name
6129: ,g_pkg_name) THEN
6130: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6131: RAISE fnd_api.g_exc_error;
6132: END IF;
6133:
6134: --FPBug#4585491 Begin

Line 6137: gme_common_pvt.log_message ('GME_INVALID_FIELD'

6133:
6134: --FPBug#4585491 Begin
6135: /* Check for p_use_workday_cal */
6136: IF (p_use_workday_cal NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
6137: gme_common_pvt.log_message ('GME_INVALID_FIELD'
6138: ,'FIELD'
6139: ,'p_use_workday_cal');
6140: RAISE fnd_api.g_exc_error;
6141: END IF;

Line 6145: gme_common_pvt.log_message ('GME_INVALID_FIELD'

6141: END IF;
6142:
6143: /* Check for p_contiguity_override */
6144: IF (p_contiguity_override NOT IN (fnd_api.g_true, fnd_api.g_false) ) THEN
6145: gme_common_pvt.log_message ('GME_INVALID_FIELD'
6146: ,'FIELD'
6147: ,'p_contiguity_override');
6148: RAISE fnd_api.g_exc_error;
6149: END IF;

Line 6156: gme_common_pvt.validate_batch

6152: /* Set the return status to success initially */
6153: x_return_status := fnd_api.g_ret_sts_success;
6154:
6155: /* Get the Batch header */
6156: gme_common_pvt.validate_batch
6157: (p_batch_header_rec => p_batch_header_rec
6158: ,p_org_code => p_org_code
6159: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6160: ,x_batch_header_rec => l_batch_header_rec

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

6155: /* Get the Batch header */
6156: gme_common_pvt.validate_batch
6157: (p_batch_header_rec => p_batch_header_rec
6158: ,p_org_code => p_org_code
6159: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6160: ,x_batch_header_rec => l_batch_header_rec
6161: ,x_message_count => x_message_count
6162: ,x_message_list => x_message_list
6163: ,x_return_status => x_return_status );

Line 6205: ,p_table => gme_common_pvt.g_interface_table

6201: RAISE fnd_api.g_exc_unexpected_error;
6202: END IF;
6203: gme_api_pub.save_batch
6204: (p_header_id => NULL
6205: ,p_table => gme_common_pvt.g_interface_table
6206: ,p_commit => p_commit
6207: ,x_return_status => x_return_status);
6208:
6209: IF (x_return_status = fnd_api.g_ret_sts_error) THEN

Line 6219: gme_common_pvt.count_and_get (x_count => x_message_count

6215: IF (fnd_api.to_boolean (p_commit) ) THEN
6216: COMMIT WORK;
6217: END IF;
6218:
6219: gme_common_pvt.count_and_get (x_count => x_message_count
6220: ,p_encoded => fnd_api.g_false
6221: ,x_data => x_message_list);
6222:
6223: IF g_debug <= gme_debug.g_log_procedure THEN

Line 6231: gme_common_pvt.count_and_get (x_count => x_message_count

6227: EXCEPTION
6228: WHEN reroute_batch_failed THEN
6229: ROLLBACK TO SAVEPOINT reroute_batch_pub;
6230: x_batch_header_rec := NULL;
6231: gme_common_pvt.count_and_get (x_count => x_message_count
6232: ,p_encoded => fnd_api.g_false
6233: ,x_data => x_message_list);
6234: WHEN fnd_api.g_exc_error THEN
6235: ROLLBACK TO SAVEPOINT reroute_batch_pub;

Line 6238: gme_common_pvt.count_and_get (x_count => x_message_count

6234: WHEN fnd_api.g_exc_error THEN
6235: ROLLBACK TO SAVEPOINT reroute_batch_pub;
6236: x_batch_header_rec := NULL;
6237: x_return_status := fnd_api.g_ret_sts_error;
6238: gme_common_pvt.count_and_get (x_count => x_message_count
6239: ,p_encoded => fnd_api.g_false
6240: ,x_data => x_message_list);
6241: WHEN fnd_api.g_exc_unexpected_error THEN
6242: ROLLBACK TO SAVEPOINT reroute_batch_pub;

Line 6249: gme_common_pvt.count_and_get (x_count => x_message_count

6245:
6246: IF (g_debug > 0) THEN gme_debug.put_line ( g_pkg_name || '.' ||
6247: l_api_name || ':' || 'UNEXPECTED:' || SQLERRM);
6248: END IF;
6249: gme_common_pvt.count_and_get (x_count => x_message_count
6250: ,p_encoded => fnd_api.g_false
6251: ,x_data => x_message_list);
6252: WHEN OTHERS THEN
6253: ROLLBACK TO SAVEPOINT reroute_batch_pub;

Line 6297: := gme_common_pvt.g_max_errors

6293: ================================================================================*/
6294: PROCEDURE cancel_batch (
6295: p_api_version IN NUMBER := 2.0
6296: ,p_validation_level IN NUMBER
6297: := gme_common_pvt.g_max_errors
6298: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6299: ,p_commit IN VARCHAR2 := fnd_api.g_false
6300: ,x_message_count OUT NOCOPY NUMBER
6301: ,x_message_list OUT NOCOPY VARCHAR2

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

6336: IF NOT fnd_api.compatible_api_call (2.0
6337: ,p_api_version
6338: ,'cancel_batch'
6339: ,g_pkg_name) THEN
6340: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6341: RAISE fnd_api.g_exc_error;
6342: END IF;
6343:
6344: --fetch the batch

Line 6345: gme_common_pvt.validate_batch

6341: RAISE fnd_api.g_exc_error;
6342: END IF;
6343:
6344: --fetch the batch
6345: gme_common_pvt.validate_batch
6346: (p_batch_header_rec => p_batch_header_rec
6347: ,p_org_code => p_org_code
6348: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6349: ,x_batch_header_rec => l_batch_header_rec

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

6344: --fetch the batch
6345: gme_common_pvt.validate_batch
6346: (p_batch_header_rec => p_batch_header_rec
6347: ,p_org_code => p_org_code
6348: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6349: ,x_batch_header_rec => l_batch_header_rec
6350: ,x_message_count => x_message_count
6351: ,x_message_list => x_message_list
6352: ,x_return_status => x_return_status );

Line 6366: IF (l_batch_header_rec.batch_type NOT IN (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo)) THEN

6362: --
6363: -- bug 13457726
6364: -- Allowing the cancellation of FPO as well
6365: --
6366: IF (l_batch_header_rec.batch_type NOT IN (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo)) THEN
6367: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6368: RAISE fnd_api.g_exc_error;
6369: END IF;
6370:

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

6363: -- bug 13457726
6364: -- Allowing the cancellation of FPO as well
6365: --
6366: IF (l_batch_header_rec.batch_type NOT IN (gme_common_pvt.g_doc_type_batch, gme_common_pvt.g_doc_type_fpo)) THEN
6367: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6368: RAISE fnd_api.g_exc_error;
6369: END IF;
6370:
6371: gme_common_pvt.g_error_count := 0;

Line 6371: gme_common_pvt.g_error_count := 0;

6367: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6368: RAISE fnd_api.g_exc_error;
6369: END IF;
6370:
6371: gme_common_pvt.g_error_count := 0;
6372:
6373: /* Check for batch status */
6374: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
6375: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');

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

6370:
6371: gme_common_pvt.g_error_count := 0;
6372:
6373: /* Check for batch status */
6374: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
6375: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');
6376: RAISE fnd_api.g_exc_error;
6377: END IF;
6378:

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

6371: gme_common_pvt.g_error_count := 0;
6372:
6373: /* Check for batch status */
6374: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_pending THEN
6375: gme_common_pvt.log_message ('GME_API_INVALID_BATCH_CANCEL');
6376: RAISE fnd_api.g_exc_error;
6377: END IF;
6378:
6379: -- Bug 12967042 Commented code below.

Line 6399: gme_common_pvt.log_message ('GME_GMF_WIP_ACCT_ISSUE');

6395:
6396: IF l_gmf_prof_val <> 0 THEN
6397: IF NOT GMF_BATCH_VALIDATIONS.check_cancel_batch(l_batch_header_rec.batch_id) THEN
6398: IF l_gmf_prof_val = 2 THEN
6399: gme_common_pvt.log_message ('GME_GMF_WIP_ACCT_ISSUE');
6400: RAISE fnd_api.g_exc_error;
6401: END IF;
6402:
6403: -- Notify GMF that user has chosed to bypass validation and proceed with cancel batch.

Line 6454: ,p_table => gme_common_pvt.g_interface_table

6450: IF x_return_status = fnd_api.g_ret_sts_success THEN
6451: IF p_commit = fnd_api.g_true THEN
6452: gme_api_pub.save_batch
6453: (p_header_id => NULL
6454: ,p_table => gme_common_pvt.g_interface_table
6455: ,p_commit => p_commit
6456: ,x_return_status => x_return_status);
6457:
6458: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 6468: gme_common_pvt.count_and_get (x_count => x_message_count

6464: ELSE
6465: RAISE batch_cancel_failure;
6466: END IF;
6467:
6468: gme_common_pvt.count_and_get (x_count => x_message_count
6469: ,p_encoded => fnd_api.g_false
6470: ,x_data => x_message_list);
6471:
6472: IF g_debug <= gme_debug.g_log_procedure THEN

Line 6480: gme_common_pvt.count_and_get (x_count => x_message_count

6476: EXCEPTION
6477: WHEN batch_cancel_failure THEN
6478: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6479: x_batch_header_rec := NULL;
6480: gme_common_pvt.count_and_get (x_count => x_message_count
6481: ,p_encoded => fnd_api.g_false
6482: ,x_data => x_message_list);
6483: WHEN fnd_api.g_exc_error THEN
6484: ROLLBACK TO SAVEPOINT cancel_batch_pub;

Line 6487: gme_common_pvt.count_and_get (x_count => x_message_count

6483: WHEN fnd_api.g_exc_error THEN
6484: ROLLBACK TO SAVEPOINT cancel_batch_pub;
6485: x_return_status := fnd_api.g_ret_sts_error;
6486: x_batch_header_rec := NULL;
6487: gme_common_pvt.count_and_get (x_count => x_message_count
6488: ,p_encoded => fnd_api.g_false
6489: ,x_data => x_message_list);
6490: WHEN OTHERS THEN
6491: ROLLBACK TO SAVEPOINT cancel_batch_pub;

Line 6522: := gme_common_pvt.g_max_errors

6518: ================================================================================*/
6519: PROCEDURE terminate_batch (
6520: p_api_version IN NUMBER := 2.0
6521: ,p_validation_level IN NUMBER
6522: := gme_common_pvt.g_max_errors
6523: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6524: ,p_commit IN VARCHAR2 := fnd_api.g_false
6525: ,x_message_count OUT NOCOPY NUMBER
6526: ,x_message_list OUT NOCOPY VARCHAR2

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

6573: IF NOT fnd_api.compatible_api_call (2.0
6574: ,p_api_version
6575: ,'terminate_batch'
6576: ,g_pkg_name) THEN
6577: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6578: RAISE fnd_api.g_exc_error;
6579: END IF;
6580: --Bug#5281136 Fetching the batch before checking for the reason_id or reason name.
6581: --fetch the batch

Line 6582: gme_common_pvt.validate_batch

6578: RAISE fnd_api.g_exc_error;
6579: END IF;
6580: --Bug#5281136 Fetching the batch before checking for the reason_id or reason name.
6581: --fetch the batch
6582: gme_common_pvt.validate_batch
6583: (p_batch_header_rec => p_batch_header_rec
6584: ,p_org_code => p_org_code
6585: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6586: ,x_batch_header_rec => l_batch_header_rec

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

6581: --fetch the batch
6582: gme_common_pvt.validate_batch
6583: (p_batch_header_rec => p_batch_header_rec
6584: ,p_org_code => p_org_code
6585: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
6586: ,x_batch_header_rec => l_batch_header_rec
6587: ,x_message_count => x_message_count
6588: ,x_message_list => x_message_list
6589: ,x_return_status => x_return_status );

Line 6604: IF NVL(gme_common_pvt.g_bulk_validation_done,'N') = 'N' THEN

6600: IF p_batch_header_rec.terminate_reason_id IS NOT NULL THEN
6601: /*Added by Shalchen 02/28/2013
6602: Add IF condition to bypass terminate_reason_id
6603: validition for batch open interface project*/
6604: IF NVL(gme_common_pvt.g_bulk_validation_done,'N') = 'N' THEN
6605: OPEN cur_val_reason_id (p_batch_header_rec.terminate_reason_id);
6606:
6607: FETCH cur_val_reason_id
6608: INTO l_reason_valid;

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

6612: IF l_reason_valid = 1 THEN
6613: l_batch_header_rec.terminate_reason_id :=
6614: p_batch_header_rec.terminate_reason_id;
6615: ELSE
6616: gme_common_pvt.log_message(p_product_code => 'INV'
6617: ,p_message_code => 'INV_LOTC_REASONID_INVALID');
6618: RAISE FND_API.g_exc_error;
6619: END IF;
6620: END IF;

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

6625: l_batch_header_rec.terminate_reason_id := get_rec.reason_id;
6626: END LOOP;
6627:
6628: IF i > 1 THEN
6629: gme_common_pvt.log_message('GME_REASON_NAME_NOT_UNIQUE');
6630: RAISE FND_API.g_exc_error;
6631: ELSIF i = 0 THEN
6632: gme_common_pvt.log_message('GME_INVALID_REASON_NAME');
6633: RAISE FND_API.g_exc_error;

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

6628: IF i > 1 THEN
6629: gme_common_pvt.log_message('GME_REASON_NAME_NOT_UNIQUE');
6630: RAISE FND_API.g_exc_error;
6631: ELSIF i = 0 THEN
6632: gme_common_pvt.log_message('GME_INVALID_REASON_NAME');
6633: RAISE FND_API.g_exc_error;
6634: END IF;
6635: END IF;
6636:

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

6634: END IF;
6635: END IF;
6636:
6637:
6638: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6639: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6640: RAISE fnd_api.g_exc_error;
6641: END IF;
6642:

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

6635: END IF;
6636:
6637:
6638: IF (l_batch_header_rec.batch_type <> gme_common_pvt.g_doc_type_batch) THEN
6639: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6640: RAISE fnd_api.g_exc_error;
6641: END IF;
6642:
6643: gme_common_pvt.g_error_count := 0;

Line 6643: gme_common_pvt.g_error_count := 0;

6639: gme_common_pvt.log_message ('GME_INVALID_BATCH_TYPE');
6640: RAISE fnd_api.g_exc_error;
6641: END IF;
6642:
6643: gme_common_pvt.g_error_count := 0;
6644:
6645: /* Check for batch status */
6646: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
6647: gme_common_pvt.log_message ('GME_INVALID_BSTAT_TERM');

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

6642:
6643: gme_common_pvt.g_error_count := 0;
6644:
6645: /* Check for batch status */
6646: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
6647: gme_common_pvt.log_message ('GME_INVALID_BSTAT_TERM');
6648:
6649: IF (g_debug <= gme_debug.g_log_statement) THEN
6650: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'

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

6643: gme_common_pvt.g_error_count := 0;
6644:
6645: /* Check for batch status */
6646: IF l_batch_header_rec.batch_status <> gme_common_pvt.g_batch_wip THEN
6647: gme_common_pvt.log_message ('GME_INVALID_BSTAT_TERM');
6648:
6649: IF (g_debug <= gme_debug.g_log_statement) THEN
6650: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ':'
6651: || 'INVALID_BATCH_STATUS');

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

6659: IF p_batch_header_rec.actual_cmplt_date IS NULL THEN
6660: l_batch_header_rec.actual_cmplt_date := SYSDATE;
6661: ELSIF (p_batch_header_rec.actual_cmplt_date <
6662: l_batch_header_rec.actual_start_date) THEN
6663: gme_common_pvt.log_message ('GME_INVALID_DATE_RANGE' ,'DATE1'
6664: ,'Termination date' ,'DATE2','Start date');
6665: x_return_status := fnd_api.g_ret_sts_error;
6666: RAISE fnd_api.g_exc_error;
6667: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN

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

6664: ,'Termination date' ,'DATE2','Start date');
6665: x_return_status := fnd_api.g_ret_sts_error;
6666: RAISE fnd_api.g_exc_error;
6667: ELSIF (p_batch_header_rec.actual_cmplt_date > SYSDATE) THEN
6668: gme_common_pvt.log_message(p_product_code => 'GMA'
6669: ,p_message_code => 'SY_NOFUTUREDATE');
6670: x_return_status := fnd_api.g_ret_sts_error;
6671: RAISE fnd_api.g_exc_error;
6672: ELSE

Line 6702: ,p_table => gme_common_pvt.g_interface_table

6698: IF x_return_status = fnd_api.g_ret_sts_success THEN
6699: IF p_commit = fnd_api.g_true THEN
6700: gme_api_pub.save_batch
6701: (p_header_id => NULL
6702: ,p_table => gme_common_pvt.g_interface_table
6703: ,p_commit => p_commit
6704: ,x_return_status => x_return_status);
6705:
6706: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 6716: gme_common_pvt.count_and_get (x_count => x_message_count

6712: ELSE
6713: RAISE batch_terminate_failure;
6714: END IF;
6715:
6716: gme_common_pvt.count_and_get (x_count => x_message_count
6717: ,p_encoded => fnd_api.g_false
6718: ,x_data => x_message_list);
6719:
6720: IF g_debug <= gme_debug.g_log_procedure THEN

Line 6728: gme_common_pvt.count_and_get (x_count => x_message_count

6724: EXCEPTION
6725: WHEN batch_terminate_failure THEN
6726: ROLLBACK TO SAVEPOINT terminate_batch;
6727: x_batch_header_rec := NULL;
6728: gme_common_pvt.count_and_get (x_count => x_message_count
6729: ,p_encoded => fnd_api.g_false
6730: ,x_data => x_message_list);
6731: WHEN fnd_api.g_exc_error THEN
6732: ROLLBACK TO SAVEPOINT terminate_batch;

Line 6735: gme_common_pvt.count_and_get (x_count => x_message_count

6731: WHEN fnd_api.g_exc_error THEN
6732: ROLLBACK TO SAVEPOINT terminate_batch;
6733: x_batch_header_rec := NULL;
6734: x_return_status := fnd_api.g_ret_sts_error;
6735: gme_common_pvt.count_and_get (x_count => x_message_count
6736: ,p_encoded => fnd_api.g_false
6737: ,x_data => x_message_list);
6738: WHEN OTHERS THEN
6739: ROLLBACK TO SAVEPOINT terminate_batch;

Line 6759: := gme_common_pvt.g_max_errors

6755: /*************************************************************************/
6756: PROCEDURE convert_dtl_reservation (
6757: p_api_version IN NUMBER := 2.0
6758: ,p_validation_level IN NUMBER
6759: := gme_common_pvt.g_max_errors
6760: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
6761: ,p_commit IN VARCHAR2 := fnd_api.g_false
6762: ,x_message_count OUT NOCOPY NUMBER
6763: ,x_message_list OUT NOCOPY VARCHAR2

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

6805: IF NOT fnd_api.compatible_api_call (2.0
6806: ,p_api_version
6807: ,'convert_dtl_reservation'
6808: ,g_pkg_name) THEN
6809: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
6810: RAISE fnd_api.g_exc_error;
6811: END IF;
6812:
6813: IF g_debug <= gme_debug.g_log_statement THEN

Line 6827: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

6823:
6824: IF cur_fetch_reservation%NOTFOUND THEN
6825: CLOSE cur_fetch_reservation;
6826:
6827: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
6828: ,'TABLE_NAME'
6829: ,'MTL_RESERVATIONS');
6830:
6831: IF g_debug <= gme_debug.g_log_statement THEN gme_debug.put_line (

Line 6847: gme_common_pvt.log_message (p_product_code => 'GMI'

6843: IF g_debug <= gme_debug.g_log_statement THEN
6844: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ' Negative qty not allowed');
6845: END IF;
6846:
6847: gme_common_pvt.log_message (p_product_code => 'GMI'
6848: ,p_message_code => 'IC_ACTIONQTYNEG');
6849: /*Bug#6778968 Rework */
6850: x_return_status := fnd_api.g_ret_sts_error;
6851: RAISE negative_qty_error;

Line 6855: gme_common_pvt.g_setup_done :=

6851: RAISE negative_qty_error;
6852: END IF;
6853:
6854: /* Do setups appropriate to the organization */
6855: gme_common_pvt.g_setup_done :=
6856: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id
6857: ,p_org_code => NULL);
6858:
6859: IF NOT gme_common_pvt.g_setup_done THEN

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

6852: END IF;
6853:
6854: /* Do setups appropriate to the organization */
6855: gme_common_pvt.g_setup_done :=
6856: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id
6857: ,p_org_code => NULL);
6858:
6859: IF NOT gme_common_pvt.g_setup_done THEN
6860: RAISE fnd_api.g_exc_error;

Line 6859: IF NOT gme_common_pvt.g_setup_done THEN

6855: gme_common_pvt.g_setup_done :=
6856: gme_common_pvt.setup (p_org_id => l_reservation_rec.organization_id
6857: ,p_org_code => NULL);
6858:
6859: IF NOT gme_common_pvt.g_setup_done THEN
6860: RAISE fnd_api.g_exc_error;
6861: END IF;
6862:
6863: gme_common_pvt.set_timestamp;

Line 6863: gme_common_pvt.set_timestamp;

6859: IF NOT gme_common_pvt.g_setup_done THEN
6860: RAISE fnd_api.g_exc_error;
6861: END IF;
6862:
6863: gme_common_pvt.set_timestamp;
6864: /* Verify that we have a valid row in gme_material_details */
6865: l_material_details_rec.material_detail_id :=
6866: l_reservation_rec.demand_source_line_id;
6867:

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

6881: RAISE fnd_api.g_exc_error;
6882: END IF;
6883:
6884: IF p_trans_date > SYSDATE THEN
6885: gme_common_pvt.log_message(p_product_code => 'GMA'
6886: ,p_message_code => 'SY_NOFUTUREDATE');
6887:
6888: x_return_status := fnd_api.g_ret_sts_error;
6889: RAISE bad_trans_date_error;

Line 6893: gme_common_pvt.log_message(p_product_code => 'GME'

6889: RAISE bad_trans_date_error;
6890: END IF;
6891:
6892: IF p_trans_date < l_batch_header_rec.actual_start_date THEN
6893: gme_common_pvt.log_message(p_product_code => 'GME'
6894: ,p_message_code => 'GME_NOT_VALID_TRANS_DATE');
6895:
6896: x_return_status := fnd_api.g_ret_sts_error;
6897: RAISE bad_trans_date_error;

Line 6966: (p_header_id => gme_common_pvt.g_transaction_header_id

6962: IF x_return_status <> fnd_api.g_ret_sts_success THEN
6963: RAISE detail_reservation_error;
6964: END IF;
6965: gme_api_pub.save_batch
6966: (p_header_id => gme_common_pvt.g_transaction_header_id
6967: ,p_table => 1
6968: ,p_commit => p_commit
6969: ,x_return_status => x_return_status);
6970:

Line 6993: gme_common_pvt.count_and_get (x_count => x_message_count

6989: END IF;
6990: EXCEPTION
6991: WHEN detail_reservation_error OR negative_qty_error OR bad_trans_date_error THEN
6992: ROLLBACK TO SAVEPOINT convert_dtl_reservation;
6993: gme_common_pvt.count_and_get (x_count => x_message_count
6994: ,p_encoded => fnd_api.g_false
6995: ,x_data => x_message_list);
6996: WHEN OTHERS THEN
6997: ROLLBACK TO SAVEPOINT convert_dtl_reservation;

Line 7009: := gme_common_pvt.g_max_errors

7005: /*************************************************************************/
7006: PROCEDURE insert_batchstep_resource (
7007: p_api_version IN NUMBER
7008: ,p_validation_level IN NUMBER
7009: := gme_common_pvt.g_max_errors
7010: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7011: ,p_commit IN VARCHAR2 := fnd_api.g_false
7012: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
7013: ,p_org_code IN VARCHAR2 := NULL

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

7099: IF NOT fnd_api.compatible_api_call (2.0
7100: ,p_api_version
7101: ,'insert_batchstep_resource'
7102: ,g_pkg_name) THEN
7103: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7104: RAISE fnd_api.g_exc_error;
7105: END IF;
7106:
7107: /* Initialize message list and count if needed */

Line 7110: gme_common_pvt.g_error_count := 0;

7106:
7107: /* Initialize message list and count if needed */
7108: IF p_init_msg_list = fnd_api.g_true THEN
7109: fnd_msg_pub.initialize;
7110: gme_common_pvt.g_error_count := 0;
7111: END IF;
7112:
7113: /* Setup the common constants used across the apis */
7114: /* This will raise an error if both organization_id and org_code are null values */

Line 7122: gme_common_pvt.g_setup_done :=

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

Line 7123: gme_common_pvt.setup

7119: ' org_code ' || p_org_code);
7120: END IF;
7121:
7122: gme_common_pvt.g_setup_done :=
7123: gme_common_pvt.setup
7124: (p_org_id => p_batchstep_resource_rec.organization_id
7125: ,p_org_code => p_org_code);
7126:
7127: IF NOT gme_common_pvt.g_setup_done THEN

Line 7127: IF NOT gme_common_pvt.g_setup_done THEN

7123: gme_common_pvt.setup
7124: (p_org_id => p_batchstep_resource_rec.organization_id
7125: ,p_org_code => p_org_code);
7126:
7127: IF NOT gme_common_pvt.g_setup_done THEN
7128: RAISE fnd_api.g_exc_error;
7129: END IF;
7130:
7131: gme_common_pvt.set_timestamp;

Line 7131: gme_common_pvt.set_timestamp;

7127: IF NOT gme_common_pvt.g_setup_done THEN
7128: RAISE fnd_api.g_exc_error;
7129: END IF;
7130:
7131: gme_common_pvt.set_timestamp;
7132: gme_common_pvt.g_check_primary_rsrc := 1;
7133: l_batchstep_resource_rec := p_batchstep_resource_rec;
7134: l_batchstep_resource_rec.organization_id :=
7135: gme_common_pvt.g_organization_id;

Line 7132: gme_common_pvt.g_check_primary_rsrc := 1;

7128: RAISE fnd_api.g_exc_error;
7129: END IF;
7130:
7131: gme_common_pvt.set_timestamp;
7132: gme_common_pvt.g_check_primary_rsrc := 1;
7133: l_batchstep_resource_rec := p_batchstep_resource_rec;
7134: l_batchstep_resource_rec.organization_id :=
7135: gme_common_pvt.g_organization_id;
7136:

Line 7135: gme_common_pvt.g_organization_id;

7131: gme_common_pvt.set_timestamp;
7132: gme_common_pvt.g_check_primary_rsrc := 1;
7133: l_batchstep_resource_rec := p_batchstep_resource_rec;
7134: l_batchstep_resource_rec.organization_id :=
7135: gme_common_pvt.g_organization_id;
7136:
7137: IF l_batchstep_resource_rec.resources IS NULL THEN
7138: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
7139: ,'FIELD_NAME'

Line 7138: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

7134: l_batchstep_resource_rec.organization_id :=
7135: gme_common_pvt.g_organization_id;
7136:
7137: IF l_batchstep_resource_rec.resources IS NULL THEN
7138: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
7139: ,'FIELD_NAME'
7140: ,'RESOURCES');
7141: RAISE fnd_api.g_exc_error;
7142: END IF;

Line 7146: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

7142: END IF;
7143:
7144: IF l_batchstep_resource_rec.batchstep_activity_id IS NOT NULL THEN
7145: --added by qzeng no need to check if done in bulk validation
7146: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
7147: -- validate the key provided
7148: IF g_debug <= gme_debug.g_log_statement THEN
7149: gme_debug.put_line
7150: ( g_pkg_name

Line 7166: gme_common_pvt.log_message

7162:
7163: IF cur_validate_activity%NOTFOUND THEN
7164: CLOSE cur_validate_activity;
7165:
7166: gme_common_pvt.log_message
7167: ('GME_ACTID_NOT_FOUND'
7168: ,'BATCHSTEP_ACT_ID'
7169: ,l_batchstep_resource_rec.batchstep_activity_id);
7170: RAISE fnd_api.g_exc_error;

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

7188:
7189: IF cur_validate_batch_type%FOUND THEN
7190: CLOSE cur_validate_batch_type;
7191:
7192: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');
7193: RAISE fnd_api.g_exc_error;
7194: END IF;
7195:
7196: CLOSE cur_validate_batch_type;

Line 7210: (p_org_code => gme_common_pvt.g_organization_code

7206: || ' Invoke validate_param');
7207: END IF;
7208:
7209: gme_batchstep_rsrc_pvt.validate_param
7210: (p_org_code => gme_common_pvt.g_organization_code
7211: ,p_batch_no => p_batch_no
7212: ,p_batchstep_no => p_batchstep_no
7213: ,p_activity => p_activity
7214: ,p_resource => l_batchstep_resource_rec.resources

Line 7306: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'

7302:
7303: IF cur_get_step_status%NOTFOUND THEN
7304: CLOSE cur_get_step_status;
7305:
7306: gme_common_pvt.log_message ('GME_NO_DATA_FOUND'
7307: ,'TABLE_NAME'
7308: ,'GME_BATCH_STEPS');
7309: RAISE fnd_api.g_exc_error;
7310: END IF;

Line 7328: gme_common_pvt.g_flex_validate_prof := 1;

7324: END IF;
7325:
7326: --FPBug#4395561 Start setting global flex validate variable
7327: IF p_validate_flexfields = FND_API.G_TRUE THEN
7328: gme_common_pvt.g_flex_validate_prof := 1;
7329: ELSE
7330: gme_common_pvt.g_flex_validate_prof := 0;
7331: END IF;
7332: --FPBug#4395561 End

Line 7330: gme_common_pvt.g_flex_validate_prof := 0;

7326: --FPBug#4395561 Start setting global flex validate variable
7327: IF p_validate_flexfields = FND_API.G_TRUE THEN
7328: gme_common_pvt.g_flex_validate_prof := 1;
7329: ELSE
7330: gme_common_pvt.g_flex_validate_prof := 0;
7331: END IF;
7332: --FPBug#4395561 End
7333:
7334: gme_batchstep_rsrc_pvt.validate_rsrc_param

Line 7353: gme_common_pvt.g_flex_validate_prof := 0;

7349: || l_return_status);
7350: END IF;
7351:
7352: --FPBug#4395561 resetting globla flex field variable
7353: gme_common_pvt.g_flex_validate_prof := 0;
7354:
7355: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7356: RAISE fnd_api.g_exc_error;
7357: END IF;

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

7427: gme_debug.put_line ( ' Completed ' || g_pkg_name || '.' || l_api_name
7428: || ' at ' || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
7429: END IF;
7430:
7431: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7432: gme_common_pvt.count_and_get(x_count => x_message_count
7433: ,p_encoded => fnd_api.g_false
7434: ,x_data => x_message_list);
7435: EXCEPTION

Line 7432: gme_common_pvt.count_and_get(x_count => x_message_count

7428: || ' at ' || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
7429: END IF;
7430:
7431: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7432: gme_common_pvt.count_and_get(x_count => x_message_count
7433: ,p_encoded => fnd_api.g_false
7434: ,x_data => x_message_list);
7435: EXCEPTION
7436: WHEN insert_rsrc_failed THEN

Line 7438: gme_common_pvt.count_and_get(x_count => x_message_count

7434: ,x_data => x_message_list);
7435: EXCEPTION
7436: WHEN insert_rsrc_failed THEN
7437: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
7438: gme_common_pvt.count_and_get(x_count => x_message_count
7439: ,p_encoded => fnd_api.g_false
7440: ,x_data => x_message_list);
7441: WHEN fnd_api.g_exc_error THEN
7442: x_return_status := fnd_api.g_ret_sts_error;

Line 7444: gme_common_pvt.count_and_get(x_count => x_message_count

7440: ,x_data => x_message_list);
7441: WHEN fnd_api.g_exc_error THEN
7442: x_return_status := fnd_api.g_ret_sts_error;
7443: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;
7444: gme_common_pvt.count_and_get(x_count => x_message_count
7445: ,p_encoded => fnd_api.g_false
7446: ,x_data => x_message_list);
7447: WHEN OTHERS THEN
7448: ROLLBACK TO SAVEPOINT insert_batchstep_rsrc;

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

7454:
7455: /*************************************************************************/
7456: PROCEDURE update_batchstep_resource (
7457: p_api_version IN NUMBER
7458: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
7459: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7460: ,p_commit IN VARCHAR2 := fnd_api.g_false
7461: ,p_batchstep_resource_rec IN gme_batch_step_resources%ROWTYPE
7462: ,p_org_code IN VARCHAR2 := NULL

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

7508: IF NOT fnd_api.compatible_api_call (2.0
7509: ,p_api_version
7510: ,'update_batchstep_resource'
7511: ,g_pkg_name) THEN
7512: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7513: RAISE fnd_api.g_exc_error;
7514: END IF;
7515:
7516: gme_common_pvt.set_timestamp;

Line 7516: gme_common_pvt.set_timestamp;

7512: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7513: RAISE fnd_api.g_exc_error;
7514: END IF;
7515:
7516: gme_common_pvt.set_timestamp;
7517:
7518: /* Initialize message list and count if needed */
7519: IF p_init_msg_list = fnd_api.g_true THEN
7520: fnd_msg_pub.initialize;

Line 7521: gme_common_pvt.g_error_count := 0;

7517:
7518: /* Initialize message list and count if needed */
7519: IF p_init_msg_list = fnd_api.g_true THEN
7520: fnd_msg_pub.initialize;
7521: gme_common_pvt.g_error_count := 0;
7522: END IF;
7523:
7524: l_batchstep_resource_rec := p_batchstep_resource_rec;
7525: gme_common_pvt.g_check_primary_rsrc := 1;

Line 7525: gme_common_pvt.g_check_primary_rsrc := 1;

7521: gme_common_pvt.g_error_count := 0;
7522: END IF;
7523:
7524: l_batchstep_resource_rec := p_batchstep_resource_rec;
7525: gme_common_pvt.g_check_primary_rsrc := 1;
7526:
7527: /* Retrieve the row to be updated */
7528: IF g_debug <= gme_debug.g_log_statement THEN
7529: gme_debug.put_line ( g_pkg_name

Line 7535: IF NOT gme_common_pvt.get_batchstep_rsrc

7531: || l_api_name
7532: || 'Invoke get_batchstep_rsrc');
7533: END IF;
7534:
7535: IF NOT gme_common_pvt.get_batchstep_rsrc
7536: (p_batchstep_rsrc_rec => l_batchstep_resource_rec
7537: ,p_org_code => p_org_code
7538: ,p_batch_no => p_batch_no
7539: ,p_batchstep_no => p_batchstep_no

Line 7588: gme_common_pvt.g_setup_done :=

7584: || ' org_code '
7585: || p_org_code);
7586: END IF;
7587:
7588: gme_common_pvt.g_setup_done :=
7589: gme_common_pvt.setup
7590: (p_org_id => l_batchstep_resource_rec.organization_id
7591: ,p_org_code => p_org_code);
7592:

Line 7589: gme_common_pvt.setup

7585: || p_org_code);
7586: END IF;
7587:
7588: gme_common_pvt.g_setup_done :=
7589: gme_common_pvt.setup
7590: (p_org_id => l_batchstep_resource_rec.organization_id
7591: ,p_org_code => p_org_code);
7592:
7593: IF NOT gme_common_pvt.g_setup_done THEN

Line 7593: IF NOT gme_common_pvt.g_setup_done THEN

7589: gme_common_pvt.setup
7590: (p_org_id => l_batchstep_resource_rec.organization_id
7591: ,p_org_code => p_org_code);
7592:
7593: IF NOT gme_common_pvt.g_setup_done THEN
7594: IF g_debug <= gme_debug.g_log_statement THEN
7595: gme_debug.put_line ( g_pkg_name
7596: || '.'
7597: || l_api_name

Line 7622: gme_common_pvt.log_message ('GME_BATCH_STEP_NOT_FOUND'

7618:
7619: IF cur_get_batchstep_status%NOTFOUND THEN
7620: CLOSE cur_get_batchstep_status;
7621:
7622: gme_common_pvt.log_message ('GME_BATCH_STEP_NOT_FOUND'
7623: ,'STEP_ID'
7624: ,l_batchstep_resource_rec.batchstep_id);
7625: RAISE fnd_api.g_exc_error;
7626: END IF;

Line 7640: gme_common_pvt.g_flex_validate_prof := 1;

7636: CLOSE cur_get_batchstep_status;
7637:
7638: --FPBug#4395561 Start setting global flex validate variable
7639: IF p_validate_flexfields = FND_API.G_TRUE THEN
7640: gme_common_pvt.g_flex_validate_prof := 1;
7641: ELSE
7642: gme_common_pvt.g_flex_validate_prof := 0;
7643: END IF;
7644: --FPBug#4395561 End

Line 7642: gme_common_pvt.g_flex_validate_prof := 0;

7638: --FPBug#4395561 Start setting global flex validate variable
7639: IF p_validate_flexfields = FND_API.G_TRUE THEN
7640: gme_common_pvt.g_flex_validate_prof := 1;
7641: ELSE
7642: gme_common_pvt.g_flex_validate_prof := 0;
7643: END IF;
7644: --FPBug#4395561 End
7645:
7646: gme_batchstep_rsrc_pvt.validate_rsrc_param

Line 7661: gme_common_pvt.g_flex_validate_prof := 0;

7657: gme_debug.put_line ('val rsrc param returns ' || l_return_status);
7658: END IF;
7659:
7660: --FPBug#4395561 resetting global flex field validate
7661: gme_common_pvt.g_flex_validate_prof := 0;
7662:
7663: IF l_return_status <> fnd_api.g_ret_sts_success THEN
7664: RAISE fnd_api.g_exc_error;
7665: END IF;

Line 7700: (p_header_id => gme_common_pvt.g_transaction_header_id

7696: || p_commit);
7697: END IF;
7698:
7699: gme_api_pub.save_batch
7700: (p_header_id => gme_common_pvt.g_transaction_header_id
7701: ,p_table => null
7702: ,p_commit => p_commit
7703: ,x_return_status => x_return_status);
7704:

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

7716: ELSE
7717: RAISE update_rsrc_failed;
7718: END IF;
7719:
7720: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7721: gme_common_pvt.count_and_get(x_count => x_message_count
7722: ,p_encoded => fnd_api.g_false
7723: ,x_data => x_message_list);
7724:

Line 7721: gme_common_pvt.count_and_get(x_count => x_message_count

7717: RAISE update_rsrc_failed;
7718: END IF;
7719:
7720: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
7721: gme_common_pvt.count_and_get(x_count => x_message_count
7722: ,p_encoded => fnd_api.g_false
7723: ,x_data => x_message_list);
7724:
7725: IF g_debug <= gme_debug.g_log_procedure THEN

Line 7732: gme_common_pvt.count_and_get(x_count => x_message_count

7728: END IF;
7729: EXCEPTION
7730: WHEN update_rsrc_failed THEN
7731: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7732: gme_common_pvt.count_and_get(x_count => x_message_count
7733: ,p_encoded => fnd_api.g_false
7734: ,x_data => x_message_list);
7735: WHEN fnd_api.g_exc_error THEN
7736: x_return_status := fnd_api.g_ret_sts_error;

Line 7738: gme_common_pvt.count_and_get(x_count => x_message_count

7734: ,x_data => x_message_list);
7735: WHEN fnd_api.g_exc_error THEN
7736: x_return_status := fnd_api.g_ret_sts_error;
7737: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;
7738: gme_common_pvt.count_and_get(x_count => x_message_count
7739: ,p_encoded => fnd_api.g_false
7740: ,x_data => x_message_list);
7741: WHEN OTHERS THEN
7742: ROLLBACK TO SAVEPOINT update_batchstep_rsrc;

Line 7753: := gme_common_pvt.g_max_errors

7749: /*************************************************************************/
7750: PROCEDURE delete_batchstep_resource (
7751: p_api_version IN NUMBER := 2.0
7752: ,p_validation_level IN NUMBER
7753: := gme_common_pvt.g_max_errors
7754: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
7755: ,p_commit IN VARCHAR2 := fnd_api.g_false
7756: ,p_batchstep_resource_id IN NUMBER := NULL
7757: ,p_org_code IN VARCHAR2 := NULL

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

7816: IF NOT fnd_api.compatible_api_call (2.0
7817: ,p_api_version
7818: ,'delete_batchstep_resource'
7819: ,g_pkg_name) THEN
7820: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7821: RAISE fnd_api.g_exc_error;
7822: END IF;
7823:
7824: gme_common_pvt.set_timestamp;

Line 7824: gme_common_pvt.set_timestamp;

7820: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
7821: RAISE fnd_api.g_exc_error;
7822: END IF;
7823:
7824: gme_common_pvt.set_timestamp;
7825:
7826: /* Initialize message list and count if needed */
7827: IF p_init_msg_list = fnd_api.g_true THEN
7828: fnd_msg_pub.initialize;

Line 7829: gme_common_pvt.g_error_count := 0;

7825:
7826: /* Initialize message list and count if needed */
7827: IF p_init_msg_list = fnd_api.g_true THEN
7828: fnd_msg_pub.initialize;
7829: gme_common_pvt.g_error_count := 0;
7830: END IF;
7831:
7832: gme_common_pvt.g_check_primary_rsrc := 1;
7833:

Line 7832: gme_common_pvt.g_check_primary_rsrc := 1;

7828: fnd_msg_pub.initialize;
7829: gme_common_pvt.g_error_count := 0;
7830: END IF;
7831:
7832: gme_common_pvt.g_check_primary_rsrc := 1;
7833:
7834: IF (g_debug <= gme_debug.g_log_statement) THEN
7835: gme_debug.put_line ( g_pkg_name
7836: || '.'

Line 7847: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'

7843: END IF;
7844:
7845: /* Report error if insufficient data to pinpoint batchstep resource */
7846: IF (p_batchstep_resource_id IS NULL AND p_resource IS NULL) THEN
7847: gme_common_pvt.log_message ('GME_FIELD_VALUE_REQUIRED'
7848: ,'FIELD_NAME'
7849: ,'RESOURCES');
7850: RAISE fnd_api.g_exc_error;
7851: END IF;

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

7915:
7916: IF cur_get_step_dtl%NOTFOUND THEN
7917: CLOSE cur_get_step_dtl;
7918:
7919: gme_common_pvt.log_message ('GME_INVALID_RSRC_ID');
7920: RAISE fnd_api.g_exc_error;
7921: END IF;
7922:
7923: CLOSE cur_get_step_dtl;

Line 7937: gme_common_pvt.g_setup_done :=

7933: || ' and org_code => '
7934: || p_org_code);
7935: END IF;
7936:
7937: gme_common_pvt.g_setup_done :=
7938: gme_common_pvt.setup (p_org_id => l_organization_id
7939: ,p_org_code => p_org_code);
7940:
7941: IF NOT gme_common_pvt.g_setup_done THEN

Line 7938: gme_common_pvt.setup (p_org_id => l_organization_id

7934: || p_org_code);
7935: END IF;
7936:
7937: gme_common_pvt.g_setup_done :=
7938: gme_common_pvt.setup (p_org_id => l_organization_id
7939: ,p_org_code => p_org_code);
7940:
7941: IF NOT gme_common_pvt.g_setup_done THEN
7942: RAISE fnd_api.g_exc_error;

Line 7941: IF NOT gme_common_pvt.g_setup_done THEN

7937: gme_common_pvt.g_setup_done :=
7938: gme_common_pvt.setup (p_org_id => l_organization_id
7939: ,p_org_code => p_org_code);
7940:
7941: IF NOT gme_common_pvt.g_setup_done THEN
7942: RAISE fnd_api.g_exc_error;
7943: END IF;
7944:
7945: /* Validations prior to deletion */

Line 7954: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

7950: || ' start of validations');
7951: END IF;
7952:
7953: --added by qzeng no need to check if done in bulk validation
7954: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
7955: /* make sure resource id does not belong to an FPO */
7956: OPEN cur_validate_batch_type (l_rsrc_id);
7957:
7958: FETCH cur_validate_batch_type

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

7959: INTO l_dummy;
7960:
7961: IF cur_validate_batch_type%FOUND THEN
7962: CLOSE cur_validate_batch_type;
7963: gme_common_pvt.log_message ('GME_FPO_RSRC_NO_EDIT');
7964: RAISE fnd_api.g_exc_error;
7965: END IF;
7966:
7967: CLOSE cur_validate_batch_type;

Line 7985: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN

7981: END IF;
7982:
7983: -- Bug 13992005 - We do not need to check batch status for this function.
7984: /*
7985: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7986: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7987: RAISE fnd_api.g_exc_error;
7988: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7989: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');

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

7982:
7983: -- Bug 13992005 - We do not need to check batch status for this function.
7984: /*
7985: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7986: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7987: RAISE fnd_api.g_exc_error;
7988: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7989: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7990: RAISE fnd_api.g_exc_error;

Line 7988: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN

7984: /*
7985: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7986: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7987: RAISE fnd_api.g_exc_error;
7988: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7989: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7990: RAISE fnd_api.g_exc_error;
7991: END IF;
7992: */

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

7985: IF l_batch_status <> gme_common_pvt.g_batch_pending THEN
7986: gme_common_pvt.log_message ('PM_WRONG_STATUS');
7987: RAISE fnd_api.g_exc_error;
7988: ELSIF l_step_status <> gme_common_pvt.g_step_pending THEN
7989: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7990: RAISE fnd_api.g_exc_error;
7991: END IF;
7992: */
7993: -- Bug 13992005

Line 7994: IF l_step_status <> gme_common_pvt.g_step_pending THEN

7990: RAISE fnd_api.g_exc_error;
7991: END IF;
7992: */
7993: -- Bug 13992005
7994: IF l_step_status <> gme_common_pvt.g_step_pending THEN
7995: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7996: RAISE fnd_api.g_exc_error;
7997: END IF;
7998:

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

7991: END IF;
7992: */
7993: -- Bug 13992005
7994: IF l_step_status <> gme_common_pvt.g_step_pending THEN
7995: gme_common_pvt.log_message ('PC_STEP_STATUS_ERR');
7996: RAISE fnd_api.g_exc_error;
7997: END IF;
7998:
7999: /* Ensure that the batchstep_resource_rec is sufficiently populated for deletion to proceed */

Line 8037: (p_header_id => gme_common_pvt.g_transaction_header_id

8033: save_batch tith commit set ' || p_commit);
8034: END IF;
8035:
8036: gme_api_pub.save_batch
8037: (p_header_id => gme_common_pvt.g_transaction_header_id
8038: ,p_table => null
8039: ,p_commit => p_commit
8040: ,x_return_status => x_return_status);
8041:

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

8055: IF g_debug <= gme_debug.g_log_procedure THEN
8056: gme_debug.put_line ( ' Completed ' || l_api_name || ' at '
8057: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
8058: END IF;
8059: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
8060: gme_common_pvt.count_and_get(x_count => x_message_count
8061: ,p_encoded => fnd_api.g_false
8062: ,x_data => x_message_list);
8063: EXCEPTION

Line 8060: gme_common_pvt.count_and_get(x_count => x_message_count

8056: gme_debug.put_line ( ' Completed ' || l_api_name || ' at '
8057: || TO_CHAR (SYSDATE, 'MM/DD/YYYY HH24:MI:SS') );
8058: END IF;
8059: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
8060: gme_common_pvt.count_and_get(x_count => x_message_count
8061: ,p_encoded => fnd_api.g_false
8062: ,x_data => x_message_list);
8063: EXCEPTION
8064: WHEN delete_rsrc_failed THEN

Line 8066: gme_common_pvt.count_and_get(x_count => x_message_count

8062: ,x_data => x_message_list);
8063: EXCEPTION
8064: WHEN delete_rsrc_failed THEN
8065: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
8066: gme_common_pvt.count_and_get(x_count => x_message_count
8067: ,p_encoded => fnd_api.g_false
8068: ,x_data => x_message_list);
8069: WHEN fnd_api.g_exc_error THEN
8070: x_return_status := fnd_api.g_ret_sts_error;

Line 8072: gme_common_pvt.count_and_get(x_count => x_message_count

8068: ,x_data => x_message_list);
8069: WHEN fnd_api.g_exc_error THEN
8070: x_return_status := fnd_api.g_ret_sts_error;
8071: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;
8072: gme_common_pvt.count_and_get(x_count => x_message_count
8073: ,p_encoded => fnd_api.g_false
8074: ,x_data => x_message_list);
8075: WHEN OTHERS THEN
8076: ROLLBACK TO SAVEPOINT delete_batchstep_rsrc;

Line 8087: := gme_common_pvt.g_max_errors

8083: /*************************************************************************/
8084: PROCEDURE auto_detail_line (
8085: p_api_version IN NUMBER := 2.0
8086: ,p_validation_level IN NUMBER
8087: := gme_common_pvt.g_max_errors
8088: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
8089: ,p_commit IN VARCHAR2 := fnd_api.g_false
8090: ,x_message_count OUT NOCOPY NUMBER
8091: ,x_message_list OUT NOCOPY VARCHAR2

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

8131: IF NOT fnd_api.compatible_api_call (2.0
8132: ,p_api_version
8133: ,'auto_detail_line'
8134: ,g_pkg_name) THEN
8135: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8136: RAISE fnd_api.g_exc_error;
8137: END IF;
8138:
8139: IF g_debug <= gme_debug.g_log_statement THEN

Line 8152: gme_common_pvt.Validate_material_detail

8148: l_material_details_rec.material_detail_id := p_material_detail_id;
8149: l_material_details_rec.line_no := p_line_no;
8150: /* Ensure line_type is populated. Reservations only permitted for ingredient lines. */
8151: l_material_details_rec.line_type := -1;
8152: gme_common_pvt.Validate_material_detail
8153: (p_material_detail_rec => l_material_details_rec
8154: ,p_org_code => p_org_code
8155: ,p_batch_no => p_batch_no
8156: ,p_batch_type => 0

Line 8171: gme_common_pvt.set_timestamp;

8167: RAISE fnd_api.g_exc_error;
8168: ELSE
8169: l_material_details_rec := l_material_details_rec_out;
8170: END IF;
8171: gme_common_pvt.set_timestamp;
8172:
8173: /* Validate the demand source - it must be a valid ingredient line */
8174: IF g_debug <= gme_debug.g_log_statement THEN
8175: gme_debug.put_line

Line 8253: gme_common_pvt.count_and_get (x_count => x_message_count

8249: END IF;
8250: EXCEPTION
8251: WHEN auto_detail_error THEN
8252: ROLLBACK TO SAVEPOINT auto_detail_line;
8253: gme_common_pvt.count_and_get (x_count => x_message_count
8254: ,p_encoded => fnd_api.g_false
8255: ,x_data => x_message_list);
8256: WHEN fnd_api.g_exc_error THEN
8257: x_return_status := fnd_api.g_ret_sts_error;

Line 8259: gme_common_pvt.count_and_get (x_count => x_message_count

8255: ,x_data => x_message_list);
8256: WHEN fnd_api.g_exc_error THEN
8257: x_return_status := fnd_api.g_ret_sts_error;
8258: ROLLBACK TO SAVEPOINT auto_detail_line;
8259: gme_common_pvt.count_and_get (x_count => x_message_count
8260: ,p_encoded => fnd_api.g_false
8261: ,x_data => x_message_list);
8262: WHEN OTHERS THEN
8263: ROLLBACK TO SAVEPOINT auto_detail_line;

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

8304: IF NOT FND_API.compatible_api_call(2.0
8305: ,p_api_version
8306: ,'auto_detail_batch'
8307: ,g_pkg_name ) THEN
8308: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8309: RAISE fnd_api.g_exc_error;
8310: END IF;
8311:
8312: IF g_debug <= gme_debug.g_log_statement THEN

Line 8330: gme_common_pvt.g_setup_done :=

8326:
8327: l_batch_rec := p_batch_rec;
8328: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
8329: IF p_org_code is NOT NULL and p_batch_rec.organization_id is NULL THEN
8330: gme_common_pvt.g_setup_done :=
8331: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
8332: p_org_code => p_org_code);
8333:
8334: IF NOT gme_common_pvt.g_setup_done THEN

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

8327: l_batch_rec := p_batch_rec;
8328: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
8329: IF p_org_code is NOT NULL and p_batch_rec.organization_id is NULL THEN
8330: gme_common_pvt.g_setup_done :=
8331: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
8332: p_org_code => p_org_code);
8333:
8334: IF NOT gme_common_pvt.g_setup_done THEN
8335: RAISE fnd_api.g_exc_error;

Line 8334: IF NOT gme_common_pvt.g_setup_done THEN

8330: gme_common_pvt.g_setup_done :=
8331: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
8332: p_org_code => p_org_code);
8333:
8334: IF NOT gme_common_pvt.g_setup_done THEN
8335: RAISE fnd_api.g_exc_error;
8336: ELSE
8337: l_batch_rec.organization_id := gme_common_pvt.g_organization_id;
8338: IF g_debug <= gme_debug.g_log_statement THEN

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

8333:
8334: IF NOT gme_common_pvt.g_setup_done THEN
8335: RAISE fnd_api.g_exc_error;
8336: ELSE
8337: l_batch_rec.organization_id := gme_common_pvt.g_organization_id;
8338: IF g_debug <= gme_debug.g_log_statement THEN
8339: gme_debug.put_line( g_pkg_name
8340: ||'.'
8341: ||l_api_name

Line 8343: ||gme_common_pvt.g_organization_id);

8339: gme_debug.put_line( g_pkg_name
8340: ||'.'
8341: ||l_api_name
8342: || ' Organization_id set to '
8343: ||gme_common_pvt.g_organization_id);
8344: END IF;
8345: END IF;
8346: END IF;
8347:

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

8345: END IF;
8346: END IF;
8347:
8348: IF l_batch_rec.batch_type is NULL THEN
8349: l_batch_rec.batch_type := gme_common_pvt.g_doc_type_batch;
8350: END IF;
8351:
8352: IF (NOT gme_batch_header_dbl.fetch_row (l_batch_rec,
8353: l_batch_header_rec) ) THEN

Line 8365: gme_common_pvt.g_setup_done :=

8361: RAISE fnd_api.g_exc_error;
8362: END IF;
8363:
8364: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
8365: gme_common_pvt.g_setup_done :=
8366: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
8367: p_org_code => p_org_code);
8368:
8369: IF NOT gme_common_pvt.g_setup_done THEN

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

8362: END IF;
8363:
8364: /* Check setup is done. For all profile/parameter values based on orgn_code/organization_id. */
8365: gme_common_pvt.g_setup_done :=
8366: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
8367: p_org_code => p_org_code);
8368:
8369: IF NOT gme_common_pvt.g_setup_done THEN
8370: RAISE fnd_api.g_exc_error;

Line 8369: IF NOT gme_common_pvt.g_setup_done THEN

8365: gme_common_pvt.g_setup_done :=
8366: gme_common_pvt.setup (p_org_id => l_batch_header_rec.organization_id,
8367: p_org_code => p_org_code);
8368:
8369: IF NOT gme_common_pvt.g_setup_done THEN
8370: RAISE fnd_api.g_exc_error;
8371: END IF;
8372:
8373: /* Verify that update_inventory is permitted for this batch */

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

8371: END IF;
8372:
8373: /* Verify that update_inventory is permitted for this batch */
8374: IF l_batch_header_rec.update_inventory_ind <> 'Y' THEN
8375: gme_common_pvt.log_message ('GME_INVENTORY_UPDATE_BLOCKED');
8376: RAISE fnd_api.g_exc_error;
8377: END IF;
8378:
8379: /* Verify Batch to be in pending or WIP status */

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

8377: END IF;
8378:
8379: /* Verify Batch to be in pending or WIP status */
8380: IF l_batch_header_rec.batch_status NOT IN
8381: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
8382: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS','PROCESS','AUTO_DETAIL_BATCH');
8383: RAISE fnd_api.g_exc_error;
8384: END IF;
8385:

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

8378:
8379: /* Verify Batch to be in pending or WIP status */
8380: IF l_batch_header_rec.batch_status NOT IN
8381: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
8382: gme_common_pvt.log_message ('GME_INVALID_BATCH_STATUS','PROCESS','AUTO_DETAIL_BATCH');
8383: RAISE fnd_api.g_exc_error;
8384: END IF;
8385:
8386: /* Reservations not permitted for FPOs */

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

8383: RAISE fnd_api.g_exc_error;
8384: END IF;
8385:
8386: /* Reservations not permitted for FPOs */
8387: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
8388: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
8389: RAISE fnd_api.g_exc_error;
8390: END IF;
8391:

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

8384: END IF;
8385:
8386: /* Reservations not permitted for FPOs */
8387: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
8388: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
8389: RAISE fnd_api.g_exc_error;
8390: END IF;
8391:
8392: gme_common_pvt.set_timestamp;

Line 8392: gme_common_pvt.set_timestamp;

8388: gme_common_pvt.log_message ('GME_FPO_RESERVATION_ERROR');
8389: RAISE fnd_api.g_exc_error;
8390: END IF;
8391:
8392: gme_common_pvt.set_timestamp;
8393:
8394: /* Invoke auto_detail_batch to create detailed level reservations */
8395: GME_API_MAIN.Auto_Detail_Batch(p_init_msg_list => FND_API.G_FALSE
8396: ,x_message_count => x_message_count

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

8426:
8427: EXCEPTION
8428: WHEN auto_detail_error THEN
8429: ROLLBACK TO SAVEPOINT auto_detail_batch;
8430: gme_common_pvt.count_and_get(x_count => x_message_count,
8431: p_encoded => FND_API.g_false,
8432: x_data => x_message_list);
8433: WHEN fnd_api.g_exc_error THEN
8434: x_return_status := FND_API.g_ret_sts_error;

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

8432: x_data => x_message_list);
8433: WHEN fnd_api.g_exc_error THEN
8434: x_return_status := FND_API.g_ret_sts_error;
8435: ROLLBACK TO SAVEPOINT auto_detail_batch;
8436: gme_common_pvt.count_and_get(x_count => x_message_count,
8437: p_encoded => FND_API.g_false,
8438: x_data => x_message_list);
8439: WHEN OTHERS THEN
8440: ROLLBACK TO SAVEPOINT auto_detail_batch;

Line 8476: := gme_common_pvt.g_max_errors,

8472: ================================================================================*/
8473: PROCEDURE insert_batchstep_activity (
8474: p_api_version IN NUMBER ,
8475: p_validation_level IN NUMBER
8476: := gme_common_pvt.g_max_errors,
8477: p_init_msg_list IN VARCHAR2
8478: DEFAULT fnd_api.g_false,
8479: p_commit IN VARCHAR2
8480: DEFAULT fnd_api.g_false,

Line 8516: gme_common_pvt.g_error_count := 0;

8512:
8513: IF (fnd_api.to_boolean (p_init_msg_list))
8514: THEN
8515: fnd_msg_pub.initialize;
8516: gme_common_pvt.g_error_count := 0;
8517: END IF;
8518:
8519: -- Standard call to check for call compatibility.
8520: IF NOT fnd_api.compatible_api_call (2.0,

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

8521: p_api_version,
8522: l_api_name,
8523: g_pkg_name
8524: ) THEN
8525: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8526: RAISE fnd_api.g_exc_error;
8527: END IF;
8528:
8529: /* Set the return status to success initially */

Line 8532: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

8528:
8529: /* Set the return status to success initially */
8530: x_return_status := fnd_api.g_ret_sts_success;
8531: --added by qzeng no need to check if done in bulk validation
8532: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
8533: /* Setup the common constants used accross the apis */
8534: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8535: p_org_code => p_org_code)
8536: )THEN

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

8530: x_return_status := fnd_api.g_ret_sts_success;
8531: --added by qzeng no need to check if done in bulk validation
8532: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
8533: /* Setup the common constants used accross the apis */
8534: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8535: p_org_code => p_org_code)
8536: )THEN
8537: RAISE fnd_api.g_exc_error;
8538: END IF;

Line 8542: gme_common_pvt.g_flex_validate_prof := 1;

8538: END IF;
8539: END IF;
8540: --FPBug#4395561 Start setting global flex validate variable
8541: IF p_validate_flexfield = FND_API.G_TRUE THEN
8542: gme_common_pvt.g_flex_validate_prof := 1;
8543: ELSE
8544: gme_common_pvt.g_flex_validate_prof := 0;
8545: END IF;
8546: --FPBug#4395561 End

Line 8544: gme_common_pvt.g_flex_validate_prof := 0;

8540: --FPBug#4395561 Start setting global flex validate variable
8541: IF p_validate_flexfield = FND_API.G_TRUE THEN
8542: gme_common_pvt.g_flex_validate_prof := 1;
8543: ELSE
8544: gme_common_pvt.g_flex_validate_prof := 0;
8545: END IF;
8546: --FPBug#4395561 End
8547:
8548: gme_common_pvt.set_timestamp;

Line 8548: gme_common_pvt.set_timestamp;

8544: gme_common_pvt.g_flex_validate_prof := 0;
8545: END IF;
8546: --FPBug#4395561 End
8547:
8548: gme_common_pvt.set_timestamp;
8549: gme_batchstep_act_pvt.insert_batchstep_activity (p_batchstep_activity_rec => p_batchstep_activity_rec,
8550: p_batchstep_resource_tbl => p_batchstep_resource_tbl,
8551: p_org_code => p_org_code,
8552: p_batch_no => p_batch_no,

Line 8560: gme_common_pvt.g_flex_validate_prof := 0;

8556: x_batchstep_activity_rec => x_batchstep_activity_rec,
8557: x_return_status => x_return_status
8558: );
8559: --FPBug#4395561 resetting global flex field validate
8560: gme_common_pvt.g_flex_validate_prof := 0;
8561:
8562: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
8563: RAISE insert_activity_failed;
8564: END IF;

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

8580: -- ELSE
8581: -- RAISE fnd_api.g_exc_error;
8582: -- END IF;
8583:
8584: gme_common_pvt.count_and_get (x_count => x_message_count,
8585: p_encoded => fnd_api.g_false,
8586: x_data => x_message_list
8587: );
8588:

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

8592: END IF;
8593: EXCEPTION
8594: WHEN insert_activity_failed THEN
8595: ROLLBACK TO SAVEPOINT insert_activity_pub;
8596: gme_common_pvt.count_and_get (x_count => x_message_count,
8597: p_encoded => fnd_api.g_false,
8598: x_data => x_message_list
8599: );
8600: WHEN fnd_api.g_exc_error THEN

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

8599: );
8600: WHEN fnd_api.g_exc_error THEN
8601: ROLLBACK TO SAVEPOINT insert_activity_pub;
8602: x_return_status := fnd_api.g_ret_sts_error;
8603: gme_common_pvt.count_and_get (x_count => x_message_count,
8604: p_encoded => fnd_api.g_false,
8605: x_data => x_message_list
8606: );
8607: WHEN OTHERS THEN

Line 8639: := gme_common_pvt.g_max_errors,

8635: ================================================================================*/
8636: PROCEDURE update_batchstep_activity (
8637: p_api_version IN NUMBER ,
8638: p_validation_level IN NUMBER
8639: := gme_common_pvt.g_max_errors,
8640: p_init_msg_list IN VARCHAR2
8641: DEFAULT fnd_api.g_false,
8642: p_commit IN VARCHAR2
8643: DEFAULT fnd_api.g_false,

Line 8672: gme_common_pvt.g_error_count := 0;

8668: END IF;
8669:
8670: IF (fnd_api.to_boolean (p_init_msg_list)) THEN
8671: fnd_msg_pub.initialize;
8672: gme_common_pvt.g_error_count := 0;
8673: END IF;
8674:
8675: -- Standard call to check for call compatibility.
8676: IF NOT fnd_api.compatible_api_call (2.0,

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

8677: p_api_version,
8678: l_api_name,
8679: g_pkg_name
8680: ) THEN
8681: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8682: RAISE fnd_api.g_exc_error;
8683: END IF;
8684:
8685: /* Set the return status to success initially */

Line 8689: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

8685: /* Set the return status to success initially */
8686: x_return_status := fnd_api.g_ret_sts_success;
8687:
8688: --added by qzeng no need to check if done in bulk validation
8689: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
8690: /* Setup the common constants used accross the apis */
8691: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8692: p_org_code => p_org_code)) THEN
8693: RAISE fnd_api.g_exc_error;

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

8687:
8688: --added by qzeng no need to check if done in bulk validation
8689: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
8690: /* Setup the common constants used accross the apis */
8691: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8692: p_org_code => p_org_code)) THEN
8693: RAISE fnd_api.g_exc_error;
8694: END IF;
8695: END IF;

Line 8698: gme_common_pvt.g_flex_validate_prof := 1;

8694: END IF;
8695: END IF;
8696: --FPBug#4395561 Start setting global flex validate variable
8697: IF p_validate_flexfield = FND_API.G_TRUE THEN
8698: gme_common_pvt.g_flex_validate_prof := 1;
8699: ELSE
8700: gme_common_pvt.g_flex_validate_prof := 0;
8701: END IF;
8702: --FPBug#4395561 End

Line 8700: gme_common_pvt.g_flex_validate_prof := 0;

8696: --FPBug#4395561 Start setting global flex validate variable
8697: IF p_validate_flexfield = FND_API.G_TRUE THEN
8698: gme_common_pvt.g_flex_validate_prof := 1;
8699: ELSE
8700: gme_common_pvt.g_flex_validate_prof := 0;
8701: END IF;
8702: --FPBug#4395561 End
8703:
8704: gme_common_pvt.set_timestamp;

Line 8704: gme_common_pvt.set_timestamp;

8700: gme_common_pvt.g_flex_validate_prof := 0;
8701: END IF;
8702: --FPBug#4395561 End
8703:
8704: gme_common_pvt.set_timestamp;
8705: gme_batchstep_act_pvt.update_batchstep_activity (p_batchstep_activity_rec => p_batchstep_activity_rec,
8706: p_org_code => p_org_code,
8707: p_batch_no => p_batch_no,
8708: p_batchstep_no => p_batchstep_no,

Line 8714: gme_common_pvt.g_flex_validate_prof := 0;

8710: x_batchstep_activity_rec => x_batchstep_activity_rec,
8711: x_return_status => x_return_status
8712: );
8713: --FPBug#4395561 resetting global flex-field validate variable
8714: gme_common_pvt.g_flex_validate_prof := 0;
8715:
8716: IF (x_return_status <> fnd_api.g_ret_sts_success) THEN
8717: RAISE update_activity_failed;
8718: END IF;

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

8734: -- ELSE
8735: -- RAISE fnd_api.g_exc_error;
8736: -- END IF;
8737:
8738: gme_common_pvt.count_and_get (x_count => x_message_count,
8739: p_encoded => fnd_api.g_false,
8740: x_data => x_message_list
8741: );
8742: IF g_debug <= gme_debug.g_log_procedure THEN

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

8745: END IF;
8746: EXCEPTION
8747: WHEN update_activity_failed THEN
8748: ROLLBACK TO SAVEPOINT update_activity_pub;
8749: gme_common_pvt.count_and_get (x_count => x_message_count,
8750: p_encoded => fnd_api.g_false,
8751: x_data => x_message_list
8752: );
8753: WHEN fnd_api.g_exc_error THEN

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

8752: );
8753: WHEN fnd_api.g_exc_error THEN
8754: ROLLBACK TO SAVEPOINT update_activity_pub;
8755: x_return_status := fnd_api.g_ret_sts_error;
8756: gme_common_pvt.count_and_get (x_count => x_message_count,
8757: p_encoded => fnd_api.g_false,
8758: x_data => x_message_list
8759: );
8760: WHEN OTHERS THEN

Line 8790: := gme_common_pvt.g_max_errors,

8786: ================================================================================*/
8787: PROCEDURE delete_batchstep_activity (
8788: p_api_version IN NUMBER := 2.0,
8789: p_validation_level IN NUMBER
8790: := gme_common_pvt.g_max_errors,
8791: p_init_msg_list IN VARCHAR2
8792: DEFAULT fnd_api.g_false,
8793: p_commit IN VARCHAR2
8794: DEFAULT fnd_api.g_false,

Line 8824: gme_common_pvt.g_error_count := 0;

8820:
8821: IF (fnd_api.to_boolean (p_init_msg_list))
8822: THEN
8823: fnd_msg_pub.initialize;
8824: gme_common_pvt.g_error_count := 0;
8825: END IF;
8826:
8827: -- Standard call to check for call compatibility.
8828: IF NOT fnd_api.compatible_api_call (2.0,

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

8828: IF NOT fnd_api.compatible_api_call (2.0,
8829: p_api_version,
8830: l_api_name,
8831: g_pkg_name) THEN
8832: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8833: RAISE fnd_api.g_exc_error;
8834: END IF;
8835:
8836: /* Set the return status to success initially */

Line 8840: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN

8836: /* Set the return status to success initially */
8837: x_return_status := fnd_api.g_ret_sts_success;
8838:
8839: --added by qzeng no need to check if done in bulk validation
8840: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
8841: /* Setup the common constants used accross the apis */
8842: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8843: p_org_code => p_org_code)) THEN
8844: RAISE fnd_api.g_exc_error;

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

8838:
8839: --added by qzeng no need to check if done in bulk validation
8840: IF NVL(gme_common_pvt.g_bulk_validation_done, 'N') = 'N' THEN
8841: /* Setup the common constants used accross the apis */
8842: IF (NOT gme_common_pvt.setup (p_org_id => NULL,
8843: p_org_code => p_org_code)) THEN
8844: RAISE fnd_api.g_exc_error;
8845: END IF;
8846: END IF;

Line 8847: gme_common_pvt.set_timestamp;

8843: p_org_code => p_org_code)) THEN
8844: RAISE fnd_api.g_exc_error;
8845: END IF;
8846: END IF;
8847: gme_common_pvt.set_timestamp;
8848: gme_batchstep_act_pvt.delete_batchstep_activity (p_batchstep_activity_id => p_batchstep_activity_id,
8849: p_org_code => p_org_code,
8850: p_batch_no => p_batch_no,
8851: p_batchstep_no => p_batchstep_no,

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

8873: -- ELSE
8874: -- RAISE fnd_api.g_exc_error;
8875: -- END IF;
8876:
8877: gme_common_pvt.count_and_get (x_count => x_message_count,
8878: p_encoded => fnd_api.g_false,
8879: x_data => x_message_list
8880: );
8881:

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

8885: END IF;
8886: EXCEPTION
8887: WHEN delete_activity_failed THEN
8888: ROLLBACK TO SAVEPOINT delete_activity_pub;
8889: gme_common_pvt.count_and_get (x_count => x_message_count,
8890: p_encoded => fnd_api.g_false,
8891: x_data => x_message_list
8892: );
8893: WHEN fnd_api.g_exc_error THEN

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

8892: );
8893: WHEN fnd_api.g_exc_error THEN
8894: ROLLBACK TO SAVEPOINT delete_activity_pub;
8895: x_return_status := fnd_api.g_ret_sts_error;
8896: gme_common_pvt.count_and_get (x_count => x_message_count,
8897: p_encoded => fnd_api.g_false,
8898: x_data => x_message_list
8899: );
8900: WHEN OTHERS THEN

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

8907:
8908: /*************************************************************************/
8909: PROCEDURE convert_fpo (
8910: p_api_version IN NUMBER := 2.0,
8911: p_validation_level IN NUMBER := gme_common_pvt.g_max_errors,
8912: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
8913: p_commit IN VARCHAR2 := fnd_api.g_false,
8914: x_message_count OUT NOCOPY NUMBER,
8915: x_message_list OUT NOCOPY VARCHAR2,

Line 8924: p_validity_rule_tab IN gme_common_pvt.recipe_validity_rule_tab,

8920: x_batch_header OUT NOCOPY gme_batch_header%ROWTYPE,
8921: p_batch_size IN NUMBER,
8922: p_num_batches IN NUMBER,
8923: p_validity_rule_id IN NUMBER,
8924: p_validity_rule_tab IN gme_common_pvt.recipe_validity_rule_tab,
8925: p_leadtime IN NUMBER DEFAULT 0,
8926: p_batch_offset IN NUMBER DEFAULT 0,
8927: p_offset_type IN NUMBER DEFAULT 0,
8928: p_plan_start_date IN gme_batch_header.plan_start_date%TYPE,

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

8958: IF NOT fnd_api.compatible_api_call (2.0
8959: ,p_api_version
8960: ,'convertFPO'
8961: ,g_pkg_name) THEN
8962: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
8963: RAISE fnd_api.g_exc_error;
8964: END IF;
8965:
8966:

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

8978: IF gme_phantom_pvt.is_phantom (
8979: p_batch_header => l_batch_header,
8980: x_return_status => x_return_status
8981: ) THEN
8982: gme_common_pvt.log_message ('PM_INVALID_PHANTOM_ACTION');
8983: RAISE fnd_api.g_exc_error;
8984: ELSIF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8985: RAISE fnd_api.g_exc_error;
8986: END IF;

Line 8999: gme_common_pvt.g_setup_done :=

8995: l_batch_header.organization_id);
8996: END IF;
8997:
8998: /* Setup the common constants used accross the apis */
8999: gme_common_pvt.g_setup_done :=
9000: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
9001: ,p_org_code => p_org_code);
9002:
9003: IF NOT gme_common_pvt.g_setup_done THEN

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

8996: END IF;
8997:
8998: /* Setup the common constants used accross the apis */
8999: gme_common_pvt.g_setup_done :=
9000: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
9001: ,p_org_code => p_org_code);
9002:
9003: IF NOT gme_common_pvt.g_setup_done THEN
9004: RAISE fnd_api.g_exc_error;

Line 9003: IF NOT gme_common_pvt.g_setup_done THEN

8999: gme_common_pvt.g_setup_done :=
9000: gme_common_pvt.setup (p_org_id => l_batch_header.organization_id
9001: ,p_org_code => p_org_code);
9002:
9003: IF NOT gme_common_pvt.g_setup_done THEN
9004: RAISE fnd_api.g_exc_error;
9005: ELSE
9006: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
9007: END IF;

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

9002:
9003: IF NOT gme_common_pvt.g_setup_done THEN
9004: RAISE fnd_api.g_exc_error;
9005: ELSE
9006: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
9007: END IF;
9008:
9009: gme_common_pvt.set_timestamp;
9010:

Line 9009: gme_common_pvt.set_timestamp;

9005: ELSE
9006: l_batch_header.organization_id := gme_common_pvt.g_organization_id;
9007: END IF;
9008:
9009: gme_common_pvt.set_timestamp;
9010:
9011: gme_convert_fpo_pvt.convert_fpo_main (
9012: p_batch_header => l_batch_header,
9013: p_batch_size => p_batch_size,

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

9036:
9037: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9038: RAISE fnd_api.g_exc_error;
9039: ELSE
9040: gme_common_pvt.log_message ('GME_API_BATCH_CREATED');
9041: END IF;
9042: END IF;
9043: ELSE
9044: RAISE convert_fpo_failed;

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

9043: ELSE
9044: RAISE convert_fpo_failed;
9045: END IF;
9046:
9047: gme_common_pvt.count_and_get (x_count => x_message_count,
9048: p_encoded => FND_API.g_false,
9049: x_data => x_message_list);
9050: IF g_debug <= gme_debug.g_log_procedure THEN
9051: gme_debug.put_line ( 'Completed ' || l_api_name || ' at ' || TO_CHAR

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

9054: EXCEPTION
9055: WHEN convert_fpo_failed THEN
9056: ROLLBACK TO SAVEPOINT convert_fpo;
9057: x_batch_header := NULL;
9058: gme_common_pvt.count_and_get (x_count => x_message_count,
9059: p_encoded => FND_API.g_false,
9060: x_data => x_message_list);
9061: WHEN fnd_api.g_exc_error THEN
9062: ROLLBACK TO SAVEPOINT convert_fpo;

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

9061: WHEN fnd_api.g_exc_error THEN
9062: ROLLBACK TO SAVEPOINT convert_fpo;
9063: x_batch_header := NULL;
9064: x_return_status := fnd_api.g_ret_sts_error;
9065: gme_common_pvt.count_and_get (x_count => x_message_count,
9066: p_encoded => FND_API.g_false,
9067: x_data => x_message_list);
9068: WHEN OTHERS THEN
9069: ROLLBACK TO SAVEPOINT convert_fpo;

Line 9122: := gme_common_pvt.g_max_errors

9118: ================================================================================*/
9119: PROCEDURE create_pending_product_lot
9120: (p_api_version IN NUMBER
9121: ,p_validation_level IN NUMBER
9122: := gme_common_pvt.g_max_errors
9123: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9124: ,p_commit IN VARCHAR2 := fnd_api.g_false
9125: ,x_message_count OUT NOCOPY NUMBER
9126: ,x_message_list OUT NOCOPY VARCHAR2

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

9170: IF NOT fnd_api.compatible_api_call (2.0
9171: ,p_api_version
9172: ,'create_pending_prod_lot'
9173: ,g_pkg_name) THEN
9174: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9175: RAISE fnd_api.g_exc_error;
9176: END IF;
9177:
9178: l_batch_id := NVL(p_pending_product_lots_rec.batch_id,

Line 9187: gme_common_pvt.Validate_material_detail

9183: l_in_material_detail_rec.batch_id := l_batch_id;
9184: l_in_material_detail_rec.material_detail_id := l_matl_dtl_id;
9185:
9186: /* Retrieve Batch Header and Material Detail Record */
9187: gme_common_pvt.Validate_material_detail
9188: (p_material_detail_rec => l_in_material_detail_rec
9189: ,p_org_code => p_org_code
9190: ,p_batch_no => p_batch_header_rec.batch_no
9191: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 9191: ,p_batch_type => gme_common_pvt.g_doc_type_batch

9187: gme_common_pvt.Validate_material_detail
9188: (p_material_detail_rec => l_in_material_detail_rec
9189: ,p_org_code => p_org_code
9190: ,p_batch_no => p_batch_header_rec.batch_no
9191: ,p_batch_type => gme_common_pvt.g_doc_type_batch
9192: ,x_batch_header_rec => l_batch_header_rec
9193: ,x_material_detail_rec => l_material_detail_rec
9194: ,x_message_count => x_message_count
9195: ,x_message_list => x_message_list

Line 9260: (p_header_id => gme_common_pvt.g_transaction_header_id

9256:
9257: -- Bug 8490219 - Only call save batch is commit is TRUE.
9258: IF p_commit = fnd_api.g_true THEN
9259: gme_api_pub.save_batch
9260: (p_header_id => gme_common_pvt.g_transaction_header_id
9261: ,p_table => 1
9262: ,p_commit => p_commit
9263: ,x_return_status => x_return_status);
9264:

Line 9289: gme_common_pvt.count_and_get (x_count => x_message_count

9285:
9286: EXCEPTION
9287: WHEN error_create_pp_lot THEN
9288: ROLLBACK TO SAVEPOINT create_pending_product_lot;
9289: gme_common_pvt.count_and_get (x_count => x_message_count
9290: ,p_encoded => fnd_api.g_false
9291: ,x_data => x_message_list);
9292: WHEN fnd_api.g_exc_error THEN
9293: ROLLBACK TO SAVEPOINT create_pending_product_lot;

Line 9295: gme_common_pvt.count_and_get (x_count => x_message_count

9291: ,x_data => x_message_list);
9292: WHEN fnd_api.g_exc_error THEN
9293: ROLLBACK TO SAVEPOINT create_pending_product_lot;
9294: x_return_status := fnd_api.g_ret_sts_error;
9295: gme_common_pvt.count_and_get (x_count => x_message_count
9296: ,p_encoded => fnd_api.g_false
9297: ,x_data => x_message_list);
9298: WHEN OTHERS THEN
9299: ROLLBACK TO SAVEPOINT create_pending_product_lot;

Line 9331: := gme_common_pvt.g_max_errors

9327:
9328: PROCEDURE update_pending_product_lot
9329: (p_api_version IN NUMBER
9330: ,p_validation_level IN NUMBER
9331: := gme_common_pvt.g_max_errors
9332: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9333: ,p_commit IN VARCHAR2 := fnd_api.g_false
9334: ,x_message_count OUT NOCOPY NUMBER
9335: ,x_message_list OUT NOCOPY VARCHAR2

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

9375: IF NOT fnd_api.compatible_api_call (2.0
9376: ,p_api_version
9377: ,'update_pending_prod_lot'
9378: ,g_pkg_name) THEN
9379: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9380: RAISE fnd_api.g_exc_error;
9381: END IF;
9382:
9383: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN

Line 9393: gme_common_pvt.Validate_material_detail

9389: END IF;
9390:
9391: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;
9392: l_in_material_detail_rec.batch_id := l_db_pending_product_lots_rec.batch_id;
9393: gme_common_pvt.Validate_material_detail
9394: (p_material_detail_rec => l_in_material_detail_rec
9395: ,p_org_code => NULL
9396: ,p_batch_no => NULL
9397: ,p_batch_type => NULL

Line 9421: gme_common_pvt.Validate_material_detail

9417: l_in_material_detail_rec.batch_id := l_batch_id;
9418: l_in_material_detail_rec.material_detail_id := l_matl_dtl_id;
9419:
9420: /* Retrieve Batch Header and Material Detail Record */
9421: gme_common_pvt.Validate_material_detail
9422: (p_material_detail_rec => l_in_material_detail_rec
9423: ,p_org_code => p_org_code
9424: ,p_batch_no => p_batch_header_rec.batch_no
9425: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 9425: ,p_batch_type => gme_common_pvt.g_doc_type_batch

9421: gme_common_pvt.Validate_material_detail
9422: (p_material_detail_rec => l_in_material_detail_rec
9423: ,p_org_code => p_org_code
9424: ,p_batch_no => p_batch_header_rec.batch_no
9425: ,p_batch_type => gme_common_pvt.g_doc_type_batch
9426: ,x_batch_header_rec => l_batch_header_rec
9427: ,x_material_detail_rec => l_material_detail_rec
9428: ,x_message_count => x_message_count
9429: ,x_message_list => x_message_list

Line 9493: || gme_common_pvt.g_transaction_header_id);

9489: ( g_pkg_name
9490: || '.'
9491: || l_api_name
9492: || ' About to invoke save_batch with header_id of '
9493: || gme_common_pvt.g_transaction_header_id);
9494: END IF;
9495:
9496: gme_api_pub.save_batch
9497: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 9497: (p_header_id => gme_common_pvt.g_transaction_header_id

9493: || gme_common_pvt.g_transaction_header_id);
9494: END IF;
9495:
9496: gme_api_pub.save_batch
9497: (p_header_id => gme_common_pvt.g_transaction_header_id
9498: ,p_table => 1
9499: ,p_commit => p_commit
9500: ,x_return_status => x_return_status);
9501:

Line 9525: gme_common_pvt.count_and_get (x_count => x_message_count

9521: EXCEPTION
9522: WHEN error_update_pp_lot THEN
9523: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9524: x_pending_product_lots_rec := NULL;
9525: gme_common_pvt.count_and_get (x_count => x_message_count
9526: ,p_encoded => fnd_api.g_false
9527: ,x_data => x_message_list);
9528: WHEN fnd_api.g_exc_error THEN
9529: ROLLBACK TO SAVEPOINT update_pending_product_lot;

Line 9532: gme_common_pvt.count_and_get (x_count => x_message_count

9528: WHEN fnd_api.g_exc_error THEN
9529: ROLLBACK TO SAVEPOINT update_pending_product_lot;
9530: x_pending_product_lots_rec := NULL;
9531: x_return_status := fnd_api.g_ret_sts_error;
9532: gme_common_pvt.count_and_get (x_count => x_message_count
9533: ,p_encoded => fnd_api.g_false
9534: ,x_data => x_message_list);
9535: WHEN OTHERS THEN
9536: ROLLBACK TO SAVEPOINT update_pending_product_lot;

Line 9569: := gme_common_pvt.g_max_errors

9565:
9566: PROCEDURE delete_pending_product_lot
9567: (p_api_version IN NUMBER
9568: ,p_validation_level IN NUMBER
9569: := gme_common_pvt.g_max_errors
9570: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9571: ,p_commit IN VARCHAR2 := fnd_api.g_false
9572: ,x_message_count OUT NOCOPY NUMBER
9573: ,x_message_list OUT NOCOPY VARCHAR2

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

9618: IF NOT fnd_api.compatible_api_call (2.0
9619: ,p_api_version
9620: ,'delete_pending_prod_lot'
9621: ,g_pkg_name) THEN
9622: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9623: RAISE fnd_api.g_exc_error;
9624: END IF;
9625:
9626: IF p_pending_product_lots_rec.pending_product_lot_id IS NOT NULL THEN

Line 9636: gme_common_pvt.Validate_material_detail

9632: END IF;
9633:
9634: l_in_material_detail_rec.material_detail_id := l_db_pending_product_lots_rec.material_detail_id;
9635: l_in_material_detail_rec.batch_id := l_db_pending_product_lots_rec.batch_id;
9636: gme_common_pvt.Validate_material_detail
9637: (p_material_detail_rec => l_in_material_detail_rec
9638: ,p_org_code => NULL
9639: ,p_batch_no => NULL
9640: ,p_batch_type => NULL

Line 9663: gme_common_pvt.Validate_material_detail

9659: l_in_material_detail_rec.batch_id := l_batch_id;
9660: l_in_material_detail_rec.material_detail_id := l_matl_dtl_id;
9661:
9662: /* Retrieve Batch Header and Material Detail Record */
9663: gme_common_pvt.Validate_material_detail
9664: (p_material_detail_rec => l_in_material_detail_rec
9665: ,p_org_code => p_org_code
9666: ,p_batch_no => p_batch_header_rec.batch_no
9667: ,p_batch_type => gme_common_pvt.g_doc_type_batch

Line 9667: ,p_batch_type => gme_common_pvt.g_doc_type_batch

9663: gme_common_pvt.Validate_material_detail
9664: (p_material_detail_rec => l_in_material_detail_rec
9665: ,p_org_code => p_org_code
9666: ,p_batch_no => p_batch_header_rec.batch_no
9667: ,p_batch_type => gme_common_pvt.g_doc_type_batch
9668: ,x_batch_header_rec => l_batch_header_rec
9669: ,x_material_detail_rec => l_material_detail_rec
9670: ,x_message_count => x_message_count
9671: ,x_message_list => x_message_list

Line 9733: || gme_common_pvt.g_transaction_header_id);

9729: ( g_pkg_name
9730: || '.'
9731: || l_api_name
9732: || ' About to invoke save_batch with header_id of '
9733: || gme_common_pvt.g_transaction_header_id);
9734: END IF;
9735:
9736: gme_api_pub.save_batch
9737: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 9737: (p_header_id => gme_common_pvt.g_transaction_header_id

9733: || gme_common_pvt.g_transaction_header_id);
9734: END IF;
9735:
9736: gme_api_pub.save_batch
9737: (p_header_id => gme_common_pvt.g_transaction_header_id
9738: ,p_table => 1
9739: ,p_commit => p_commit
9740: ,x_return_status => x_return_status);
9741:

Line 9765: gme_common_pvt.count_and_get (x_count => x_message_count

9761:
9762: EXCEPTION
9763: WHEN error_delete_pp_lot THEN
9764: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9765: gme_common_pvt.count_and_get (x_count => x_message_count
9766: ,p_encoded => fnd_api.g_false
9767: ,x_data => x_message_list);
9768: WHEN fnd_api.g_exc_error THEN
9769: ROLLBACK TO SAVEPOINT delete_pending_product_lot;

Line 9771: gme_common_pvt.count_and_get (x_count => x_message_count

9767: ,x_data => x_message_list);
9768: WHEN fnd_api.g_exc_error THEN
9769: ROLLBACK TO SAVEPOINT delete_pending_product_lot;
9770: x_return_status := fnd_api.g_ret_sts_error;
9771: gme_common_pvt.count_and_get (x_count => x_message_count
9772: ,p_encoded => fnd_api.g_false
9773: ,x_data => x_message_list);
9774: WHEN OTHERS THEN
9775: ROLLBACK TO SAVEPOINT delete_pending_product_lot;

Line 9812: := gme_common_pvt.g_max_errors

9808: ================================================================================*/
9809: PROCEDURE unrelease_batch
9810: (p_api_version IN NUMBER
9811: ,p_validation_level IN NUMBER
9812: := gme_common_pvt.g_max_errors
9813: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
9814: ,p_commit IN VARCHAR2 := fnd_api.g_false
9815: ,x_message_count OUT NOCOPY NUMBER
9816: ,x_message_list OUT NOCOPY VARCHAR2

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

9868: IF NOT fnd_api.compatible_api_call (2.0
9869: ,p_api_version
9870: ,'unrelease_batch'
9871: ,g_pkg_name) THEN
9872: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
9873: RAISE fnd_api.g_exc_error;
9874: END IF;
9875:
9876:

Line 9877: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;

9873: RAISE fnd_api.g_exc_error;
9874: END IF;
9875:
9876:
9877: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9878: gme_common_pvt.validate_batch
9879: (p_batch_header_rec => p_batch_header_rec
9880: ,p_org_code => p_org_code
9881: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

Line 9878: gme_common_pvt.validate_batch

9874: END IF;
9875:
9876:
9877: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9878: gme_common_pvt.validate_batch
9879: (p_batch_header_rec => p_batch_header_rec
9880: ,p_org_code => p_org_code
9881: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
9882: ,x_batch_header_rec => l_batch_header_rec

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

9877: --l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
9878: gme_common_pvt.validate_batch
9879: (p_batch_header_rec => p_batch_header_rec
9880: ,p_org_code => p_org_code
9881: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
9882: ,x_batch_header_rec => l_batch_header_rec
9883: ,x_message_count => x_message_count
9884: ,x_message_list => x_message_list
9885: ,x_return_status => x_return_status );

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

9901: IF x_return_status <> fnd_api.g_ret_sts_success THEN
9902: RAISE fnd_api.g_exc_error;
9903: END IF;
9904:
9905: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
9906:
9907: /* Invoke main */
9908: gme_api_main.unrelease_batch
9909: (p_validation_level => p_validation_level

Line 9931: (p_header_id => gme_common_pvt.g_transaction_header_id

9927:
9928: /* Invoke save_batch */
9929: /*
9930: gme_api_pub.save_batch
9931: (p_header_id => gme_common_pvt.g_transaction_header_id
9932: ,p_table => 1
9933: ,p_commit => p_commit
9934: ,x_return_status => x_return_status);
9935:

Line 9949: gme_api_pub.save_batch (p_header_id => gme_common_pvt.g_transaction_header_id

9945: */
9946:
9947: IF x_return_status = fnd_api.g_ret_sts_success THEN
9948: IF p_commit = fnd_api.g_true THEN
9949: gme_api_pub.save_batch (p_header_id => gme_common_pvt.g_transaction_header_id
9950: ,p_table => 1
9951: ,p_commit => fnd_api.g_false
9952: ,x_return_status => x_return_status);
9953:

Line 9973: gme_common_pvt.count_and_get (x_count => x_message_count

9969: EXCEPTION
9970: WHEN error_unrelease_batch THEN
9971: ROLLBACK TO SAVEPOINT unrelease_batch;
9972: x_batch_header_rec := NULL;
9973: gme_common_pvt.count_and_get (x_count => x_message_count
9974: ,p_encoded => fnd_api.g_false
9975: ,x_data => x_message_list);
9976: WHEN fnd_api.g_exc_error THEN
9977: ROLLBACK TO SAVEPOINT unrelease_batch;

Line 9980: gme_common_pvt.count_and_get (x_count => x_message_count

9976: WHEN fnd_api.g_exc_error THEN
9977: ROLLBACK TO SAVEPOINT unrelease_batch;
9978: x_batch_header_rec := NULL;
9979: x_return_status := fnd_api.g_ret_sts_error;
9980: gme_common_pvt.count_and_get (x_count => x_message_count
9981: ,p_encoded => fnd_api.g_false
9982: ,x_data => x_message_list);
9983: WHEN OTHERS THEN
9984: ROLLBACK TO SAVEPOINT unrelease_batch;

Line 10023: := gme_common_pvt.g_max_errors

10019: ================================================================================*/
10020: PROCEDURE unrelease_step
10021: (p_api_version IN NUMBER
10022: ,p_validation_level IN NUMBER
10023: := gme_common_pvt.g_max_errors
10024: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10025: ,p_commit IN VARCHAR2 := fnd_api.g_false
10026: ,x_message_count OUT NOCOPY NUMBER
10027: ,x_message_list OUT NOCOPY VARCHAR2

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

10063: IF NOT fnd_api.compatible_api_call (2.0
10064: ,p_api_version
10065: ,'unrelease_step'
10066: ,g_pkg_name) THEN
10067: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10068: RAISE fnd_api.g_exc_error;
10069: END IF;
10070:
10071: /* Validate Input parameters */

Line 10072: gme_common_pvt.Validate_batch_step (

10068: RAISE fnd_api.g_exc_error;
10069: END IF;
10070:
10071: /* Validate Input parameters */
10072: gme_common_pvt.Validate_batch_step (
10073: p_batch_step_rec => p_batch_step_rec
10074: ,p_org_code => p_org_code
10075: ,p_batch_no => p_batch_no
10076: ,x_batch_step_rec => l_batch_step_rec

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

10096: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10097: RAISE fnd_api.g_exc_error;
10098: END IF;
10099:
10100: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10101:
10102: /* Invoke main */
10103: gme_api_main.unrelease_step
10104: (p_validation_level => p_validation_level

Line 10134: || gme_common_pvt.g_transaction_header_id);

10130: ( g_pkg_name
10131: || '.'
10132: || l_api_name
10133: || ' About to invoke save_batch with header_id of '
10134: || gme_common_pvt.g_transaction_header_id);
10135: END IF;
10136:
10137: -- Bug 11846735 - restructure save block.
10138: IF x_return_status = fnd_api.g_ret_sts_success THEN

Line 10140: gme_api_pub.save_batch (p_header_id => gme_common_pvt.g_transaction_header_id

10136:
10137: -- Bug 11846735 - restructure save block.
10138: IF x_return_status = fnd_api.g_ret_sts_success THEN
10139: IF p_commit = fnd_api.g_true THEN
10140: gme_api_pub.save_batch (p_header_id => gme_common_pvt.g_transaction_header_id
10141: ,p_table => 1
10142: ,p_commit => fnd_api.g_false
10143: ,x_return_status => x_return_status);
10144:

Line 10166: gme_common_pvt.count_and_get (x_count => x_message_count

10162: EXCEPTION
10163: WHEN error_unrelease_step THEN
10164: ROLLBACK TO SAVEPOINT unrelease_step;
10165: x_batch_step_rec := NULL;
10166: gme_common_pvt.count_and_get (x_count => x_message_count
10167: ,p_encoded => fnd_api.g_false
10168: ,x_data => x_message_list);
10169: WHEN fnd_api.g_exc_error THEN
10170: ROLLBACK TO SAVEPOINT unrelease_step;

Line 10173: gme_common_pvt.count_and_get (x_count => x_message_count

10169: WHEN fnd_api.g_exc_error THEN
10170: ROLLBACK TO SAVEPOINT unrelease_step;
10171: x_batch_step_rec := NULL;
10172: x_return_status := fnd_api.g_ret_sts_error;
10173: gme_common_pvt.count_and_get (x_count => x_message_count
10174: ,p_encoded => fnd_api.g_false
10175: ,x_data => x_message_list);
10176: WHEN OTHERS THEN
10177: ROLLBACK TO SAVEPOINT unrelease_step;

Line 10222: := gme_common_pvt.g_max_errors

10218: ================================================================================*/
10219: PROCEDURE complete_batch
10220: (p_api_version IN NUMBER
10221: ,p_validation_level IN NUMBER
10222: := gme_common_pvt.g_max_errors
10223: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10224: ,p_commit IN VARCHAR2 := fnd_api.g_false
10225: ,x_message_count OUT NOCOPY NUMBER
10226: ,x_message_list OUT NOCOPY VARCHAR2

Line 10233: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

10229: ,p_org_code IN VARCHAR2
10230: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10231: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10232: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
10233: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10234: IS
10235: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_BATCH';
10236:
10237: l_in_batch_header_rec gme_batch_header%ROWTYPE;

Line 10239: l_exception_material_tbl gme_common_pvt.exceptions_tab;

10235: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_BATCH';
10236:
10237: l_in_batch_header_rec gme_batch_header%ROWTYPE;
10238: l_batch_header_rec gme_batch_header%ROWTYPE;
10239: l_exception_material_tbl gme_common_pvt.exceptions_tab;
10240:
10241: error_complete_batch EXCEPTION;
10242: purge_exception_err EXCEPTION;
10243:

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

10264: IF NOT fnd_api.compatible_api_call (2.0
10265: ,p_api_version
10266: ,'complete_batch'
10267: ,g_pkg_name) THEN
10268: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10269: RAISE fnd_api.g_exc_error;
10270: END IF;
10271:
10272:

Line 10273: -- l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;

10269: RAISE fnd_api.g_exc_error;
10270: END IF;
10271:
10272:
10273: -- l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
10274: gme_common_pvt.validate_batch
10275: (p_batch_header_rec => p_batch_header_rec
10276: ,p_org_code => p_org_code
10277: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)

Line 10274: gme_common_pvt.validate_batch

10270: END IF;
10271:
10272:
10273: -- l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
10274: gme_common_pvt.validate_batch
10275: (p_batch_header_rec => p_batch_header_rec
10276: ,p_org_code => p_org_code
10277: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
10278: ,x_batch_header_rec => l_batch_header_rec

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

10273: -- l_in_batch_header_rec.batch_type := gme_common_pvt.g_doc_type_batch;
10274: gme_common_pvt.validate_batch
10275: (p_batch_header_rec => p_batch_header_rec
10276: ,p_org_code => p_org_code
10277: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
10278: ,x_batch_header_rec => l_batch_header_rec
10279: ,x_message_count => x_message_count
10280: ,x_message_list => x_message_list
10281: ,x_return_status => x_return_status );

Line 10295: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

10291: -- Bug 15977300 - initialize header record once.
10292: l_in_batch_header_rec := l_batch_header_rec;
10293:
10294: -- Validations
10295: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
10296: IF p_validate_flexfields = fnd_api.g_true THEN
10297: gme_common_pvt.g_flex_validate_prof := 1;
10298: ELSE
10299: gme_common_pvt.g_flex_validate_prof := 0;

Line 10297: gme_common_pvt.g_flex_validate_prof := 1;

10293:
10294: -- Validations
10295: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
10296: IF p_validate_flexfields = fnd_api.g_true THEN
10297: gme_common_pvt.g_flex_validate_prof := 1;
10298: ELSE
10299: gme_common_pvt.g_flex_validate_prof := 0;
10300: END IF;
10301:

Line 10299: gme_common_pvt.g_flex_validate_prof := 0;

10295: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
10296: IF p_validate_flexfields = fnd_api.g_true THEN
10297: gme_common_pvt.g_flex_validate_prof := 1;
10298: ELSE
10299: gme_common_pvt.g_flex_validate_prof := 0;
10300: END IF;
10301:
10302: -- Bug 15977300 - initialize header record once.
10303: --l_in_batch_header_rec := l_batch_header_rec;

Line 10314: gme_common_pvt.g_flex_validate_prof := 0;

10310: RAISE fnd_api.g_exc_error;
10311: END IF;
10312:
10313: -- reset flex global
10314: gme_common_pvt.g_flex_validate_prof := 0;
10315: END IF;
10316:
10317: -- Bug 6828656
10318: -- Reassign actual_start_date

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

10331: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10332: RAISE fnd_api.g_exc_error;
10333: END IF;
10334:
10335: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10336:
10337: /* Invoke main */
10338: gme_api_main.complete_batch
10339: (p_validation_level => p_validation_level

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

10354: || ' Return status from gme_api_main.complete_batch is '
10355: || x_return_status);
10356: END IF;
10357:
10358: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10359: x_return_status := fnd_api.g_ret_sts_success;
10360: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10361: x_exception_material_tbl := l_exception_material_tbl;
10362: END IF;

Line 10360: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

10356: END IF;
10357:
10358: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10359: x_return_status := fnd_api.g_ret_sts_success;
10360: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10361: x_exception_material_tbl := l_exception_material_tbl;
10362: END IF;
10363:
10364: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 10395: || gme_common_pvt.g_transaction_header_id);

10391: ( g_pkg_name
10392: || '.'
10393: || l_api_name
10394: || ' About to invoke save_batch with header_id of '
10395: || gme_common_pvt.g_transaction_header_id);
10396: END IF;
10397:
10398: gme_api_pub.save_batch
10399: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 10399: (p_header_id => gme_common_pvt.g_transaction_header_id

10395: || gme_common_pvt.g_transaction_header_id);
10396: END IF;
10397:
10398: gme_api_pub.save_batch
10399: (p_header_id => gme_common_pvt.g_transaction_header_id
10400: ,p_table => 1
10401: ,p_commit => p_commit
10402: ,x_return_status => x_return_status);
10403:

Line 10428: gme_common_pvt.count_and_get (x_count => x_message_count

10424: EXCEPTION
10425: WHEN error_complete_batch THEN
10426: ROLLBACK TO SAVEPOINT complete_batch;
10427: x_batch_header_rec := NULL;
10428: gme_common_pvt.count_and_get (x_count => x_message_count
10429: ,p_encoded => fnd_api.g_false
10430: ,x_data => x_message_list);
10431: WHEN fnd_api.g_exc_error THEN
10432: ROLLBACK TO SAVEPOINT complete_batch;

Line 10435: gme_common_pvt.count_and_get (x_count => x_message_count

10431: WHEN fnd_api.g_exc_error THEN
10432: ROLLBACK TO SAVEPOINT complete_batch;
10433: x_batch_header_rec := NULL;
10434: x_return_status := fnd_api.g_ret_sts_error;
10435: gme_common_pvt.count_and_get (x_count => x_message_count
10436: ,p_encoded => fnd_api.g_false
10437: ,x_data => x_message_list);
10438: WHEN purge_exception_err THEN
10439: ROLLBACK TO SAVEPOINT complete_batch;

Line 10440: gme_common_pvt.count_and_get (x_count => x_message_count

10436: ,p_encoded => fnd_api.g_false
10437: ,x_data => x_message_list);
10438: WHEN purge_exception_err THEN
10439: ROLLBACK TO SAVEPOINT complete_batch;
10440: gme_common_pvt.count_and_get (x_count => x_message_count
10441: ,p_encoded => fnd_api.g_false
10442: ,x_data => x_message_list);
10443: WHEN OTHERS THEN
10444: ROLLBACK TO SAVEPOINT complete_batch;

Line 10492: := gme_common_pvt.g_max_errors

10488: ================================================================================*/
10489: PROCEDURE complete_step
10490: (p_api_version IN NUMBER
10491: ,p_validation_level IN NUMBER
10492: := gme_common_pvt.g_max_errors
10493: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10494: ,p_commit IN VARCHAR2 := fnd_api.g_false
10495: ,p_save_batch IN VARCHAR2 := fnd_api.g_true -- Bug 16079623
10496: ,x_message_count OUT NOCOPY NUMBER

Line 10506: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

10502: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10503: ,p_override_quality IN VARCHAR2 := fnd_api.g_false
10504: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10505: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
10506: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10507: IS
10508: l_api_name CONSTANT VARCHAR2 (30) := 'COMPLETE_STEP';
10509:
10510: l_in_batch_step_rec gme_batch_steps%ROWTYPE;

Line 10516: l_exception_material_tbl gme_common_pvt.exceptions_tab;

10512: l_in_batch_header_rec gme_batch_header%ROWTYPE;
10513: l_batch_header_rec gme_batch_header%ROWTYPE;
10514: l_calc_batch_start_date DATE;
10515:
10516: l_exception_material_tbl gme_common_pvt.exceptions_tab;
10517:
10518: error_complete_step EXCEPTION;
10519: BEGIN
10520: IF (g_debug <> -1) THEN

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

10539: IF NOT fnd_api.compatible_api_call (2.0
10540: ,p_api_version
10541: ,'complete_step'
10542: ,g_pkg_name) THEN
10543: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10544: RAISE fnd_api.g_exc_error;
10545: END IF;
10546:
10547: /* Validate Input parameters */

Line 10548: gme_common_pvt.Validate_batch_step (

10544: RAISE fnd_api.g_exc_error;
10545: END IF;
10546:
10547: /* Validate Input parameters */
10548: gme_common_pvt.Validate_batch_step (
10549: p_batch_step_rec => p_batch_step_rec
10550: ,p_org_code => p_org_code
10551: ,p_batch_no => p_batch_no
10552: ,x_batch_step_rec => l_batch_step_rec

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

10563: RAISE fnd_api.g_exc_error;
10564: END IF;
10565: -- Validations
10566:
10567: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
10568: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
10569: RAISE fnd_api.g_exc_error;
10570: END IF;
10571:

Line 10568: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');

10564: END IF;
10565: -- Validations
10566:
10567: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
10568: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
10569: RAISE fnd_api.g_exc_error;
10570: END IF;
10571:
10572: -- current Step Status must be Pending or WIP

Line 10573: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN

10569: RAISE fnd_api.g_exc_error;
10570: END IF;
10571:
10572: -- current Step Status must be Pending or WIP
10573: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN
10574: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_CERT');
10575: RAISE fnd_api.g_exc_error;
10576: END IF;
10577:

Line 10574: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_CERT');

10570: END IF;
10571:
10572: -- current Step Status must be Pending or WIP
10573: IF (l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_WIP)) THEN
10574: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_CERT');
10575: RAISE fnd_api.g_exc_error;
10576: END IF;
10577:
10578: IF l_batch_header_rec.batch_status NOT IN

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

10575: RAISE fnd_api.g_exc_error;
10576: END IF;
10577:
10578: IF l_batch_header_rec.batch_status NOT IN
10579: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
10580: gme_common_pvt.log_message ('GME_API_INV_BATCH_CERT_STEP');
10581: RAISE fnd_api.g_exc_error;
10582: END IF;
10583:

Line 10580: gme_common_pvt.log_message ('GME_API_INV_BATCH_CERT_STEP');

10576: END IF;
10577:
10578: IF l_batch_header_rec.batch_status NOT IN
10579: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
10580: gme_common_pvt.log_message ('GME_API_INV_BATCH_CERT_STEP');
10581: RAISE fnd_api.g_exc_error;
10582: END IF;
10583:
10584: --Bug#5109119 checking for parameter value 1 instead of Y

Line 10585: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND

10581: RAISE fnd_api.g_exc_error;
10582: END IF;
10583:
10584: --Bug#5109119 checking for parameter value 1 instead of Y
10585: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
10586: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
10587: l_batch_header_rec.parentline_id IS NOT NULL) THEN
10588: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');
10589: RAISE fnd_api.g_exc_error;

Line 10586: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR

10582: END IF;
10583:
10584: --Bug#5109119 checking for parameter value 1 instead of Y
10585: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
10586: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
10587: l_batch_header_rec.parentline_id IS NOT NULL) THEN
10588: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');
10589: RAISE fnd_api.g_exc_error;
10590: END IF;

Line 10588: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');

10584: --Bug#5109119 checking for parameter value 1 instead of Y
10585: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
10586: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
10587: l_batch_header_rec.parentline_id IS NOT NULL) THEN
10588: gme_common_pvt.log_message ('GME_API_INV_BATCH_CMPL_STEP');
10589: RAISE fnd_api.g_exc_error;
10590: END IF;
10591:
10592: l_in_batch_step_rec := l_batch_step_rec;

Line 10606: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN

10602: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10603: RAISE fnd_api.g_exc_error;
10604: END IF;
10605:
10606: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
10607: -- call release step validation; use step actual cmplt date
10608: -- if step actual start date is NULL and batch is Pending
10609: NULL;
10610: END IF; -- IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending

Line 10610: END IF; -- IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending

10606: IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending THEN
10607: -- call release step validation; use step actual cmplt date
10608: -- if step actual start date is NULL and batch is Pending
10609: NULL;
10610: END IF; -- IF l_batch_step_rec.step_status = gme_common_pvt.g_step_pending
10611:
10612: gme_complete_batch_step_pvt.validate_step_cmplt_date
10613: (p_batch_step_rec => l_batch_step_rec
10614: ,p_batch_header_rec => l_batch_header_rec

Line 10624: gme_common_pvt.g_flex_validate_prof := 1;

10620: END IF;
10621:
10622: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
10623: IF p_validate_flexfields = fnd_api.g_true THEN
10624: gme_common_pvt.g_flex_validate_prof := 1;
10625: ELSE
10626: gme_common_pvt.g_flex_validate_prof := 0;
10627: END IF;
10628:

Line 10626: gme_common_pvt.g_flex_validate_prof := 0;

10622: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
10623: IF p_validate_flexfields = fnd_api.g_true THEN
10624: gme_common_pvt.g_flex_validate_prof := 1;
10625: ELSE
10626: gme_common_pvt.g_flex_validate_prof := 0;
10627: END IF;
10628:
10629: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
10630: l_in_batch_header_rec := l_batch_header_rec;

Line 10629: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

10625: ELSE
10626: gme_common_pvt.g_flex_validate_prof := 0;
10627: END IF;
10628:
10629: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
10630: l_in_batch_header_rec := l_batch_header_rec;
10631: l_in_batch_header_rec.actual_start_date := l_calc_batch_start_date;
10632: -- call release batch validation...
10633: NULL;

Line 10641: -- gme_common_pvt.g_move_to_temp := fnd_api.g_false;

10637: END IF;
10638: END IF;
10639:
10640: -- Bug 13981238 - comment out the following line so that any transactions are moved to mmt.
10641: -- gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10642:
10643: /* Invoke main */
10644: gme_api_main.complete_step
10645: (p_validation_level => p_validation_level

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

10661: || ' Return status from gme_api_main.complete_step is '
10662: || x_return_status);
10663: END IF;
10664:
10665: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10666: x_return_status := fnd_api.g_ret_sts_success;
10667: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10668: x_exception_material_tbl := l_exception_material_tbl;
10669: END IF;

Line 10667: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

10663: END IF;
10664:
10665: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10666: x_return_status := fnd_api.g_ret_sts_success;
10667: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10668: x_exception_material_tbl := l_exception_material_tbl;
10669: END IF;
10670:
10671: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 10675: gme_common_pvt.g_flex_validate_prof := 0;

10671: IF x_return_status <> fnd_api.g_ret_sts_success THEN
10672: RAISE error_complete_step;
10673: END IF;
10674: -- reset flex global
10675: gme_common_pvt.g_flex_validate_prof := 0;
10676:
10677: -- Bug 13981238 Restructure call to save_batch conditionalize on p_commit flag.
10678:
10679: -- Invoke save_batch

Line 10686: (p_header_id => gme_common_pvt.g_transaction_header_id

10682: -- Bug 16079623 - Conditionalize call to save_batch based on p_save_batch. Rework of 13981238.
10683: IF (p_save_batch = fnd_api.g_true) THEN
10684: -- Bug 13981238 Change table parameter to 2 since now transactions will be in mmt.
10685: gme_api_pub.save_batch
10686: (p_header_id => gme_common_pvt.g_transaction_header_id
10687: ,p_table => 2
10688: ,p_commit => p_commit
10689: ,x_return_status => x_return_status);
10690:

Line 10715: gme_common_pvt.count_and_get (x_count => x_message_count

10711: EXCEPTION
10712: WHEN error_complete_step THEN
10713: ROLLBACK TO SAVEPOINT complete_step;
10714: x_batch_step_rec := NULL;
10715: gme_common_pvt.count_and_get (x_count => x_message_count
10716: ,p_encoded => fnd_api.g_false
10717: ,x_data => x_message_list);
10718: WHEN fnd_api.g_exc_error THEN
10719: ROLLBACK TO SAVEPOINT complete_step;

Line 10722: gme_common_pvt.count_and_get (x_count => x_message_count

10718: WHEN fnd_api.g_exc_error THEN
10719: ROLLBACK TO SAVEPOINT complete_step;
10720: x_batch_step_rec := NULL;
10721: x_return_status := fnd_api.g_ret_sts_error;
10722: gme_common_pvt.count_and_get (x_count => x_message_count
10723: ,p_encoded => fnd_api.g_false
10724: ,x_data => x_message_list);
10725: WHEN OTHERS THEN
10726: ROLLBACK TO SAVEPOINT complete_step;

Line 10760: := gme_common_pvt.g_max_errors

10756: ================================================================================*/
10757: PROCEDURE release_batch
10758: (p_api_version IN NUMBER
10759: ,p_validation_level IN NUMBER
10760: := gme_common_pvt.g_max_errors
10761: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10762: ,p_commit IN VARCHAR2 := fnd_api.g_false
10763: ,x_message_count OUT NOCOPY NUMBER
10764: ,x_message_list OUT NOCOPY VARCHAR2

Line 10771: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

10767: ,p_org_code IN VARCHAR2
10768: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10769: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10770: ,x_batch_header_rec OUT NOCOPY gme_batch_header%ROWTYPE
10771: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10772: IS
10773: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_BATCH';
10774:
10775: l_in_batch_header_rec gme_batch_header%ROWTYPE;

Line 10777: l_exception_material_tbl gme_common_pvt.exceptions_tab;

10773: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_BATCH';
10774:
10775: l_in_batch_header_rec gme_batch_header%ROWTYPE;
10776: l_batch_header_rec gme_batch_header%ROWTYPE;
10777: l_exception_material_tbl gme_common_pvt.exceptions_tab;
10778:
10779: error_release_batch EXCEPTION;
10780: BEGIN
10781: IF (g_debug <> -1) THEN

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

10800: IF NOT fnd_api.compatible_api_call (2.0
10801: ,p_api_version
10802: ,'release_batch'
10803: ,g_pkg_name) THEN
10804: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10805: RAISE fnd_api.g_exc_error;
10806: END IF;
10807:
10808: gme_common_pvt.validate_batch

Line 10808: gme_common_pvt.validate_batch

10804: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
10805: RAISE fnd_api.g_exc_error;
10806: END IF;
10807:
10808: gme_common_pvt.validate_batch
10809: (p_batch_header_rec => p_batch_header_rec
10810: ,p_org_code => p_org_code
10811: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
10812: ,x_batch_header_rec => l_batch_header_rec

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

10807:
10808: gme_common_pvt.validate_batch
10809: (p_batch_header_rec => p_batch_header_rec
10810: ,p_org_code => p_org_code
10811: ,p_batch_type => nvl(p_batch_header_rec.batch_type,gme_common_pvt.g_doc_type_batch)
10812: ,x_batch_header_rec => l_batch_header_rec
10813: ,x_message_count => x_message_count
10814: ,x_message_list => x_message_list
10815: ,x_return_status => x_return_status );

Line 10826: gme_common_pvt.g_flex_validate_prof := 1;

10822: RAISE fnd_api.g_exc_error;
10823: END IF;
10824: -- Validations
10825: IF p_validate_flexfields = fnd_api.g_true THEN
10826: gme_common_pvt.g_flex_validate_prof := 1;
10827: ELSE
10828: gme_common_pvt.g_flex_validate_prof := 0;
10829: END IF;
10830:

Line 10828: gme_common_pvt.g_flex_validate_prof := 0;

10824: -- Validations
10825: IF p_validate_flexfields = fnd_api.g_true THEN
10826: gme_common_pvt.g_flex_validate_prof := 1;
10827: ELSE
10828: gme_common_pvt.g_flex_validate_prof := 0;
10829: END IF;
10830:
10831: l_in_batch_header_rec := l_batch_header_rec;
10832: l_in_batch_header_rec.actual_start_date := p_batch_header_rec.actual_start_date;

Line 10845: gme_common_pvt.g_flex_validate_prof := 0;

10841: RAISE fnd_api.g_exc_error;
10842: END IF;
10843:
10844: -- reset flex global
10845: gme_common_pvt.g_flex_validate_prof := 0;
10846:
10847: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10848: IF g_debug <= gme_debug.g_log_statement THEN
10849: gme_debug.put_line ( g_pkg_name || '.' || l_api_name

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

10843:
10844: -- reset flex global
10845: gme_common_pvt.g_flex_validate_prof := 0;
10846:
10847: gme_common_pvt.g_move_to_temp := fnd_api.g_false;
10848: IF g_debug <= gme_debug.g_log_statement THEN
10849: gme_debug.put_line ( g_pkg_name || '.' || l_api_name
10850: || 'batch_id '||l_batch_header_rec.batch_id);
10851: END IF;

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

10866: ' Return status from gme_api_main.release_batch is '
10867: || x_return_status);
10868: END IF;
10869:
10870: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10871: x_return_status := fnd_api.g_ret_sts_success;
10872: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10873: x_exception_material_tbl := l_exception_material_tbl;
10874: END IF;

Line 10872: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

10868: END IF;
10869:
10870: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
10871: x_return_status := fnd_api.g_ret_sts_success;
10872: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
10873: x_exception_material_tbl := l_exception_material_tbl;
10874: END IF;
10875:
10876: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 10883: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);

10879:
10880: /* Invoke save_batch */
10881: IF g_debug <= gme_debug.g_log_statement THEN
10882: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' About to
10883: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);
10884: END IF;
10885:
10886: gme_api_pub.save_batch
10887: (p_header_id => gme_common_pvt.g_transaction_header_id

Line 10887: (p_header_id => gme_common_pvt.g_transaction_header_id

10883: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);
10884: END IF;
10885:
10886: gme_api_pub.save_batch
10887: (p_header_id => gme_common_pvt.g_transaction_header_id
10888: ,p_table => 1
10889: ,p_commit => p_commit
10890: ,x_return_status => x_return_status);
10891:

Line 10909: gme_common_pvt.count_and_get (x_count => x_message_count

10905: EXCEPTION
10906: WHEN error_release_batch THEN
10907: ROLLBACK TO SAVEPOINT release_batch;
10908: x_batch_header_rec := NULL;
10909: gme_common_pvt.count_and_get (x_count => x_message_count
10910: ,p_encoded => fnd_api.g_false
10911: ,x_data => x_message_list);
10912: WHEN fnd_api.g_exc_error THEN
10913: ROLLBACK TO SAVEPOINT release_batch;

Line 10916: gme_common_pvt.count_and_get (x_count => x_message_count

10912: WHEN fnd_api.g_exc_error THEN
10913: ROLLBACK TO SAVEPOINT release_batch;
10914: x_batch_header_rec := NULL;
10915: x_return_status := fnd_api.g_ret_sts_error;
10916: gme_common_pvt.count_and_get (x_count => x_message_count
10917: ,p_encoded => fnd_api.g_false
10918: ,x_data => x_message_list);
10919: WHEN OTHERS THEN
10920: ROLLBACK TO SAVEPOINT release_batch;

Line 10968: := gme_common_pvt.g_max_errors

10964: ================================================================================*/
10965: PROCEDURE release_step
10966: (p_api_version IN NUMBER
10967: ,p_validation_level IN NUMBER
10968: := gme_common_pvt.g_max_errors
10969: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
10970: ,p_commit IN VARCHAR2 := fnd_api.g_false
10971: ,p_save_batch IN VARCHAR2 := fnd_api.g_true -- Bug 16079623
10972: ,x_message_count OUT NOCOPY NUMBER

Line 10981: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)

10977: ,p_org_code IN VARCHAR2
10978: ,p_ignore_exception IN VARCHAR2 := fnd_api.g_false
10979: ,p_validate_flexfields IN VARCHAR2 := fnd_api.g_false
10980: ,x_batch_step_rec OUT NOCOPY gme_batch_steps%ROWTYPE
10981: ,x_exception_material_tbl OUT NOCOPY gme_common_pvt.exceptions_tab)
10982: IS
10983: l_api_name CONSTANT VARCHAR2 (30) := 'RELEASE_STEP';
10984:
10985: l_in_batch_step_rec gme_batch_steps%ROWTYPE;

Line 10990: l_exception_material_tbl gme_common_pvt.exceptions_tab;

10986: l_batch_step_rec gme_batch_steps%ROWTYPE;
10987: l_in_batch_header_rec gme_batch_header%ROWTYPE;
10988: l_batch_header_rec gme_batch_header%ROWTYPE;
10989:
10990: l_exception_material_tbl gme_common_pvt.exceptions_tab;
10991:
10992: error_release_step EXCEPTION;
10993: BEGIN
10994: IF (g_debug <> -1) THEN

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

11013: IF NOT fnd_api.compatible_api_call (2.0
11014: ,p_api_version
11015: ,'release_step'
11016: ,g_pkg_name) THEN
11017: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
11018: RAISE fnd_api.g_exc_error;
11019: END IF;
11020: /* Validate Input parameters */
11021: gme_common_pvt.Validate_batch_step (

Line 11021: gme_common_pvt.Validate_batch_step (

11017: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
11018: RAISE fnd_api.g_exc_error;
11019: END IF;
11020: /* Validate Input parameters */
11021: gme_common_pvt.Validate_batch_step (
11022: p_batch_step_rec => p_batch_step_rec
11023: ,p_org_code => p_org_code
11024: ,p_batch_no => p_batch_no
11025: ,x_batch_step_rec => l_batch_step_rec

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

11035: END IF;
11036: RAISE fnd_api.g_exc_error;
11037: END IF;
11038: -- Validations
11039: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
11040: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
11041: RAISE fnd_api.g_exc_error;
11042: END IF;
11043: -- current Step Status must be Pending

Line 11040: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');

11036: RAISE fnd_api.g_exc_error;
11037: END IF;
11038: -- Validations
11039: IF l_batch_header_rec.batch_type = gme_common_pvt.g_doc_type_fpo THEN
11040: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
11041: RAISE fnd_api.g_exc_error;
11042: END IF;
11043: -- current Step Status must be Pending
11044: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN

Line 11044: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN

11040: gme_common_pvt.log_message('GME_API_INVALID_BATCH_TYPE');
11041: RAISE fnd_api.g_exc_error;
11042: END IF;
11043: -- current Step Status must be Pending
11044: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN
11045: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');
11046: RAISE fnd_api.g_exc_error;
11047: END IF;
11048:

Line 11045: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');

11041: RAISE fnd_api.g_exc_error;
11042: END IF;
11043: -- current Step Status must be Pending
11044: IF (l_batch_step_rec.step_status <> gme_common_pvt.g_step_pending) THEN
11045: gme_common_pvt.log_message('GME_API_INV_STAT_STEP_REL');
11046: RAISE fnd_api.g_exc_error;
11047: END IF;
11048:
11049: IF l_batch_header_rec.batch_status NOT IN

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

11046: RAISE fnd_api.g_exc_error;
11047: END IF;
11048:
11049: IF l_batch_header_rec.batch_status NOT IN
11050: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
11051: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
11052: RAISE fnd_api.g_exc_error;
11053: END IF;
11054:

Line 11051: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');

11047: END IF;
11048:
11049: IF l_batch_header_rec.batch_status NOT IN
11050: (gme_common_pvt.g_batch_pending, gme_common_pvt.g_batch_wip) THEN
11051: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
11052: RAISE fnd_api.g_exc_error;
11053: END IF;
11054:
11055: --Pawan kumar changed to number for g_step_controls_batch_sts

Line 11056: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND

11052: RAISE fnd_api.g_exc_error;
11053: END IF;
11054:
11055: --Pawan kumar changed to number for g_step_controls_batch_sts
11056: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
11057: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
11058: l_batch_header_rec.parentline_id IS NOT NULL) THEN
11059: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
11060: RAISE fnd_api.g_exc_error;

Line 11057: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR

11053: END IF;
11054:
11055: --Pawan kumar changed to number for g_step_controls_batch_sts
11056: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
11057: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
11058: l_batch_header_rec.parentline_id IS NOT NULL) THEN
11059: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
11060: RAISE fnd_api.g_exc_error;
11061: END IF;

Line 11059: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');

11055: --Pawan kumar changed to number for g_step_controls_batch_sts
11056: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending AND
11057: (gme_common_pvt.g_step_controls_batch_sts_ind <> 1 OR
11058: l_batch_header_rec.parentline_id IS NOT NULL) THEN
11059: gme_common_pvt.log_message ('GME_API_INV_BATCH_REL_STEP');
11060: RAISE fnd_api.g_exc_error;
11061: END IF;
11062:
11063: l_in_batch_step_rec := l_batch_step_rec;

Line 11078: gme_common_pvt.g_flex_validate_prof := 1;

11074: END IF;
11075:
11076: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
11077: IF p_validate_flexfields = fnd_api.g_true THEN
11078: gme_common_pvt.g_flex_validate_prof := 1;
11079: ELSE
11080: gme_common_pvt.g_flex_validate_prof := 0;
11081: END IF;
11082:

Line 11080: gme_common_pvt.g_flex_validate_prof := 0;

11076: -- needed for release batch AND/OR release step (release step is in private to take care of dependent steps)
11077: IF p_validate_flexfields = fnd_api.g_true THEN
11078: gme_common_pvt.g_flex_validate_prof := 1;
11079: ELSE
11080: gme_common_pvt.g_flex_validate_prof := 0;
11081: END IF;
11082:
11083: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
11084: l_in_batch_header_rec := l_batch_header_rec;

Line 11083: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN

11079: ELSE
11080: gme_common_pvt.g_flex_validate_prof := 0;
11081: END IF;
11082:
11083: IF l_batch_header_rec.batch_status = gme_common_pvt.g_batch_pending THEN
11084: l_in_batch_header_rec := l_batch_header_rec;
11085: l_in_batch_header_rec.actual_start_date := l_batch_step_rec.actual_start_date;
11086:
11087: -- call release batch validation... output batch header will have actual start date filled in

Line 11099: -- gme_common_pvt.g_move_to_temp := fnd_api.g_false;

11095: END IF;
11096: END IF;
11097:
11098: -- Bug 13981238 - comment out the following line so that any transactions are moved to mmt.
11099: -- gme_common_pvt.g_move_to_temp := fnd_api.g_false;
11100:
11101: /* Invoke main */
11102: gme_api_main.release_step
11103: (p_validation_level => p_validation_level

Line 11120: gme_common_pvt.g_flex_validate_prof := 0;

11116: status from gme_api_main.release_step is ' || x_return_status);
11117: END IF;
11118:
11119: -- reset flex global
11120: gme_common_pvt.g_flex_validate_prof := 0;
11121:
11122: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
11123: x_return_status := fnd_api.g_ret_sts_success;
11124: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

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

11118:
11119: -- reset flex global
11120: gme_common_pvt.g_flex_validate_prof := 0;
11121:
11122: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
11123: x_return_status := fnd_api.g_ret_sts_success;
11124: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
11125: x_exception_material_tbl := l_exception_material_tbl;
11126: END IF;

Line 11124: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN

11120: gme_common_pvt.g_flex_validate_prof := 0;
11121:
11122: IF p_ignore_exception = fnd_api.g_true AND x_return_status = gme_common_pvt.g_exceptions_err THEN
11123: x_return_status := fnd_api.g_ret_sts_success;
11124: ELSIF x_return_status = gme_common_pvt.g_exceptions_err THEN
11125: x_exception_material_tbl := l_exception_material_tbl;
11126: END IF;
11127:
11128: IF x_return_status <> fnd_api.g_ret_sts_success THEN

Line 11135: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);

11131:
11132: /* Invoke save_batch */
11133: IF g_debug <= gme_debug.g_log_statement THEN
11134: gme_debug.put_line ( g_pkg_name || '.' || l_api_name || ' About to
11135: invoke save_batch with header_id of ' || gme_common_pvt.g_transaction_header_id);
11136: END IF;
11137:
11138: -- Bug 13981238 Restructure call to save_batch conditionalize on p_commit flag.
11139: -- Invoke save_batch

Line 11146: (p_header_id => gme_common_pvt.g_transaction_header_id

11142: -- Bug 16079623 - Conditionalize call to save_batch based on p_save_batch. Rework of 13981238.
11143: IF (p_save_batch = fnd_api.g_true) THEN
11144: -- Bug 13981238 Change table parameter to 2 since now transactions will be in mmt.
11145: gme_api_pub.save_batch
11146: (p_header_id => gme_common_pvt.g_transaction_header_id
11147: ,p_table => 2
11148: ,p_commit => p_commit
11149: ,x_return_status => x_return_status);
11150:

Line 11170: gme_common_pvt.count_and_get (x_count => x_message_count

11166: EXCEPTION
11167: WHEN error_release_step THEN
11168: ROLLBACK TO SAVEPOINT release_step;
11169: x_batch_step_rec := NULL;
11170: gme_common_pvt.count_and_get (x_count => x_message_count
11171: ,p_encoded => fnd_api.g_false
11172: ,x_data => x_message_list);
11173: WHEN fnd_api.g_exc_error THEN
11174: ROLLBACK TO SAVEPOINT release_step;

Line 11177: gme_common_pvt.count_and_get (x_count => x_message_count

11173: WHEN fnd_api.g_exc_error THEN
11174: ROLLBACK TO SAVEPOINT release_step;
11175: x_batch_step_rec := NULL;
11176: x_return_status := fnd_api.g_ret_sts_error;
11177: gme_common_pvt.count_and_get (x_count => x_message_count
11178: ,p_encoded => fnd_api.g_false
11179: ,x_data => x_message_list);
11180: WHEN OTHERS THEN
11181: ROLLBACK TO SAVEPOINT release_step;

Line 11214: := gme_common_pvt.g_max_errors

11210: ================================================================================*/
11211: PROCEDURE process_group
11212: (p_api_version IN NUMBER
11213: ,p_validation_level IN NUMBER
11214: := gme_common_pvt.g_max_errors
11215: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
11216: ,p_commit IN VARCHAR2 := fnd_api.g_false
11217: ,p_group_name IN VARCHAR2
11218: ,p_org_code IN VARCHAR2

Line 11235: l_exception_material_tbl gme_common_pvt.exceptions_tab;

11231: success_count NUMBER := 0;
11232: failed_count NUMBER := 0;
11233: l_batch_header_rec gme_batch_header%ROWTYPE;
11234: l_in_batch_header_rec gme_batch_header%ROWTYPE;
11235: l_exception_material_tbl gme_common_pvt.exceptions_tab;
11236: error_process_group EXCEPTION;
11237:
11238: CURSOR get_organization (l_org_code IN VARCHAR2)
11239: IS

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

11290: IF NOT fnd_api.compatible_api_call (2.0
11291: ,p_api_version
11292: ,'process_group'
11293: ,g_pkg_name) THEN
11294: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
11295: RAISE fnd_api.g_exc_error;
11296: END IF;
11297:
11298: /* Validate Input parameters */

Line 11331: gme_common_pvt.log_message ('GME_INVALID_ORG');

11327: FETCH get_organization INTO l_org_id;
11328:
11329: IF get_organization%NOTFOUND THEN
11330: CLOSE get_organization;
11331: gme_common_pvt.log_message ('GME_INVALID_ORG');
11332: RAISE fnd_api.g_exc_error;
11333: END IF;
11334:
11335: CLOSE get_organization;

Line 11343: gme_common_pvt.log_message ('GME_INVALID_GROUP');

11339: FETCH get_group_id INTO l_group_id;
11340:
11341: IF get_group_id%NOTFOUND THEN
11342: CLOSE get_group_id;
11343: gme_common_pvt.log_message ('GME_INVALID_GROUP');
11344: RAISE fnd_api.g_exc_error;
11345: END IF;
11346:
11347: CLOSE get_group_id;

Line 11354: gme_common_pvt.log_message ('GME_INVALID_GROUP_ACTION');

11350: FETCH validate_lookup_code INTO l_action;
11351:
11352: IF validate_lookup_code%NOTFOUND THEN
11353: CLOSE validate_lookup_code;
11354: gme_common_pvt.log_message ('GME_INVALID_GROUP_ACTION');
11355: RAISE fnd_api.g_exc_error;
11356: END IF;
11357:
11358: CLOSE validate_lookup_code;

Line 11361: gme_common_pvt.log_message ('GME_INVALID_ERR_FLAG');

11357:
11358: CLOSE validate_lookup_code;
11359:
11360: IF (p_on_error_flag <> 'STOP' AND p_on_error_flag <> 'CONTINUE') THEN
11361: gme_common_pvt.log_message ('GME_INVALID_ERR_FLAG');
11362: RAISE fnd_api.g_exc_error;
11363: END IF;
11364:
11365: i := 0;

Line 11501: gme_common_pvt.count_and_get (x_count => x_message_count

11497:
11498: -- DBMS_OUTPUT.put_line ('return status is = ' || x_return_status);
11499: IF x_return_status <> fnd_api.g_ret_sts_success THEN
11500: failed_count := failed_count + 1;
11501: gme_common_pvt.count_and_get (x_count => x_message_count
11502: ,p_encoded => fnd_api.g_false
11503: ,x_data => x_message_list);
11504: -- DBMS_OUTPUT.put_line('Error ' || x_message_list);
11505: IF (p_on_error_flag = 'STOP') THEN

Line 11515: gme_common_pvt.count_and_get (x_count => x_message_count

11511:
11512: EXCEPTION
11513: WHEN OTHERS THEN
11514: failed_count := failed_count + 1;
11515: gme_common_pvt.count_and_get (x_count => x_message_count
11516: ,p_encoded => fnd_api.g_false
11517: ,x_data => x_message_list);
11518: -- DBMS_OUTPUT.put_line('Error ' || x_message_list);
11519: IF (p_on_error_flag = 'STOP') THEN

Line 11526: gme_common_pvt.log_message ('GME_NO_GROUP_ASSOC');

11522: END;
11523: END LOOP;
11524:
11525: IF i=0 THEN
11526: gme_common_pvt.log_message ('GME_NO_GROUP_ASSOC');
11527: RAISE fnd_api.g_exc_error;
11528: ELSE
11529: -- DBMS_OUTPUT.put_line('Total ' || i);
11530: -- DBMS_OUTPUT.put_line('Success ' || success_count);

Line 11532: gme_common_pvt.log_message

11528: ELSE
11529: -- DBMS_OUTPUT.put_line('Total ' || i);
11530: -- DBMS_OUTPUT.put_line('Success ' || success_count);
11531: -- DBMS_OUTPUT.put_line('Failed ' || failed_count);
11532: gme_common_pvt.log_message
11533: ( p_message_code => 'GME_GROUP_ASSOC_TOTAL'
11534: ,p_product_code => 'GME'
11535: ,p_token1_name => 'TOTAL_COUNT'
11536: ,p_token1_value => i

Line 11538: gme_common_pvt.log_message

11534: ,p_product_code => 'GME'
11535: ,p_token1_name => 'TOTAL_COUNT'
11536: ,p_token1_value => i
11537: );
11538: gme_common_pvt.log_message
11539: ( p_message_code => 'GME_GROUP_ASSOC_SUCCESS'
11540: ,p_product_code => 'GME'
11541: ,p_token1_name => 'SUCCESS_COUNT'
11542: ,p_token1_value => success_count

Line 11545: gme_common_pvt.log_message

11541: ,p_token1_name => 'SUCCESS_COUNT'
11542: ,p_token1_value => success_count
11543: );
11544:
11545: gme_common_pvt.log_message
11546: ( p_message_code => 'GME_GROUP_ASSOC_FAIL'
11547: ,p_product_code => 'GME'
11548: ,p_token1_name => 'FAILED_COUNT'
11549: ,p_token1_value => failed_count

Line 11556: gme_common_pvt.count_and_get (x_count => x_message_count

11552:
11553: EXCEPTION
11554:
11555: WHEN error_process_group THEN
11556: gme_common_pvt.count_and_get (x_count => x_message_count
11557: ,p_encoded => fnd_api.g_false
11558: ,x_data => x_message_list);
11559: WHEN fnd_api.g_exc_error THEN
11560: x_return_status := fnd_api.g_ret_sts_error;

Line 11561: gme_common_pvt.count_and_get (x_count => x_message_count

11557: ,p_encoded => fnd_api.g_false
11558: ,x_data => x_message_list);
11559: WHEN fnd_api.g_exc_error THEN
11560: x_return_status := fnd_api.g_ret_sts_error;
11561: gme_common_pvt.count_and_get (x_count => x_message_count
11562: ,p_encoded => fnd_api.g_false
11563: ,x_data => x_message_list);
11564: WHEN OTHERS THEN
11565: gme_when_others ( p_api_name => l_api_name

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

11598: PROCEDURE update_batchstep_qty. Charges will also be recalculated.
11599: ================================================================================*/
11600: PROCEDURE update_batchstep_qty (
11601: p_api_version IN NUMBER := 1.0
11602: ,p_validation_level IN NUMBER := gme_common_pvt.g_max_errors
11603: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
11604: ,p_commit IN VARCHAR2
11605: ,p_org_code IN VARCHAR2
11606: ,p_batch_no IN VARCHAR2 := NULL

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

11645: IF NOT fnd_api.compatible_api_call (1.0
11646: ,p_api_version
11647: ,'update_batchstep'
11648: ,g_pkg_name) THEN
11649: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
11650: RAISE fnd_api.g_exc_error;
11651: END IF;
11652:
11653: gme_common_pvt.set_timestamp;

Line 11653: gme_common_pvt.set_timestamp;

11649: gme_common_pvt.log_message ('GME_INVALID_API_VERSION');
11650: RAISE fnd_api.g_exc_error;
11651: END IF;
11652:
11653: gme_common_pvt.set_timestamp;
11654:
11655: /* Initialize message list and count if needed */
11656: IF p_init_msg_list = fnd_api.g_true THEN
11657: fnd_msg_pub.initialize;

Line 11658: gme_common_pvt.g_error_count := 0;

11654:
11655: /* Initialize message list and count if needed */
11656: IF p_init_msg_list = fnd_api.g_true THEN
11657: fnd_msg_pub.initialize;
11658: gme_common_pvt.g_error_count := 0;
11659: END IF;
11660:
11661: /* Retrieve the row to be updated */
11662: IF g_debug <= gme_debug.g_log_statement THEN

Line 11672: IF NOT gme_common_pvt.get_batch_step

11668: || ' Invoke get_batchstep');
11669: END IF;
11670:
11671: -- Fetch the step record from the DB as well as the batch header record.
11672: IF NOT gme_common_pvt.get_batch_step
11673: (p_batch_step_rec => p_batch_step_rec
11674: ,p_org_code => p_org_code
11675: ,p_batch_no => p_batch_no
11676: ,x_batch_step_rec => l_batch_step_rec

Line 11709: gme_common_pvt.g_setup_done :=

11705: || ' org_code '
11706: || p_org_code);
11707: END IF;
11708:
11709: gme_common_pvt.g_setup_done :=
11710: gme_common_pvt.setup
11711: (p_org_id => l_batch_header.organization_id
11712: ,p_org_code => p_org_code);
11713:

Line 11710: gme_common_pvt.setup

11706: || p_org_code);
11707: END IF;
11708:
11709: gme_common_pvt.g_setup_done :=
11710: gme_common_pvt.setup
11711: (p_org_id => l_batch_header.organization_id
11712: ,p_org_code => p_org_code);
11713:
11714: IF NOT gme_common_pvt.g_setup_done THEN

Line 11714: IF NOT gme_common_pvt.g_setup_done THEN

11710: gme_common_pvt.setup
11711: (p_org_id => l_batch_header.organization_id
11712: ,p_org_code => p_org_code);
11713:
11714: IF NOT gme_common_pvt.g_setup_done THEN
11715: IF g_debug <= gme_debug.g_log_statement THEN
11716: gme_debug.put_line ( g_pkg_name
11717: || '.'
11718: || l_api_name

Line 11737: gme_common_pvt.log_message (p_product_code => 'GME'

11733:
11734: -- This api only good NON ASQC batches.
11735: IF l_batch_header.automatic_step_calculation = 1 THEN
11736:
11737: gme_common_pvt.log_message (p_product_code => 'GME'
11738: ,p_message_code => 'GME_API_BATCH_STEP_UPD_ERR');
11739: RAISE l_invalid_step_status;
11740: END IF;
11741:

Line 11743: IF l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_completed

11739: RAISE l_invalid_step_status;
11740: END IF;
11741:
11742: -- This api only good for wip and completed steps.
11743: IF l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_completed
11744: ,gme_common_pvt.g_step_wip) THEN
11745:
11746: gme_common_pvt.log_message (p_product_code => 'GME'
11747: ,p_message_code => 'GME_API_INV_STAT_STEP_EDIT');

Line 11744: ,gme_common_pvt.g_step_wip) THEN

11740: END IF;
11741:
11742: -- This api only good for wip and completed steps.
11743: IF l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_completed
11744: ,gme_common_pvt.g_step_wip) THEN
11745:
11746: gme_common_pvt.log_message (p_product_code => 'GME'
11747: ,p_message_code => 'GME_API_INV_STAT_STEP_EDIT');
11748: RAISE l_invalid_step_status;

Line 11746: gme_common_pvt.log_message (p_product_code => 'GME'

11742: -- This api only good for wip and completed steps.
11743: IF l_batch_step_rec.step_status NOT IN (gme_common_pvt.g_step_completed
11744: ,gme_common_pvt.g_step_wip) THEN
11745:
11746: gme_common_pvt.log_message (p_product_code => 'GME'
11747: ,p_message_code => 'GME_API_INV_STAT_STEP_EDIT');
11748: RAISE l_invalid_step_status;
11749: END IF;
11750:

Line 11762: gme_common_pvt.log_message (p_product_code => 'GMI'

11758: IF g_debug <= gme_debug.g_log_statement THEN
11759: gme_debug.put_line (g_pkg_name || '.' || l_api_name || ' Negative qty not allowed');
11760: END IF;
11761:
11762: gme_common_pvt.log_message (p_product_code => 'GMI'
11763: ,p_message_code => 'IC_ACTIONQTYNEG');
11764: RAISE negative_qty_error;
11765: END IF;
11766:

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

11811: -- We may revert back to using just a pure commit if required. Leaving code for now.
11812: /*
11813: IF p_commit = fnd_api.g_true THEN
11814: COMMIT;
11815: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
11816: END IF;
11817: */
11818: IF p_commit = fnd_api.g_true THEN
11819: gme_api_pub.save_batch

Line 11820: (p_header_id => gme_common_pvt.g_transaction_header_id

11816: END IF;
11817: */
11818: IF p_commit = fnd_api.g_true THEN
11819: gme_api_pub.save_batch
11820: (p_header_id => gme_common_pvt.g_transaction_header_id
11821: ,p_table => null
11822: ,p_commit => p_commit
11823: ,p_clear_qty_cache => fnd_api.g_true
11824: ,x_return_status => x_return_status);

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

11834: IF x_return_status <> fnd_api.g_ret_sts_success THEN
11835: RAISE fnd_api.g_exc_error;
11836: END IF;
11837:
11838: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
11839: gme_common_pvt.count_and_get(x_count => x_message_count
11840: ,p_encoded => fnd_api.g_false
11841: ,x_data => x_message_list);
11842: END IF;

Line 11839: gme_common_pvt.count_and_get(x_count => x_message_count

11835: RAISE fnd_api.g_exc_error;
11836: END IF;
11837:
11838: gme_common_pvt.log_message ('PM_SAVED_CHANGES');
11839: gme_common_pvt.count_and_get(x_count => x_message_count
11840: ,p_encoded => fnd_api.g_false
11841: ,x_data => x_message_list);
11842: END IF;
11843: ELSE

Line 11848: gme_common_pvt.log_message (p_product_code => 'IEM'

11844: RAISE update_step_failed;
11845: END IF;
11846: ELSE
11847: -- Tell user that nothing was changed.
11848: gme_common_pvt.log_message (p_product_code => 'IEM'
11849: ,p_message_code => 'IEM_NOTHING_TO_UPDATE');
11850: END IF;
11851:
11852: IF g_debug <= gme_debug.g_log_procedure THEN

Line 11860: gme_common_pvt.count_and_get (x_count => x_message_count

11856: EXCEPTION
11857: WHEN l_invalid_step_status OR negative_qty_error OR update_step_failed THEN
11858: ROLLBACK TO SAVEPOINT update_batchstep_qty;
11859: x_return_status := fnd_api.g_ret_sts_error;
11860: gme_common_pvt.count_and_get (x_count => x_message_count
11861: ,p_encoded => fnd_api.g_false
11862: ,x_data => x_message_list);
11863: WHEN fnd_api.g_exc_error THEN
11864: x_return_status := fnd_api.g_ret_sts_error;

Line 11866: gme_common_pvt.count_and_get (x_count => x_message_count

11862: ,x_data => x_message_list);
11863: WHEN fnd_api.g_exc_error THEN
11864: x_return_status := fnd_api.g_ret_sts_error;
11865: ROLLBACK TO SAVEPOINT update_batchstep_qty;
11866: gme_common_pvt.count_and_get (x_count => x_message_count
11867: ,p_encoded => fnd_api.g_false
11868: ,x_data => x_message_list);
11869: WHEN OTHERS THEN
11870: ROLLBACK TO SAVEPOINT update_batchstep_qty;