0% found this document useful (0 votes)
33 views

BAPI

The document discusses Business Application Programming Interfaces (BAPIs), which allow integration at the business level rather than the technical level. BAPIs provide standardized interfaces to read, create, change, and process data in SAP systems. They allow accessing and exchanging business data between SAP and non-SAP applications in a distributed environment.

Uploaded by

PRASHANT KUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

BAPI

The document discusses Business Application Programming Interfaces (BAPIs), which allow integration at the business level rather than the technical level. BAPIs provide standardized interfaces to read, create, change, and process data in SAP systems. They allow accessing and exchanging business data between SAP and non-SAP applications in a distributed environment.

Uploaded by

PRASHANT KUMAR
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 28

BAPI

( Business Application Programming Interface )

02-Sep-09 Kaavian Systems


Business Application Programming Interface
 What is interface?
 Various types of interfaces
 Why BAPI ?
 BAPI
 Business Objects and structure
 Business Object Repository
 BAPI Access methods
 How To Use BAPI
 Type-Application Accessing BAPI
 Benefits of BAPI
Business Application Programming Interface

02-Sep-09 Kaavian Systems 3


Business Application Programming Interface

02-Sep-09 Kaavian Systems 4


Business Application Programming Interface

02-Sep-09 Kaavian Systems 5


Purpose of BAPI

 SAP created the Business Framework to allow the technical


integration and exchange of business data among SAP components
and between SAP and non-SAP components.
Time-Bed
 The integration can include both components within a local network
and components that are connected with one another through the
Internet.

 BAPIs allow integration at the Business Level, not the technical level.

02-Sep-09 Kaavian Systems 6


BAPI Definition

 A BAPI is a well defined interface for the processes and data of a


business application system, implemented as the method of an object
in the BOR

 Business Application Program Interfaces allow developers to


integrate third-party software into SAP's R/3 product.

 BAPIs are about calling data in and out of SAP.

 BAPI can be called with in SAP R/3 program also to accomplish


create/change/delete.

02-Sep-09 Kaavian Systems 7


SAP Business Object
First Layer (Kernel) - Represents the object's Inherent data.
Second Layer (Integrity layer ) - Business logic of the object.
Third Layer (Interface layer ) - Describes the implementation and
structure of the SAP business object .
Fourth Layer (Access layer) - Technologies used for external access
to the object’s data ( com/dcom,
rfc, java,corba ).

STRUCTURE

02-Sep-09 Kaavian Systems 8


BAPI Architectural View

BAPI BOR

02-Sep-09 Kaavian Systems 9


An Example of Business Object

02-Sep-09 Kaavian Systems 10


Characteristics of Object Types

 Interfaces : The SAP interface types included in the object.

 Key Fields : The key fields that describes the instance of the
business object uniquely.

 Attributes : Characteristics/Property of the business object.

 Methods :Activity that can be performed on a business


object (BAPI) & provides access to the object data.

 Events : Signals that the status of the business object has


changed.

02-Sep-09 Kaavian Systems 11


Sub Type & Super Type

When an object type is generated from an existing object


type, the new object type is called the subtype and the existing object
type is called the super type.

A subtype inherits all the properties and methods defined for


the super type from which it descends, but can also have additional
properties and methods.

Example :
The object type Employee is a subtype which has been
derived from the super type Person.

02-Sep-09 Kaavian Systems 12


Business Object in the BOR

Central repository within the R/3 System containing all the


SAP Business Object Types and SAP Interface Types
together
02-Sep-09 with their definitions and
Kaavian methods.
Systems 13
Business Object Repository

Business Object Types : A business object type is the representation


of a business entity in the SAP System. It encompasses both the
functionality (in the form of methods) and the data (in the form of
attributes) of this entity. The business object type is accessed through
defined functions (methods).

Interface Types : Collection of attribute, method, and event


definitions, used in a common context. An object type can support one or
more interface types. The attributes, methods, and events already defined
in the interface types are therefore available to the object type with their
interfaces, and are also passed on to the relevant subtypes.

