DBA Data[Home] [Help]

APPS.GME_CREATE_STEP_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 78

      error_insert_batch_step       EXCEPTION;
Line: 79

      error_insert_b_step_act       EXCEPTION;
Line: 80

      error_insert_b_step_res       EXCEPTION;
Line: 81

      error_insert_b_res_param      EXCEPTION;
Line: 82

      error_insert_res_txns         EXCEPTION;
Line: 83

      error_insert_b_step_items     EXCEPTION;
Line: 84

      error_insert_b_step_depend    EXCEPTION;
Line: 103

         SELECT batchstep_id, plan_step_qty, plan_charges
           FROM gme_batch_steps
          WHERE batch_id = v_batch_id
            AND (   v_count <> 1
                 OR (    v_count = 1
                     AND batchstep_id = (SELECT MAX (batchstep_id)
                                           FROM gme_batch_steps
                                          WHERE batch_id = v_batch_id) ) );
Line: 114

         SELECT batchstep_activity_id, plan_activity_factor
           FROM gme_batch_step_activities
          WHERE batch_id = v_batch_id;
Line: 122

         SELECT batchstep_activity_id, plan_activity_factor
           FROM gme_batch_step_activities
          WHERE batchstep_id = x_step_id AND batch_id = x_batch_id;
Line: 128

         SELECT batchstep_resource_id, plan_rsrc_usage, plan_rsrc_count
           FROM gme_batch_step_resources
          WHERE batchstep_activity_id = v_batchstep_activity_id;
Line: 134

         SELECT recipe_id
           FROM gmd_recipe_validity_rules
          WHERE recipe_validity_rule_id = v_recipe_validity_rule_id;
Line: 142

         SELECT plan_start_date, plan_cmplt_date
           FROM gme_batch_steps
          WHERE batch_id = v_batch_id AND batchstep_id = v_batchstep_id;
Line: 150

         SELECT plan_cmplt_date
           FROM gme_batch_steps
          WHERE batch_id = v_batch_id AND batchstep_id = v_batchstep_id;
Line: 156

         SELECT resources
           FROM gme_batch_step_charges
          WHERE batch_id = v_batch_id
            AND batchstep_id = v_batchstep_id
            AND ROWNUM = 1;
Line: 167

         SELECT plan_start_date, plan_cmplt_date
           FROM gme_batch_step_resources
          WHERE resources = v_resources
            AND batch_id = v_batch_id
            AND batchstep_id = v_batchstep_id;
Line: 175

         SELECT batchstep_id
           FROM gme_batch_steps
          WHERE batch_id = v_batch_id;
Line: 210

      l_step_charge_rsrc_tab.DELETE ();
Line: 233

         l_gme_batch_steps (j).delete_mark := 0;
Line: 311

         /* call create flex procedure to insert the default values of the BATCH_STEPS_DTL_FLEX
             DFF's segments if they are enabled */
         l_return_status := NULL;
Line: 323

         IF (gme_batch_steps_dbl.insert_row
                                       (p_batch_step      => l_gme_batch_steps
                                                                           (j)
                                       ,x_batch_step      => l_gme_batch_steps
                                                                           (j) ) =
                                                                          TRUE) THEN
            -- Keep the last batchstep_id produced... this is required for single step insert... since we don't
            -- have the routingstep_id, we need this when linking the activities and resources back to the step.
            l_last_batchstep_id := l_gme_batch_steps (j).batchstep_id;
Line: 343

            RAISE error_insert_batch_step;
Line: 379

         l_gme_batch_step_activities (j).delete_mark := 0;
Line: 387

            SELECT batchstep_id
                  ,plan_start_date
                  ,plan_cmplt_date
              INTO l_gme_batch_step_activities (j).batchstep_id
                  ,l_gme_batch_step_activities (j).plan_start_date
                  ,l_gme_batch_step_activities (j).plan_cmplt_date
              FROM gme_batch_steps
             WHERE batch_id = l_batch_id
               AND routingstep_id = p_recipe_rout_act_tbl (i).routingstep_id;
Line: 397

            SELECT batchstep_id
                  ,plan_start_date
                  ,plan_cmplt_date
              INTO l_gme_batch_step_activities (j).batchstep_id
                  ,l_gme_batch_step_activities (j).plan_start_date
                  ,l_gme_batch_step_activities (j).plan_cmplt_date
              FROM gme_batch_steps
             WHERE batch_id = l_batch_id
                   AND batchstep_id = l_last_batchstep_id;
