DBA Data[Home] [Help]

APPS.GME_UNRELEASE_STEP_PVT SQL Statements

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

Line: 15

  x_batch_step_rec          Updated batch step record
  x_return_status           Outcome of the API call
            S - Success
            E - Error
            U - Unexpected error
=============================================================================*/
   PROCEDURE unrelease_step (
      p_batch_step_rec          IN              gme_batch_steps%ROWTYPE
     ,p_update_inventory_ind    IN              VARCHAR2
     ,p_create_resv_pend_lots   IN              NUMBER
     ,p_from_unrelease_batch    IN              NUMBER
     ,x_batch_step_rec          OUT NOCOPY      gme_batch_steps%ROWTYPE
     ,x_return_status           OUT NOCOPY      VARCHAR2)
   IS
      CURSOR cur_get_step_materials (
         v_batch_id       gme_batch_header.batch_id%TYPE
        ,v_batchstep_id   gme_batch_steps.batchstep_id%TYPE)
      IS
         SELECT d.*
           FROM gme_batch_step_items i, gme_material_details d
          WHERE d.batch_id = v_batch_id
            AND d.material_detail_id = i.material_detail_id
            AND i.batchstep_id = v_batchstep_id
            AND d.release_type = gme_common_pvt.g_mtl_autobystep_release;
Line: 50

      error_update_row        EXCEPTION;
Line: 52

      update_step_qty_error   EXCEPTION;
Line: 121

      IF NOT (gme_batch_steps_dbl.update_row (p_batch_step      => x_batch_step_rec) ) THEN
         RAISE error_update_row;
Line: 126

      x_batch_step_rec.last_updated_by := gme_common_pvt.g_user_ident;
Line: 127

      x_batch_step_rec.last_update_date := gme_common_pvt.g_timestamp;
Line: 128

      x_batch_step_rec.last_update_login := gme_common_pvt.g_login_id;
Line: 144

                         ,p_update_inventory_ind       => p_update_inventory_ind
                         ,p_create_resv_pend_lots      => p_create_resv_pend_lots
                         ,p_from_batch                => FALSE
                         ,x_return_status              => x_return_status);
Line: 155

      /* Invoke the update step qty API to update the step quantities and the */
      /* quantities of the succeeding steps                                   */
      l_in_batch_step_rec := x_batch_step_rec;
Line: 158

      gme_update_step_qty_pvt.update_step_qty
                                     (p_batch_step_rec      => l_in_batch_step_rec
                                     ,x_message_count       => l_msg_count
                                     ,x_message_list        => l_msg_stack
                                     ,x_return_status       => x_return_status
                                     ,x_batch_step_rec      => x_batch_step_rec);
Line: 166

         RAISE update_step_qty_error;
Line: 170

      UPDATE gme_batch_step_activities
         SET actual_start_date = NULL
            ,plan_activity_factor = NVL (plan_activity_factor, 0)
            ,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 batchstep_id = x_batch_step_rec.batchstep_id
         AND batch_id = x_batch_step_rec.batch_id;
Line: 180

      UPDATE gme_batch_step_resources
         SET actual_start_date = NULL
            ,plan_rsrc_count = NVL (plan_rsrc_count, 1)
            ,plan_rsrc_qty = NVL (plan_rsrc_qty, 0)
            ,plan_rsrc_usage = NVL (plan_rsrc_usage, 0)
            ,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 batchstep_id = x_batch_step_rec.batchstep_id
         AND batch_id = x_batch_step_rec.batch_id;
Line: 193

      UPDATE gme_batch_step_activities
         SET plan_start_date = x_batch_step_rec.plan_start_date
       WHERE batchstep_id = x_batch_step_rec.batchstep_id
         AND batch_id = x_batch_step_rec.batch_id
         AND plan_start_date IS NULL;
Line: 199

      UPDATE gme_batch_step_resources
         SET plan_start_date = x_batch_step_rec.plan_start_date
       WHERE batchstep_id = x_batch_step_rec.batchstep_id
         AND batch_id = x_batch_step_rec.batch_id
         AND plan_start_date IS NULL;
Line: 205

      UPDATE gme_batch_step_activities
         SET plan_cmplt_date = x_batch_step_rec.plan_cmplt_date
       WHERE batchstep_id = x_batch_step_rec.batchstep_id
         AND batch_id = x_batch_step_rec.batch_id
         AND plan_cmplt_date IS NULL;
Line: 211

      UPDATE gme_batch_step_resources
         SET plan_cmplt_date = x_batch_step_rec.plan_cmplt_date
       WHERE batchstep_id = x_batch_step_rec.batchstep_id
         AND batch_id = x_batch_step_rec.batch_id
         AND plan_cmplt_date IS NULL;
Line: 222

      WHEN error_update_row THEN
         gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
                                    ,SQLERRM);
Line: 226

      WHEN error_unrelease_matl OR update_step_qty_error THEN
         NULL;
Line: 261

         SELECT 1
         FROM   gme_batch_step_dependencies d, gme_batch_steps s
         WHERE  d.batchstep_id = s.batchstep_id AND
                d.batch_id = s.batch_id AND
                d.dep_step_id = v_batchstep_id AND
                s.batch_id = v_batch_id AND
                s.step_status <> gme_common_pvt.g_step_pending;