INTRODUCTION:
Functional consultants need to use bapi's when it is not possible to meet client requirements with standard screens.
This blogg is useful to give A general idea about finding bapi's and also to test them.
BAPI
BAPI(Business Application Programming Interface) is a business-level programming interface provided by SAP to execute standard business processes in a controlled and validated way.
In short they simulate the business logic behind the functional screens ,BAPI validate data before updating to tables so they reduce the risk of data corruption,
BAPI are used to connect sap system with non-sap system and also in developing custom screens to meet the business requirement
HOW TO FIND BAPI’S
Method:1
TCODE: BAPI
We can find bapis using bapi transaction and can search with respect to module.
Method2:
SE37
Search with *BAPI_* to find the bapi
Method3:
Just search in google or with ai.
IMPORTANT DETAILS REGARDING BAPI
1.Please read the bapi documentation clearly. Sometimes it will save lot of time
To find the documentation pass the bapi
Pass the bapi in se37 and click on display and then in new screen click on function module documentation
which fields are mandatory?
In se37 after executing the bapi we get screen as below
The screen has import parameters and tables.
To get clarity on mandatory fields.
Step1: read documentation it will sometimes have values related to import parameters.
Step2:
By following above path we can see if fields are optional or mandatory and can also see default values
Similarly we can check for tables. if there is no optional tickmark its mandatory to pass values in that field or table .
We can take reference from standard screens on what data to pass as bapi replicate business logic behind standard screens.
TESTING BAPI
For most of the bapis , bapi transaction commit also need to be passed for changes changes to reflect in system but there are few exceptions like BAPI_PRODORD_RELEASE where there is no need to commit.
After clicking on execute we are in first bapi
Pass the mandatory values
Then execute
Click on back button
Now we are in commit BAPI
Pass ‘X’ and execute
Click on back button again
RESULT:
Before executing BAPI
After executing BAPI
We can copy the test data to test data directory for future reference or to pass the test data to ABAP team.
To check the executed test data
Click on the record number we can check what data was passed.
CONCLUSION:
Please follow above steps for finding bapi's and also to test them.