DBA Data[Home] [Help]

APPS.GME_UPDATE_STEP_QTY_PVT dependencies on GME_DEBUG

Line 68: IF g_debug <= gme_debug.g_log_procedure THEN

64: UNION
65: SELECT p_material_step_id from dual;
66: --Bug#5606246 end
67: BEGIN
68: IF g_debug <= gme_debug.g_log_procedure THEN
69: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
70: || l_api_name||' with batchstep_id '||p_batch_step_rec.batchstep_id);
71: END IF;
72:

Line 69: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

65: SELECT p_material_step_id from dual;
66: --Bug#5606246 end
67: BEGIN
68: IF g_debug <= gme_debug.g_log_procedure THEN
69: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
70: || l_api_name||' with batchstep_id '||p_batch_step_rec.batchstep_id);
71: END IF;
72:
73: /* Set the savepoint before proceeding */

Line 77: IF g_debug <= gme_debug.g_log_statement THEN

73: /* Set the savepoint before proceeding */
74: SAVEPOINT update_step_qty;
75: /* Set the return status to success initially */
76: x_return_status := fnd_api.g_ret_sts_success;
77: IF g_debug <= gme_debug.g_log_statement THEN
78: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
79: || l_api_name||'p_routing_scale_factor ' || p_routing_scale_factor);
80: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
81: || l_api_name||'p_backflush_factor ' || p_backflush_factor);

Line 78: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

74: SAVEPOINT update_step_qty;
75: /* Set the return status to success initially */
76: x_return_status := fnd_api.g_ret_sts_success;
77: IF g_debug <= gme_debug.g_log_statement THEN
78: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
79: || l_api_name||'p_routing_scale_factor ' || p_routing_scale_factor);
80: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
81: || l_api_name||'p_backflush_factor ' || p_backflush_factor);
82: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

Line 80: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

76: x_return_status := fnd_api.g_ret_sts_success;
77: IF g_debug <= gme_debug.g_log_statement THEN
78: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
79: || l_api_name||'p_routing_scale_factor ' || p_routing_scale_factor);
80: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
81: || l_api_name||'p_backflush_factor ' || p_backflush_factor);
82: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
83: || l_api_name||'p_dependency_type ' || p_dependency_type);
84: END IF;

Line 82: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

78: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
79: || l_api_name||'p_routing_scale_factor ' || p_routing_scale_factor);
80: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
81: || l_api_name||'p_backflush_factor ' || p_backflush_factor);
82: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
83: || l_api_name||'p_dependency_type ' || p_dependency_type);
84: END IF;
85:
86: /* Initialize output batch step row */

Line 112: IF g_debug <= gme_debug.g_log_statement THEN

108:
109: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
110: RAISE fnd_api.g_exc_error;
111: END IF;
112: IF g_debug <= gme_debug.g_log_statement THEN
113: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
114: || l_api_name||': Resource transactions loaded '||l_rec);
115: END IF;
116: l_rec := 0;

Line 113: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

109: IF (l_return_status <> fnd_api.g_ret_sts_success) THEN
110: RAISE fnd_api.g_exc_error;
111: END IF;
112: IF g_debug <= gme_debug.g_log_statement THEN
113: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
114: || l_api_name||': Resource transactions loaded '||l_rec);
115: END IF;
116: l_rec := 0;
117:

Line 305: IF g_debug <= gme_debug.g_log_procedure THEN

301: END LOOP; /* FOR dep_steps*/
302: END IF; /* IF x_batch_step_rec.step_status IN (2, 3) */
303: END IF; /*IF l_batch_header.automatic_step_calculation = 1*/
304:
305: IF g_debug <= gme_debug.g_log_procedure THEN
306: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
307: END IF;
308: EXCEPTION
309: WHEN batch_step_fetch_error THEN

Line 306: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

302: END IF; /* IF x_batch_step_rec.step_status IN (2, 3) */
303: END IF; /*IF l_batch_header.automatic_step_calculation = 1*/
304:
305: IF g_debug <= gme_debug.g_log_procedure THEN
306: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
307: END IF;
308: EXCEPTION
309: WHEN batch_step_fetch_error THEN
310: ROLLBACK TO SAVEPOINT update_step_qty;

Line 342: IF g_debug <= gme_debug.g_log_unexpected THEN