02-Sep-09 Kaavian Systems 14


Ways of Accessing BAPI’s

02-Sep-09 Kaavian Systems 15


Object-Oriented Access to BAPI’s

OLE Automation clients


(Microsoft Excel, Visual SAP
Basic or C++ programs, ... Business
Objects
ID I s p a t c h I n t e r f ace
BAPI

BAPI ActiveX Control


BOR

Remote Function Call (RFC)

02-Sep-09 Kaavian Systems 16


Function-Oriented Access to BAPI’s

02-Sep-09 Kaavian Systems 17


How to Create BAPI

 Create a remote enabled functional module in SE37.

 Set the import/export parameters which are responsible for transfer


of data.
 If required use the changing/table parameters to transfer a set of data.

 Create an return parameter (table) to capture the messages.


Source code as applicable to the requirement .

 Go to Tcode SWO1(BOR) create an object.

 Create an API method by giving the function module name created


earlier.
 Generate and release the object.
Prerequisites

Using BAPI method to access data in SAP business


objects, and application program only needs to know how
to call the method.

The information required is:

1. The name of the BAPI


2. Details of the BAPI interface
3. Parameters for both importing and exporting data.

02-Sep-09 Kaavian Systems 19


 Import Parameters :
Which contain data to be transferred from the calling
program to the BAPI

 Export Parameters :
Which contain data to be transferred from the BAPI back to
the calling program

 Import/Export (Table) :

02-Sep-09 Kaavian Systems 20


Applications that Access BAPI’s

Dialog Applications :

With dialog applications the caller usually waits until the


method call has been processed.

Example : waits for the results of a GetList() BAPI

Distributed Applications :

BAPIs can also be used in Application Link Enabling (ALE) to


exchange and replicate data between two distributed systems.

02-Sep-09 Kaavian Systems 21


BAPI’s In Dialog Applications
Transaction Control
BapiService.TransactionCommit()
BapiService.TransactionRollback()

Input Help
HelpValues.GetList()

Field Help
BapiService.FieldHelpGetDocu()

Return Messages
BapiService.MessageGetDetail()

02-Sep-09 Kaavian Systems 22


Processing Modes
Synchronous BAPIs :

Synchronous BAPIs are generally used to read data from a


remote logical system, for example to display a customer list. Before
calling the Bapi, it is therefore necessary to determine the RFC destination
of the remote system or the Bapi server.

Asynchronous BAPIs :

Asynchronous BAPIs are generally used for replicating data


on one or more logical systems, for example to distribute article master
data. To implement an asynchronous data transfer with a Bapi, an ALE
IDOC interface must be generated. This interface controls all of the data
communication between logical systems using IDOC technology. The
application calls the generated ALE IDOC interface locally instead of the
Bapis.
02-Sep-09 Kaavian Systems 23
Standardized BAPI’s

 BAPIs for Reading Data

 BAPIs for Creating or Changing Data

 BAPIs for Mass Processing

02-Sep-09 Kaavian Systems 24


BAPI’s for Reading Data

GetList():
Select a range of object key values.

Example: company codes and material numbers.


GetDetail():
Used a key to retrieve details about an instance of a
business object type and returns this data to the calling
program.

GetStatus():
Used to query the status of an SAP business object instance.

Example: the processing status of a sales order.


02-Sep-09 Kaavian Systems 25
BAPI’s for Mass Processing

With BAPIs for mass processing, the suffix "Multiple" is added to


the method name,
 ChangeMultiple()

 CreateMultiple()

 DeleteMultiple()

The BAPIs here are always class methods.

02-Sep-09 Kaavian Systems 26


Benefits

 Business Standards

Benifits Of BAPI  Object-Oriented Technology


 Conforming To standards
(Com / Dcom )

 Openness

02-Sep-09 Kaavian Systems 27


THANK YOU

02-Sep-09 Kaavian Systems

You might also like