DBA Data[Home] [Help]

APPS.CSL_MTL_UNIT_TRANS_ACC_PKG SQL Statements

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

Line: 11

g_old_resource_id       NUMBER; -- variable containing old resource_id; populated in Pre_Update hook
Line: 14

PROCEDURE Insert_MTL_Unit_Trans(
                                      p_resource_id         NUMBER,
                                      p_transaction_id      NUMBER,
                                      p_inventory_item_id   NUMBER,
                                      p_organization_id     NUMBER,
		        p_subinventory_code   VARCHAR2
	                )
IS

CURSOR c_mtl_unit_trans(b_transaction_id      NUMBER
                       ,b_inventory_item_id   NUMBER
                       ,b_organization_id     NUMBER
                       ,b_subinventory_code   VARCHAR2)
       IS
           SELECT TRANSACTION_ID, SERIAL_NUMBER
           FROM MTL_UNIT_TRANSACTIONS
           WHERE TRANSACTION_ID = b_transaction_id
           AND INVENTORY_ITEM_ID = b_inventory_item_id
           AND ORGANIZATION_ID = b_organization_id
           AND SUBINVENTORY_CODE = b_subinventory_code;
Line: 45

    , v_message     => 'Entering Insert_MTL_Unit_Trans'
    , v_level_id    => JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_FULL);
Line: 58

      , v_message     => 'Insert_MTL_Unit_Trans could not find records for transaction :' || p_transaction_id ||
                         ' , ' || p_inventory_item_id || p_organization_id ||
                         ' , ' || p_subinventory_code || ' for resource id ' || p_resource_id
      , v_level_id    => JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_MEDIUM);
Line: 71

        , v_message     => 'Inserting ACC record :' || p_transaction_id ||
                           ' , ' || p_inventory_item_id || p_organization_id ||
                           ' , ' || p_subinventory_code || ' for resource id ' || p_resource_id
        , v_level_id    => JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_FULL);
Line: 79

      /*** Call common package to insert record into ACC table ***/
      JTM_HOOK_UTIL_PKG.Insert_Acc
      ( p_publication_item_names => g_publication_item_name
       ,p_acc_table_name         => g_acc_table_name
       ,p_resource_id            => p_resource_id
       ,p_pk1_name               => g_pk1_name
       ,p_pk1_num_value          => r_mtl_unit_trans.TRANSACTION_ID
       ,p_pk2_name               => g_pk2_name
       ,p_pk2_char_value         => r_mtl_unit_trans.SERIAL_NUMBER
      );
Line: 93

END Insert_MTL_Unit_Trans;
Line: 96

PROCEDURE Update_MTL_Unit_Trans(
                                      p_resource_id         NUMBER,
                                      p_transaction_id      NUMBER,
                                      p_inventory_item_id   NUMBER,
                                      p_organization_id     NUMBER,
		        p_subinventory_code   VARCHAR2
		      )
IS

BEGIN

/*** Not necassery because it will be an insert or delete updates will not be done from the csp_inv_loc_ass package ***/
  /*** get debug level ***/
  g_debug_level := JTM_HOOK_UTIL_PKG.Get_Debug_Level;
Line: 111

END Update_MTL_Unit_Trans;
Line: 114

PROCEDURE Delete_MTL_Unit_Trans(
                                      p_resource_id         NUMBER,
                                      p_transaction_id      NUMBER,
                                      p_inventory_item_id   NUMBER,
                                      p_organization_id     NUMBER,
		        p_subinventory_code   VARCHAR2
	                     )
IS

CURSOR c_mtl_unit_trans(b_transaction_id      NUMBER
                       ,b_inventory_item_id   NUMBER
                       ,b_organization_id     NUMBER
                       ,b_subinventory_code   VARCHAR2)
       IS
           SELECT TRANSACTION_ID, SERIAL_NUMBER
           FROM MTL_UNIT_TRANSACTIONS
           WHERE TRANSACTION_ID = b_transaction_id
           AND INVENTORY_ITEM_ID = b_inventory_item_id
           AND ORGANIZATION_ID = b_organization_id
           AND SUBINVENTORY_CODE = b_subinventory_code;
Line: 146

    , v_message     => 'Entering Delete_MTL_trans_lot_num'
    , v_level_id    => JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_FULL);
Line: 159

      , v_message     => 'Delete_MTL_trans_lot_num could not find transaction records for transaction :' || p_transaction_id ||
                         ' , ' || p_inventory_item_id || p_organization_id ||
                         ' , ' || p_subinventory_code || ' for resource id ' || p_resource_id
      , v_level_id    => JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_MEDIUM);
Line: 180

      /*** Call common package to insert record into ACC table ***/
      JTM_HOOK_UTIL_PKG.Delete_Acc
      ( p_publication_item_names => g_publication_item_name
       ,p_acc_table_name         => g_acc_table_name
       ,p_resource_id            => p_resource_id
       ,p_pk1_name               => g_pk1_name
       ,p_pk1_num_value          => r_mtl_unit_trans.TRANSACTION_ID
       ,p_pk2_name               => g_pk2_name
       ,p_pk2_char_value         => r_mtl_unit_trans.SERIAL_NUMBER
      );
Line: 194

END Delete_MTL_Unit_Trans;
Line: 196

/*Delete all records for non-existing user ( e.g user was deleted )*/
PROCEDURE DELETE_ALL_ACC_RECORDS( p_resource_id IN NUMBER
                                , x_return_status OUT NOCOPY VARCHAR2 )
IS
BEGIN
  /*** get debug level ***/
  g_debug_level := JTM_HOOK_UTIL_PKG.Get_Debug_Level;
Line: 207

    , 'Entering DELETE_ALL_ACC_RECORDS'
    , JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_FULL
    );
Line: 212

  DELETE JTM_MTL_UNIT_TRANS_ACC
  WHERE  RESOURCE_ID = p_resource_id;
Line: 221

    , 'Leaving DELETE_ALL_ACC_RECORDS'
    , JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_FULL
    );
Line: 233

    , v_message     => 'Caught exception in DELETE_ALL_ACC_RECORDS hook:' || fnd_global.local_chr(10) || sqlerrm
    , v_level_id    => JTM_HOOK_UTIL_PKG.G_DEBUG_LEVEL_ERROR);
Line: 237

END DELETE_ALL_ACC_RECORDS;