DBA Data[Home] [Help]

APPS.GME_CREATE_STEP_PVT dependencies on GME_BATCH_STEP_RESOURCES

Line 30: l_gme_batch_step_resources gme_create_step_pvt.gme_batch_step_resources_tab

26: ();
27: l_gme_batch_step_activities gme_create_step_pvt.gme_batch_step_activities_tab
28: := gme_create_step_pvt.gme_batch_step_activities_tab
29: ();
30: l_gme_batch_step_resources gme_create_step_pvt.gme_batch_step_resources_tab
31: := gme_create_step_pvt.gme_batch_step_resources_tab
32: ();
33: l_gme_rsrc_parameters gme_create_step_pvt.gme_process_parameters_tab
34: := gme_create_step_pvt.gme_process_parameters_tab

Line 31: := gme_create_step_pvt.gme_batch_step_resources_tab

27: l_gme_batch_step_activities gme_create_step_pvt.gme_batch_step_activities_tab
28: := gme_create_step_pvt.gme_batch_step_activities_tab
29: ();
30: l_gme_batch_step_resources gme_create_step_pvt.gme_batch_step_resources_tab
31: := gme_create_step_pvt.gme_batch_step_resources_tab
32: ();
33: l_gme_rsrc_parameters gme_create_step_pvt.gme_process_parameters_tab
34: := gme_create_step_pvt.gme_process_parameters_tab
35: ();

Line 61: l_resources gme_batch_step_resources.resources%TYPE;

57: l_charge gme_batch_steps.plan_charges%TYPE;
58: l_uom_class mtl_units_of_measure.uom_class%TYPE;
59: l_batchstep_activity_id gme_batch_step_activities.batchstep_activity_id%TYPE;
60: l_activity_factor gme_batch_step_activities.plan_activity_factor%TYPE;
61: l_resources gme_batch_step_resources.resources%TYPE;
62: l_batchstep_ids_tab l_batchstep_ids;
63: l_total_scale_by_charge PLS_INTEGER;
64: l_count_scale_by_charge PLS_INTEGER;
65: l_return_status VARCHAR2 (1);

Line 133: FROM gme_batch_step_resources

129:
130: CURSOR cur_get_resources (v_batchstep_activity_id NUMBER)
131: IS
132: SELECT batchstep_resource_id, plan_rsrc_usage, plan_rsrc_count
133: FROM gme_batch_step_resources
134: WHERE batchstep_activity_id = v_batchstep_activity_id;
135:
136: CURSOR cur_recipe_id (v_recipe_validity_rule_id NUMBER)
137: IS

Line 167: v_resources gme_batch_step_resources.resources%TYPE

163: AND batchstep_id = v_batchstep_id
164: AND ROWNUM = 1;
165:
166: CURSOR cur_get_resource_dates (
167: v_resources gme_batch_step_resources.resources%TYPE
168: ,v_batch_id NUMBER
169: ,v_batchstep_id NUMBER)
170: IS
171: SELECT plan_start_date, plan_cmplt_date

Line 172: FROM gme_batch_step_resources

168: ,v_batch_id NUMBER
169: ,v_batchstep_id NUMBER)
170: IS
171: SELECT plan_start_date, plan_cmplt_date
172: FROM gme_batch_step_resources
173: WHERE resources = v_resources
174: AND batch_id = v_batch_id
175: AND batchstep_id = v_batchstep_id;
176:

Line 483: -- Create data for GME_BATCH_STEP_RESOURCES and GME_RESOURCE_TXNS...

479: END LOOP; /* WHILE i IS NOT NULL; STEP ACTIVITIES */
480:
481: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
482: gme_debug.put_line ('Completed GME_BATCH_STEP_ACTIVITIES');
483: -- Create data for GME_BATCH_STEP_RESOURCES and GME_RESOURCE_TXNS...
484: gme_debug.put_line ('GME_BATCH_STEP_RESOURCES');
485: END IF;
486:
487: i := p_recipe_rout_resc_tbl.FIRST;

Line 484: gme_debug.put_line ('GME_BATCH_STEP_RESOURCES');

480:
481: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
482: gme_debug.put_line ('Completed GME_BATCH_STEP_ACTIVITIES');
483: -- Create data for GME_BATCH_STEP_RESOURCES and GME_RESOURCE_TXNS...
484: gme_debug.put_line ('GME_BATCH_STEP_RESOURCES');
485: END IF;
486:
487: i := p_recipe_rout_resc_tbl.FIRST;
488: j := 0;

Line 491: l_gme_batch_step_resources.EXTEND;

487: i := p_recipe_rout_resc_tbl.FIRST;
488: j := 0;
489:
490: WHILE i IS NOT NULL LOOP
491: l_gme_batch_step_resources.EXTEND;
492:
493: IF (j = 0) THEN
494: j := l_gme_batch_step_resources.FIRST;
495: ELSE

Line 494: j := l_gme_batch_step_resources.FIRST;

490: WHILE i IS NOT NULL LOOP
491: l_gme_batch_step_resources.EXTEND;
492:
493: IF (j = 0) THEN
494: j := l_gme_batch_step_resources.FIRST;
495: ELSE
496: j := l_gme_batch_step_resources.NEXT (j);
497: END IF;
498:

Line 496: j := l_gme_batch_step_resources.NEXT (j);

492:
493: IF (j = 0) THEN
494: j := l_gme_batch_step_resources.FIRST;
495: ELSE
496: j := l_gme_batch_step_resources.NEXT (j);
497: END IF;
498:
499: l_gme_batch_step_resources (j).batch_id := l_batch_id;
500: l_gme_batch_step_resources (j).organization_id :=

Line 499: l_gme_batch_step_resources (j).batch_id := l_batch_id;

