(Business Application Programming Interface) : Some of The Important Points Related To BAPI
(Business Application Programming Interface) : Some of The Important Points Related To BAPI
BAPI's are used to connecting from SAP to SAP as well as SAP to NON-SAP.
BAPI's are defined as an API method (Application Programming Interface) of SAP objects. These
methods & their objects are stored as well maintained in BOR (Business Object Repository). BOR
taking care about version change management (when ever the version is changed, if any changes
required in BAPI those changes is done by BOR).
BAPI's are also called as one of the remote enable function module.
Execute SE11.
Select the radio button data type.
Provide the BAPI structure name (ZBAPI_STR).
Click on create.
Select the radio button structure. Enter.
Provide short description (BAPI Structure).
Provide the component & component type.
EBELN EBELN
BEDAT BEDAT
LIFNR LIFNR
Save in own package. Check, activate.
Execute SE37.
In the menu bar click on goto function groups create group.
Provide the function group name (ZBAPI_FG), short description.
Save in our own package.
Steps to activate the function group: -
In the menu bar click on environment inactive objects.
Expand the function group under transportable objects.
Select the function group. Right click activate. Enter.
Source code
Select single ebeln bedat lifnr from ekko into wa_ekko where ebeln = i_ebeln.
Save, check, activate.
Click on back. In the menu bar click on function module. Release -> Release.
Function module is released.
Steps to release the object & method for BAPI function module: -
Execute SW01.
Provide the object name (ZBAPI_OB).
Click on create.
Provide the same to all. Select the application (M). Enter.
Click on enter. Save in our package.
Place the cursor on methods. In the menu bar click on utilities. API methods Add method.
Provide function module name (ZBAPI_FM1). Click on enter.
Click on next step (CTRL + SHIFT + F11). Click on next.
Click on yes. Click on save.
Method 2:-
By using BAPI methods, we can identify the standard BAPI. Some of the BAPI methods are
1. Get list ()
2. Get details ()
3. Get status ()
4. Existence check ()
5. Create ()
6. Change ()
7. Delete ()
Steps to identify the BAPI based on BAPI method name: -
Execute ‘SE37’.
Provide BAPI *<Method name>. Click on F4.
We get the list of BAPIs related to that method & identify our required method.
Note: - When ever we are working with crate, change, delete BAPIs, then we must committed the data
base by using ‘BAPI_TRANSACTION_COMMIT’ function module. Other wise the data base
isn’t updated.