DBA Data[Home] [Help]

APPS.CSP_TRANSACTIONS_PUB SQL Statements

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

Line: 43

  select quantity_delivered
  from   mtl_txn_request_lines
  where  line_id = p_line_id;
Line: 89

  select header_id
  from   mtl_txn_request_lines
  where  line_id = p_line_id;
Line: 101

  l_trolin_tbl(1).operation  := inv_globals.g_opr_update;
Line: 181

      SELECT header_id
      INTO l_header_id
      FROM mtl_txn_request_headers
      WHERE header_id = px_header_id
      AND   organization_id = p_organization_id;
Line: 207

  l_mohdr_rec.last_updated_by       := nvl(fnd_global.user_id,1);
Line: 208

  l_mohdr_rec.last_update_date      := sysdate;
Line: 209

  l_mohdr_rec.last_update_login     := nvl(fnd_global.login_id,-1);
Line: 236

    /* call table handlers for inserting into csp_move_order_header table*/
    csp_to_form_moheaders.Validate_and_Write(
       P_Api_Version_Number           => 1.0
      ,P_Init_Msg_List               => p_init_msg_list
      ,P_Commit                      => l_commit
      ,p_validation_level            => null
      ,p_action_code                 => 0    -- 0 = insert, 1 = update, 2 = delete
      ,p_header_id                   => l_mohdr_rec.header_id
      ,p_created_by                  => nvl(fnd_global.user_id,1)
      ,p_creation_date               => sysdate
      ,p_last_updated_by             => nvl(fnd_global.user_id,1)
      ,p_last_update_date            => sysdate
      ,p_last_update_login           => nvl(fnd_global.login_id,-1)
      ,p_carrier                     => p_freight_carrier
      ,p_shipment_method              => p_shipment_method
      ,p_autoreceipt_flag             => p_autoreceipt_flag
      ,p_attribute_category           => null
      ,p_attribute1                   => null
      ,p_attribute2                   => null
      ,p_attribute3                   => null
      ,p_attribute4                   => null
      ,p_attribute5                   => null
      ,p_attribute6                   => null
      ,p_attribute7                   => null
      ,p_attribute8                   => null
      ,p_attribute9                   => null
      ,p_attribute10                  => null
      ,p_attribute11                  => null
      ,p_attribute12                  => null
      ,p_attribute13                  => null
      ,p_attribute14                  => null
      ,p_attribute15                  => null
      ,p_location_id                  => null
      /*,p_address1                     => p_address1
      ,p_address2                     => p_address2
      ,p_address3                     => p_address3
      ,p_address4                     => p_address4
      ,p_city                         => p_city
      ,p_postal_code                  => p_postal_code
      ,p_state                        => p_state
      ,p_province                     => p_province
      ,p_country                      => p_country */
      ,X_Return_Status                => l_return_status
      ,X_Msg_Count                    => l_msg_count
      ,X_Msg_Data                     => l_msg_data
     );
Line: 428

      SELECT line_id
      INTO l_line_id
      FROM mtl_txn_request_lines
      WHERE line_id = px_line_id
      AND   organization_id = p_organization_id;
Line: 446

  select nvl(max(line_number), 0)
  into l_line_num
  from mtl_txn_request_lines
  where header_id = p_header_id;
Line: 463

  l_trolin_tbl(l_order_count).last_updated_by       := nvl(FND_GLOBAL.USER_ID,1);
Line: 464

  l_trolin_tbl(l_order_count).last_update_date      := sysdate;
Line: 465

  l_trolin_tbl(l_order_count).last_update_login     := nvl(FND_GLOBAL.LOGIN_ID, -1);
Line: 500

     /* call table handlers for inserting into csp_move_order_lines table*/
     csp_to_form_molines.Validate_and_Write(
           P_Api_Version_Number      => 1.0
          ,P_Init_Msg_List           => p_init_msg_list
          ,P_Commit                  => l_commit
          ,p_validation_level        => null
          ,p_action_code             => 0
          ,P_line_id                 => l_trolin_tbl(l_order_count).line_id
          ,p_CREATED_BY              => nvl(fnd_global.user_id,1)
          ,p_CREATION_DATE           => sysdate
          ,p_LAST_UPDATED_BY         => nvl(fnd_global.user_id,1)
          ,p_LAST_UPDATE_DATE        => sysdate
          ,p_LAST_UPDATED_LOGIN      => nvl(fnd_global.login_id,-1)
          ,p_HEADER_ID               => p_header_id
          ,p_CUSTOMER_PO             => p_customer_po
          ,p_INCIDENT_ID             => p_service_request
          ,p_TASK_ID                 => p_task_id
          ,p_TASK_ASSIGNMENT_ID      => p_task_assignment_id
          ,p_COMMENTS                => p_comments
          ,p_attribute_category     => null
          ,p_attribute1             => null
          ,p_attribute2             => null
          ,p_attribute3             => null
          ,p_attribute4             => null
          ,p_attribute5             => null
          ,p_attribute6             => null
          ,p_attribute7             => null
          ,p_attribute8             => null
          ,p_attribute9             => null
          ,p_attribute10            => null
          ,p_attribute11            => null
          ,p_attribute12            => null
          ,p_attribute13            => null
          ,p_attribute14            => null
          ,p_attribute15            => null
          ,X_Return_Status          => l_return_status
          ,X_Msg_Count              => l_msg_count
          ,X_Msg_Data               => l_msg_data
     );
