Test BAPI Function module using SE37

BAPI's are remote execution enabled function modules having a business purpose (or Assigned in a BOR ). Majority of the BAPI's require BAPI_TRANSACTION_COMMIT to be called after the call of BAPI. This will commit/ Save the changes to the database.

Now if you are testing a BAPI using SE37, then even though the BAPI executes just fine , you wont be able to see the changes done as BAPI_TRANSACTION_COMMIT is not executed. In this case we can use the Test Sequences functionality provided in SE37.

Go to Test >> Test Sequences and specify the BAPI you want to test first and in second line mention 'BAPI_TRANSACTION_COMMIT'.


Now you can execute and enter data to the first FM that you want to test. When you click back after first FM execution , the second FM i.e, our COMMIT FM will execute and hence you can simulate the exact scenario as in case of real coding/program.