495: ELSE
496: j := l_gme_batch_step_resources.NEXT (j);
497: END IF;
498:
499: l_gme_batch_step_resources (j).batch_id := l_batch_id;
500: l_gme_batch_step_resources (j).organization_id :=
501: p_gme_batch_header_rec.organization_id;
502: l_gme_batch_step_resources (j).resources :=
503: p_recipe_rout_resc_tbl (i).resources;

Line 500: l_gme_batch_step_resources (j).organization_id :=

496: j := l_gme_batch_step_resources.NEXT (j);
497: END IF;
498:
499: l_gme_batch_step_resources (j).batch_id := l_batch_id;
500: l_gme_batch_step_resources (j).organization_id :=
501: p_gme_batch_header_rec.organization_id;
502: l_gme_batch_step_resources (j).resources :=
503: p_recipe_rout_resc_tbl (i).resources;
504: l_gme_batch_step_resources (j).cost_analysis_code :=

Line 502: l_gme_batch_step_resources (j).resources :=

498:
499: l_gme_batch_step_resources (j).batch_id := l_batch_id;
500: l_gme_batch_step_resources (j).organization_id :=
501: p_gme_batch_header_rec.organization_id;
502: l_gme_batch_step_resources (j).resources :=
503: p_recipe_rout_resc_tbl (i).resources;
504: l_gme_batch_step_resources (j).cost_analysis_code :=
505: p_recipe_rout_resc_tbl (i).cost_analysis_code;
506: l_gme_batch_step_resources (j).cost_cmpntcls_id :=

Line 504: l_gme_batch_step_resources (j).cost_analysis_code :=

500: l_gme_batch_step_resources (j).organization_id :=
501: p_gme_batch_header_rec.organization_id;
502: l_gme_batch_step_resources (j).resources :=
503: p_recipe_rout_resc_tbl (i).resources;
504: l_gme_batch_step_resources (j).cost_analysis_code :=
505: p_recipe_rout_resc_tbl (i).cost_analysis_code;
506: l_gme_batch_step_resources (j).cost_cmpntcls_id :=
507: p_recipe_rout_resc_tbl (i).cost_cmpntcls_id;
508: l_gme_batch_step_resources (j).prim_rsrc_ind :=

Line 506: l_gme_batch_step_resources (j).cost_cmpntcls_id :=

502: l_gme_batch_step_resources (j).resources :=
503: p_recipe_rout_resc_tbl (i).resources;
504: l_gme_batch_step_resources (j).cost_analysis_code :=
505: p_recipe_rout_resc_tbl (i).cost_analysis_code;
506: l_gme_batch_step_resources (j).cost_cmpntcls_id :=
507: p_recipe_rout_resc_tbl (i).cost_cmpntcls_id;
508: l_gme_batch_step_resources (j).prim_rsrc_ind :=
509: p_recipe_rout_resc_tbl (i).prim_rsrc_ind;
510: l_gme_batch_step_resources (j).scale_type :=

Line 508: l_gme_batch_step_resources (j).prim_rsrc_ind :=

504: l_gme_batch_step_resources (j).cost_analysis_code :=
505: p_recipe_rout_resc_tbl (i).cost_analysis_code;
506: l_gme_batch_step_resources (j).cost_cmpntcls_id :=
507: p_recipe_rout_resc_tbl (i).cost_cmpntcls_id;
508: l_gme_batch_step_resources (j).prim_rsrc_ind :=
509: p_recipe_rout_resc_tbl (i).prim_rsrc_ind;
510: l_gme_batch_step_resources (j).scale_type :=
511: p_recipe_rout_resc_tbl (i).scale_type;
512: l_gme_batch_step_resources (j).plan_rsrc_count :=

Line 510: l_gme_batch_step_resources (j).scale_type :=

506: l_gme_batch_step_resources (j).cost_cmpntcls_id :=
507: p_recipe_rout_resc_tbl (i).cost_cmpntcls_id;
508: l_gme_batch_step_resources (j).prim_rsrc_ind :=
509: p_recipe_rout_resc_tbl (i).prim_rsrc_ind;
510: l_gme_batch_step_resources (j).scale_type :=
511: p_recipe_rout_resc_tbl (i).scale_type;
512: l_gme_batch_step_resources (j).plan_rsrc_count :=
513: p_recipe_rout_resc_tbl (i).resource_count;
514: l_gme_batch_step_resources (j).plan_rsrc_qty :=

Line 512: l_gme_batch_step_resources (j).plan_rsrc_count :=

508: l_gme_batch_step_resources (j).prim_rsrc_ind :=
509: p_recipe_rout_resc_tbl (i).prim_rsrc_ind;
510: l_gme_batch_step_resources (j).scale_type :=
511: p_recipe_rout_resc_tbl (i).scale_type;
512: l_gme_batch_step_resources (j).plan_rsrc_count :=
513: p_recipe_rout_resc_tbl (i).resource_count;
514: l_gme_batch_step_resources (j).plan_rsrc_qty :=
515: p_recipe_rout_resc_tbl (i).process_qty;
516: l_gme_batch_step_resources (j).original_rsrc_qty :=

Line 514: l_gme_batch_step_resources (j).plan_rsrc_qty :=

510: l_gme_batch_step_resources (j).scale_type :=
511: p_recipe_rout_resc_tbl (i).scale_type;
512: l_gme_batch_step_resources (j).plan_rsrc_count :=
513: p_recipe_rout_resc_tbl (i).resource_count;
514: l_gme_batch_step_resources (j).plan_rsrc_qty :=
515: p_recipe_rout_resc_tbl (i).process_qty;
516: l_gme_batch_step_resources (j).original_rsrc_qty :=
517: p_recipe_rout_resc_tbl (i).process_qty;
518: l_gme_batch_step_resources (j).resource_qty_um :=