Line: 691

    SELECT mtl_material_transactions_s.nextval
    FROM   dual;
Line: 696

    SELECT acct_period_id
    FROM   org_acct_periods
    WHERE  trunc(period_start_date) <= trunc(p_transaction_date)
    AND    trunc(schedule_close_date) >= trunc(p_transaction_date)
    AND    organization_id = p_organization_id
    AND    period_close_date is null
    AND    nvl(open_flag,'Y') = 'Y';
Line: 705

    SELECT application_id,
           responsibility_id
    FROM   fnd_responsibility
    WHERE  responsibility_key = 'SPARES_MANAGEMENT';
Line: 711

    SELECT cost_of_sales_account,inventory_asset_flag
    FROM   mtl_system_items_b
    WHERE  organization_id = p_org_id
    AND    inventory_item_id = p_item_id;
Line: 717

    SELECT asset_inventory
    FROM   mtl_secondary_inventories
    WHERE  organization_id = p_org_id
    AND    secondary_inventory_name = p_subinv;
Line: 771

             select inventory_item_id into l_check_existence
             from mtl_system_items_kfv
             where inventory_item_id = p_inventory_item_id
             and organization_id = p_organization_id;
Line: 810

       SELECT TO_NUMBER(DECODE(SUBSTRB(USERENV('CLIENT_INFO'),1,1), ' ', NULL,
                                SUBSTRB(USERENV('CLIENT_INFO'),1,10)))
       INTO   p_org_id
       from dual;
Line: 815

		SElECT gcc.code_combination_id
		INTO   l_code_comb_id
		FROM   hr_operating_units hou,gl_sets_of_books gsob,
			   gl_code_combinations gcc
    	--	WHERE hou.organization_id = p_organization_id
                WHERE hou.organization_id = p_org_id
		AND   hou.set_of_books_id = gsob.set_of_books_id
		AND   gsob.chart_of_accounts_id = gcc.chart_of_accounts_id
		AND   gcc.code_combination_id = p_account_id;
Line: 905

      SELECT SHIPMENT_NUMBER INTO l_ship_number
      FROM MTL_MATERIAL_TRANSACTIONS_TEMP M
      WHERE M.SHIPMENT_NUMBER = p_shipment_number AND ROWNUM = 1;
Line: 920

      SELECT SHIPMENT_NUM INTO l_ship_number
      FROM RCV_SHIPMENT_HEADERS M
      WHERE M.SHIPMENT_NUM = p_shipment_number AND ROWNUM = 1;
Line: 935

      SELECT SHIPMENT_NUMBER INTO l_ship_number
      FROM MTL_TRANSACTIONS_INTERFACE M
      WHERE M.SHIPMENT_NUMBER = p_shipment_number AND ROWNUM = 1;
Line: 965

  INSERT INTO mtl_transactions_interface
    ( source_code
    , source_header_id
    , source_line_id
    , process_flag
    , transaction_mode
    , transaction_header_id
    , transaction_interface_id
    , inventory_item_id
    , revision
    , organization_id
    , subinventory_code
    , locator_id
    , transaction_quantity
    , transaction_uom
    , transaction_date
    , acct_period_id
    , distribution_account_id
    , transaction_source_name
    , transaction_type_id
    , transfer_subinventory
    , transfer_locator
    , transfer_organization
    , last_update_date
    , last_updated_by
    , creation_date
    , created_by
    , last_update_login
    , lock_flag    --always set to 2 so that the transaction_manager will pick the record and assign it to the transaction_worker.
    , transaction_source_id
    , trx_source_line_id
    , waybill_airbill
    , shipment_number
    , freight_code
    , reason_id
    , transaction_reference
    , expected_arrival_date
    , WIP_ENTITY_TYPE
    , FINAL_COMPLETION_FLAG
    )
  VALUES
    ( nvl(p_source_id,'CSP')
    , 100                               -- source header id
    , nvl(p_source_line_id,1)
    , 1                                 --process_flag yes
    , 2                                 --transaction_mode online
    , l_transaction_header_id
    , l_transaction_interface_id
    , p_inventory_item_id
    , p_revision
    , p_organization_id
    , p_subinventory_code
    , p_locator_id
    , l_quantity
    , p_uom
    , p_transaction_date                           --transaction_date
    , l_acct_period_id
    , l_account_id
    , p_transaction_source_name
    , p_transaction_type_id
    , p_transfer_to_subinventory
    , p_transfer_to_locator
    , p_transfer_to_organization
    , sysdate                           --last_update_date
    , nvl(fnd_global.user_id,1)         --last_updated_by
    , sysdate                           --creation_date
    , nvl(fnd_global.user_id,1)         --created_by
    , nvl(fnd_global.login_id,-1)
    , 2
    , decode(sign(p_transaction_source_id-1000000000000),-1,
                  p_transaction_source_id,null)
    , decode(sign(greatest(p_transaction_source_id,p_trx_source_line_id)
                  -1000000000000),-1,p_trx_source_line_id,null)
    , p_waybill_airbill
    , p_shipment_number
    , p_freight_code
    , p_reason_id
    , p_transaction_reference
    , p_expected_delivery_date
    , l_WIP_ENTITY_TYPE
    , l_FINAL_COMPLETION_FLAG
  );
