At our site, one day we ran payment and forgot to give invoice batch parameter to payment process. So payment process selected all invoices, total of 3.2 million unpaid invoices. Dev environment was slow, so Record Print Status program got stuck, it was taking too much time, we did not have any idea when it will finish. So we terminated the concurrent program for Record Print Status and tried to terminate Payment Instructions so that invoices could be paid using other payment requests. Since payment batch had 3.2 million invoices, Terminate payment instruction timed out, we tried few times but it did not help, probably this made matter worse. So my colleague Vipul Maheshwari opened Terminate Instruction Page and found API used for terminating payment instruction. I used following script and executed it using sql script based concurrent program. It cancelled payment instruction in 10 minutes,
DECLARE
v_errbuf VARCHAR2(2000);
v_retcode VARCHAR2(80);
v_debug_flag VARCHAR2(3) := 'Y'; /* Not used by this procedure */
l_instr_id NUMBER := 24863; /* <<---Payment instruction that needs to be cancelled. */
l_status_code VARCHAR2(240);
l_ret_status VARCHAR2(2000);
--
BEGIN
iby_disburse_ui_api_pub_pkg.terminate_pmt_instruction
( l_instr_id
, l_status_code /* This param is not used by this procedure*/
, l_ret_status
);
fnd_file.put_line(fnd_file.log, 'Return Status := ' || l_ret_status);
END;
/
No comments:
Post a Comment