declare
l_source_code VARCHAR2(100) :='MIGRATION';
l_lock_flag NUMBER := 2;
L_source_line_id NUMBER :=99;
l_source_header_id NUMBER :=99;
L_process_flag NUMBER :=1;
l_user_id NUMBER :=fnd_global.user_id;
l_resp_id NUMBER :=fnd_global.resp_id;
l_appl_id NUMBER :=fnd_global.resp_appl_id;
l_org_id NUMBER :=fnd_global.org_id;
l_login_id NUMBER :=fnd_global.login_id;
l_transaction_mode NUMBER :=3;
l_transaction_interface_id NUMBER;
begin
DBMS_OUTPUT.PUT_LINE('Before inserting!');
fnd_client_info.set_org_context(204);--initializing org_id
fnd_global.apps_initialize(l_user_id, l_resp_id, l_appl_id,l_login_id);
select mtl_material_transactions_s.nextval into l_transaction_interface_id from dual;
insert into MTL_TRANSACTIONS_INTERFACE
(transaction_interface_id
,source_code
,source_line_id
,source_header_id
, process_flag
, validation_required
,transaction_mode
,last_update_date
,creation_date
,created_by
,last_update_login
,inventory_item_id
,organization_id
,transaction_quantity
,transaction_uom
,transaction_date
,subinventory_code
,transaction_source_type_id
,transaction_action_id
,transaction_type_id
,transaction_cost
,distribution_account_id
,last_updated_by
,LOCK_FLAG
)
values
(l_transaction_interface_id
,l_source_code
,L_source_line_id
,l_source_header_id
,L_process_flag
,1
, l_transaction_mode
,sysdate
,sysdate
,l_user_id
,l_login_id
,209960
,l_org_id
,30
,'Ea'
,sysdate
,'Stores'
,3
,1
,42
,100
,13401
,l_user_id
,l_lock_flag);
commit;
DBMS_OUTPUT.PUT_LINE('After inserting!');
DBMS_OUTPUT.PUT_LINE('running successfully!');
exception
when others then
DBMS_OUTPUT.PUT_LINE('ERROR!');
DBMS_OUTPUT.PUT_LINE('ERROR='||sqlerrm);
end;
l_source_code VARCHAR2(100) :='MIGRATION';
l_lock_flag NUMBER := 2;
L_source_line_id NUMBER :=99;
l_source_header_id NUMBER :=99;
L_process_flag NUMBER :=1;
l_user_id NUMBER :=fnd_global.user_id;
l_resp_id NUMBER :=fnd_global.resp_id;
l_appl_id NUMBER :=fnd_global.resp_appl_id;
l_org_id NUMBER :=fnd_global.org_id;
l_login_id NUMBER :=fnd_global.login_id;
l_transaction_mode NUMBER :=3;
l_transaction_interface_id NUMBER;
begin
DBMS_OUTPUT.PUT_LINE('Before inserting!');
fnd_client_info.set_org_context(204);--initializing org_id
fnd_global.apps_initialize(l_user_id, l_resp_id, l_appl_id,l_login_id);
select mtl_material_transactions_s.nextval into l_transaction_interface_id from dual;
insert into MTL_TRANSACTIONS_INTERFACE
(transaction_interface_id
,source_code
,source_line_id
,source_header_id
, process_flag
, validation_required
,transaction_mode
,last_update_date
,creation_date
,created_by
,last_update_login
,inventory_item_id
,organization_id
,transaction_quantity
,transaction_uom
,transaction_date
,subinventory_code
,transaction_source_type_id
,transaction_action_id
,transaction_type_id
,transaction_cost
,distribution_account_id
,last_updated_by
,LOCK_FLAG
)
values
(l_transaction_interface_id
,l_source_code
,L_source_line_id
,l_source_header_id
,L_process_flag
,1
, l_transaction_mode
,sysdate
,sysdate
,l_user_id
,l_login_id
,209960
,l_org_id
,30
,'Ea'
,sysdate
,'Stores'
,3
,1
,42
,100
,13401
,l_user_id
,l_lock_flag);
commit;
DBMS_OUTPUT.PUT_LINE('After inserting!');
DBMS_OUTPUT.PUT_LINE('running successfully!');
exception
when others then
DBMS_OUTPUT.PUT_LINE('ERROR!');
DBMS_OUTPUT.PUT_LINE('ERROR='||sqlerrm);
end;
No comments:
Post a Comment