Line: 444

         /* call create flex procedure to insert the default values of the GME_BATCH_STEP_ACTIVITIES_FLEX
            DFF's segments if they are enabled */
         l_return_status:=NULL;
Line: 456

         IF (gme_batch_step_activities_dbl.insert_row
                  (p_batch_step_activities      => l_gme_batch_step_activities
                                                                           (j)
                  ,x_batch_step_activities      => l_gme_batch_step_activities
                                                                           (j) ) ) THEN
            NULL;
Line: 463

            RAISE error_insert_b_step_act;
Line: 563

            SELECT batchstep_id
                  ,plan_start_date
                  ,plan_cmplt_date
              INTO l_gme_batch_step_resources (j).batchstep_id
                  ,l_gme_batch_step_resources (j).plan_start_date
                  ,l_gme_batch_step_resources (j).plan_cmplt_date
              FROM gme_batch_steps
             WHERE batch_id = l_batch_id
               AND routingstep_id = p_recipe_rout_resc_tbl (i).routingstep_id;
Line: 573

            SELECT batchstep_id
                  ,plan_start_date
                  ,plan_cmplt_date
              INTO l_gme_batch_step_resources (j).batchstep_id
                  ,l_gme_batch_step_resources (j).plan_start_date
                  ,l_gme_batch_step_resources (j).plan_cmplt_date
              FROM gme_batch_steps
             WHERE batch_id = l_batch_id
                   AND batchstep_id = l_last_batchstep_id;
Line: 588

         SELECT batchstep_activity_id
           INTO l_gme_batch_step_resources (j).batchstep_activity_id
           FROM gme_batch_step_activities
          WHERE batch_id = l_batch_id
            AND batchstep_id = l_gme_batch_step_resources (j).batchstep_id
            AND oprn_line_id = p_recipe_rout_resc_tbl (i).oprn_line_id;
Line: 631

         /* call create flex procedure to insert the default values of the GME_BATCH_STEP_RESOURCES_FLEX
            DFF's segments if they are enabled */
         l_return_status:=NULL;
Line: 643

         IF (gme_batch_step_resources_dbl.insert_row
                    (p_batch_step_resources      => l_gme_batch_step_resources
                                                                           (j)
                    ,x_batch_step_resources      => l_gme_batch_step_resources
                                                                           (j) ) ) THEN
            NULL;
Line: 650

            RAISE error_insert_b_step_res;
Line: 683

            SELECT batchstep_id
              INTO l_gme_rsrc_parameters (m).batchstep_id
              FROM gme_batch_steps
             WHERE batch_id = l_batch_id
               AND routingstep_id = p_resc_parameters_tbl (m).routingstep_id;
Line: 689

            SELECT batchstep_id
              INTO l_gme_rsrc_parameters (m).batchstep_id
              FROM gme_batch_steps
             WHERE batch_id = l_batch_id
                   AND batchstep_id = l_last_batchstep_id;
Line: 697

         SELECT batchstep_activity_id
           INTO l_gme_rsrc_parameters (m).batchstep_activity_id
           FROM gme_batch_step_activities
          WHERE batch_id = l_batch_id
            AND batchstep_id = l_gme_rsrc_parameters (m).batchstep_id
            AND oprn_line_id = p_resc_parameters_tbl (m).oprn_line_id;
Line: 705

         SELECT batchstep_resource_id
           INTO l_gme_rsrc_parameters (m).batchstep_resource_id
           FROM gme_batch_step_resources
          WHERE batch_id = l_batch_id
            AND batchstep_id = l_gme_rsrc_parameters (m).batchstep_id
            AND batchstep_activity_id =
                               l_gme_rsrc_parameters (m).batchstep_activity_id
            AND resources = p_resc_parameters_tbl (m).resources;
Line: 715

         /* call create flex procedure to insert the default values of the GME_BATCH_PROC_PARAM_FLEX
            DFF's segments if they are enabled */
          l_return_status:=NULL;
Line: 728

         IF NOT (gme_process_parameters_dbl.insert_row
                           (p_process_parameters      => l_gme_rsrc_parameters
                                                                           (m)
                           ,x_process_parameters      => l_gme_rsrc_parameters
                                                                           (m) ) ) THEN
            RAISE error_insert_b_res_param;