Line 516: l_gme_batch_step_resources (j).original_rsrc_qty :=

512: l_gme_batch_step_resources (j).plan_rsrc_count :=
513: p_recipe_rout_resc_tbl (i).resource_count;
514: l_gme_batch_step_resources (j).plan_rsrc_qty :=
515: p_recipe_rout_resc_tbl (i).process_qty;
516: l_gme_batch_step_resources (j).original_rsrc_qty :=
517: p_recipe_rout_resc_tbl (i).process_qty;
518: l_gme_batch_step_resources (j).resource_qty_um :=
519: p_recipe_rout_resc_tbl (i).process_uom;
520: l_gme_batch_step_resources (j).plan_rsrc_usage :=

Line 518: l_gme_batch_step_resources (j).resource_qty_um :=

514: l_gme_batch_step_resources (j).plan_rsrc_qty :=
515: p_recipe_rout_resc_tbl (i).process_qty;
516: l_gme_batch_step_resources (j).original_rsrc_qty :=
517: p_recipe_rout_resc_tbl (i).process_qty;
518: l_gme_batch_step_resources (j).resource_qty_um :=
519: p_recipe_rout_resc_tbl (i).process_uom;
520: l_gme_batch_step_resources (j).plan_rsrc_usage :=
521: p_recipe_rout_resc_tbl (i).resource_usage
522: * p_recipe_rout_resc_tbl (i).resource_count;

Line 520: l_gme_batch_step_resources (j).plan_rsrc_usage :=

516: l_gme_batch_step_resources (j).original_rsrc_qty :=
517: p_recipe_rout_resc_tbl (i).process_qty;
518: l_gme_batch_step_resources (j).resource_qty_um :=
519: p_recipe_rout_resc_tbl (i).process_uom;
520: l_gme_batch_step_resources (j).plan_rsrc_usage :=
521: p_recipe_rout_resc_tbl (i).resource_usage
522: * p_recipe_rout_resc_tbl (i).resource_count;
523: l_gme_batch_step_resources (j).original_rsrc_usage :=
524: p_recipe_rout_resc_tbl (i).resource_usage

Line 523: l_gme_batch_step_resources (j).original_rsrc_usage :=

519: p_recipe_rout_resc_tbl (i).process_uom;
520: l_gme_batch_step_resources (j).plan_rsrc_usage :=
521: p_recipe_rout_resc_tbl (i).resource_usage
522: * p_recipe_rout_resc_tbl (i).resource_count;
523: l_gme_batch_step_resources (j).original_rsrc_usage :=
524: p_recipe_rout_resc_tbl (i).resource_usage
525: * p_recipe_rout_resc_tbl (i).resource_count;
526: l_gme_batch_step_resources (j).usage_um :=
527: p_recipe_rout_resc_tbl (i).usage_um;

Line 526: l_gme_batch_step_resources (j).usage_um :=

522: * p_recipe_rout_resc_tbl (i).resource_count;
523: l_gme_batch_step_resources (j).original_rsrc_usage :=
524: p_recipe_rout_resc_tbl (i).resource_usage
525: * p_recipe_rout_resc_tbl (i).resource_count;
526: l_gme_batch_step_resources (j).usage_um :=
527: p_recipe_rout_resc_tbl (i).usage_um;
528: l_gme_batch_step_resources (j).offset_interval :=
529: p_recipe_rout_resc_tbl (i).offset_interval;
530: l_gme_batch_step_resources (j).capacity_um :=

Line 528: l_gme_batch_step_resources (j).offset_interval :=

524: p_recipe_rout_resc_tbl (i).resource_usage
525: * p_recipe_rout_resc_tbl (i).resource_count;
526: l_gme_batch_step_resources (j).usage_um :=
527: p_recipe_rout_resc_tbl (i).usage_um;
528: l_gme_batch_step_resources (j).offset_interval :=
529: p_recipe_rout_resc_tbl (i).offset_interval;
530: l_gme_batch_step_resources (j).capacity_um :=
531: p_recipe_rout_resc_tbl (i).capacity_uom;
532: l_gme_batch_step_resources (j).min_capacity :=

Line 530: l_gme_batch_step_resources (j).capacity_um :=

526: l_gme_batch_step_resources (j).usage_um :=
527: p_recipe_rout_resc_tbl (i).usage_um;
528: l_gme_batch_step_resources (j).offset_interval :=
529: p_recipe_rout_resc_tbl (i).offset_interval;
530: l_gme_batch_step_resources (j).capacity_um :=
531: p_recipe_rout_resc_tbl (i).capacity_uom;
532: l_gme_batch_step_resources (j).min_capacity :=
533: p_recipe_rout_resc_tbl (i).min_capacity;
534: l_gme_batch_step_resources (j).max_capacity :=

Line 532: l_gme_batch_step_resources (j).min_capacity :=

528: l_gme_batch_step_resources (j).offset_interval :=
529: p_recipe_rout_resc_tbl (i).offset_interval;
530: l_gme_batch_step_resources (j).capacity_um :=
531: p_recipe_rout_resc_tbl (i).capacity_uom;
532: l_gme_batch_step_resources (j).min_capacity :=
533: p_recipe_rout_resc_tbl (i).min_capacity;
534: l_gme_batch_step_resources (j).max_capacity :=
535: p_recipe_rout_resc_tbl (i).max_capacity;
536: l_gme_batch_step_resources (j).capacity_tolerance :=

Line 534: l_gme_batch_step_resources (j).max_capacity :=

