DBA Data[Home] [Help]

APPS.GME_BATCHSTEP_ACT_PVT SQL Statements

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

Line: 35

         SELECT batch_id, batch_status
           FROM gme_batch_header
          WHERE organization_id = v_organization_id AND batch_no = v_batch_no;
Line: 41

         SELECT batchstep_id, step_status
           FROM gme_batch_steps
          WHERE batch_id = v_batch_id AND batchstep_no = v_batchstep_no;
Line: 51

         SELECT batchstep_activity_id
           FROM gme_batch_step_activities
          WHERE batchstep_id = v_step_id
            AND batch_id = v_batch_id
            AND activity = v_activity;
Line: 189

     This procedure is used to validate all parameters passed to insert activity API
   Parameters

     x_return_status              reflects return status of the API
=============================================================================================*/
   PROCEDURE validate_activity_param (
      p_batchstep_activity_rec   IN              gme_batch_step_activities%ROWTYPE,
      p_step_id                  IN              NUMBER,
      p_validate_flexfield       IN              VARCHAR2
            DEFAULT fnd_api.g_false,
      p_action                   IN              VARCHAR2,
      x_batchstep_activity_rec   OUT NOCOPY      gme_batch_step_activities%ROWTYPE,
      x_step_status              OUT NOCOPY      NUMBER,
      x_return_status            OUT NOCOPY      VARCHAR2
   )
   IS
      l_api_name        CONSTANT VARCHAR2 (30)   := 'validate_activity_param';
Line: 215

         SELECT 1
           FROM fm_actv_mst
          WHERE activity = v_activity AND delete_mark = 0;
Line: 221

         SELECT *
           FROM gme_batch_steps
          WHERE batchstep_id = v_step_id;
Line: 227

         SELECT automatic_step_calculation
           FROM gme_batch_header
          WHERE batch_id = v_batch_id;
Line: 233

         SELECT batch_type
           FROM gme_batch_header b, gme_batch_steps s
          WHERE b.batch_id = s.batch_id AND batchstep_id = v_step_id;
Line: 250

      IF (p_action = 'INSERT')
      THEN
         -- check FPO
         OPEN cur_check_fpo (p_step_id);
Line: 662

     insert_batchstep_activity
   Description
     This procedure is used to insert activity for a batch step
   Parameters
     p_batchstep_id OR (p_org_code,p_batch_no,step_no) to uniquely identify a step
     p_batchstep_activity_rec       GME_BATCH_STEP_ACTIVITIES%ROWTYPE   - details of the activity
     p_batchstep_resource_tbl       gme_create_step_pvt.resources_tab   - details of the rsrc
     x_batchstep_activity_rec       GME_BATCH_STEP_ACTIVITIES%ROWTYPE   - returns the newly inserted row
     x_return_status                reflects return status of the API
=============================================================================================*/
   PROCEDURE insert_batchstep_activity (
      p_batchstep_activity_rec   IN              gme_batch_step_activities%ROWTYPE,
      p_batchstep_resource_tbl   IN              gme_create_step_pvt.resources_tab,
      p_org_code                 IN              VARCHAR2 := NULL,
      p_batch_no                 IN              VARCHAR2 := NULL,
      p_batchstep_no             IN              NUMBER := NULL,
      p_ignore_qty_below_cap     IN              VARCHAR2
            DEFAULT fnd_api.g_false,
      p_validate_flexfield       IN              VARCHAR2
            DEFAULT fnd_api.g_false,
      x_batchstep_activity_rec   OUT NOCOPY      gme_batch_step_activities%ROWTYPE,
      x_return_status            OUT NOCOPY      VARCHAR2
   )
   IS
      l_api_name            CONSTANT VARCHAR2 (30)
                                               := 'insert_batchstep_activity';
Line: 704

         SELECT batch_id
           FROM gme_batch_steps
          WHERE batchstep_id = v_step_id;
Line: 784

                               p_action                      => 'INSERT',
                               x_batchstep_activity_rec      => l_batchstep_activity_rec,
                               x_step_status                 => l_step_status,
                               x_return_status               => x_return_status
                              );
Line: 814

      l_batchstep_activity_rec.delete_mark := 0;
