DBA Data[Home] [Help]

APPS.EAM_MTL_TXN_PROCESS SQL Statements

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

Line: 106

 select 1 into x_future_date from dual where p_date <= sysdate ;
Line: 119

 select inventory_item_id into p_item_id
 from mtl_system_items_b_kfv
 where
 concatenated_segments = p_item
 and organization_id = p_org_id;
Line: 138

  select sum(transaction_quantity) into l_mti_qty
  from mtl_transactions_interface
  where transaction_source_id = p_trx_src_id
  and transaction_type_id = 43
  and organization_id = p_org_id
  and inventory_item_id = p_item_id
  and process_flag = 1;  --1(ready). Do not pick up 3(errored) or 2(not ready)
Line: 147

    select quantity_issued into l_qty_issued
    from wip_requirement_operations
    where wip_entity_id = p_trx_src_id
    and inventory_item_id = p_item_id;
Line: 176

 select secondary_inventory_name into p_subinv_code
 from mtl_secondary_inventories
 where
 secondary_inventory_name = p_subinv_code
 and organization_id = p_org_id
 and nvl(disable_date,trunc(sysdate)+1)>trunc(sysdate)
 and inv_material_status_grp.is_status_applicable(NULL,NULL,p_trx_type_id,NULL,NULL,
     p_org_id,p_item_id,secondary_inventory_name,NULL,NULL,NULL,'Z') = 'Y' ;
Line: 186

 select secondary_inventory_name into p_subinv_code
 from mtl_secondary_inventories
 where
 secondary_inventory_name = p_subinv_code
 and organization_id = p_org_id
 and nvl(disable_date,trunc(sysdate)+1)>trunc(sysdate)
 and inv_material_status_grp.is_status_applicable(NULL,NULL,p_trx_type_id,NULL,NULL,
     p_org_id,p_item_id,secondary_inventory_name,NULL,NULL,NULL,'Z') = 'Y'
 and EXISTS (select secondary_inventory from mtl_item_sub_inventories
                       where secondary_inventory = secondary_inventory_name
                       and  inventory_item_id = p_item_id
                       and organization_id = p_org_id);
Line: 219

 select Inventory_Location_ID into p_locator_id
 from mtl_item_locations_kfv where
 concatenated_segments = p_locator
 and subinventory_code = p_subinv_code
 and organization_id   = p_org_id;
Line: 226

 select Inventory_Location_ID into p_locator_id
 from mtl_item_locations_kfv where
 concatenated_segments = p_locator
 and subinventory_code = p_subinv_code
 and organization_id   = p_org_id
 and EXISTS (select '1' from mtl_secondary_locators
                      where inventory_item_id = p_item_id
                      and organization_id = p_org_id
                      and secondary_locator = inventory_location_id) ;
Line: 281

 select reason_id into p_reason_id
 from mtl_transaction_reasons
 where
 reason_name = p_reason
 and nvl(disable_date,sysdate+1) > sysdate ;
Line: 299

  select
  mtl_material_transactions_s.nextval into x_header_id
  from dual;
Line: 312

  select mtl_material_transactions_s.nextval into INV_TRANSACTIONS.G_Serial_ID
  from dual;
Line: 317

  'Inserting into MTI with Tx Header ID=' || x_header_id);
Line: 319

/* Calling the Inventory Transaction API to insert data into MTI table .*/

INV_TRANSACTIONS.Line_Interface_Insert(
                                p_item_id,
                                p_revision,
                                p_org_id,
                                p_trx_src_id,
                                p_trx_action_id,
                                p_subinv_code,
                                p_tosubinv_code,
       p_locator_id,
       p_tolocator_id,
       null,/* Added for bug# 5896548*/
       /*p_org_id,Commented for bug# 5896548*/
       p_trx_type_id,
       p_trx_src_type_id,
       p_trx_qty,
       p_uom,
       p_date,
       p_reason_id,
       p_user_id,
       x_error_mssg,
       x_status_flag
);
Line: 364

UPDATE MTL_TRANSACTIONS_INTERFACE SET
WIP_ENTITY_TYPE = p_wip_entity_type,
OPERATION_SEQ_NUM = p_operation_seq_num,
TRANSACTION_REFERENCE = p_trx_reference,
NEGATIVE_REQ_FLAG = negative_req_flag,
TRANSACTION_SOURCE_ID = p_trx_src_id,
TRANSACTION_MODE = l_tx_mode_mti  --else background transactions wont be picked up
where
TRANSACTION_HEADER_ID = x_header_id ;
Line: 382

 INV_TRANSACTIONS.LOT_INTERFACE_INSERT(
                                   p_Transaction_Quantity => p_trx_qty,
                                   p_Lot_Number => p_lot_num,
                                   p_User_Id => p_user_id,
                                   p_serial_number_control_code => p_serial_ctrl_code
);
Line: 399

