Test BAPI in Function Builder (SE37) Using Test Sequences

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

test-sequences-sap-function-builder-1

Enter the BAPI names i.e. BAPI_GOODSMVT_CREATE and BAPI_TRANSACTION_COMMIT that we want to execute in a sequence and press execute.

test-sequences-sap-function-builder-2

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.

test-sequences-sap-function-builder-3

The BAPI will create the material document.

test-sequences-sap-function-builder-4

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.

test-sequences-sap-function-builder-5

Go back to SE37 and press BACK.

test-sequences-sap-function-builder-6

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.

test-sequences-sap-function-builder-7