Enterprise Resource Planning Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

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

sunil7330_0-1766577746228.png

 

We can find bapis using bapi transaction and can search with respect to module.

Method2:

SE37

sunil7330_1-1766577746231.png

 

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

sunil7330_2-1766577746233.png

 

sunil7330_3-1766577746243.png

 

sunil7330_4-1766577746248.png

which fields  are mandatory?

sunil7330_5-1766577746255.png

 

In se37 after executing the bapi we get screen as below

sunil7330_6-1766577746258.png

 

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:

sunil7330_7-1766577746267.png

 

sunil7330_8-1766577746271.png

By following above path we can see  if fields are optional or mandatory and can also see default values

sunil7330_9-1766577746276.png

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

sunil7330_10-1766577746279.png

 

sunil7330_11-1766577746281.png

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

sunil7330_12-1766577746285.png

Pass the mandatory values

sunil7330_13-1766577746288.png

Then execute

sunil7330_14-1766577746292.png

Click on back button

sunil7330_15-1766577746294.png

Now we are in commit BAPI

Pass ‘X’  and execute

sunil7330_16-1766577746296.png

 

Click on back button again

sunil7330_17-1766577746298.png

RESULT:

Before executing BAPI

sunil7330_18-1766577746302.png

 

After executing BAPI

sunil7330_19-1766577746304.png

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

sunil7330_20-1766577746308.png

 

sunil7330_21-1766577746309.png

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. 

2 Comments
Labels in this area