Introduction
As a SAP Consultant at some point of your career you will use BAPI. There is special way to test a BAPI whether it is really useful for you to call in your Program.
Solution
In our example we will be using BAPI_PO_CHANGE to change some fields in PO Line Item.
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture1-4.png)
Now we will fill the Parameters and save it as a Test Data
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture2-4.png)
Below is the Saved Test Data Entry
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture3-3.png)
Now we go back to SE37 and follow the below path
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture4-4.png)
We will put the following Function Modules.
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture5-3.png)
Now we execute based on the saved Test data
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture6-3.png)
After Executing we will hit Back Button and this will call the Commit Function Module
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture7-2.png)
BAPI_TRANSACTION_COMMIT is called and we execute
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture8-1.png)
Now executing is completed and the Database has commited.
![](/legacyfs/online/storage/blog_attachments/2020/09/Capture9-1.png)
Conclusion
We can use this Blog for both SAP ECC and SAP S/4HANA
Below is the video version
https://youtu.be/xJdf3xbS56I
Also check how to Find BAPI
https://youtu.be/bpqKiBEy8Zk
https://youtu.be/EYQW7nYLQwk