‎2009 Dec 07 8:07 AM
Hi,
May I know if there is a parameter to do test run in BAPI_PO_CREATE?
As I cannot see any in function module, I created a parameter checkbox in my selection screen.
But even I have statement if p_test = 'X' to execute BAPI_TRANSACTION_ROLLBACK, yet the PO is created.
May I know why?
IF p_test = 'X'.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
RETURN =
.
Thanks
Rgds
‎2009 Dec 07 8:51 AM
hi use BAPI_PO_CREATE1 and don't use commit it will give you PO no. but in system PO no. will not be there.
Atul
‎2009 Dec 07 9:07 AM
Hello,
In BAPI_PO_CREATE, at the end you have this FM: TRANSACTION_END. This FM does an explicit COMMIT WORK because of which you cannot ROLLBACK.
As suggested if you use BAPI_PO_CREATE1 you can simulate the PO creation using the param TESTRUN.
BR,
Suhas
‎2009 Dec 07 9:17 AM
Read OSS [Note 187687 - BAPI_PO_CREATE and Commit Work|https://service.sap.com/sap/support/notes/187687]
By specifically calling the TRANSACTION_BEGIN and TRANSACTION_END function modules in the calling program of BAPI_PO_CREATE you can perform the transaction control yourself. You can find a corresponding example in the attachment. (This document is currently available on SAP Service Marketplace and is located on the Attachment tab page).
Regards,
Raymond
‎2009 Dec 07 9:35 AM
hi,
where is the attachment tab in service marketplace? i do not see such tab at sap service marketplace.
can explain?
thanks
‎2009 Dec 07 9:59 AM