Sunday 3 May 2020

Inventory Material transactions Interface using API INV_TXN_MANAGER_PUB

Inventory Material transactions Interface 


Below given script will insert Data for Account Alias Receipt for lot number 'Test1234'
---------------------------------------------------------------------------------------

declare
     l_trx_interface_id number;

begin
     select mtl_material_transactions_s.nextval into l_trx_interface_id from dual;

     insert into mtl_transactions_interface
          (source_code,       
           source_line_id,   
           source_header_id,
           process_flag,       
           transaction_mode, 
           lock_flag,
           last_update_date,   
           last_updated_by,   
           creation_date,
           created_by,         
           inventory_item_id, 
           organization_id,
           transaction_quantity,
           transaction_uom,   
           transaction_date,
           subinventory_code,   
           transaction_type_id,
           transaction_reference,
           transaction_interface_id,                 
          distribution_account_id,
           transaction_header_id)
     values ('Test Code',         
                  1,                 
                  1,
                  1,                   
                  2,                 
                  2,
                  sysdate,             
                  -1,                 
                  sysdate,
                 -1,                 
                 456789,             
                113,
                1,                   
                'Ea',               
                 sysdate,
                 'Stores',           
                41,                 
                'Test Reference',
                l_trx_interface_id ,       
                78907,
               123456);

     insert into mtl_transaction_lots_interface
          (transaction_interface_id, 
            last_update_date, 
            last_updated_by,
           creation_date,            
            created_by,       
            lot_number,
           transaction_quantity,     
            lot_expiration_date)
     values (l_trx_interface_id ,             
                sysdate,          
                -1,
                 sysdate,                  
                -1,               
                'Test1234',
                 1,                       
                 sysdate+100);

     commit;

end;

/



The following script will call the transaction manager pub
----------------------------------------------------------

declare
     v_ret_status Varchar2(100);
     v_msg_cnt Number;
     v_msg_data Varchar2(2000);
     v_ret_value Number;
     v_trans_count Number;

begin
     v_ret_value := INV_TXN_MANAGER_PUB.process_Transactions(
          p_api_version      => 1.0,
          p_init_msg_list    => 'T',
          p_commit           => 'T',
          p_validation_level => 100,
          x_return_status    => v_ret_status,
          x_msg_count        => v_msg_cnt,
          x_msg_data         => v_msg_data,
          x_trans_count      => v_trans_count,
          p_table            => 1,
          p_header_id        => 123456);
       
     dbms_output.put_line('API return status is: '||v_ret_status);     
     dbms_output.put_line('API msg count is: '||v_msg_cnt);
     dbms_output.put_line('API msg data is: '||v_msg_data);
     dbms_output.put_line('API Trans count is: '||v_trans_count);
end;


/

1 comment:

  1. “I could not have closed on my first home without Mr, Benjamin Lee ! Benjamin and his team went above and beyond for me on this transaction. He handled my very tight turn around time with ease and was always available for me when I had questions (and I had plenty), even when he was away from the office, which I greatly appreciated! He and his team handled many last-minute scrambles with the seller and worked tirelessly to make sure that I could close before my lease (and my down payment assistance, for that matter) expired. Mr Benjamin is incredibly knowledgeable Loan Officer, courteous, and patient. I went through a couple offers on properties before my final purchase and Benjamin was there to help with each one, often coordinating with my agent behind the scenes. I felt supported throughout the entire process. Thanks to Benjamin and the tireless efforts of his team, I am now a proud home owner! I would encourage you to consider Benjamin Briel Lee for any kind of loan.Mr, Benjamin Lee Contact informaions.via WhatsApp +1-989-394-3740  Email- 247officedept@gmail.com.

    ReplyDelete

How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>

 How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>  Sometime these xml data tags automatically chang...