DBA Data[Home] [Help]

APPS.GME_SCALE_BATCH_PVT SQL Statements

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

Line: 42

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

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

         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: 62

         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: 248

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

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

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

         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: 277

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

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

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

            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: 591

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

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

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

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

            /* 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: 675

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

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

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

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

         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: 1130

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

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

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

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

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

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

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

      l_update_inventory_ind      VARCHAR2 (1);
Line: 1420

      update_res_error            EXCEPTION;
Line: 1422

      update_res_txn_error        EXCEPTION;
Line: 1428

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

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

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

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

       INTO l_auto_step_calc, l_update_inventory_ind;
Line: 1500

               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: 1512

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

               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: 1530

               /* 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: 1575

                  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: 1581

                        RAISE update_res_txn_error;
Line: 1583

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

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

      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: 1596

      WHEN error_updating_step_qty OR update_res_txn_error THEN
         x_return_status := l_return_status;