338: x_return_status := l_return_status;
339: fnd_msg_pub.count_and_get (p_count => x_message_count
340: ,p_data => x_message_list);
341: WHEN OTHERS THEN
342: IF g_debug <= gme_debug.g_log_unexpected THEN
343: gme_debug.put_line ( 'When others exception in '
344: || g_pkg_name
345: || '.'
346: || l_api_name

Line 343: gme_debug.put_line ( 'When others exception in '

339: fnd_msg_pub.count_and_get (p_count => x_message_count
340: ,p_data => x_message_list);
341: WHEN OTHERS THEN
342: IF g_debug <= gme_debug.g_log_unexpected THEN
343: gme_debug.put_line ( 'When others exception in '
344: || g_pkg_name
345: || '.'
346: || l_api_name
347: || ' Error is '

Line 383: IF g_debug <= gme_debug.g_log_procedure THEN

379: l_um_type mtl_uom_conversions.uom_class%TYPE;
380: l_std_factor NUMBER;
381: l_api_name CONSTANT VARCHAR2 (30) := 'calculate_mass_vol_qty';
382: BEGIN
383: IF g_debug <= gme_debug.g_log_procedure THEN
384: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
385: || l_api_name);
386: END IF;
387:

Line 384: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

380: l_std_factor NUMBER;
381: l_api_name CONSTANT VARCHAR2 (30) := 'calculate_mass_vol_qty';
382: BEGIN
383: IF g_debug <= gme_debug.g_log_procedure THEN
384: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
385: || l_api_name);
386: END IF;
387:
388: OPEN cur_get_uom;

Line 417: IF g_debug <= gme_debug.g_log_procedure THEN

413: NVL (p_batch_step_rec.plan_step_qty * l_std_factor, 0);
414: END IF; /* IF p_batch_step_rec.step_status > 1 */
415: END IF; /* IF l_um_type = gme_common_pvt.g_mass_um_type */
416:
417: IF g_debug <= gme_debug.g_log_procedure THEN
418: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
419: END IF;
420: EXCEPTION
421: WHEN OTHERS THEN

Line 418: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

414: END IF; /* IF p_batch_step_rec.step_status > 1 */
415: END IF; /* IF l_um_type = gme_common_pvt.g_mass_um_type */
416:
417: IF g_debug <= gme_debug.g_log_procedure THEN
418: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
419: END IF;
420: EXCEPTION
421: WHEN OTHERS THEN
422: IF g_debug <= gme_debug.g_log_unexpected THEN

Line 422: IF g_debug <= gme_debug.g_log_unexpected THEN

418: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
419: END IF;
420: EXCEPTION
421: WHEN OTHERS THEN
422: IF g_debug <= gme_debug.g_log_unexpected THEN
423: gme_debug.put_line ( 'When others exception in '
424: || g_pkg_name
425: || '.'
426: || l_api_name

Line 423: gme_debug.put_line ( 'When others exception in '

419: END IF;
420: EXCEPTION
421: WHEN OTHERS THEN
422: IF g_debug <= gme_debug.g_log_unexpected THEN
423: gme_debug.put_line ( 'When others exception in '
424: || g_pkg_name
425: || '.'
426: || l_api_name
427: || ' Error is '

Line 466: IF g_debug <= gme_debug.g_log_procedure THEN

462: l_charges NUMBER;
463: l_orig_charges NUMBER;
464: l_charge_diff NUMBER;
465: BEGIN
466: IF g_debug <= gme_debug.g_log_procedure THEN
467: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
468: || l_api_name);
469: END IF;
470:

Line 467: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

463: l_orig_charges NUMBER;
464: l_charge_diff NUMBER;
465: BEGIN
466: IF g_debug <= gme_debug.g_log_procedure THEN
467: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
468: || l_api_name);
469: END IF;
470:
471: /* Set the return status to success initially */

Line 529: IF g_debug <= gme_debug.g_log_procedure THEN

525: ,p_batch_step_rec) ) THEN
526: RAISE batch_step_fetch_err;
527: END IF;
528:
529: IF g_debug <= gme_debug.g_log_procedure THEN
530: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
531: END IF;
532: EXCEPTION
533: WHEN compute_resource_error THEN

Line 530: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

526: RAISE batch_step_fetch_err;
527: END IF;
528:
529: IF g_debug <= gme_debug.g_log_procedure THEN
530: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
531: END IF;
532: EXCEPTION
533: WHEN compute_resource_error THEN
534: x_return_status := l_return_status;

Line 538: IF g_debug <= gme_debug.g_log_unexpected THEN

