DBA Data[Home] [Help]

APPS.GMP_RESOURCES_PUB SQL Statements

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

Line: 6

  /*   insert_resources                                              */
  /*                                                                 */
  /* DESCRIPTION:                                                    */
  /*                                                                 */
  /* API returns (x_return_code) = 'S' if the insert into resources  */
  /* header  (cr_rsrc_mst ) table is successfully.                   */
  /*                                                                 */
  /* History :                                                       */
  /* Sridhar 03-SEP-2002  Initial implementation                     */
  /* =============================================================== */
  PROCEDURE insert_resources
  ( p_api_version            IN   NUMBER                           :=  1
  , p_init_msg_list          IN   BOOLEAN                          :=  TRUE
  , p_commit                 IN   BOOLEAN                          :=  FALSE
  , p_resources              IN   cr_rsrc_mst%ROWTYPE
  , x_message_count          OUT  NOCOPY NUMBER
  , x_message_list           OUT  NOCOPY VARCHAR2
  , x_return_status          IN OUT  NOCOPY VARCHAR2
  ) IS

  /* Local variable section */
  l_api_name              CONSTANT VARCHAR2(30) := 'INSERT_RESOURCES';
Line: 57

                                        ,'INSERT_RESOURCES'
                                        ,GMP_RESOURCES_PUB.m_pkg_name) THEN
       x_return_status := FND_API.G_RET_STS_ERROR;
Line: 63

    v_insert_flag := 'Y';
Line: 87

       /* Insert the Resource Data now */
       /* Making the Capacity Tolerance field NULL if
          Capacity Constraint field has value = 0
       */
         -- 13576218 rpatangy
         IF l_resources_rec.capacity_constraint IS NULL THEN
            -- valid values are 0 and 1, defualt is 0
            l_resources_rec.capacity_constraint := 0 ;
Line: 101

       CR_RSRC_MST_PKG.insert_row
                 (  l_row_id,
                    l_resources_rec.resources,
                    l_resources_rec.resource_class,
                    l_resources_rec.trans_cnt,
                    NVL(l_resources_rec.delete_mark,0),
                    l_resources_rec.text_code,
                    l_resources_rec.min_capacity,
                    l_resources_rec.max_capacity,
                    l_resources_rec.capacity_constraint,
                    l_resources_rec.capacity_uom,
                    l_resources_rec.std_usage_uom,
                    l_resources_rec.cost_cmpntcls_id,
                    l_resources_rec.resource_desc,
                    --l_resources_rec.creation_date,  Bug 13575854
                    sysdate,
                    --l_resources_rec.created_by,     Bug 13575854
                    FND_GLOBAL.user_id,
                    --l_resources_rec.last_update_date, Bug 13575854
                    sysdate,
                    --l_resources_rec.last_updated_by,  Bug 13575854
                    FND_GLOBAL.user_id,
                    l_resources_rec.last_update_login,
                    l_resources_rec.capacity_tolerance,
                    l_resources_rec.utilization,
                    l_resources_rec.efficiency
                  );
Line: 128

            v_insert_flag := 'N';
Line: 176

  END insert_resources;
Line: 184

  /* The following Procedure checks the Record and then Inserts      */
  /* the row into cr_rsrc_mst table and Returns S code if inserted   */
  /* Successfully                                                    */
  /*                                                                 */
  /* History :                                                       */
  /* Sgidugu 09/03/2002   Initial implementation                     */
  /* =============================================================== */
   PROCEDURE  check_data(p_resources        IN VARCHAR2,
                        p_resource_desc      IN VARCHAR2,
                        p_std_usage_um       IN VARCHAR2,
                        p_resource_class     IN VARCHAR2,
                        p_cost_cmpntcls_id   IN NUMBER,
                        p_min_capacity       IN NUMBER,
                        p_max_capacity       IN NUMBER,
                        p_capacity_uom       IN   VARCHAR2,
                        p_capacity_constraint  IN   NUMBER,
                        p_capacity_tolerance   IN   NUMBER,
                        x_message_count          OUT  NOCOPY NUMBER,
                        x_message_list           OUT  NOCOPY VARCHAR2,
                        x_return_status      OUT  NOCOPY VARCHAR2) IS
   CURSOR Cur_resources IS
   SELECT COUNT(1)
   FROM   cr_rsrc_mst
   where  resources = p_resources
   and    delete_mark = 0;
Line: 211

   SELECT COUNT(1)
   --FROM   sy_uoms_mst        vkinduri BUG 13575854
   FROM   mtl_units_of_measure
   WHERE  uom_code = p_std_usage_um;
Line: 218

   SELECT COUNT(1)
   FROM   cr_rsrc_cls
   WHERE  resource_class = p_resource_class
   AND    delete_mark = 0;
Line: 224

   SELECT COUNT(1)
   FROM   cm_cmpt_mst
   WHERE  cost_cmpntcls_id = p_cost_cmpntcls_id
   AND delete_mark     = 0;
