In this topic i will show you how to test SAP BAPI as functional consultant roles. In this topic, i will show you example for stock movement.
1/ Find right BAPI for your requirements.
Use tcode: SE38 to find your BAPI, search BAPI with prefix “BAPI*”
2/ Perform testing
By default, the BAPI with insert data to database will not commit data to database when you executed. We need to add another standard BAPI to tell system that you want to commit work to database. The BAPI name :”BAPI_TRANSACTION_COMMIT”
To do that, we need to add the commit work BAPI into your BAPI call sequences.
First enter your main BAPI will be processed
Second, enter commit work BAPI : BAPI_TRANSACTION_COMMIT
3/ Enter value to BAPI structure
Click to ICON(s) to enter BAPI data
Enter Header Information
Enter Items Information
Material Document Created but haven’t save to database yet.
Click back on Main GUI
Execute commit work BAPI
4/ Check document created in SAP
For material movement, i can use tcode: MIGO to check the document created by BAPI
Check error return if any
5/ Save your test data for future use
Reuse test data
Cuong Dang (Cody)