How to test a create/change BAPI that requires a database commit in function builder?
Let us test a BAPI (BAPI_GOODSMVT_CREATE) that requires a database commit without writing any code. First go to functional builder (SE37), enter the name of the BAPI and select the menu Function Module –> Test –> Test Sequences
Enter the BAPI names i.e. BAPI_GOODSMVT_CREATE and BAPI_TRANSACTION_COMMIT that we want to execute in a sequence and press execute.
As soon as execute is pressed, test environment for BAPI BAPI_GOODSMVT_CREATE will be triggered. Enter the appropriate input for the BAPI and execute.
The BAPI will create the material document.
At this point the material document is not yet stored in database since database commit is not yet issued. Go to MB03 and try to display the material document 4900324182/2013.
Go back to SE37 and press BACK.
As soon as back button is pressed, test environment for BAPI_TRANSACTION_COMMIT will be triggered. Just execute to issue the database commit.
Now go to MB03 and check the material document.