After running the API, what result it giving ? Any error msg ?
Please visit the following MOS doc. It's showing as Bug.
Bug 4711021 : SAME AS 4264508? CANNOT CLOSE PO USING PO_ACTIONS.CLOSE_PO
FAQ: Finally Close Control Action (Doc ID 1481368.1)
The po_actions.close_po is returning False. I am working on 220.127.116.11 version.
I have gone through the post that you pasted, unfortunately it didn't have solution. Did anyone has solution on this requirement of closing the PO header and line in 18.104.22.168.
-- lv_header_id NUMBER := p_header_id;
FND_global.apps_initialize (user_id => 74131 ,resp_id => 54926 ,resp_appl_id =>201 );
lv_result := PO_ACTIONS.CLOSE_PO(P_DOCID => 528555 ,
P_DOCTYP => 'PO',
P_DOCSUBTYP => 'STANDARD',
P_LINEID => NULL,
P_SHIPID => NULL,
P_ACTION => 'CLOSE',
P_REASON => 'Intercompany PO Closing',
P_CALLING_MODE => 'PO',
P_CONC_FLAG => 'N',
P_RETURN_CODE => lv_return_code,
P_AUTO_CLOSE => 'Y',
P_ACTION_DATE => SYSDATE,
P_ORIGIN_DOC_ID => NULL);
IF lv_result = TRUE THEN
DBMS_OUTPUT.PUT_LINE('Successfully closed PO#');
DBMS_OUTPUT.PUT_LINE('Cannot close PO#');
Let me confirm the following .
1> whether you want to close the PO at header or line level ?
2> what is the status of PO ?
3> Have you taken a receipt of PO line/shipment ? If yes, have you delivered the same ?
Please find following
1> whether you want to close the PO at header or line level ? -- Want to Close PO first at line level the after all line is closed PO header needs to be closed.
2> what is the status of PO ? Approved
3> Have you taken a receipt of PO line/shipment ? If yes, have you delivered the same ? - PO is received in full.
From the MOS research we have found that at this time there is no public API available to close the PO in mass. For the same, you have to go thru form only.
Navigation path : Purchasing resp. > PO Summary > (M) Tools > Control > Close .
There is a Enhancement request (ER) have been logged with Oracle development for this feature.
Please review the MOS Doc as well as attached screen shots.
If you have a mass PO cancellation, you can use the data loader tool.