Synchronizing the Expense Report Status
Normally when any employee submits the expense report, it will go to the supervisor for approval and after the approval it will go for audit and once the audit is completed then the report will get imported to accounts payables for invoice processing and will get paid as per the process.. in this whole process expense report will get changed the status from the multiple stages.. here in this case, expense report has been stuck up with Ready for payment and not changing further to proceed with the payment…
We can use the below script to update/change/synchronize the expense report status for a specific report.. this need to be tested in the test environment first and need to move it to production after the successful testing.. if the issue is different than this we recommend you to open an SR with oracle to get the issue fixed..
create table Iron_ap_exp_rep_hed_329725_bkp as
SELECT *
FROM ap_expense_report_headers_all
WHERE expense_status_code = ‘INVOICED’
and vouchno is not null;
declare
cursor c1 is
SELECT vouchno, org_id, report_header_id
FROM ap_expense_report_headers_all
WHERE expense_status_code = ‘INVOICED’
and vouchno is not null;
begin
for i in c1 loop
mo_global.set_policy_context(‘S’, i.org_id) ;
AP_WEB_UTILITIES_PKG.UpdateExpenseStatusCode( p_invoice_id => i.vouchno);
end loop;
commit;
end;