Line: 756

         SELECT material_detail_id
           INTO l_gme_batch_step_items (j).material_detail_id
           FROM gme_material_details
          WHERE batch_id = l_batch_id
            AND formulaline_id = p_recipe_rout_matl_tbl (i).formulaline_id;
Line: 763

            SELECT batchstep_id
              INTO l_gme_batch_step_items (j).batchstep_id
              FROM gme_batch_steps
             WHERE batch_id = l_batch_id
               AND routingstep_id = p_recipe_rout_matl_tbl (i).routingstep_id;
Line: 812

         IF (gme_batch_step_items_dbl.insert_row
                            (p_batch_step_items      => l_gme_batch_step_items
                                                                           (j)
                            ,x_batch_step_items      => l_gme_batch_step_items
                                                                           (j) ) ) THEN
            NULL;
Line: 819

            RAISE error_insert_b_step_items;
Line: 845

         SELECT batchstep_id
           INTO l_gme_batch_step_dep (j).batchstep_id
           FROM gme_batch_steps
          WHERE batch_id = l_batch_id
            AND batchstep_no = p_routing_depd_tbl (i).routingstep_no;
Line: 851

         SELECT batchstep_id
           INTO l_gme_batch_step_dep (j).dep_step_id
           FROM gme_batch_steps
          WHERE batch_id = l_batch_id
            AND batchstep_no = p_routing_depd_tbl (i).dep_routingstep_no;
Line: 875

         IF (gme_batch_step_depend_dbl.insert_row (l_gme_batch_step_dep (j)
                                                  ,l_gme_batch_step_dep (j) ) ) THEN
            NULL;
Line: 879

            RAISE error_insert_b_step_depend;
Line: 934

            UPDATE gme_batch_steps
               SET plan_step_qty = ROUND (l_step_tbl (i).step_qty, 32)
                  ,plan_mass_qty = ROUND (l_step_tbl (i).step_mass_qty, 32)
                  ,mass_ref_um = l_step_tbl (i).step_mass_uom
                  ,plan_volume_qty = ROUND (l_step_tbl (i).step_vol_qty, 32)
                  ,volume_ref_um = l_step_tbl (i).step_vol_uom
             WHERE batch_id = l_batch_id
               AND batchstep_no = l_step_tbl (i).step_no;
Line: 951

         SELECT uom_class, conversion_rate
           INTO l_uom_class, l_std_factor
           FROM mtl_uom_conversions
          WHERE uom_code = p_recipe_rout_step_tbl (1).process_qty_uom
	    AND inventory_item_id = 0;
Line: 976

                || 'resources name passed in case of single step insertion is'
                || p_recipe_rout_step_tbl (1).resources);
Line: 986

         gme_update_step_qty_pvt.calc_charge
                          (p_step_id            => l_last_batchstep_id
                          ,p_resources          => p_recipe_rout_step_tbl (1).resources
                          ,p_mass_qty           => l_mass_qty
                          ,p_vol_qty            => l_volume_qty
                          ,x_charge             => l_charge
                          ,x_return_status      => l_return_status);
Line: 1004

         UPDATE gme_batch_steps
            SET plan_charges = l_charge
          WHERE batchstep_id = l_last_batchstep_id;
Line: 1008

         update_charges (p_batch_id                  => l_batch_id
                        ,p_step_charge_rsrc_tab      => l_step_charge_rsrc_tab
                        ,x_return_status             => l_return_status);
Line: 1023

         UPDATE gme_batch_step_resources
            SET plan_rsrc_usage =
                        ROUND ( (l_qty / plan_rsrc_qty * plan_rsrc_usage), 32)
          WHERE batchstep_id = l_batchstep_id
            AND scale_type = 1
            AND                      -- scale_type = 1 denotes linear scale...
                plan_rsrc_qty <> 0;
Line: 1046

         SELECT plan_step_qty, plan_charges
           INTO l_qty, l_plan_charges
           FROM gme_batch_steps
          WHERE batchstep_id = l_last_batchstep_id;
Line: 1052

         UPDATE gme_batch_step_resources
            SET plan_rsrc_qty = ROUND (l_qty, 32)
          WHERE batchstep_id = l_last_batchstep_id
            AND scale_type <>
                   0
-- if scale_type = 0, then let's leave the plan_rsrc_qty to that passed in by GMD... scale_type = 0 is fixed
            AND plan_rsrc_qty <> 0;
