We are on RDBMS 188.8.131.52.0 and Oracle Applications 184.108.40.206
I am using po_actions.close_po in my code to close a PO distribution line.
The code used is as below . This code is part of the the other logic written in my package
APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(115);apps.fnd_client_info.setup_client_info(application_id => 201, responsibility_id => 20707, user_id => 97720, security_group_id => 0);
v_retnum := po_actions.close_po(p_docid => cur_close_po_rec.header_id, p_doctyp => 'PO', p_docsubtyp => 'STANDARD', p_lineid => 0, p_shipid => cur_close_po_rec.line_location_id, p_action => 'CLOSE', p_reason => 'INVOICING COMPLETED BY FSC DATED ' || to_char(SYSDATE, 'DD-MON-YYYY'), --p_calling_mode => 'PO', p_calling_mode => 'AP',
p_conc_flag => 'Y', p_return_code => v_retcode, p_auto_close => 'Y', p_action_date => SYSDATE); COMMIT;
But this is not closing the PO Distribution Line.
Whereas if I run this code explicitly in an anonymous block it works well.
Please suggest where I may be going wrong.