534: x_return_status := l_return_status;
535: WHEN batch_step_upd_err OR error_calc_charge OR batch_step_fetch_err THEN
536: x_return_status := fnd_api.g_ret_sts_error;
537: WHEN OTHERS THEN
538: IF g_debug <= gme_debug.g_log_unexpected THEN
539: gme_debug.put_line ( 'When others exception in '
540: || g_pkg_name
541: || '.'
542: || l_api_name

Line 539: gme_debug.put_line ( 'When others exception in '

535: WHEN batch_step_upd_err OR error_calc_charge OR batch_step_fetch_err THEN
536: x_return_status := fnd_api.g_ret_sts_error;
537: WHEN OTHERS THEN
538: IF g_debug <= gme_debug.g_log_unexpected THEN
539: gme_debug.put_line ( 'When others exception in '
540: || g_pkg_name
541: || '.'
542: || l_api_name
543: || ' Error is '

Line 653: IF g_debug <= gme_debug.g_log_procedure THEN

649: error_step_not_found EXCEPTION;
650: error_calc_charge_conv EXCEPTION;
651: error_max_cap_not_mass_vol EXCEPTION;
652: BEGIN
653: IF g_debug <= gme_debug.g_log_procedure THEN
654: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
655: || l_api_name);
656: END IF;
657:

Line 654: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

650: error_calc_charge_conv EXCEPTION;
651: error_max_cap_not_mass_vol EXCEPTION;
652: BEGIN
653: IF g_debug <= gme_debug.g_log_procedure THEN
654: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
655: || l_api_name);
656: END IF;
657:
658: /* Initialize the return status to success */

Line 663: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

659: x_return_status := fnd_api.g_ret_sts_success;
660: x_charge := 0;
661: l_remaining_quantity := -1;
662:
663: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
664: gme_debug.put_line('pmassqty: '||p_mass_qty);
665: gme_debug.put_line('pvolqty: '||p_vol_qty);
666: END IF;
667:

Line 664: gme_debug.put_line('pmassqty: '||p_mass_qty);

660: x_charge := 0;
661: l_remaining_quantity := -1;
662:
663: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
664: gme_debug.put_line('pmassqty: '||p_mass_qty);
665: gme_debug.put_line('pvolqty: '||p_vol_qty);
666: END IF;
667:
668: /* Get the max capacity and uom for the current step */

Line 665: gme_debug.put_line('pvolqty: '||p_vol_qty);

661: l_remaining_quantity := -1;
662:
663: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
664: gme_debug.put_line('pmassqty: '||p_mass_qty);
665: gme_debug.put_line('pvolqty: '||p_vol_qty);
666: END IF;
667:
668: /* Get the max capacity and uom for the current step */
669: OPEN cur_get_max_capacity;

Line 678: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

674: IF cur_get_max_capacity%NOTFOUND THEN
675: RAISE error_step_not_found;
676: END IF;
677:
678: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
679: gme_debug.put_line('Max capacity, UOM: '||x_max_cap||', '||x_max_cap_uom);
680: gme_debug.put_line('Step Qty, UOM: '||x_step_qty||', '||x_step_qty_uom);
681: END IF;
682:

Line 679: gme_debug.put_line('Max capacity, UOM: '||x_max_cap||', '||x_max_cap_uom);

675: RAISE error_step_not_found;
676: END IF;
677:
678: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
679: gme_debug.put_line('Max capacity, UOM: '||x_max_cap||', '||x_max_cap_uom);
680: gme_debug.put_line('Step Qty, UOM: '||x_step_qty||', '||x_step_qty_uom);
681: END IF;
682:
683: /* Bug#5231180 Begin if we pass step qty and max capacity use them otherwise get the values

Line 680: gme_debug.put_line('Step Qty, UOM: '||x_step_qty||', '||x_step_qty_uom);

676: END IF;
677:
678: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
679: gme_debug.put_line('Max capacity, UOM: '||x_max_cap||', '||x_max_cap_uom);
680: gme_debug.put_line('Step Qty, UOM: '||x_step_qty||', '||x_step_qty_uom);
681: END IF;
682:
683: /* Bug#5231180 Begin if we pass step qty and max capacity use them otherwise get the values
684: from table. these will be passed from recalculate charges procedure */

Line 712: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

708: CLOSE cur_get_std_factor;
709:
710: x_std_capacity := x_max_cap * x_std_factor;
711:
712: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
713: gme_debug.put_line('Standard Factor: '||x_std_factor);
714: gme_debug.put_line('Standard Capacity: '||x_std_capacity);
715: END IF;
716:

Line 713: gme_debug.put_line('Standard Factor: '||x_std_factor);

709:
710: x_std_capacity := x_max_cap * x_std_factor;
711:
712: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
713: gme_debug.put_line('Standard Factor: '||x_std_factor);
714: gme_debug.put_line('Standard Capacity: '||x_std_capacity);
715: END IF;
716:
717: --Bug2617151

Line 714: gme_debug.put_line('Standard Capacity: '||x_std_capacity);

710: x_std_capacity := x_max_cap * x_std_factor;
711:
712: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
713: gme_debug.put_line('Standard Factor: '||x_std_factor);
714: gme_debug.put_line('Standard Capacity: '||x_std_capacity);
715: END IF;
716:
717: --Bug2617151
718: OPEN cur_get_tolerance;

Line 786: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

782: END IF; /*if x_max_cap_uom is not null then */
783:
784: /*Checking the scale type of the resource before
785: populating the charges table*/
786: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
787: gme_debug.put_line ('p_resources is' || p_resources);
788: END IF;
789:
790: IF p_resources IS NOT NULL THEN

Line 787: gme_debug.put_line ('p_resources is' || p_resources);

783:
784: /*Checking the scale type of the resource before
785: populating the charges table*/
786: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
787: gme_debug.put_line ('p_resources is' || p_resources);
788: END IF;
789:
790: IF p_resources IS NOT NULL THEN
791: OPEN cur_get_scale_type (p_resources);

Line 797: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

793: INTO l_scale_type;
794:
795: CLOSE cur_get_scale_type;
796:
797: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
798: gme_debug.put_line ('l_scale_type is' || l_scale_type);
799: END IF;
800:
801: IF l_scale_type = 1 THEN

Line 798: gme_debug.put_line ('l_scale_type is' || l_scale_type);

794:
795: CLOSE cur_get_scale_type;
796:
797: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
798: gme_debug.put_line ('l_scale_type is' || l_scale_type);
799: END IF;
800:
801: IF l_scale_type = 1 THEN
802: --Generating the charge details and populating the gme_batch_step_charges table.

Line 819: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN

815: IF x_std_factor <> 1 AND l_remaining_quantity <> -1 THEN
816: l_remaining_quantity := (l_remaining_quantity / x_std_factor);
817: END IF;
818:
819: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
820: gme_debug.put_line ( 'l_remaining_quantity is'
821: || l_remaining_quantity);
822: END IF;
823:

Line 820: gme_debug.put_line ( 'l_remaining_quantity is'

816: l_remaining_quantity := (l_remaining_quantity / x_std_factor);
817: END IF;
818:
819: IF NVL (g_debug, -1) = gme_debug.g_log_statement THEN
820: gme_debug.put_line ( 'l_remaining_quantity is'
821: || l_remaining_quantity);
822: END IF;
823:
824: l_batch_step_charges_in.batch_id := l_batch_id;

Line 844: IF g_debug <= gme_debug.g_log_procedure THEN

840: END IF;
841: END IF; /*if l_scale_type = 1*/
842: END IF; /*if p_resource is not null*/
843:
844: IF g_debug <= gme_debug.g_log_procedure THEN
845: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
846: END IF;
847: EXCEPTION
848: WHEN error_step_not_found THEN

Line 845: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

841: END IF; /*if l_scale_type = 1*/
842: END IF; /*if p_resource is not null*/
843:
844: IF g_debug <= gme_debug.g_log_procedure THEN
845: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
846: END IF;
847: EXCEPTION
848: WHEN error_step_not_found THEN
849: x_return_status := fnd_api.g_ret_sts_error;

Line 872: IF g_debug <= gme_debug.g_log_unexpected THEN

868: gme_common_pvt.log_message ('GME_INSERT_CHARGE_ERROR'
869: ,'STEP_NO'
870: ,x_step_no);
871: WHEN OTHERS THEN
872: IF g_debug <= gme_debug.g_log_unexpected THEN
873: gme_debug.put_line ( 'When others exception in '
874: || g_pkg_name
875: || '.'
876: || l_api_name

Line 873: gme_debug.put_line ( 'When others exception in '

869: ,'STEP_NO'
870: ,x_step_no);
871: WHEN OTHERS THEN
872: IF g_debug <= gme_debug.g_log_unexpected THEN
873: gme_debug.put_line ( 'When others exception in '
874: || g_pkg_name
875: || '.'
876: || l_api_name
877: || ' Error is '

Line 929: IF g_debug <= gme_debug.g_log_procedure THEN

925: step_activity_fetch_error EXCEPTION;
926: step_resource_upd_err EXCEPTION;
927: step_activity_upd_err EXCEPTION;
928: BEGIN
929: IF g_debug <= gme_debug.g_log_procedure THEN
930: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
931: || l_api_name);
932: END IF;
933:

Line 930: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

926: step_resource_upd_err EXCEPTION;
927: step_activity_upd_err EXCEPTION;
928: BEGIN
929: IF g_debug <= gme_debug.g_log_procedure THEN
930: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
931: || l_api_name);
932: END IF;
933:
934: /* Initialize the return status to success */

Line 1009: IF g_debug <= gme_debug.g_log_procedure THEN

1005: RAISE step_activity_upd_err;
1006: END IF;
1007: END LOOP; /* FOR i IN 1..l_batchstep_activity_ids.COUNT LOOP */
1008:
1009: IF g_debug <= gme_debug.g_log_procedure THEN
1010: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1011: END IF;
1012: EXCEPTION
1013: WHEN step_activity_fetch_error THEN

Line 1010: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

1006: END IF;
1007: END LOOP; /* FOR i IN 1..l_batchstep_activity_ids.COUNT LOOP */
1008:
1009: IF g_debug <= gme_debug.g_log_procedure THEN
1010: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1011: END IF;
1012: EXCEPTION
1013: WHEN step_activity_fetch_error THEN
1014: x_return_status := fnd_api.g_ret_sts_error;

Line 1040: IF g_debug <= gme_debug.g_log_unexpected THEN

1036: fnd_msg_pub.add_exc_msg ('gme_update_step_qty_pvt'
1037: ,'UPDATE_ACTIVITIES');
1038: END IF;
1039: WHEN OTHERS THEN
1040: IF g_debug <= gme_debug.g_log_unexpected THEN
1041: gme_debug.put_line ( 'When others exception in '
1042: || g_pkg_name
1043: || '.'
1044: || l_api_name

Line 1041: gme_debug.put_line ( 'When others exception in '

1037: ,'UPDATE_ACTIVITIES');
1038: END IF;
1039: WHEN OTHERS THEN
1040: IF g_debug <= gme_debug.g_log_unexpected THEN
1041: gme_debug.put_line ( 'When others exception in '
1042: || g_pkg_name
1043: || '.'
1044: || l_api_name
1045: || ' Error is '

Line 1142: IF g_debug <= gme_debug.g_log_procedure THEN

1138: error_txns_update EXCEPTION;
1139: error_fetch_rsrc_tran EXCEPTION;
1140: qty_below_cap_error EXCEPTION;
1141: BEGIN
1142: IF g_debug <= gme_debug.g_log_procedure THEN
1143: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1144: || l_api_name);
1145: END IF;
1146:

Line 1143: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

1139: error_fetch_rsrc_tran EXCEPTION;
1140: qty_below_cap_error EXCEPTION;
1141: BEGIN
1142: IF g_debug <= gme_debug.g_log_procedure THEN
1143: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1144: || l_api_name);
1145: END IF;
1146:
1147: /* Initialize the return status to success */

Line 1418: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

1414: INTO l_prev_plan_charges;
1415:
1416: CLOSE cur_prev_plan_charge;
1417:
1418: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1419: gme_debug.put_line ( ' plan rsrc qty:'
1420: || l_gme_batchstep_resources.plan_rsrc_qty
1421: || ' Plan actv:'
1422: || l_prev_plan_actv_fact);

Line 1419: gme_debug.put_line ( ' plan rsrc qty:'

1415:
1416: CLOSE cur_prev_plan_charge;
1417:
1418: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1419: gme_debug.put_line ( ' plan rsrc qty:'
1420: || l_gme_batchstep_resources.plan_rsrc_qty
1421: || ' Plan actv:'
1422: || l_prev_plan_actv_fact);
1423: END IF;

Line 1639: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

1635: NVL (l_gme_batchstep_resources.plan_rsrc_qty, 0);
1636: END IF; /* IF p_batch_hdr_rec.automatic_step_calculation = 1 */
1637:
1638: /* We should check for the process qty going below the min capacity based on the profile */
1639: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1640: gme_debug.put_line
1641: ( ' Allow qty to go below capacity profile value:'
1642: || l_allow_qty_below_cap);
1643: END IF;

Line 1640: gme_debug.put_line

1636: END IF; /* IF p_batch_hdr_rec.automatic_step_calculation = 1 */
1637:
1638: /* We should check for the process qty going below the min capacity based on the profile */
1639: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1640: gme_debug.put_line
1641: ( ' Allow qty to go below capacity profile value:'
1642: || l_allow_qty_below_cap);
1643: END IF;
1644:

Line 1698: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

1694: gme_common_pvt.g_step_pending
1695: OR ( p_batch_hdr_rec.automatic_step_calculation = 1
1696: AND p_batch_step_rec.step_status =
1697: gme_common_pvt.g_step_wip) ) THEN
1698: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1699: gme_debug.put_line (' invoking pending usage');
1700: END IF;
1701:
1702: adjust_pending_usage

Line 1699: gme_debug.put_line (' invoking pending usage');

1695: OR ( p_batch_hdr_rec.automatic_step_calculation = 1
1696: AND p_batch_step_rec.step_status =
1697: gme_common_pvt.g_step_wip) ) THEN
1698: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1699: gme_debug.put_line (' invoking pending usage');
1700: END IF;
1701:
1702: adjust_pending_usage
1703: (p_batch_step_resources_rec => l_gme_batchstep_resources

Line 1728: IF g_debug <= gme_debug.g_log_procedure THEN

1724: RAISE step_resource_upd_err;
1725: END IF;
1726: END LOOP; /* FOR i IN 1..l_batchstep_resource_ids.COUNT LOOP */
1727:
1728: IF g_debug <= gme_debug.g_log_procedure THEN
1729: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1730: END IF;
1731: EXCEPTION
1732: WHEN activity_resource_fetch_error THEN

Line 1729: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

1725: END IF;
1726: END LOOP; /* FOR i IN 1..l_batchstep_resource_ids.COUNT LOOP */
1727:
1728: IF g_debug <= gme_debug.g_log_procedure THEN
1729: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1730: END IF;
1731: EXCEPTION
1732: WHEN activity_resource_fetch_error THEN
1733: x_return_status := fnd_api.g_ret_sts_error;

Line 1748: IF g_debug <= gme_debug.g_log_unexpected THEN

1744: gme_common_pvt.log_message ('GME_API_RSRC_QTY_BELOW_CAP'
1745: ,'RESOURCES'
1746: ,l_gme_batchstep_resources.resources);
1747: WHEN OTHERS THEN
1748: IF g_debug <= gme_debug.g_log_unexpected THEN
1749: gme_debug.put_line ( 'When others exception in '
1750: || g_pkg_name
1751: || '.'
1752: || l_api_name

Line 1749: gme_debug.put_line ( 'When others exception in '

1745: ,'RESOURCES'
1746: ,l_gme_batchstep_resources.resources);
1747: WHEN OTHERS THEN
1748: IF g_debug <= gme_debug.g_log_unexpected THEN
1749: gme_debug.put_line ( 'When others exception in '
1750: || g_pkg_name
1751: || '.'
1752: || l_api_name
1753: || ' Error is '

Line 1802: IF g_debug <= gme_debug.g_log_procedure THEN

1798: resource_trans_ins_err EXCEPTION;
1799: -- p_tran_rec gmi_trans_engine_pub.ictran_rec;
1800: -- l_tran_rec_out gmi_trans_engine_pub.ictran_rec;
1801: BEGIN
1802: IF g_debug <= gme_debug.g_log_procedure THEN
1803: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1804: || l_api_name);
1805: END IF;
1806:

Line 1803: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

1799: -- p_tran_rec gmi_trans_engine_pub.ictran_rec;
1800: -- l_tran_rec_out gmi_trans_engine_pub.ictran_rec;
1801: BEGIN
1802: IF g_debug <= gme_debug.g_log_procedure THEN
1803: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1804: || l_api_name);
1805: END IF;
1806:
1807: /* Initialize the return status to success */

Line 1851: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

1847: ,l_usage_hrs
1848: ,l_return_status);
1849:
1850: IF l_return_status = 'S' THEN
1851: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1852: gme_debug.put_line ( 'l_return_status'
1853: || l_return_status
1854: || ' usage'
1855: || l_usage_hrs);

Line 1852: gme_debug.put_line ( 'l_return_status'

1848: ,l_return_status);
1849:
1850: IF l_return_status = 'S' THEN
1851: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1852: gme_debug.put_line ( 'l_return_status'
1853: || l_return_status
1854: || ' usage'
1855: || l_usage_hrs);
1856: END IF;

Line 1904: IF g_debug <= gme_debug.g_log_procedure THEN

1900: ,l_ins_resource_row) ) THEN
1901: RAISE resource_trans_ins_err;
1902: END IF;
1903:
1904: IF g_debug <= gme_debug.g_log_procedure THEN
1905: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1906: END IF;
1907: EXCEPTION
1908: WHEN resource_trans_ins_err THEN