Line: 1066

            UPDATE gme_batch_step_resources
               SET plan_rsrc_usage =
                                  ROUND (plan_rsrc_usage * l_plan_charges, 32)
             WHERE batchstep_id = l_last_batchstep_id AND scale_type = 2;
Line: 1076

            SELECT COUNT (1)
              INTO l_count_scale_by_charge
              FROM gme_batch_step_resources
             WHERE batchstep_id = l_last_batchstep_id AND scale_type = 2;
Line: 1097

            UPDATE gme_batch_step_resources
               SET plan_rsrc_usage =
                               ROUND (plan_rsrc_usage * l_activity_factor, 32)
                  ,plan_rsrc_qty =
                                 ROUND (plan_rsrc_qty * l_activity_factor, 32)
             WHERE batchstep_activity_id = l_batchstep_activity_id;
Line: 1104

            IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN
               FOR l_rec IN cur_get_resources (l_batchstep_activity_id) LOOP
                  UPDATE gme_resource_txns
                     SET resource_usage =
                            ROUND (  l_rec.plan_rsrc_usage
                                   / l_rec.plan_rsrc_count
                                  ,32)
                   WHERE doc_id = l_batch_id
                     AND doc_type = l_doc_type
                     AND line_id = l_rec.batchstep_resource_id;
Line: 1116

               /* IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN */

            FETCH cur_get_step_activities
             INTO l_batchstep_activity_id, l_activity_factor;
Line: 1131

            UPDATE gme_batch_step_resources
               SET plan_rsrc_qty = ROUND (l_qty, 32)
             WHERE batchstep_id = l_batchstep_id
               AND scale_type <> 0
               AND plan_rsrc_qty <> 0;
Line: 1144

               UPDATE gme_batch_step_resources
                  SET plan_rsrc_usage =
                                  ROUND (plan_rsrc_usage * l_plan_charges, 32)
                WHERE batchstep_id = l_batchstep_id AND scale_type = 2;
Line: 1154

               SELECT COUNT (1)
                 INTO l_count_scale_by_charge
                 FROM gme_batch_step_resources
                WHERE batchstep_id = l_batchstep_id AND scale_type = 2;
Line: 1182

            UPDATE gme_batch_step_resources
               SET plan_rsrc_usage =
                               ROUND (plan_rsrc_usage * l_activity_factor, 32)
                  ,plan_rsrc_qty =
                                 ROUND (plan_rsrc_qty * l_activity_factor, 32)
             WHERE batchstep_activity_id = l_batchstep_activity_id;
Line: 1189

            IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN
               FOR l_rec IN cur_get_resources (l_batchstep_activity_id) LOOP
                  UPDATE gme_resource_txns
                     SET resource_usage =
                            ROUND (  l_rec.plan_rsrc_usage
                                   / l_rec.plan_rsrc_count
                                  ,32)
                   WHERE doc_id = l_batch_id
                     AND doc_type = l_doc_type
                     AND line_id = l_rec.batchstep_resource_id;
Line: 1201

               /* IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN */

            FETCH cur_get_activities
             INTO l_batchstep_activity_id, l_activity_factor;
Line: 1300

               UPDATE gme_batch_steps
                  SET plan_cmplt_date = p_step_cmplt_date
                     ,last_updated_by = gme_common_pvt.g_user_ident
                     ,last_update_date = gme_common_pvt.g_timestamp
                     ,last_update_login = gme_common_pvt.g_login_id
                WHERE batch_id = p_gme_batch_header_rec.batch_id
                  AND batchstep_id = l_last_batchstep_id;
Line: 1414

            UPDATE gme_batch_step_charges
               SET plan_start_date = l_rsrc_start_date
                  ,plan_cmplt_date = l_rsrc_cmplt_date
             WHERE batch_id = p_gme_batch_header_rec.batch_id
               AND batchstep_id = l_batchstep_ids_tab (i);
Line: 1440

      WHEN error_insert_batch_step THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert batch step error');
Line: 1446

      WHEN error_insert_b_step_act THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert batch step activity error');
Line: 1452

      WHEN error_insert_b_step_res THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert batch step resource error');
Line: 1458

      WHEN error_insert_res_txns THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert resource txns error');
Line: 1464

      WHEN error_insert_b_res_param THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert resource param error');
Line: 1470

      WHEN error_insert_b_step_items THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert batch step items error');
Line: 1476

      WHEN error_insert_b_step_depend THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert batch step depend error');