INV_TRANSACTIONS.SERIAL_INTERFACE_INSERT(
                                 p_From_Serial => p_from_ser_number,
                                 p_To_Serial => p_to_ser_number,
                                 p_User_Id => p_user_id,
                                 p_lot_control_code => p_lot_ctrl_code
);
Line: 474

SELECT
negative_inv_receipt_code,stock_locator_control_code into
x_neg_flag,x_org_ctrl FROM MTL_PARAMETERS
WHERE
organization_id = p_org;
Line: 487

SELECT
locator_type into x_sub_ctrl
FROM MTL_SECONDARY_INVENTORIES
WHERE
organization_id = p_org and
secondary_inventory_name = p_subinv ;
Line: 501

SELECT
location_control_code,restrict_locators_code into
x_item_ctrl,x_restrict_flag
FROM MTL_SYSTEM_ITEMS
WHERE
inventory_item_id = p_item_id and
organization_id = p_org;
Line: 694

  l_eam_mat_req_rec.transaction_type    :=  EAM_PROCESS_WO_PVT.G_OPR_UPDATE;
Line: 950

  l_eam_direct_items_rec.transaction_type   :=  EAM_PROCESS_WO_PVT.G_OPR_UPDATE;
Line: 968

  l_eam_mat_req_rec.transaction_type    :=  EAM_PROCESS_WO_PVT.G_OPR_UPDATE;
Line: 1092

PROCEDURE insert_into_wro(
                   p_api_version        IN       NUMBER
                  ,p_init_msg_list      IN       VARCHAR2 := fnd_api.g_false
                  ,p_commit             IN       VARCHAR2 := fnd_api.g_false
                  ,p_validation_level   IN       NUMBER   := fnd_api.g_valid_level_full
                  ,p_wip_entity_id      IN       NUMBER
                  ,p_organization_id    IN       NUMBER
      ,p_inventory_item_id  IN    NUMBER
      ,p_description            IN   VARCHAR2
                  ,p_operation_seq_num    IN     NUMBER
            ,p_supply               IN    NUMBER
                ,p_mode      IN   VARCHAR2  :=  'INSERT'
      ,p_required_date        IN     DATE
      ,p_quantity            IN      NUMBER
      ,p_comments            IN      VARCHAR2
      ,p_supply_subinventory  IN     VARCHAR2
      ,p_locator    IN     VARCHAR2
      ,p_mrp_net_flag         IN     VARCHAR2
      ,p_material_release     IN     VARCHAR2
                 ,x_return_status      OUT NOCOPY      VARCHAR2
                  ,x_msg_count          OUT NOCOPY      NUMBER
                  ,x_msg_data           OUT NOCOPY      VARCHAR2
                 )

                IS
                   l_api_name       CONSTANT VARCHAR2(30) := 'insert_into_wro';
Line: 1137

         invalid_update_operation     NUMBER := 0;
Line: 1138

                   invalid_update_department    NUMBER := 0;
Line: 1139

         invalid_update_description   NUMBER := 0;
Line: 1140

                   l_update_status              NUMBER := 0;
Line: 1188

                   SAVEPOINT get_insert_into_wro_pvt;
Line: 1223

          select department_id
          into l_department_id
    from wip_operations
    where wip_entity_id = l_wip_entity_id
          and operation_seq_num = p_operation_seq_num
    and organization_id = p_organization_id;
Line: 1239

    select inventory_location_id
          into l_locator
    from mtl_item_locations_kfv
    where organization_id = p_organization_id
    and concatenated_segments = p_locator
    and subinventory_code = p_supply_subinventory ;
Line: 1259

    if(p_mode='INSERT') then
         -- entry into WIP_REQUIREMENT_OPERATIONS

                l_eam_mat_req_rec.batch_id := 1;
Line: 1325

               , p_debug_filename          => 'insertwro.log'
               , p_output_dir              => l_output_dir
                         , p_debug_file_mode         => 'w'
                       );