Line: 253

       IF v_insert_flag = 'Y' then
          x_return_status := 'S';
Line: 262

       END IF;          /* End if for Insert flag = 'Y' */
Line: 438

  /*   update_resources                                              */
  /*                                                                 */
  /* DESCRIPTION:                                                    */
  /*                                                                 */
  /* API returns (x_return_code) = 'S' if the update into Generic    */
  /* Resource Table                                                  */
  /*                                                                 */
  /* History :                                                       */
  /* Sgidugu 09/04/2002   Initial implementation                     */
  /* =============================================================== */
  PROCEDURE update_resources
  ( p_api_version            IN   NUMBER                           :=  1
  , p_init_msg_list          IN   BOOLEAN                          :=  TRUE
  , p_commit                 IN   BOOLEAN                          :=  FALSE
  , p_resources              IN   cr_rsrc_mst%ROWTYPE
  , x_message_count          OUT  NOCOPY NUMBER
  , x_message_list           OUT  NOCOPY VARCHAR2
  , x_return_status          OUT  NOCOPY VARCHAR2
  ) IS

  /* Local variable section */
  l_api_name              CONSTANT VARCHAR2(30) := 'INSERT_RESOURCES';
Line: 464

  resource_update_failure          EXCEPTION;
Line: 468

    SAVEPOINT update_resources;
Line: 469

    gmd_debug.log_initialize('UpdateResourcePub');
Line: 509

          RAISE resource_update_failure;
Line: 511

           /* Update the Resource Data now */
           CR_RSRC_MST_PKG.update_row(
                                     p_resources.resources,
                                     p_resources.resource_class,
                                     p_resources.trans_cnt,
                                     NVL(p_resources.delete_mark,0),
                                     p_resources.text_code,
                                     p_resources.min_capacity,
                                     p_resources.max_capacity,
                                     p_resources.capacity_constraint,
                                     p_resources.capacity_uom,
                                     p_resources.std_usage_uom,
                                     p_resources.cost_cmpntcls_id,
                                     p_resources.resource_desc,
                                     --p_resources.last_update_date,
                                     sysdate,    -- vkinduri Bug 13575854
                                     --p_resources.last_updated_by,
                                     FND_GLOBAL.user_id,   -- vkinduri Bug 13575854
                                     --p_resources.last_update_login,
                                     FND_GLOBAL.user_id,    -- vkinduri Bug 13575854
                                     p_resources.capacity_tolerance,
                                     p_resources.utilization,
                                     p_resources.efficiency
                                     );
Line: 540

       RAISE resource_update_failure;
Line: 549

       gmd_debug.put_line('Resource was Updated successfullly');
Line: 555

    WHEN resource_update_failure OR invalid_version THEN
         ROLLBACK TO SAVEPOINT update_resources;
Line: 564

         ROLLBACK TO SAVEPOINT update_resources;
Line: 574

  END update_resources;
Line: 578

  /*   delete_resources                                              */
  /*                                                                 */
  /* DESCRIPTION:                                                    */
  /*                                                                 */
  /* API returns (x_return_code) = 'S' if the delete Resources       */
  /* was Successful                                                  */
  /*                                                                 */
  /* History :                                                       */
  /* Sgidugu 09/04/2002   Initial implementation                     */
  /* =============================================================== */
  PROCEDURE delete_resources
  ( p_api_version 	IN 	NUMBER 			        := 1
  , p_init_msg_list 	IN 	BOOLEAN 			:= TRUE
  , p_commit		IN 	BOOLEAN 			:= FALSE
  , p_resources 	IN	cr_rsrc_mst.resources%TYPE
  , x_message_count 	OUT 	NOCOPY NUMBER
  , x_message_list 	OUT 	NOCOPY VARCHAR2
  , x_return_status	OUT 	NOCOPY VARCHAR2
  ) IS
  CURSOR Cur_resources IS
  SELECT count(1)
  FROM cr_rsrc_mst
  where resources = p_resources;
Line: 605

  l_api_name              CONSTANT VARCHAR2(30) := 'DELETE_RESOURCES';
Line: 609

  resource_delete_failure           EXCEPTION;
Line: 612

    SAVEPOINT delete_resources;
Line: 613

    gmd_debug.log_initialize('DeleteResourcePub');
Line: 638

        GMD_DEBUG.PUT_LINE('Resource to be deleted Does Not Exist ');
Line: 640

        RAISE resource_delete_failure;
Line: 642

        delete from cr_rsrc_mst_tl
        where resources = p_resources;
Line: 645

        delete from cr_rsrc_mst_b
        where resources = p_resources;
Line: 656

       gmd_debug.put_line('Resource was deleted successfully');
Line: 662

    WHEN resource_delete_failure OR invalid_version THEN
         ROLLBACK TO SAVEPOINT delete_resources;
Line: 671

         ROLLBACK TO SAVEPOINT delete_resources;
Line: 681

  END delete_resources;