530: l_gme_batch_step_resources (j).capacity_um :=
531: p_recipe_rout_resc_tbl (i).capacity_uom;
532: l_gme_batch_step_resources (j).min_capacity :=
533: p_recipe_rout_resc_tbl (i).min_capacity;
534: l_gme_batch_step_resources (j).max_capacity :=
535: p_recipe_rout_resc_tbl (i).max_capacity;
536: l_gme_batch_step_resources (j).capacity_tolerance :=
537: p_recipe_rout_resc_tbl (i).capacity_tolerance;
538: l_gme_batch_step_resources (j).calculate_charges :=

Line 536: l_gme_batch_step_resources (j).capacity_tolerance :=

532: l_gme_batch_step_resources (j).min_capacity :=
533: p_recipe_rout_resc_tbl (i).min_capacity;
534: l_gme_batch_step_resources (j).max_capacity :=
535: p_recipe_rout_resc_tbl (i).max_capacity;
536: l_gme_batch_step_resources (j).capacity_tolerance :=
537: p_recipe_rout_resc_tbl (i).capacity_tolerance;
538: l_gme_batch_step_resources (j).calculate_charges :=
539: p_recipe_rout_resc_tbl (i).capacity_constraint;
540: l_gme_batch_step_resources (j).process_parameter_1 :=

Line 538: l_gme_batch_step_resources (j).calculate_charges :=

534: l_gme_batch_step_resources (j).max_capacity :=
535: p_recipe_rout_resc_tbl (i).max_capacity;
536: l_gme_batch_step_resources (j).capacity_tolerance :=
537: p_recipe_rout_resc_tbl (i).capacity_tolerance;
538: l_gme_batch_step_resources (j).calculate_charges :=
539: p_recipe_rout_resc_tbl (i).capacity_constraint;
540: l_gme_batch_step_resources (j).process_parameter_1 :=
541: p_recipe_rout_resc_tbl (i).process_parameter_1;
542: l_gme_batch_step_resources (j).process_parameter_2 :=

Line 540: l_gme_batch_step_resources (j).process_parameter_1 :=

536: l_gme_batch_step_resources (j).capacity_tolerance :=
537: p_recipe_rout_resc_tbl (i).capacity_tolerance;
538: l_gme_batch_step_resources (j).calculate_charges :=
539: p_recipe_rout_resc_tbl (i).capacity_constraint;
540: l_gme_batch_step_resources (j).process_parameter_1 :=
541: p_recipe_rout_resc_tbl (i).process_parameter_1;
542: l_gme_batch_step_resources (j).process_parameter_2 :=
543: p_recipe_rout_resc_tbl (i).process_parameter_2;
544: l_gme_batch_step_resources (j).process_parameter_3 :=

Line 542: l_gme_batch_step_resources (j).process_parameter_2 :=

538: l_gme_batch_step_resources (j).calculate_charges :=
539: p_recipe_rout_resc_tbl (i).capacity_constraint;
540: l_gme_batch_step_resources (j).process_parameter_1 :=
541: p_recipe_rout_resc_tbl (i).process_parameter_1;
542: l_gme_batch_step_resources (j).process_parameter_2 :=
543: p_recipe_rout_resc_tbl (i).process_parameter_2;
544: l_gme_batch_step_resources (j).process_parameter_3 :=
545: p_recipe_rout_resc_tbl (i).process_parameter_3;
546: l_gme_batch_step_resources (j).process_parameter_4 :=

Line 544: l_gme_batch_step_resources (j).process_parameter_3 :=

540: l_gme_batch_step_resources (j).process_parameter_1 :=
541: p_recipe_rout_resc_tbl (i).process_parameter_1;
542: l_gme_batch_step_resources (j).process_parameter_2 :=
543: p_recipe_rout_resc_tbl (i).process_parameter_2;
544: l_gme_batch_step_resources (j).process_parameter_3 :=
545: p_recipe_rout_resc_tbl (i).process_parameter_3;
546: l_gme_batch_step_resources (j).process_parameter_4 :=
547: p_recipe_rout_resc_tbl (i).process_parameter_4;
548: l_gme_batch_step_resources (j).process_parameter_5 :=

Line 546: l_gme_batch_step_resources (j).process_parameter_4 :=

542: l_gme_batch_step_resources (j).process_parameter_2 :=
543: p_recipe_rout_resc_tbl (i).process_parameter_2;
544: l_gme_batch_step_resources (j).process_parameter_3 :=
545: p_recipe_rout_resc_tbl (i).process_parameter_3;
546: l_gme_batch_step_resources (j).process_parameter_4 :=
547: p_recipe_rout_resc_tbl (i).process_parameter_4;
548: l_gme_batch_step_resources (j).process_parameter_5 :=
549: p_recipe_rout_resc_tbl (i).process_parameter_5;
550:

Line 548: l_gme_batch_step_resources (j).process_parameter_5 :=

544: l_gme_batch_step_resources (j).process_parameter_3 :=
545: p_recipe_rout_resc_tbl (i).process_parameter_3;
546: l_gme_batch_step_resources (j).process_parameter_4 :=
547: p_recipe_rout_resc_tbl (i).process_parameter_4;
548: l_gme_batch_step_resources (j).process_parameter_5 :=
549: p_recipe_rout_resc_tbl (i).process_parameter_5;
550:
551: IF l_gme_batch_step_resources (j).scale_type <> 0 THEN
552: IF l_gme_batch_step_resources (j).plan_rsrc_qty = 0

Line 551: IF l_gme_batch_step_resources (j).scale_type <> 0 THEN

