Understanding and Working with BAPI’s

Business API (BAPI) is the most important component of SAP Business Framework. BAPI enables SAP and third party applications to interact and integrate with each other at the Business Object / Process level. BAPIs are implemented using Remotely callable Function modules. These RFCs are assigned as a callable method of a Business Object in the Business Object Repository (BOR). All BAPIs are independent of the screen and hence can work in the background without user intervention. BAPI supports both inbound and outbound processing. Since it follows object-oriented approach, SAP has positioned itself to support interfacing through BAPIs in the future.

A Business Application Programming Interface is a precisely defined interface providing access process and data in Business Applications Systems Such as SAP. They come very handy and can be used in Webdynpros, Visual Basic, external EAIs and such can use BAPIs to retrieve data from SAP.

What are the Benefits of BAPI

  • Can be used in diverse languages / Development Environments(ABAP, Visual Basic, Java, C++, etc.)
  • Can be called from diverse platforms (COM, CORBA, Unix)
  • Reduced development cost
  • Reduced maintenance cost
  • “Best-of-both-worlds” approach
  • Rich functionality of the R/3 system
  • User-specific front-ends

Steps involved in Creation of BAPI’s

  1. Defining BAPI Data structures in SE11
  2. Program a RFC enabled BAPI function module for each method
  3. Create a Business object for the BAPI in the BOR
  4. Documentation of the BAPI
  5. Generate ALE interface for asynchronous BAPIs
  6. Generate and release

Need more info? Download the 40 Page document on working with BAPI’s -> Working with BAPI’s

Interfacing with BAPI & ALE

This document talks about custom BAPI creation and generating the ALE interface for the Custom BAPI.

BAPIs are integrated into the ALE communication model. ALE communication is asynchronous and message-based. ALE communication is the preferred way to integrate distributed SAP Systems, for example, for distributing master data. Since Release 4.0 BAPIs are the standardized interfaces for ALE-supported communication. ALE services, such as asynchronous BAPI calls, distribution model, monitoring and error handling can be used for BAPIs. The IDoc types required for the ALE services can be generated from BAPIs.

Read more about the document on working with ALE – BAPI Intefaces with screenshots .

BAPI’s are closely tied and work similar to Business Objects in SAP

SAP Business Object  is similar to real-world business objects such as Sales Order, Invoice, Employee, etc., which consist of various tables/programs that are related to each other in a business context. All the business objects are maintained in the BOR (Business Object Repository).

The various characteristics of an object are called Attributes.  For example, the business object Sales Order is characterized by the following attributes:

  • Date of the order
  • Items of the order
  • Prices of various items of the order
  • Name of the customer to whom the order belongs to

The application program or programs used by the system to change or manipulate a business object are known as Method(s).

For example, a program could be used to

(a) check the availability of stock to deliver,
(b) trace the shipment route,
(c) check the item prices,
(d) validate the order date, etc.

So, attributes and methods collectively represent business objects in SAP.


ERP Avatar

Leave a Reply

Your email address will not be published. Required fields are marked *