5 Replies Latest reply: Jan 11, 2012 12:36 AM by 910247 RSS

    API's used to perform Subinventory Transfer.

    695295
      Hi,

      My requirement is to make Subinventory Transfer automated. So could anyone help me in this regard. What are all the API's and Tables were used to automate the Subinventory Transfer process. And what are all the steps do I need to take care.

      Thanks in Advance,
      Manasa.
        • 1. Re: API's used to perform Subinventory Transfer.
          595774
          Step 1 : Insert the Records in MTL_TRANSACTIONS_INTERFACE

          Step 2 : Call the INV_TXN_MANAGER_PUB.process_transactions API : Input Paameter TRANSACTION_INTERFACE_ID



          Step 1 :

          INSERT INTO MTL_TRANSACTIONS_INTERFACE
          ( created_by
          ,creation_date
          ,flow_schedule
          ,inventory_item_id
          ,last_updated_by
          ,last_update_date
          ,last_update_login
          ,locator_id
          ,lock_flag
          ,material_account
          ,organization_id
          ,process_flag
          ,program_id
          ,program_update_date
          ,scheduled_flag
          ,source_code
          ,source_header_id
          ,source_line_id
          ,subinventory_code
          ,transaction_date
          ,transaction_header_id
          ,transaction_interface_id
          ,transaction_mode
          ,transaction_quantity
          ,transaction_type_id
          ,transaction_uom
          ,transfer_locator
          ,transfer_subinventory
          ,validation_required
          )


          Step 2:

          INV_TXN_MANAGER_PUB.process_transactions(
          p_api_version => 1.0
          ,p_init_msg_list => fnd_api.g_true
          ,p_commit => fnd_api.g_true
          ,p_validation_level => fnd_api.g_valid_level_full
          ,x_return_status => l_return_status
          ,x_msg_count => l_msg_cnt
          ,x_msg_data => l_msg_data
          ,x_trans_count => l_trans_count
          ,p_table => 1
          ,p_header_id => l_transaction_header_id
          );
          • 2. Re: API's used to perform Subinventory Transfer.
            hluij1
            Is there also a API for RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE?
            • 3. Re: API's used to perform Subinventory Transfer.
              733278
              Hi All,

              i am calling the API to process the records in mtl_transactions_interface but its neither throwing any error nor processing the records and also initialized the user_id,resp_id,resp_appl_id .

              code:

              retval := apps.INV_TXN_MANAGER_PUB.process_Transactions(
              p_api_version => 1.0
              ,p_init_msg_list => fnd_api.g_true
              ,p_commit => fnd_api.g_true
              ,p_validation_level => fnd_api.g_valid_level_full
              ,x_return_status => l_return_status
              ,x_msg_count => l_msg_cnt
              ,x_msg_data => l_msg_data
              ,x_trans_count => l_trans_count
              ,p_table => 1
              ,p_header_id => transaction_interface_id
              );

              can any one suggest how to fix this and trace the error caused by .INV_TXN_MANAGER_PUB.process_Transactions .

              Edited by: user12000441 on Mar 1, 2010 7:50 AM
              • 4. Re: API's used to perform Subinventory Transfer.
                user11138684
                The prameter is not the interface_id, its the header_id.
                Try with header_id.
                • 5. Re: API's used to perform Subinventory Transfer.
                  910247
                  To test Protsess_transatstion can use the following function:

                  FUNCTION get_err_msg_interface (p_trx_header_id IN NUMBER)
                  RETURN VARCHAR2
                  IS
                  o_err_msg VARCHAR2 (4000);
                  BEGIN
                  SELECT NVL(error_explanation, error_code)
                  INTO o_err_msg
                  FROM mtl_transactions_interface
                  WHERE transaction_header_id = p_trx_header_id;
                  RETURN o_err_msg;
                  EXCEPTION
                  WHEN OTHERS THEN
                  fnd_file.put_line (fnd_file.log, 'Get_err_msg_interface Error = ' || SQLERRM);
                  RETURN p_trx_header_id;
                  END;

                  As a parameter have to pass Transaction_header_id. Calling this function after work Protsess_transatstion.