Line: 1544

   PROCEDURE update_charges (
      p_batch_id               IN              NUMBER
     ,p_step_charge_rsrc_tab   IN              gme_create_step_pvt.step_charge_rsrc_tab
     ,x_return_status          OUT NOCOPY      VARCHAR2)
   IS
      x_charge_tab          charge_tab;
Line: 1553

      l_api_name   CONSTANT VARCHAR2 (30)                 := 'update charges';
Line: 1558

         SELECT batchstep_id, plan_mass_qty, mass_ref_um, plan_volume_qty
               ,volume_ref_um
           FROM gme_batch_steps
          WHERE batch_id = v_batch_id;
Line: 1589

         gme_update_step_qty_pvt.calc_charge
            (p_step_id            => x_cur_step_rec.batchstep_id
            ,p_resources          => p_step_charge_rsrc_tab
                                                  (x_cur_step_rec.batchstep_id).resources
            ,p_mass_qty           => x_cur_step_rec.plan_mass_qty
            ,p_vol_qty            => x_cur_step_rec.plan_volume_qty
            ,x_charge             => x_charge
            ,x_return_status      => l_return_status);
Line: 1600

                        (   ' update charges >calc charges > return charge '
                         || TO_CHAR (x_charge) );
Line: 1603

                          (   ' update charges >calc charges >batchstep_id  '
                           || TO_CHAR (x_cur_step_rec.batchstep_id) );
Line: 1620

         UPDATE gme_batch_steps
            SET plan_charges = x_charge_tab (i).charge
          WHERE batchstep_id = x_charge_tab (i).step_id;
Line: 1643

   END update_charges;
Line: 1668

         SELECT dep_type, r.plan_start_date, r.plan_cmplt_date
               ,standard_delay
           FROM gme_batch_step_dependencies d, gme_batch_steps r
          WHERE d.batch_id = r.batch_id
            AND d.batch_id = v_batch_id
            AND r.batchstep_id = d.dep_step_id
            AND d.batchstep_id = v_step_id;
Line: 1678

         SELECT MAX (DECODE (dep_type
                            ,1, r.plan_start_date + standard_delay / 24
                            ,0, r.plan_cmplt_date + standard_delay / 24) )
           FROM gme_batch_step_dependencies d, gme_batch_steps r
          WHERE d.batch_id = r.batch_id
            AND d.batch_id = v_batch_id
            AND r.batchstep_id = d.dep_step_id
            AND d.batchstep_id = v_step_id;
Line: 1975

         SELECT *
           FROM gme_batch_step_activities
          WHERE batch_id = v_batch_id AND batchstep_id = v_step_id;
Line: 1981

         SELECT *
           FROM gme_batch_step_resources
          WHERE batchstep_activity_id = v_batchstep_activity_id;
Line: 1987

         SELECT batchstep_id
           FROM gme_batch_steps
          WHERE batch_id = v_batch_id AND batchstep_no = v_step;
Line: 1993

         SELECT batchstep_no
           FROM gme_batch_steps
          WHERE batchstep_id = v_batchstep_id;
Line: 1999

         SELECT activity
           FROM gme_batch_step_activities
          WHERE batchstep_activity_id = v_batchstep_activity_id;
Line: 2006

         SELECT inventory_item_id
           FROM gmd_recipe_validity_rules
          WHERE recipe_validity_rule_id = p_recipe_validity_rule_id;
Line: 2013

      error_insert_res_txns     EXCEPTION;
Line: 2064

      /* it is not NULL, then we only want to calc the dates for that step, i.e. insert_step... */
      IF (p_step_id IS NULL) THEN
         gmd_auto_step_calc.load_steps (l_batch_id
                                       ,1
                                       ,NULL
                                       ,x_gmd_step_tbl
                                       ,x_routing_id
                                       ,l_return_status);
Line: 2090

         SELECT batchstep_no
           INTO x_gmd_step_tbl (1).step_no
           FROM gme_batch_steps
          WHERE batchstep_id = p_step_id;
Line: 2122

            SELECT batchstep_no
              INTO x_step_no
              FROM gme_batch_steps
             WHERE batchstep_id = p_step_id;
Line: 2320

         SELECT *
           INTO x_step_row
           FROM gme_batch_steps
          WHERE batchstep_id = x_step_tbl (i);
Line: 2347

         x_act_tab.DELETE;
Line: 2401

            x_rsrc_tab.DELETE;