Line: 1334

	l_eam_mat_req_rec.transaction_type := EAM_PROCESS_WO_PUB.G_OPR_UPDATE;
Line: 1395

               , p_debug_filename          => 'updatewro.log'
               , p_output_dir              => l_output_dir
                         , p_debug_file_mode         => 'w'
                       );
Line: 1404

		     ROLLBACK TO get_insert_into_wro_pvt;
Line: 1421

                      ROLLBACK TO get_insert_into_wro_pvt;
Line: 1428

                      ROLLBACK TO get_insert_into_wro_pvt;
Line: 1435

                      ROLLBACK TO get_insert_into_wro_pvt;
Line: 1446

 END insert_into_wro;
Line: 1449

PROCEDURE insert_into_wdi(
                   p_api_version        IN       NUMBER
                  ,p_init_msg_list      IN       VARCHAR2 := fnd_api.g_false
                  ,p_commit             IN       VARCHAR2 := fnd_api.g_false
                  ,p_validation_level   IN       NUMBER   := fnd_api.g_valid_level_full
                  ,p_wip_entity_id      IN       NUMBER
                  ,p_organization_id    IN       NUMBER
      ,p_direct_item_seq_id  IN   NUMBER  := NULL
      ,p_description            IN   VARCHAR2
                  ,p_operation_seq_num    IN     NUMBER
                 ,p_mode      IN   VARCHAR2  :=  'INSERT'
                 ,p_direct_item_type    IN VARCHAR2 :='1'
                  ,p_purchasing_category_id    NUMBER          :=null
                 ,p_suggested_vendor_id         NUMBER   :=null
                 ,p_suggested_vendor_name         VARCHAR2    :=null
                 ,p_suggested_vendor_site         VARCHAR2    :=null
                 ,p_suggested_vendor_contact      VARCHAR2    :=null
                  ,p_suggested_vendor_phone        VARCHAR2    :=null,
                  p_suggested_vendor_item_num     VARCHAR2    :=null,
                  p_unit_price                    NUMBER          :=null,
                 p_auto_request_material       VARCHAR2     :=null,
                 p_required_quantity            NUMBER          :=null,
                 p_uom                          VARCHAR2     :=null,
                  p_need_by_date                 DATE            :=null
                 ,x_return_status      OUT NOCOPY      VARCHAR2
                  ,x_msg_count          OUT NOCOPY      NUMBER
                  ,x_msg_data           OUT NOCOPY      VARCHAR2
                 )
               IS
                   l_api_name       CONSTANT VARCHAR2(30) := 'insert_into_wro';
Line: 1498

		invalid_update_operation     NUMBER := 0;
Line: 1499

		invalid_update_department    NUMBER := 0;
Line: 1500

		invalid_update_description   NUMBER := 0;
Line: 1501

		l_update_status              NUMBER := 0;
Line: 1554

                   SAVEPOINT get_insert_into_wro_pvt;
Line: 1590

          select department_id
          into l_department_id
    from wip_operations
    where wip_entity_id = l_wip_entity_id
          and operation_seq_num = p_operation_seq_num
    and organization_id = p_organization_id;
Line: 1608

               if(p_mode='INSERT') then
                       l_eam_di_req_rec.transaction_type := EAM_PROCESS_WO_PUB.G_OPR_CREATE;
Line: 1611

                       l_eam_di_req_rec.transaction_type := EAM_PROCESS_WO_PUB.G_OPR_UPDATE;
Line: 1681

               , p_debug_filename          => 'insertwdi.log'
               , p_output_dir              => l_output_dir
               , p_debug_file_mode         => 'w'
                       );
Line: 1688

           if(p_mode='INSERT') then
               l_eam_mat_req_rec.transaction_type := EAM_PROCESS_WO_PUB.G_OPR_CREATE;
Line: 1691

               l_eam_mat_req_rec.transaction_type := EAM_PROCESS_WO_PUB.G_OPR_UPDATE;
Line: 1756

               , p_debug_filename          => 'insertwdi.log'
               , p_output_dir              => l_output_dir
              , p_debug_file_mode         => 'w'
                       );
Line: 1766

                    ROLLBACK TO get_insert_into_wro_pvt;
Line: 1783

                      ROLLBACK TO get_insert_into_wro_pvt;
Line: 1790

                      ROLLBACK TO get_insert_into_wro_pvt;
Line: 1797

                      ROLLBACK TO get_insert_into_wro_pvt;
Line: 1808

END insert_into_wdi;