BAPI Concept
The full form of BAPI is Business Application Programming Interface. BAPI is an application interface program by which we can meet business function. Now interface is a program or a way or a process or something by which two different systems or applications can flow data smoothly. It means there must be a proper communication between those systems or applications.
In SAP system we call BAPI as a function module which is remotely enabled. It means we can call BAPI by ABAP programs from the same system or any outside system also. Now BAPI always hits Business Object Repository (BOR) to meet the business function. There are lots of business object in the SAP system like customer, order, invoice, purchase etc. These objects are stored in BOR. We can use T-code SW01 to open business object builder.
Business Object Repository (BOR) contains business objects in the SAP system. Technically we can say that a business object is like a class and it contains many methods which are BAPIs. Hence the class which is business object corresponds to an SAP table or a table hierarchy and we can access those tables by calling the methods of that class – BAPIs.
Difference between BAPI & RFC:
Hence we can say that BAPI is remote function module which deals with business related data through BOR. So BAPI is a part of remote function module which hits BOR and any other kind of remote function which doesn’t hit BOR is not BAPI.
RFC is a protocol, basically the interface protocol by which remote functionality works. Hence BAPIs and remote function module use this protocol to connect between two SAP or non-SAP systems.
We have a lot of standard BAPIs into the SAP system. Some of those are as follows.
GetList – Returns a list of available objects which meet the specified selection criteria.
GetDetail – Returns the detailed information for an object. Here the complete key must be specified.
Create, Change, Delete, Cancel – It allows us to do that.
AddItem, RemoveItem – It allows us to do that.
We can use T-code BAPI to go to the BAPI Explorer. From there we can navigate to the exact BAPI and we can enter to the Function Builder to view that BAPI by double clicking on that.
Properties of BAPI:
1. Naming convention BAPI_<business object name>_<method name>
2. BAPI is always remote enabled function module
3. It contains neither user dialogs nor messages
4. BAPI raise no exception
5. Return parameter which is the export parameter is mandatory for BAPI to report the errors because BAPI doesn't return any sy-subrc value.
Post a Comment