Line: 2424

            IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN
               x_rsrc_txns_tab.DELETE;
Line: 2428

               /* IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN */

            FOR k IN x_rsrc_tab.FIRST .. x_rsrc_tab.LAST LOOP
               IF l_use_workday_cal = fnd_api.g_true THEN
                  x_rsrc_tab (k).plan_start_date :=
                     get_working_start_time
                               (p_start_date         => x_act_tab (j).plan_start_date
                               ,p_offset             => x_rsrc_tab (k).offset_interval
                               ,p_calendar_code      => l_calendar_code);
Line: 2487

               IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN
                  FOR m IN 1 .. l_cal_count LOOP
                     x_rsrc_tab (k).plan_start_date :=
                                           l_contig_period_tbl (m).start_date;
Line: 2493

                     insert_resource_txns (p_gme_batch_header_rec
                                          ,l_doc_type
                                          ,x_rsrc_tab (k)
                                          ,l_return_status);
Line: 2499

                        RAISE error_insert_res_txns;
Line: 2507

               /* IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN */
               IF    k = x_rsrc_tab.FIRST
                  OR x_rsrc_tab (k).plan_cmplt_date > x_max_rsrc_date THEN
                  x_max_rsrc_date := x_rsrc_tab (k).plan_cmplt_date;
Line: 2528

               UPDATE gme_batch_step_resources
                  SET plan_start_date = x_rsrc_tab (k).plan_start_date
                     ,plan_cmplt_date = x_rsrc_tab (k).plan_cmplt_date
                WHERE batchstep_resource_id =
                                          x_rsrc_tab (k).batchstep_resource_id;
Line: 2549

            UPDATE gme_batch_step_activities
               SET plan_start_date = x_act_tab (k).plan_start_date
                  ,plan_cmplt_date = x_act_tab (k).plan_cmplt_date
             WHERE batchstep_activity_id = x_act_tab (k).batchstep_activity_id;
Line: 2555

         UPDATE gme_batch_steps
            SET plan_start_date = x_step_row.plan_start_date
               ,plan_cmplt_date = x_step_row.plan_cmplt_date
               ,due_date = x_step_row.due_date
          WHERE batchstep_id = x_step_row.batchstep_id;
Line: 2565

         SELECT MAX (plan_cmplt_date)
           INTO max_cmplt_date
           FROM gme_batch_steps
          WHERE batch_id = l_batch_id;
Line: 2570

         SELECT MIN (plan_start_date)
           INTO min_start_date
           FROM gme_batch_steps
          WHERE batch_id = l_batch_id;
Line: 2578

            UPDATE gme_batch_header
            SET plan_cmplt_date = max_cmplt_date
               ,last_updated_by = gme_common_pvt.g_user_ident
               ,last_update_date = gme_common_pvt.g_timestamp
               ,last_update_login = gme_common_pvt.g_login_id
            WHERE batch_id = l_batch_id;
Line: 2585

            UPDATE gme_batch_header
            SET plan_start_date = min_start_date
               ,plan_cmplt_date = max_cmplt_date
               ,last_updated_by = gme_common_pvt.g_user_ident
               ,last_update_date = gme_common_pvt.g_timestamp
               ,last_update_login = gme_common_pvt.g_login_id
           WHERE batch_id = l_batch_id;
Line: 2594

       /*  UPDATE gme_batch_header
            SET plan_start_date = min_start_date
               ,plan_cmplt_date = max_cmplt_date
               ,last_updated_by = gme_common_pvt.g_user_ident
               ,last_update_date = gme_common_pvt.g_timestamp
               ,last_update_login = gme_common_pvt.g_login_id
          WHERE batch_id = l_batch_id;*/
Line: 2602

         UPDATE gme_batch_header
            SET due_date = max_cmplt_date
               ,last_updated_by = gme_common_pvt.g_user_ident
               ,last_update_date = gme_common_pvt.g_timestamp
               ,last_update_login = gme_common_pvt.g_login_id
          WHERE batch_id = l_batch_id
                AND due_date = gme_common_pvt.g_timestamp;
Line: 2696

      SELECT batchstep_id, batchstep_no
      FROM   gme_batch_steps
      WHERE  batch_id = v_batch_id
             AND batchstep_id NOT IN (SELECT dep_step_id
                                      FROM gme_batch_step_dependencies
                                      WHERE batch_id = v_batch_id);
