Hi experts,
When create purchase order with reference to some purchase requisition, I want to close this PR by enhancement code. And I know there are two function modules BAPI_PR_CHANGE and BAPI_REQUISITION_DELETE can set PReq Closed flag.
But what I'm insterested in is to achieve it like standard SAP, not using BAPI. Please refer to the screenshot below, if we click the button and save PO, the PR will be closed.
I tried method IF_PURCHASE_ORDER_SCHEDULE_MM~SET_DATA(), but failed to close PR. And I found that this flag is not reflected on the field MEPOSCHEDULE-EBAKZ.
So could anyone tell me how standard SAP achieve this? Many thanks!
Regards,
Shelwin