Line 1905: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

1901: RAISE resource_trans_ins_err;
1902: END IF;
1903:
1904: IF g_debug <= gme_debug.g_log_procedure THEN
1905: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
1906: END IF;
1907: EXCEPTION
1908: WHEN resource_trans_ins_err THEN
1909: x_return_status := fnd_api.g_ret_sts_error;

Line 1913: IF g_debug <= gme_debug.g_log_unexpected THEN

1909: x_return_status := fnd_api.g_ret_sts_error;
1910: WHEN fnd_api.g_exc_error THEN
1911: x_return_status := fnd_api.g_ret_sts_error;
1912: WHEN OTHERS THEN
1913: IF g_debug <= gme_debug.g_log_unexpected THEN
1914: gme_debug.put_line ( 'When others exception in '
1915: || g_pkg_name
1916: || '.'
1917: || l_api_name

Line 1914: gme_debug.put_line ( 'When others exception in '

1910: WHEN fnd_api.g_exc_error THEN
1911: x_return_status := fnd_api.g_ret_sts_error;
1912: WHEN OTHERS THEN
1913: IF g_debug <= gme_debug.g_log_unexpected THEN
1914: gme_debug.put_line ( 'When others exception in '
1915: || g_pkg_name
1916: || '.'
1917: || l_api_name
1918: || ' Error is '

Line 1958: IF g_debug <= gme_debug.g_log_procedure THEN

1954: l_tot_usage NUMBER;
1955: l_tran_count NUMBER;
1956: l_return_status VARCHAR2 (1);
1957: BEGIN
1958: IF g_debug <= gme_debug.g_log_procedure THEN
1959: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1960: || l_api_name);
1961: END IF;
1962:

Line 1959: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

1955: l_tran_count NUMBER;
1956: l_return_status VARCHAR2 (1);
1957: BEGIN
1958: IF g_debug <= gme_debug.g_log_procedure THEN
1959: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
1960: || l_api_name);
1961: END IF;
1962:
1963: /* Initialize return status to success */

Line 1974: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

1970: INTO l_tot_usage, l_tran_count;
1971:
1972: CLOSE cur_sum_usage;
1973:
1974: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1975: gme_debug.put_line ( ' tot usage:'
1976: || l_tot_usage
1977: || ' count:'
1978: || l_tran_count);

Line 1975: gme_debug.put_line ( ' tot usage:'

1971:
1972: CLOSE cur_sum_usage;
1973:
1974: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1975: gme_debug.put_line ( ' tot usage:'
1976: || l_tot_usage
1977: || ' count:'
1978: || l_tran_count);
1979: END IF;

Line 1983: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

1979: END IF;
1980:
1981: IF (l_tot_usage <> p_batch_step_resources_rec.plan_rsrc_usage)
1982: OR (l_tran_count <> p_batch_step_resources_rec.plan_rsrc_count) THEN
1983: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1984: gme_debug.put_line
1985: ( ' Pending Plan Usage:'
1986: || TO_CHAR (p_batch_step_resources_rec.plan_rsrc_usage)
1987: || ' Plan Count:'

Line 1984: gme_debug.put_line

1980:
1981: IF (l_tot_usage <> p_batch_step_resources_rec.plan_rsrc_usage)
1982: OR (l_tran_count <> p_batch_step_resources_rec.plan_rsrc_count) THEN
1983: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1984: gme_debug.put_line
1985: ( ' Pending Plan Usage:'
1986: || TO_CHAR (p_batch_step_resources_rec.plan_rsrc_usage)
1987: || ' Plan Count:'
1988: || TO_CHAR (p_batch_step_resources_rec.plan_rsrc_count) );

Line 2004: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2000: l_alloc_usage :=
2001: p_batch_step_resources_rec.plan_rsrc_usage
2002: / p_batch_step_resources_rec.plan_rsrc_count;
2003:
2004: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2005: gme_debug.put_line (' Alloc Usage:' || TO_CHAR (l_alloc_usage) );
2006: END IF;
2007:
2008: l_batch_hdr.batch_id := p_batch_step_resources_rec.batch_id;

Line 2005: gme_debug.put_line (' Alloc Usage:' || TO_CHAR (l_alloc_usage) );

2001: p_batch_step_resources_rec.plan_rsrc_usage
2002: / p_batch_step_resources_rec.plan_rsrc_count;
2003:
2004: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2005: gme_debug.put_line (' Alloc Usage:' || TO_CHAR (l_alloc_usage) );
2006: END IF;
2007:
2008: l_batch_hdr.batch_id := p_batch_step_resources_rec.batch_id;
2009:

Line 2033: IF g_debug <= gme_debug.g_log_unexpected THEN

2029: EXCEPTION
2030: WHEN fnd_api.g_exc_error THEN
2031: x_return_status := fnd_api.g_ret_sts_error;
2032: WHEN OTHERS THEN
2033: IF g_debug <= gme_debug.g_log_unexpected THEN
2034: gme_debug.put_line ( 'When others exception in '
2035: || g_pkg_name
2036: || '.'
2037: || l_api_name

Line 2034: gme_debug.put_line ( 'When others exception in '

2030: WHEN fnd_api.g_exc_error THEN
2031: x_return_status := fnd_api.g_ret_sts_error;
2032: WHEN OTHERS THEN
2033: IF g_debug <= gme_debug.g_log_unexpected THEN
2034: gme_debug.put_line ( 'When others exception in '
2035: || g_pkg_name
2036: || '.'
2037: || l_api_name
2038: || ' Error is '

Line 2114: IF g_debug <= gme_debug.g_log_procedure THEN

2110: l_override_usage NUMBER DEFAULT 0;
2111: l_actual_usage NUMBER;
2112: l_return_status VARCHAR2 (1);
2113: BEGIN
2114: IF g_debug <= gme_debug.g_log_procedure THEN
2115: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
2116: || l_api_name);
2117: END IF;
2118:

Line 2115: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

2111: l_actual_usage NUMBER;
2112: l_return_status VARCHAR2 (1);
2113: BEGIN
2114: IF g_debug <= gme_debug.g_log_procedure THEN
2115: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
2116: || l_api_name);
2117: END IF;
2118:
2119: /* Initialize return status to success */

Line 2122: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2118:
2119: /* Initialize return status to success */
2120: x_return_status := fnd_api.g_ret_sts_success;
2121:
2122: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2123: gme_debug.put_line ( ' Adjusting actual usage :'
2124: || p_batch_step_resources_rec.actual_rsrc_usage);
2125: END IF;
2126:

Line 2123: gme_debug.put_line ( ' Adjusting actual usage :'

2119: /* Initialize return status to success */
2120: x_return_status := fnd_api.g_ret_sts_success;
2121:
2122: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2123: gme_debug.put_line ( ' Adjusting actual usage :'
2124: || p_batch_step_resources_rec.actual_rsrc_usage);
2125: END IF;
2126:
2127: /* Lets fetch all the active resource transactions for the current resource */

Line 2164: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2160: END IF;
2161:
2162: CLOSE cur_sum_comp_usage;
2163:
2164: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2165: gme_debug.put_line
2166: ( ' Completed Usage:'
2167: || TO_CHAR (l_sum_comp_usage)
2168: || ' Actual Usage:'

Line 2165: gme_debug.put_line

2161:
2162: CLOSE cur_sum_comp_usage;
2163:
2164: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2165: gme_debug.put_line
2166: ( ' Completed Usage:'
2167: || TO_CHAR (l_sum_comp_usage)
2168: || ' Actual Usage:'
2169: || TO_CHAR (p_batch_step_resources_rec.actual_rsrc_usage)

Line 2182: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2178: INTO l_cnt_comp_usage;
2179:
2180: CLOSE cur_count_comp_usage;
2181:
2182: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2183: gme_debug.put_line ( ' Completed Transaction Count:'
2184: || TO_CHAR (l_cnt_comp_usage) );
2185: END IF;
2186:

Line 2183: gme_debug.put_line ( ' Completed Transaction Count:'

2179:
2180: CLOSE cur_count_comp_usage;
2181:
2182: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2183: gme_debug.put_line ( ' Completed Transaction Count:'
2184: || TO_CHAR (l_cnt_comp_usage) );
2185: END IF;
2186:
2187: /* Step 2 : */

Line 2264: IF g_debug <= gme_debug.g_log_procedure THEN

2260: /* IF l_sum_comp_usage < p_batch_step_resources_rec.actual_rsrc_usage */
2261: END IF;
2262: /* IF l_sum_comp_usage <> p_batch_step_resources_rec.actual_rsrc_usage */
2263:
2264: IF g_debug <= gme_debug.g_log_procedure THEN
2265: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2266: END IF;
2267: EXCEPTION
2268: WHEN fnd_api.g_exc_error THEN

Line 2265: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

2261: END IF;
2262: /* IF l_sum_comp_usage <> p_batch_step_resources_rec.actual_rsrc_usage */
2263:
2264: IF g_debug <= gme_debug.g_log_procedure THEN
2265: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2266: END IF;
2267: EXCEPTION
2268: WHEN fnd_api.g_exc_error THEN
2269: x_return_status := fnd_api.g_ret_sts_error;

Line 2271: IF g_debug <= gme_debug.g_log_unexpected THEN

2267: EXCEPTION
2268: WHEN fnd_api.g_exc_error THEN
2269: x_return_status := fnd_api.g_ret_sts_error;
2270: WHEN OTHERS THEN
2271: IF g_debug <= gme_debug.g_log_unexpected THEN
2272: gme_debug.put_line ( 'When others exception in '
2273: || g_pkg_name
2274: || '.'
2275: || l_api_name

Line 2272: gme_debug.put_line ( 'When others exception in '

2268: WHEN fnd_api.g_exc_error THEN
2269: x_return_status := fnd_api.g_ret_sts_error;
2270: WHEN OTHERS THEN
2271: IF g_debug <= gme_debug.g_log_unexpected THEN
2272: gme_debug.put_line ( 'When others exception in '
2273: || g_pkg_name
2274: || '.'
2275: || l_api_name
2276: || ' Error is '

Line 2340: IF g_debug <= gme_debug.g_log_procedure THEN

2336: l_rsrc_plan_strt_dt DATE;
2337: l_remaining_tran_count NUMBER;
2338: l_extra_usage_left NUMBER := 0;
2339: BEGIN
2340: IF g_debug <= gme_debug.g_log_procedure THEN
2341: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
2342: || l_api_name);
2343: END IF;
2344:

Line 2341: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

2337: l_remaining_tran_count NUMBER;
2338: l_extra_usage_left NUMBER := 0;
2339: BEGIN
2340: IF g_debug <= gme_debug.g_log_procedure THEN
2341: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'
2342: || l_api_name);
2343: END IF;
2344:
2345: /* Initialize return status to success */

Line 2375: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2371: IF l_return_status <> x_return_status THEN
2372: RAISE fnd_api.g_exc_error;
2373: END IF;
2374:
2375: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2376: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Line ID '||l_resource_txns.line_id);
2377: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Resource Txns Count '||l_resource_tab.COUNT);
2378: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Step Status '||l_step_status);
2379: END IF;

Line 2376: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Line ID '||l_resource_txns.line_id);

2372: RAISE fnd_api.g_exc_error;
2373: END IF;
2374:
2375: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2376: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Line ID '||l_resource_txns.line_id);
2377: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Resource Txns Count '||l_resource_tab.COUNT);
2378: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Step Status '||l_step_status);
2379: END IF;
2380:

Line 2377: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Resource Txns Count '||l_resource_tab.COUNT);

2373: END IF;
2374:
2375: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2376: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Line ID '||l_resource_txns.line_id);
2377: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Resource Txns Count '||l_resource_tab.COUNT);
2378: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Step Status '||l_step_status);
2379: END IF;
2380:
2381:

Line 2378: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Step Status '||l_step_status);

2374:
2375: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2376: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Line ID '||l_resource_txns.line_id);
2377: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Resource Txns Count '||l_resource_tab.COUNT);
2378: gme_debug.put_line(g_pkg_name||'.'||l_api_name||': Step Status '||l_step_status);
2379: END IF;
2380:
2381:
2382: /* If the step is in WIP then we need to adjust the pending transactions */

Line 2492: IF g_debug <= gme_debug.g_log_procedure THEN

2488: END IF; /* IF l_step_status = 2 */
2489: END IF; /* IF l_resource_tab(i).completed_ind = 0 */
2490: END LOOP; /* FOR i IN 1..l_resource_tab.COUNT */
2491:
2492: IF g_debug <= gme_debug.g_log_procedure THEN
2493: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2494: END IF;
2495: EXCEPTION
2496: WHEN fnd_api.g_exc_error THEN

Line 2493: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);

2489: END IF; /* IF l_resource_tab(i).completed_ind = 0 */
2490: END LOOP; /* FOR i IN 1..l_resource_tab.COUNT */
2491:
2492: IF g_debug <= gme_debug.g_log_procedure THEN
2493: gme_debug.put_line ('Exiting api ' || g_pkg_name || '.' || l_api_name);
2494: END IF;
2495: EXCEPTION
2496: WHEN fnd_api.g_exc_error THEN
2497: x_return_status := l_return_status;

Line 2499: IF g_debug <= gme_debug.g_log_unexpected THEN

2495: EXCEPTION
2496: WHEN fnd_api.g_exc_error THEN
2497: x_return_status := l_return_status;
2498: WHEN OTHERS THEN
2499: IF g_debug <= gme_debug.g_log_unexpected THEN
2500: gme_debug.put_line ( 'When others exception in '
2501: || g_pkg_name
2502: || '.'
2503: || l_api_name

Line 2500: gme_debug.put_line ( 'When others exception in '

2496: WHEN fnd_api.g_exc_error THEN
2497: x_return_status := l_return_status;
2498: WHEN OTHERS THEN
2499: IF g_debug <= gme_debug.g_log_unexpected THEN
2500: gme_debug.put_line ( 'When others exception in '
2501: || g_pkg_name
2502: || '.'
2503: || l_api_name
2504: || ' Error is '

Line 2573: IF g_debug <= gme_debug.g_log_procedure THEN

2569: error_in_update_step EXCEPTION;
2570: invalid_value EXCEPTION;
2571: error_in_clear_charges EXCEPTION;
2572: BEGIN
2573: IF g_debug <= gme_debug.g_log_procedure THEN
2574: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
2575: END IF;
2576:
2577: x_return_status := fnd_api.g_ret_sts_success;

Line 2574: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);

2570: invalid_value EXCEPTION;
2571: error_in_clear_charges EXCEPTION;
2572: BEGIN
2573: IF g_debug <= gme_debug.g_log_procedure THEN
2574: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'|| l_api_name);
2575: END IF;
2576:
2577: x_return_status := fnd_api.g_ret_sts_success;
2578: x_batchstep_rec := p_batchstep_rec;

Line 2587: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2583: END IF;
2584:
2585: /* validate the calculation type */
2586: IF p_cal_type NOT IN ('R','P') THEN
2587: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2588: gme_debug.put_line('Invalid value for p_cal_type');
2589: END IF;
2590: RAISE invalid_value;
2591: END IF;

Line 2588: gme_debug.put_line('Invalid value for p_cal_type');

2584:
2585: /* validate the calculation type */
2586: IF p_cal_type NOT IN ('R','P') THEN
2587: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2588: gme_debug.put_line('Invalid value for p_cal_type');
2589: END IF;
2590: RAISE invalid_value;
2591: END IF;
2592:

Line 2607: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2603: END IF;
2604:
2605: l_max_capacity := l_step_rec.max_step_capacity;
2606:
2607: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2608: gme_debug.put_line('DB Step Qty: '||l_step_qty);
2609: gme_debug.put_line('Step Qty: '||l_in_step_qty);
2610: gme_debug.put_line('Max Capacity of the Step: '||l_max_capacity);
2611: END IF;

Line 2608: gme_debug.put_line('DB Step Qty: '||l_step_qty);

2604:
2605: l_max_capacity := l_step_rec.max_step_capacity;
2606:
2607: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2608: gme_debug.put_line('DB Step Qty: '||l_step_qty);
2609: gme_debug.put_line('Step Qty: '||l_in_step_qty);
2610: gme_debug.put_line('Max Capacity of the Step: '||l_max_capacity);
2611: END IF;
2612:

Line 2609: gme_debug.put_line('Step Qty: '||l_in_step_qty);

2605: l_max_capacity := l_step_rec.max_step_capacity;
2606:
2607: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2608: gme_debug.put_line('DB Step Qty: '||l_step_qty);
2609: gme_debug.put_line('Step Qty: '||l_in_step_qty);
2610: gme_debug.put_line('Max Capacity of the Step: '||l_max_capacity);
2611: END IF;
2612:
2613: IF p_cal_type = 'P' THEN

Line 2610: gme_debug.put_line('Max Capacity of the Step: '||l_max_capacity);

2606:
2607: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2608: gme_debug.put_line('DB Step Qty: '||l_step_qty);
2609: gme_debug.put_line('Step Qty: '||l_in_step_qty);
2610: gme_debug.put_line('Max Capacity of the Step: '||l_max_capacity);
2611: END IF;
2612:
2613: IF p_cal_type = 'P' THEN
2614: /* if the cal type P that means step update is triggering recalculate charges*/

Line 2627: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2623: END IF;
2624:
2625: IF l_calc_step_qty THEN
2626:
2627: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2628: gme_debug.put_line('Calculating the Charges');
2629: END IF;
2630:
2631: /*if we come here then there is change in the step qty and we have to recalculate charges

Line 2628: gme_debug.put_line('Calculating the Charges');

2624:
2625: IF l_calc_step_qty THEN
2626:
2627: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2628: gme_debug.put_line('Calculating the Charges');
2629: END IF;
2630:
2631: /*if we come here then there is change in the step qty and we have to recalculate charges
2632: max step capacity uom and all */

Line 2651: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2647: ,x_resource => l_resource
2648: ,x_return_status => l_return_status);
2649:
2650: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2651: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2652: gme_debug.put_line('Error in calculating the max capacity');
2653: END IF;
2654: RAISE error_in_calc_capacity;
2655: END IF;

Line 2652: gme_debug.put_line('Error in calculating the max capacity');

2648: ,x_return_status => l_return_status);
2649:
2650: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2651: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2652: gme_debug.put_line('Error in calculating the max capacity');
2653: END IF;
2654: RAISE error_in_calc_capacity;
2655: END IF;
2656:

Line 2657: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2653: END IF;
2654: RAISE error_in_calc_capacity;
2655: END IF;
2656:
2657: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2658: gme_debug.put_line('Calculated Max Step Qty: '||x_batchstep_rec.max_step_capacity);
2659: gme_debug.put_line('Capacity Resource : '||l_resource);
2660: END IF;
2661:

Line 2658: gme_debug.put_line('Calculated Max Step Qty: '||x_batchstep_rec.max_step_capacity);

2654: RAISE error_in_calc_capacity;
2655: END IF;
2656:
2657: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2658: gme_debug.put_line('Calculated Max Step Qty: '||x_batchstep_rec.max_step_capacity);
2659: gme_debug.put_line('Capacity Resource : '||l_resource);
2660: END IF;
2661:
2662: /*clear the charges */

Line 2659: gme_debug.put_line('Capacity Resource : '||l_resource);

2655: END IF;
2656:
2657: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2658: gme_debug.put_line('Calculated Max Step Qty: '||x_batchstep_rec.max_step_capacity);
2659: gme_debug.put_line('Capacity Resource : '||l_resource);
2660: END IF;
2661:
2662: /*clear the charges */
2663: /*DELETE FROM gme_batch_step_charges

Line 2687: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2683: l_mass_qty := x_batchstep_rec.plan_mass_qty;
2684: l_vol_qty := x_batchstep_rec.plan_volume_qty;
2685: END IF;
2686:
2687: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2688: gme_debug.put_line('Mass Qty: '||l_mass_qty||' Volume Qty: '||l_vol_qty);
2689: END IF;
2690:
2691: /* we have the max capacity and resource here */

Line 2688: gme_debug.put_line('Mass Qty: '||l_mass_qty||' Volume Qty: '||l_vol_qty);

2684: l_vol_qty := x_batchstep_rec.plan_volume_qty;
2685: END IF;
2686:
2687: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2688: gme_debug.put_line('Mass Qty: '||l_mass_qty||' Volume Qty: '||l_vol_qty);
2689: END IF;
2690:
2691: /* we have the max capacity and resource here */
2692: gme_update_step_qty_pvt.calc_charge (

Line 2703: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2699: ,x_charge => l_charge
2700: ,x_return_status => l_return_status);
2701:
2702: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2703: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2704: gme_debug.put_line('error in calc_charge');
2705: END IF;
2706: RAISE error_calc_charge;
2707: END IF;

Line 2704: gme_debug.put_line('error in calc_charge');

2700: ,x_return_status => l_return_status);
2701:
2702: IF l_return_status <> fnd_api.g_ret_sts_success THEN
2703: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2704: gme_debug.put_line('error in calc_charge');
2705: END IF;
2706: RAISE error_calc_charge;
2707: END IF;
2708:

Line 2720: IF g_debug <= gme_debug.g_log_procedure THEN

2716: IF NOT gme_batch_steps_dbl.update_row(p_batch_step => x_batchstep_rec) THEN
2717: RAISE error_in_update_step;
2718: END IF;
2719:
2720: IF g_debug <= gme_debug.g_log_procedure THEN
2721: gme_debug.put_line ('Existing api ' || g_pkg_name || '.'|| l_api_name);
2722: END IF;
2723: EXCEPTION
2724: WHEN error_batchstep_id OR error_in_calc_capacity OR error_in_clear_charges THEN

Line 2721: gme_debug.put_line ('Existing api ' || g_pkg_name || '.'|| l_api_name);

2717: RAISE error_in_update_step;
2718: END IF;
2719:
2720: IF g_debug <= gme_debug.g_log_procedure THEN
2721: gme_debug.put_line ('Existing api ' || g_pkg_name || '.'|| l_api_name);
2722: END IF;
2723: EXCEPTION
2724: WHEN error_batchstep_id OR error_in_calc_capacity OR error_in_clear_charges THEN
2725: x_return_status := fnd_api.g_ret_sts_error;

Line 2727: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

2723: EXCEPTION
2724: WHEN error_batchstep_id OR error_in_calc_capacity OR error_in_clear_charges THEN
2725: x_return_status := fnd_api.g_ret_sts_error;
2726: WHEN OTHERS THEN
2727: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2728: gme_debug.put_line(g_pkg_name || '.'|| l_api_name --> when others '
2729: || SQLERRM);
2730: END IF;
2731: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2728: gme_debug.put_line(g_pkg_name || '.'|| l_api_name --> when others '

2724: WHEN error_batchstep_id OR error_in_calc_capacity OR error_in_clear_charges THEN
2725: x_return_status := fnd_api.g_ret_sts_error;
2726: WHEN OTHERS THEN
2727: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2728: gme_debug.put_line(g_pkg_name || '.'|| l_api_name --> when others '
2729: || SQLERRM);
2730: END IF;
2731: x_return_status := fnd_api.g_ret_sts_unexp_error;
2732: END recalculate_charges;