DBA Data[Home] [Help]

APPS.GME_SCALE_BATCH_PVT SQL Statements

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

Line: 45

         SELECT   *
             FROM gme_material_details
            WHERE batch_id = v_batch_id
         ORDER BY line_no;
Line: 52

         SELECT batch_status
           FROM gme_batch_header
          WHERE batch_id = v_batch_id;
Line: 58

         SELECT s.batchstep_no, step_status
           FROM gme_batch_steps s, gme_batch_step_items i
          WHERE s.batchstep_id = i.batchstep_id
            AND i.material_detail_id = v_material_detail_id;
Line: 65

         SELECT   1
             FROM gme_material_details
            WHERE batch_id = v_batch_id
         GROUP BY line_type
           HAVING SUM (DECODE (v_batch_status, 1, plan_qty, 2, wip_plan_qty) ) =
                                                                             0
              AND line_type IN (1, -1);
Line: 254

         SELECT *
           FROM gmd_recipe_validity_rules
          WHERE recipe_validity_rule_id = v_validity_rule_id;
Line: 261

         SELECT status_type
           FROM gmd_status
          WHERE status_code = v_validity_rule_status;
Line: 269

         SELECT concatenated_segments
           FROM mtl_system_items_kfv
          WHERE inventory_item_id = v_item_id AND organization_id = v_org_id;
Line: 275

         SELECT qty, scale_type, scale_multiple, scale_rounding_variance
               ,rounding_direction, contribute_yield_ind, inventory_item_id
               ,detail_uom, line_no, line_type
           FROM fm_matl_dtl
          WHERE formulaline_id = v_formulaline_id;
Line: 283

         SELECT   *
             FROM gme_material_details
            WHERE batch_id = v_batch_id
         ORDER BY line_no;
Line: 290

         SELECT DISTINCT batchstep_id
                    FROM gme_batch_step_items
                   WHERE batch_id = v_batch_id;
Line: 296

         SELECT 1
           FROM DUAL
          WHERE EXISTS (SELECT 1
                          FROM gme_batch_step_charges
                         WHERE batch_id = v_batch_id);
Line: 454

            OR l_recipe_validity_rule.delete_mark = 1 THEN
            -- Report error that the rule passed in is invalid
            -- This is a fatal error and there is no point continuing
            gme_common_pvt.log_message ('GME_API_INVALID_RULE');
Line: 597

               IF NOT (gme_material_details_dbl.update_row
                                                (x_material_tbl (l_row_number) ) ) THEN
                  RAISE material_save_failed;
Line: 601

                  x_material_tbl (l_row_number).last_update_date :=
                                                   gme_common_pvt.g_timestamp;
Line: 603

                  x_material_tbl (l_row_number).last_updated_by :=
                                                  gme_common_pvt.g_user_ident;
Line: 605

                  x_material_tbl (l_row_number).last_update_login :=
                                                    gme_common_pvt.g_login_id;
Line: 669

            /* Update POC Data if steps are associated to a material line  */
            /* First fetch all the steps associated to a batch(all material lines) */
            /* Checking for the new batch and batch with routing only */
            /* we are using p_batch_header_rec for batch status to check whether batch has been created or not*/
            IF     p_batch_header_rec.batch_status <> 0
               AND l_batch_header.poc_ind = 'Y' THEN
               IF l_batch_header.automatic_step_calculation = 1 THEN
                  FOR l_cur_item_step_asso IN
                     cur_item_step_asso (l_batch_header.batch_id) LOOP
                     l_batch_step.batchstep_id :=
                                            l_cur_item_step_asso.batchstep_id;
Line: 681

                     gme_update_step_qty_pvt.update_step_qty
                                                            (l_in_batch_step
                                                            ,l_count
                                                            ,l_list
                                                            ,l_return_status
                                                            ,l_batch_step);
Line: 1017

         SELECT   material_detail_id
             FROM gme_material_details
            WHERE batch_id = v_batch_id
         ORDER BY line_no;
Line: 1024

         SELECT DISTINCT batchstep_id
                    FROM gme_batch_step_items
                   WHERE batch_id = v_batch_id;