Line: 860

                                                     p_action                      => 'INSERT',
                                                     x_batchstep_resource_rec      => l_batchstep_resource_rec,
                                                     x_step_status                 => l_step_status,
                                                     x_return_status               => x_return_status
                                                    );
Line: 897

                             || 'before call to GME_BATCH_STEP_ACTIVITIES_DBL.insert_row batch_id='
                             || l_batchstep_activity_rec.batch_id
                             || ' and step_id ='
                             || l_batchstep_activity_rec.batchstep_id
                            );
Line: 904

      IF NOT (gme_batch_step_activities_dbl.insert_row (l_batchstep_activity_rec,
                                                        l_batchstep_activity_out_rec
                                                       )
             )
      THEN
         RAISE fnd_api.g_exc_error;
Line: 918

                             || 'after call to GME_BATCH_STEP_ACTIVITIES_DBL.insert_row activity_id='
                             || l_batchstep_activity_out_rec.batchstep_activity_id
                            );
Line: 935

         gme_batchstep_rsrc_pvt.insert_batchstep_rsrc (p_batchstep_resource_rec      => l_batchstep_resource_rec,
                                                       x_batchstep_resource_rec      => l_batchstep_resource_out_rec,
                                                       x_return_status               => x_return_status
                                                      );
Line: 999

   END insert_batchstep_activity;
Line: 1003

      update_batchstep_activity
   Description
     This procedure is used to update an activity
   Parameters
     p_batchstep_activity_id OR
     (p_org_code,p_batch_no,step_no,activity)   to uniquely identify an activity
     p_batchstep_activity_rec     GME_BATCH_STEP_ACTIVITIES%ROWTYPE  - details of the activity
     x_batchstep_activity_rec     returns the newly updated row for further processing
     x_return_status              reflects return status of the API
   History
=============================================================================================*/
   PROCEDURE update_batchstep_activity (
      p_batchstep_activity_rec   IN              gme_batch_step_activities%ROWTYPE,
      p_org_code                 IN              VARCHAR2 := NULL,
      p_batch_no                 IN              VARCHAR2 := NULL,
      p_batchstep_no             IN              NUMBER := NULL,
      p_validate_flexfield       IN              VARCHAR2
            DEFAULT fnd_api.g_false,
      x_batchstep_activity_rec   OUT NOCOPY      gme_batch_step_activities%ROWTYPE,
      x_return_status            OUT NOCOPY      VARCHAR2
   )
   IS
      l_api_name            CONSTANT VARCHAR2 (30)
                                               := 'update_batchstep_activity';
Line: 1034

      l_field_updated                BOOLEAN                         := FALSE;
Line: 1037

      l_update_resources             BOOLEAN                         := FALSE;
Line: 1039

      l_last_update_date             DATE;
Line: 1050

         SELECT *
           FROM gme_batch_step_resources
          WHERE batchstep_activity_id = v_act_id;
Line: 1059

         SELECT a.batch_id, a.batchstep_id, step_status, activity
           FROM gme_batch_step_activities a, gme_batch_steps s
          WHERE batchstep_activity_id = v_act_id
            AND a.batchstep_id = s.batchstep_id;
Line: 1066

         SELECT *
           FROM gme_batch_steps
          WHERE batchstep_id = v_step_id;
Line: 1074

         SELECT *
           FROM gme_batch_header
          WHERE batch_id = v_batch_id;
Line: 1082

         SELECT batch_type
           FROM gme_batch_header b, gme_batch_step_activities a
          WHERE b.batch_id = a.batch_id AND batchstep_activity_id = v_actv_id;
Line: 1088

         SELECT        last_update_date
                  FROM gme_batch_step_activities
                 WHERE batchstep_activity_id = v_activity_id
         FOR UPDATE OF last_update_date NOWAIT;
Line: 1182

      FETCH cur_lock_actv INTO l_last_update_date;
Line: 1219

         l_field_updated := TRUE;
Line: 1255

            l_field_updated := TRUE;
Line: 1284

            l_field_updated := TRUE;
Line: 1337

            l_field_updated := TRUE;
Line: 1378

            l_field_updated := TRUE;
Line: 1454

            l_field_updated := TRUE;
Line: 1455

            l_update_resources := TRUE;
Line: 1479

            l_field_updated := TRUE;