Line: 2714

      SELECT branch, LENGTH(branch) sz
      FROM (SELECT REPLACE(sys_connect_by_path(LPAD(s.batchstep_no, 5, 0)||LPAD(p.batchstep_no, 5, 0 )||dep_type||LPAD(standard_delay, 3,0),' '), ' ', NULL) branch
            FROM (SELECT * FROM gme_batch_step_dependencies WHERE batch_id = v_batch_id) d,
                 (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) s,
                 (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) p
            WHERE s.batchstep_id = d.batchstep_id
                  AND p.batchstep_id = d.dep_step_id
		  AND connect_by_isleaf = 1
            START WITH d.batchstep_id = v_batchstep_id
            CONNECT BY d.batchstep_id = PRIOR d.dep_step_id) x;
Line: 2857

         SELECT a.conversion_rate, b.uom_class
           FROM mtl_uom_conversions a, mtl_units_of_measure b
          WHERE a.uom_code = b.uom_code
            AND a.inventory_item_id = 0
            AND b.uom_code = v_uom_code;
Line: 2865

         SELECT uom_code
           FROM mtl_units_of_measure
          WHERE uom_class = v_uom_class AND base_uom_flag = 'Y';
Line: 2913

         SELECT plan_step_qty
           INTO x_step_qty
           FROM gme_batch_steps
          WHERE batchstep_no = p_step_tbl (i).step_no
            AND batch_id = p_parent_id;
Line: 2985

         SELECT   *
             FROM fm_text_tbl
            WHERE text_code = p_text_code
         ORDER BY line_no;
Line: 3001

      l_text_table.DELETE;
Line: 3004

                 gme_text_dbl.insert_header_row (l_text_header, l_text_header);
Line: 3047

            gme_text_dbl.insert_text_row (l_text_table (l_row_count)
                                         ,l_text_table (l_row_count) );
Line: 3052

               gme_debug.put_line (   'trouble inserting text for '
                                   || p_text_string);
Line: 3061

            gme_debug.put_line ('inserted text for ' || p_text_string);
Line: 3072

               ('ERROR - unexpected error in copy and create text while inserting header or dtl');
Line: 3106

         SELECT b.uom_class, a.conversion_rate
           FROM mtl_uom_conversions a, mtl_units_of_measure b
          WHERE a.uom_code = b.uom_code
            AND a.inventory_item_id = 0
            AND b.uom_code = v_uom_code;
Line: 3183

         SELECT batchstep_activity_id, offset_interval, batchstep_id
               ,batch_id
           FROM gme_batch_step_activities
          WHERE batchstep_id = v_step_id AND batch_id = v_batch_id;
Line: 3193

         SELECT batchstep_resource_id, offset_interval, plan_rsrc_usage
               ,plan_rsrc_count, usage_um
           FROM gme_batch_step_resources
          WHERE batchstep_id = v_step_id
            AND batch_id = v_batch_id
            AND batchstep_activity_id = v_activity_id;
Line: 3288

   PROCEDURE insert_resource_txns (
      p_gme_batch_header_rec       IN              gme_batch_header%ROWTYPE
     ,p_doc_type                   IN              VARCHAR2
     ,p_batch_step_resources_rec   IN              gme_batch_step_resources%ROWTYPE
     ,x_return_status              OUT NOCOPY      VARCHAR2)
   IS
      l_gme_resource_txns      gme_resource_txns%ROWTYPE;
Line: 3298

      l_api_name      CONSTANT VARCHAR2 (30)        := 'insert_resource_txns';
Line: 3299

      error_insert_res_txns    EXCEPTION;
Line: 3331

      IF p_gme_batch_header_rec.update_inventory_ind = 'Y' THEN
         l_gme_resource_txns.doc_id := p_batch_step_resources_rec.batch_id;
Line: 3353

         l_gme_resource_txns.delete_mark := 0;
Line: 3378

             /*call create flex procedure to insert the default values of the GME_RSRC_TXN_FLEX
               DFF's segments if they are enabled */
             l_return_status:=NULL;
Line: 3390

            IF (gme_resource_txns_dbl.insert_row
                                      (p_resource_txns      => l_gme_resource_txns
                                      ,x_resource_txns      => l_gme_resource_txns) ) THEN
               NULL;
Line: 3395

               RAISE error_insert_res_txns;
Line: 3404

      WHEN error_insert_res_txns THEN
         IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
            gme_debug.put_line ('insert resource txns error');
Line: 3431

   END insert_resource_txns;