547: p_recipe_rout_resc_tbl (i).process_parameter_4;
548: l_gme_batch_step_resources (j).process_parameter_5 :=
549: p_recipe_rout_resc_tbl (i).process_parameter_5;
550:
551: IF l_gme_batch_step_resources (j).scale_type <> 0 THEN
552: IF l_gme_batch_step_resources (j).plan_rsrc_qty = 0
553: AND l_gme_batch_step_resources (j).plan_rsrc_usage <> 0 THEN
554: gme_common_pvt.log_message
555: ('gme_rsrc_qty_usage_oprn'

Line 552: IF l_gme_batch_step_resources (j).plan_rsrc_qty = 0

548: l_gme_batch_step_resources (j).process_parameter_5 :=
549: p_recipe_rout_resc_tbl (i).process_parameter_5;
550:
551: IF l_gme_batch_step_resources (j).scale_type <> 0 THEN
552: IF l_gme_batch_step_resources (j).plan_rsrc_qty = 0
553: AND l_gme_batch_step_resources (j).plan_rsrc_usage <> 0 THEN
554: gme_common_pvt.log_message
555: ('gme_rsrc_qty_usage_oprn'
556: ,'RESOURCE'

Line 553: AND l_gme_batch_step_resources (j).plan_rsrc_usage <> 0 THEN

549: p_recipe_rout_resc_tbl (i).process_parameter_5;
550:
551: IF l_gme_batch_step_resources (j).scale_type <> 0 THEN
552: IF l_gme_batch_step_resources (j).plan_rsrc_qty = 0
553: AND l_gme_batch_step_resources (j).plan_rsrc_usage <> 0 THEN
554: gme_common_pvt.log_message
555: ('gme_rsrc_qty_usage_oprn'
556: ,'RESOURCE'
557: ,p_recipe_rout_resc_tbl (i).resources

Line 570: || l_gme_batch_step_resources (j).plan_rsrc_qty);

566: END IF;
567:
568: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
569: gme_debug.put_line ( ' plan_rsrc_qty '
570: || l_gme_batch_step_resources (j).plan_rsrc_qty);
571: END IF;
572:
573: -- Link this resource to the batch step it belongs to...
574: IF (p_recipe_rout_resc_tbl (i).routingstep_id IS NOT NULL) THEN

Line 578: INTO l_gme_batch_step_resources (j).batchstep_id

574: IF (p_recipe_rout_resc_tbl (i).routingstep_id IS NOT NULL) THEN
575: SELECT batchstep_id
576: ,plan_start_date
577: ,plan_cmplt_date
578: INTO l_gme_batch_step_resources (j).batchstep_id
579: ,l_gme_batch_step_resources (j).plan_start_date
580: ,l_gme_batch_step_resources (j).plan_cmplt_date
581: FROM gme_batch_steps
582: WHERE batch_id = l_batch_id

Line 579: ,l_gme_batch_step_resources (j).plan_start_date

575: SELECT batchstep_id
576: ,plan_start_date
577: ,plan_cmplt_date
578: INTO l_gme_batch_step_resources (j).batchstep_id
579: ,l_gme_batch_step_resources (j).plan_start_date
580: ,l_gme_batch_step_resources (j).plan_cmplt_date
581: FROM gme_batch_steps
582: WHERE batch_id = l_batch_id
583: AND routingstep_id = p_recipe_rout_resc_tbl (i).routingstep_id;

Line 580: ,l_gme_batch_step_resources (j).plan_cmplt_date

576: ,plan_start_date
577: ,plan_cmplt_date
578: INTO l_gme_batch_step_resources (j).batchstep_id
579: ,l_gme_batch_step_resources (j).plan_start_date
580: ,l_gme_batch_step_resources (j).plan_cmplt_date
581: FROM gme_batch_steps
582: WHERE batch_id = l_batch_id
583: AND routingstep_id = p_recipe_rout_resc_tbl (i).routingstep_id;
584: ELSE

Line 588: INTO l_gme_batch_step_resources (j).batchstep_id

584: ELSE
585: SELECT batchstep_id
586: ,plan_start_date
587: ,plan_cmplt_date
588: INTO l_gme_batch_step_resources (j).batchstep_id
589: ,l_gme_batch_step_resources (j).plan_start_date
590: ,l_gme_batch_step_resources (j).plan_cmplt_date
591: FROM gme_batch_steps
592: WHERE batch_id = l_batch_id

Line 589: ,l_gme_batch_step_resources (j).plan_start_date

585: SELECT batchstep_id
586: ,plan_start_date
587: ,plan_cmplt_date
588: INTO l_gme_batch_step_resources (j).batchstep_id
589: ,l_gme_batch_step_resources (j).plan_start_date
590: ,l_gme_batch_step_resources (j).plan_cmplt_date
591: FROM gme_batch_steps
592: WHERE batch_id = l_batch_id
593: AND batchstep_id = l_last_batchstep_id;

Line 590: ,l_gme_batch_step_resources (j).plan_cmplt_date

586: ,plan_start_date
587: ,plan_cmplt_date
588: INTO l_gme_batch_step_resources (j).batchstep_id
589: ,l_gme_batch_step_resources (j).plan_start_date
590: ,l_gme_batch_step_resources (j).plan_cmplt_date
591: FROM gme_batch_steps
592: WHERE batch_id = l_batch_id
593: AND batchstep_id = l_last_batchstep_id;
594: END IF;

Line 601: INTO l_gme_batch_step_resources (j).batchstep_activity_id

597: -- Note: To go from resources upto activity, you key on batch_id, batchstep_id and
598: -- oprn_line_id -> because oprn can be repeated many times in different steps so, if you have
599: -- batchstep_id and then oprn_line_id, you will get a unique row from gme_batch_step_activities...
600: SELECT batchstep_activity_id
601: INTO l_gme_batch_step_resources (j).batchstep_activity_id
602: FROM gme_batch_step_activities
603: WHERE batch_id = l_batch_id
604: AND batchstep_id = l_gme_batch_step_resources (j).batchstep_id
605: AND oprn_line_id = p_recipe_rout_resc_tbl (i).oprn_line_id;

Line 604: AND batchstep_id = l_gme_batch_step_resources (j).batchstep_id

600: SELECT batchstep_activity_id
601: INTO l_gme_batch_step_resources (j).batchstep_activity_id
602: FROM gme_batch_step_activities
603: WHERE batch_id = l_batch_id
604: AND batchstep_id = l_gme_batch_step_resources (j).batchstep_id
605: AND oprn_line_id = p_recipe_rout_resc_tbl (i).oprn_line_id;
606:
607: -- Insert text if copy text is on and there is text on the resource passed in...
608: -- Note... this should also work for insert step because an operation can have text

Line 614: 'gme_batch_step_resources' || '|' || TO_CHAR (l_batch_id)

610: IF (p_recipe_rout_resc_tbl (i).text_code IS NOT NULL)
611: AND (gme_common_pvt.g_copy_routing_text_ind = '1') THEN
612: l_gmd_text_code := p_recipe_rout_resc_tbl (i).text_code;
613: l_text_string :=
614: 'gme_batch_step_resources' || '|' || TO_CHAR (l_batch_id)
615: || '|';
616: l_text_string :=
617: l_text_string
618: || TO_CHAR (l_gme_batch_step_resources (j).batchstep_activity_id)

Line 618: || TO_CHAR (l_gme_batch_step_resources (j).batchstep_activity_id)

614: 'gme_batch_step_resources' || '|' || TO_CHAR (l_batch_id)
615: || '|';
616: l_text_string :=
617: l_text_string
618: || TO_CHAR (l_gme_batch_step_resources (j).batchstep_activity_id)
619: || '|';
620: l_text_string :=
621: l_text_string || p_recipe_rout_resc_tbl (i).resources;
622:

Line 638: l_gme_batch_step_resources (j).text_code := l_gme_text_code;

634:
635: IF (l_return_status <> x_return_status) THEN
636: RAISE error_create_text;
637: ELSE
638: l_gme_batch_step_resources (j).text_code := l_gme_text_code;
639: END IF;
640: END IF;
641:
642: --FPBug#4395561 Start

Line 643: /* call create flex procedure to insert the default values of the GME_BATCH_STEP_RESOURCES_FLEX

639: END IF;
640: END IF;
641:
642: --FPBug#4395561 Start
643: /* call create flex procedure to insert the default values of the GME_BATCH_STEP_RESOURCES_FLEX
644: DFF's segments if they are enabled */
645: l_return_status:=NULL;
646: gme_validate_flex_fld_pvt.create_flex_step_resources (
647: l_gme_batch_step_resources (j),

Line 647: l_gme_batch_step_resources (j),

643: /* call create flex procedure to insert the default values of the GME_BATCH_STEP_RESOURCES_FLEX
644: DFF's segments if they are enabled */
645: l_return_status:=NULL;
646: gme_validate_flex_fld_pvt.create_flex_step_resources (
647: l_gme_batch_step_resources (j),
648: l_gme_batch_step_resources (j),
649: l_return_status);
650: IF l_return_status <> FND_API.g_ret_sts_success THEN
651: RAISE create_flex_failure;

Line 648: l_gme_batch_step_resources (j),

644: DFF's segments if they are enabled */
645: l_return_status:=NULL;
646: gme_validate_flex_fld_pvt.create_flex_step_resources (
647: l_gme_batch_step_resources (j),
648: l_gme_batch_step_resources (j),
649: l_return_status);
650: IF l_return_status <> FND_API.g_ret_sts_success THEN
651: RAISE create_flex_failure;
652: END IF;

Line 655: IF (gme_batch_step_resources_dbl.insert_row

651: RAISE create_flex_failure;
652: END IF;
653: --FPBug#4395561 End
654:
655: IF (gme_batch_step_resources_dbl.insert_row
656: (p_batch_step_resources => l_gme_batch_step_resources
657: (j)
658: ,x_batch_step_resources => l_gme_batch_step_resources
659: (j) ) ) THEN

Line 656: (p_batch_step_resources => l_gme_batch_step_resources

652: END IF;
653: --FPBug#4395561 End
654:
655: IF (gme_batch_step_resources_dbl.insert_row
656: (p_batch_step_resources => l_gme_batch_step_resources
657: (j)
658: ,x_batch_step_resources => l_gme_batch_step_resources
659: (j) ) ) THEN
660: NULL;

Line 658: ,x_batch_step_resources => l_gme_batch_step_resources

654:
655: IF (gme_batch_step_resources_dbl.insert_row
656: (p_batch_step_resources => l_gme_batch_step_resources
657: (j)
658: ,x_batch_step_resources => l_gme_batch_step_resources
659: (j) ) ) THEN
660: NULL;
661: ELSE
662: RAISE error_insert_b_step_res;

Line 668: IF l_gme_batch_step_resources.COUNT > 0 THEN

664:
665: i := p_recipe_rout_resc_tbl.NEXT (i);
666: END LOOP; /* WHILE i IS NOT NULL; */
667:
668: IF l_gme_batch_step_resources.COUNT > 0 THEN
669: gme_batch_step_chg_pvt.set_sequence_dependent_id (l_batch_id);
670: END IF;
671:
672: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

Line 673: gme_debug.put_line ('Completed GME_BATCH_STEP_RESOURCES');

669: gme_batch_step_chg_pvt.set_sequence_dependent_id (l_batch_id);
670: END IF;
671:
672: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
673: gme_debug.put_line ('Completed GME_BATCH_STEP_RESOURCES');
674: gme_debug.put_line ('GME_step_process_parameters');
675: END IF;
676:
677: FOR m IN 1 .. p_resc_parameters_tbl.COUNT LOOP

Line 719: FROM gme_batch_step_resources

715:
716: -- Link this process parameters to the resources it belongs to..
717: SELECT batchstep_resource_id
718: INTO l_gme_rsrc_parameters (m).batchstep_resource_id
719: FROM gme_batch_step_resources
720: WHERE batch_id = l_batch_id
721: AND batchstep_id = l_gme_rsrc_parameters (m).batchstep_id
722: AND batchstep_activity_id =
723: l_gme_rsrc_parameters (m).batchstep_activity_id

Line 1108: UPDATE gme_batch_step_resources

1104: FETCH cur_get_batch_steps
1105: INTO l_batchstep_id, l_qty, l_plan_charges;
1106:
1107: WHILE cur_get_batch_steps%FOUND LOOP
1108: UPDATE gme_batch_step_resources
1109: SET plan_rsrc_usage =
1110: ROUND ( (l_qty / plan_rsrc_qty * plan_rsrc_usage), 32)
1111: WHERE batchstep_id = l_batchstep_id
1112: AND scale_type = 1

Line 1137: UPDATE gme_batch_step_resources

1133: FROM gme_batch_steps
1134: WHERE batchstep_id = l_last_batchstep_id;
1135:
1136: -- Round the plan_rsrc_qty to 32 decimal places.
1137: UPDATE gme_batch_step_resources
1138: SET plan_rsrc_qty = ROUND (l_qty, 32)
1139: WHERE batchstep_id = l_last_batchstep_id
1140: AND scale_type <>
1141: 0

Line 1151: UPDATE gme_batch_step_resources

1147: gme_debug.put_line (' plan charges ' || TO_CHAR (l_plan_charges) );
1148: END IF;
1149:
1150: IF l_plan_charges IS NOT NULL THEN
1151: UPDATE gme_batch_step_resources
1152: SET plan_rsrc_usage =
1153: ROUND (plan_rsrc_usage * l_plan_charges, 32)
1154: WHERE batchstep_id = l_last_batchstep_id AND scale_type = 2;
1155: -- scale_type = 2 denotes scale by charge...

Line 1163: FROM gme_batch_step_resources

1159: -- Because of the limitation in forms taking only 1 message at a time (?), we will put one message if this occurs,
1160: -- NOT one message per occurrence.
1161: SELECT COUNT (1)
1162: INTO l_count_scale_by_charge
1163: FROM gme_batch_step_resources
1164: WHERE batchstep_id = l_last_batchstep_id AND scale_type = 2;
1165: -- scale_type = 2 denotes scale by charge...
1166: END IF;
1167:

Line 1182: UPDATE gme_batch_step_resources

1178: FETCH cur_get_step_activities
1179: INTO l_batchstep_activity_id, l_activity_factor;
1180:
1181: WHILE cur_get_step_activities%FOUND LOOP
1182: UPDATE gme_batch_step_resources
1183: SET plan_rsrc_usage =
1184: ROUND (plan_rsrc_usage * l_activity_factor, 32)
1185: ,plan_rsrc_qty =
1186: ROUND (plan_rsrc_qty * l_activity_factor, 32)

Line 1216: UPDATE gme_batch_step_resources

1212: FETCH cur_get_batch_steps
1213: INTO l_batchstep_id, l_qty, l_plan_charges;
1214:
1215: WHILE cur_get_batch_steps%FOUND LOOP
1216: UPDATE gme_batch_step_resources
1217: SET plan_rsrc_qty = ROUND (l_qty, 32)
1218: WHERE batchstep_id = l_batchstep_id
1219: AND scale_type <> 0
1220: AND plan_rsrc_qty <> 0;

Line 1229: UPDATE gme_batch_step_resources

1225: || TO_CHAR (l_plan_charges) );
1226: END IF;
1227:
1228: IF l_plan_charges IS NOT NULL THEN
1229: UPDATE gme_batch_step_resources
1230: SET plan_rsrc_usage =
1231: ROUND (plan_rsrc_usage * l_plan_charges, 32)
1232: WHERE batchstep_id = l_batchstep_id AND scale_type = 2;
1233: -- scale_type = 2 denotes scale by charge...

Line 1241: FROM gme_batch_step_resources

1237: -- Because of the limitation in forms taking only 1 message at a time (?), we will put one message if this occurs,
1238: -- NOT one message per occurrence.
1239: SELECT COUNT (1)
1240: INTO l_count_scale_by_charge
1241: FROM gme_batch_step_resources
1242: WHERE batchstep_id = l_batchstep_id AND scale_type = 2;
1243: -- scale_type = 2 denotes scale by charge...
1244: END IF;
1245:

Line 1267: UPDATE gme_batch_step_resources

1263: FETCH cur_get_activities
1264: INTO l_batchstep_activity_id, l_activity_factor;
1265:
1266: WHILE cur_get_activities%FOUND LOOP
1267: UPDATE gme_batch_step_resources
1268: SET plan_rsrc_usage =
1269: ROUND (plan_rsrc_usage * l_activity_factor, 32)
1270: ,plan_rsrc_qty =
1271: ROUND (plan_rsrc_qty * l_activity_factor, 32)

Line 2074: x_rsrc_row gme_batch_step_resources%ROWTYPE;

2070: l_step_duration_tab step_duration_tab;
2071: x_act_tab activities_tab;
2072: x_act_row gme_batch_step_activities%ROWTYPE;
2073: x_rsrc_tab resources_tab;
2074: x_rsrc_row gme_batch_step_resources%ROWTYPE;
2075: x_rsrc_txns_tab rsrc_txns_tab;
2076: x_step_row gme_batch_steps%ROWTYPE;
2077: x_max_act_date DATE;
2078: x_max_rsrc_date DATE;

Line 2089: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;

2085: x_step_start_date DATE;
2086: x_step_no gme_batch_steps.batchstep_no%TYPE;
2087: max_cmplt_date DATE;
2088: min_start_date DATE;
2089: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;
2090: l_batchstep_activity_id NUMBER;
2091: l_batchstep_id NUMBER;
2092: l_cal_count NUMBER;
2093: l_contig_period_tbl gmp_calendar_api.contig_period_tbl;

Line 2107: FROM gme_batch_step_resources

2103:
2104: CURSOR cur_get_act_rsrcs (v_batchstep_activity_id NUMBER)
2105: IS
2106: SELECT *
2107: FROM gme_batch_step_resources
2108: WHERE batchstep_activity_id = v_batchstep_activity_id;
2109:
2110: CURSOR cur_get_step_id (v_step NUMBER, v_batch_id NUMBER)
2111: IS

Line 2712: UPDATE gme_batch_step_resources

2708: x_max_act_date := x_act_tab (j).plan_cmplt_date;
2709: END IF;
2710:
2711: FOR k IN x_rsrc_tab.FIRST .. x_rsrc_tab.LAST LOOP
2712: UPDATE gme_batch_step_resources
2713: SET plan_start_date = x_rsrc_tab (k).plan_start_date
2714: ,plan_cmplt_date = x_rsrc_tab (k).plan_cmplt_date
2715: WHERE batchstep_resource_id =
2716: x_rsrc_tab (k).batchstep_resource_id;

Line 3592: p_plan_rsrc_usage IN gme_batch_step_resources.plan_rsrc_usage%TYPE

3588: x_return_status := fnd_api.g_ret_sts_unexp_error;
3589: END copy_and_create_text;
3590:
3591: PROCEDURE get_usage_in_hours (
3592: p_plan_rsrc_usage IN gme_batch_step_resources.plan_rsrc_usage%TYPE
3593: ,p_usage_um IN gme_batch_step_resources.usage_um%TYPE
3594: ,x_usage_hrs OUT NOCOPY gme_batch_step_resources.plan_rsrc_usage%TYPE
3595: ,x_return_status OUT NOCOPY VARCHAR2)
3596: IS

Line 3593: ,p_usage_um IN gme_batch_step_resources.usage_um%TYPE

3589: END copy_and_create_text;
3590:
3591: PROCEDURE get_usage_in_hours (
3592: p_plan_rsrc_usage IN gme_batch_step_resources.plan_rsrc_usage%TYPE
3593: ,p_usage_um IN gme_batch_step_resources.usage_um%TYPE
3594: ,x_usage_hrs OUT NOCOPY gme_batch_step_resources.plan_rsrc_usage%TYPE
3595: ,x_return_status OUT NOCOPY VARCHAR2)
3596: IS
3597: l_hour_um mtl_units_of_measure.uom_code%TYPE;

Line 3594: ,x_usage_hrs OUT NOCOPY gme_batch_step_resources.plan_rsrc_usage%TYPE

3590:
3591: PROCEDURE get_usage_in_hours (
3592: p_plan_rsrc_usage IN gme_batch_step_resources.plan_rsrc_usage%TYPE
3593: ,p_usage_um IN gme_batch_step_resources.usage_um%TYPE
3594: ,x_usage_hrs OUT NOCOPY gme_batch_step_resources.plan_rsrc_usage%TYPE
3595: ,x_return_status OUT NOCOPY VARCHAR2)
3596: IS
3597: l_hour_um mtl_units_of_measure.uom_code%TYPE;
3598: l_hour_uom_class mtl_units_of_measure.uom_class%TYPE;

Line 3702: FROM gme_batch_step_resources

3698: ,v_activity_id NUMBER)
3699: IS
3700: SELECT batchstep_resource_id, offset_interval, plan_rsrc_usage
3701: ,plan_rsrc_count, usage_um
3702: FROM gme_batch_step_resources
3703: WHERE batchstep_id = v_step_id
3704: AND batch_id = v_batch_id
3705: AND batchstep_activity_id = v_activity_id;
3706:

Line 3712: x_usage_hour gme_batch_step_resources.plan_rsrc_usage%TYPE;

3708: l_rsrc_duration NUMBER;
3709: l_act_duration NUMBER;
3710: l_max_rsrc_duration NUMBER;
3711: l_max_act_duration NUMBER;
3712: x_usage_hour gme_batch_step_resources.plan_rsrc_usage%TYPE;
3713: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;
3714: l_return_status VARCHAR2 (1);
3715: missing_profile_option EXCEPTION;
3716: l_api_name CONSTANT VARCHAR2 (30) := 'get_max_duration';

Line 3713: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;

3709: l_act_duration NUMBER;
3710: l_max_rsrc_duration NUMBER;
3711: l_max_act_duration NUMBER;
3712: x_usage_hour gme_batch_step_resources.plan_rsrc_usage%TYPE;
3713: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;
3714: l_return_status VARCHAR2 (1);
3715: missing_profile_option EXCEPTION;
3716: l_api_name CONSTANT VARCHAR2 (30) := 'get_max_duration';
3717: BEGIN

Line 3798: ,p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE

3794:
3795: PROCEDURE insert_resource_txns (
3796: p_gme_batch_header_rec IN gme_batch_header%ROWTYPE
3797: ,p_doc_type IN VARCHAR2
3798: ,p_batch_step_resources_rec IN gme_batch_step_resources%ROWTYPE
3799: ,p_trans_count IN NUMBER
3800: ,x_return_status OUT NOCOPY VARCHAR2)
3801: IS
3802: l_gme_resource_txns gme_resource_txns%ROWTYPE;