Line: 1050

      select process_flag,transaction_source_id,wip_entity_type
        into l_process_flag,l_transaction_source_id,l_wip_entity_type
        from mtl_transactions_interface
       where transaction_header_id = l_transaction_header_id
         and transaction_interface_id = l_transaction_interface_id;
Line: 1062

    select count(*)
      into ln_count
      from mtl_system_items
     where inventory_item_id = p_inventory_item_id
       and serial_number_control_code <> 1
       and lot_control_code = 2
       and organization_id = p_organization_id;
Line: 1075

        Select lot_number
          into l_lot_number_val
          From MTL_SERIAL_NUMBERS_VAL_V
         Where current_organization_id = p_organization_id
           and current_subinventory_code = p_subinventory_code
           and inventory_item_id = p_inventory_item_id
           and serial_number = p_serial_number
           and lot_number is not null;
Line: 1098

    INSERT INTO mtl_transaction_lots_interface
    ( transaction_interface_id
    , lot_number
    , lot_expiration_date
    , transaction_quantity
    , serial_transaction_temp_id
    , last_update_date
    , last_updated_by
    , creation_date
    , created_by
    , last_update_login
    )
    VALUES
    ( l_transaction_interface_id
    , p_lot_number_temp
    , p_lot_expiration_date
    , p_quantity
    , l_transaction_interface_id  -- We will only have 1 serial number at a time
    , sysdate
    , nvl(fnd_global.user_id,-1)
    , sysdate
    , nvl(fnd_global.user_id,-1)
    , nvl(fnd_global.login_id,-1)
    );
Line: 1125

    INSERT INTO mtl_serial_numbers_interface
    ( transaction_interface_id
    , fm_serial_number
    , to_serial_number
    , last_update_date
    , last_updated_by
    , creation_date
    , created_by
    , last_update_login)
    VALUES
    ( l_transaction_interface_id
    , p_serial_number
    , nvl(p_to_serial_number, p_serial_number)
    , sysdate           --last_update_date
    , nvl(fnd_global.user_id,1) --last_updated_by
    , sysdate           --creation_date
    , nvl(fnd_global.user_id,1) --created_by
    , nvl(fnd_global.login_id,-1)   --last_update_login
    );
Line: 1189

        select error_code, error_explanation
          into l_error_code, l_error_explanation
        from mtl_transactions_interface
        where transaction_header_id = l_transaction_header_id
          and rownum = 1;
Line: 1228

      delete from mtl_transactions_interface where transaction_header_id = l_transaction_header_id;
Line: 1329

       select
        transaction_temp_id      ,
        transaction_source_id    ,
        lot_number               ,
        lot_expiration_date      ,
        transaction_quantity     ,
        move_order_line_id       ,
        item_lot_control_code    ,
        item_serial_control_code ,
        inventory_item_id        ,
        organization_id          ,
        subinventory_code        ,
        locator_id               ,
        revision                 ,
        TRANSACTION_UOM          ,
        SOURCE_CODE              ,
        source_line_id           ,
        TRANSACTION_TYPE_ID      ,
        distribution_account_id  ,
        transfer_subinventory    ,
        transfer_to_location     ,
        transfer_organization    ,
        trx_source_line_id       ,
        expected_arrival_date
      from mtl_material_transactions_temp
      where transaction_temp_id = p_transaction_temp_id;
Line: 1357

        select transaction_temp_id, serial_transaction_temp_id,
               lot_number, lot_expiration_date, transaction_quantity
        from mtl_transaction_lots_temp
        where transaction_temp_id = p_transaction_temp_id;
Line: 1363

        select transaction_temp_id, fm_serial_number, to_serial_number, serial_prefix from mtl_serial_numbers_temp
        where transaction_temp_id = l_transaction_temp_id;
Line: 1367

        SELECT mtl_material_transactions_s.nextval
        FROM   dual;
Line: 1371

        select distinct header_id from csp_moveorder_lines
        where line_id = l_line_id;
Line: 1458

                    select transaction_temp_id into l_check_existence
                    from mtl_material_transactions_temp
                    where transaction_temp_id = p_transaction_temp_id;