Line: 1480

            l_update_resources := TRUE;
Line: 1556

            l_field_updated := TRUE;
Line: 1643

      IF NOT (l_field_updated)
      THEN
         gme_common_pvt.log_message ('GME_NO_CHANGE_TO_UPD');
Line: 1651

         gme_debug.put_line ('before update of activity');
Line: 1654

      IF l_update_resources
      THEN
         OPEN cur_get_batch (l_batch_id);
Line: 1661

         IF l_batch_hdr.update_inventory_ind = 'Y'
         THEN
            gme_trans_engine_util.load_rsrc_trans (p_batch_row          => l_batch_hdr,
                                                   x_rsc_row_count      => l_rsrc_trans_count,
                                                   x_return_status      => x_return_status
                                                   );
Line: 1688

         gme_update_step_qty_pvt.update_resources (p_batch_hdr_rec                 => l_batch_hdr,
                                                   p_batch_step_rec                => l_step_dtl,
                                                   p_batchstep_activities_rec      => l_batchstep_activity_rec,
                                                   x_return_status                 => x_return_status
                                                  );
Line: 1700

                                || 'after call to GME_UPDATE_STEP_QTY_PVT.update_resources return status is '
                                || x_return_status
                               );
Line: 1714

      IF NOT (gme_batch_step_activities_dbl.update_row (l_batchstep_activity_rec
                                                       )
             )
      THEN
         RAISE fnd_api.g_exc_error;
Line: 1794

   END update_batchstep_activity;
Line: 1798

      delete_batchstep_activity
   Description
     This procedure is used to delete an activity and all it's children
   Parameters
     p_batchstep_activity_id OR
     (p_org_code,p_batch_no,step_no,activity)   to uniquely identify an activity
     x_return_status              reflects return status of the API

=============================================================================================*/
   PROCEDURE delete_batchstep_activity (
      p_batchstep_activity_id   IN              NUMBER := NULL,
      p_org_code                IN              VARCHAR2 := NULL,
      p_batch_no                IN              VARCHAR2 := NULL,
      p_batchstep_no            IN              NUMBER := NULL,
      p_activity                IN              VARCHAR2 := NULL,
      x_return_status           OUT NOCOPY      VARCHAR2
   )
   IS
      l_api_name        CONSTANT VARCHAR2 (30) := 'delete_batchstep_activity';
Line: 1827

      l_last_update_date         DATE;
Line: 1834

         SELECT *
           FROM gme_batch_header
          WHERE batch_id = v_batch_id;
Line: 1840

         SELECT step_status, batch_status, a.batch_id, s.batchstep_id,
                batchstep_activity_id, activity
           FROM gme_batch_steps s,
                gme_batch_step_activities a,
                gme_batch_header b
          WHERE batchstep_activity_id = v_batchstep_act_id
            AND b.batch_id = a.batch_id
            AND s.batchstep_id = a.batchstep_id;
Line: 1851

         SELECT COUNT (1)
           FROM gme_batch_step_activities
          WHERE batchstep_id = v_step_id;
Line: 1857

         SELECT batch_type
           FROM gme_batch_header b, gme_batch_step_activities a
          WHERE b.batch_id = a.batch_id AND batchstep_activity_id = v_actv_id;
Line: 1863

         SELECT        last_update_date
                  FROM gme_batch_step_activities
                 WHERE batchstep_activity_id = v_activity_id
         FOR UPDATE OF last_update_date NOWAIT;
Line: 1956

      FETCH cur_lock_actv INTO l_last_update_date;
Line: 1987

      IF l_batch_hdr.update_inventory_ind = 'Y'
      THEN
         gme_trans_engine_util.load_rsrc_trans (p_batch_row          => l_batch_hdr,
                                                x_rsc_row_count      => l_rsrc_trans_count,
                                                x_return_status      => x_return_status
                                                );
Line: 2014

      gme_delete_batch_step_pvt.delete_activity (p_batch_step_activities_rec      => l_batchstep_activity_rec,
                                                 x_return_status                  => x_return_status
                                                );
Line: 2020

         gme_debug.put_line (   'after call to gme_delete_batch_step_pvt.delete_activity return status is '
                             || x_return_status
                            );
Line: 2089

   END delete_batchstep_activity;