Line: 1030

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

         SELECT s.batchstep_no, step_status
           FROM gme_batch_steps s, gme_batch_step_items i
          WHERE s.batchstep_id = i.batchstep_id
            AND i.material_detail_id = v_material_detail_id;
Line: 1140

            IF NOT (gme_material_details_dbl.update_row
                                                       (x_material_details (i) ) ) THEN
               RAISE material_save_failed;
Line: 1144

               x_material_details (i).last_update_date :=
                                                   gme_common_pvt.g_timestamp;
Line: 1146

               x_material_details (i).last_updated_by :=
                                                  gme_common_pvt.g_user_ident;
Line: 1148

               x_material_details (i).last_update_login :=
                                                    gme_common_pvt.g_login_id;
Line: 1190

                  gme_update_step_qty_pvt.update_step_qty (l_in_batch_step
                                                          ,l_count
                                                          ,l_list
                                                          ,l_return_status
                                                          ,l_batch_step);
Line: 1298

         SELECT routing_uom
           FROM gmd_routings_b
          WHERE routing_id = (SELECT routing_id
                                FROM gme_batch_header
                               WHERE batch_id = v_batch_id);
Line: 1306

         SELECT concatenated_segments
           FROM mtl_system_items_kfv
          WHERE inventory_item_id = v_item_id AND organization_id = v_org_id;
Line: 1426

      l_update_inventory_ind      VARCHAR2 (1);
Line: 1430

      update_res_error            EXCEPTION;
Line: 1432

      update_res_txn_error        EXCEPTION;
Line: 1438

         SELECT automatic_step_calculation, update_inventory_ind
           FROM gme_batch_header
          WHERE batch_id = p_batch_id;
Line: 1444

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

         SELECT batchstep_resource_id
           FROM gme_batch_step_resources
          WHERE batchstep_id = v_step_id AND scale_type <> 0;
Line: 1458

         SELECT poc_trans_id
           FROM gme_resource_txns_gtmp
          WHERE doc_id = v_batch_id AND line_id = v_res_id;
Line: 1471

       INTO l_auto_step_calc, l_update_inventory_ind;
Line: 1510

               gme_update_step_qty_pvt.calc_charge
                                 (p_step_id            => l_batch_step.batchstep_id
                                 ,p_mass_qty           => l_batch_step.actual_mass_qty
                                 ,p_vol_qty            => l_batch_step.actual_volume_qty
                                 ,x_charge             => l_charge
                                 ,x_return_status      => l_return_status);
Line: 1522

            IF NOT (gme_batch_steps_dbl.update_row (l_batch_step) ) THEN
               RAISE error_updating_steps;
Line: 1528

               gme_update_step_qty_pvt.update_step_qty
                            (p_batch_step_rec            => l_in_batch_step
                            ,x_batch_step_rec            => l_batch_step
                            ,x_message_count             => l_message_count
                            ,x_message_list              => l_message_list
                            ,x_return_status             => l_return_status
                            ,p_routing_scale_factor      => p_routing_scale_factor);
Line: 1540

               /* We cannot invoke the update step qty API for certified non asqc steps */
               /* as it would not update the resources if the actuals already populated */
               /* Fetch all the resources associated with the step */
               OPEN cur_get_res (l_batch_step.batchstep_id);
Line: 1585

                  IF l_update_inventory_ind = 'Y' THEN
                     gme_update_step_qty_pvt.adjust_actual_usage
                        (p_batch_step_resources_rec      => l_gme_batchstep_resources
                        ,x_return_status                 => l_return_status);
Line: 1591

                        RAISE update_res_txn_error;
Line: 1593

                  END IF;                /* IF l_update_inventory_ind = 'Y' */
Line: 1595

                  IF NOT (gme_batch_step_resources_dbl.update_row
                                                    (l_gme_batchstep_resources) ) THEN
                     RAISE update_res_error;
Line: 1604

      WHEN error_updating_steps OR activity_rsrc_fetch_error OR update_res_error OR batch_step_fetch_err THEN
         x_return_status := fnd_api.g_ret_sts_error;
Line: 1606

      WHEN error_updating_step_qty OR update_res_txn_error THEN
         x_return_status := l_return_status;