Professional Documents
Culture Documents
Chapter 12.3 - Use of BAPIs For Data Interfacing
Chapter 12.3 - Use of BAPIs For Data Interfacing
Objectives
Extract Map
Clean
Load
We will discuss
use of BAPI in Check
detail in this
chapter
Extract Map
Clean
Load
We will discuss
use of BAPI in Check
detail in this
chapter
BAPI : Overview
BAPIs as Interfaces
When using BAPIs as interfaces to the SAP System, the Workbench uses the
same technology as used with permanent data transfer via ALE between SAP
Systems or between SAP Systems and non-SAP systems.
The data to be loaded must be in IDoc format. The IDoc numbers in the file must
be unique.
When the task is started, the IDocs from the specified input files are read and
transferred to the BAPI.
The use of BAPIs is increasingly important, because the previous techniques are
only of limited or no use for data transfer from Release 4.6 onwards:
The batch input procedure CANNOT be used for the new Enjoy transactions because
the batch input recorder does not support the controls used in these transactions.
The administration transaction associated with the direct input method will no longer be
supported from Release 5.0 onwards (at the latest). This means that existing direct
input programs can be used, but the data transfer should be converted to BAPIs in the
medium term.
When you use call transaction, you have to specify values for all the mandatory fields
on a screen. You can't update a single field, if there are some more fields which are
mandatory in the same screen. But, when you use BAPI you can update individual
fields without having to specify other fields.
If you use CALL TRANSACTION you have to do a new recording each time the screens
of a particular transaction changes. But, if you are using BAPI to update fields, it does
not matter, where on the screen or in which screen a particular field resides. This is due
to the fact that BAPI updates through structures that are mapped directly with database
tables, so position of the fields on the screen does not matter.
Data Interfacing through BAPIs greatly increase the performance as the updates are
done directly through structures.
The following aspects are relevant for developing a BAPI that can be used for
mass data transfer in the DX Workbench:
Implementing a BAPI
BAPIs for mass data transfer must be developed as described in the BAPI Programming Guide.
All write BAPIs can potentially be used for mass data processing.
Generating the BAPI-ALE Interface
Since the data for the BAPI call is received in the SAP System in IDoc format, the BAPI-ALE
interface has to be generated to automate the mapping of the IDoc to the parameters of the
BAPI.
Writing a report
The report is responsible for writing existing R/3 objects in IDoc format to a file. This report is
required, since it is the only way for users to establish the connection between the online
transaction, the BAPI, and the IDoc.
Registering a BAPI
This step is required if the BAPI will be used in the DX Workbench. To register the
BAPI, including its corresponding report, use transaction BDLR.
Generate default
Idocs for a BAPI
without application
Determine how the data
data used for BAPI is
to be represented in Generate Idocs for a
IDoc BAPI whose
parameters have
been filled with data
from an existing R/3
object
DX Workbench
Mapping
External format data IDoc format of the
transfer file
LSMW/External
mapping tool
Transfer file
imported to
target system
Demonstration
Using BAPI function modules instead of Call Transaction to update Material data.
Practice
Using BAPI function modules instead of Call Transaction to update Material data.
Summary
Questions
What is BAPI ?
Why batch input procedure cannot be used with enjoy SAP transactions?
What are the steps need to be performed to update data in SAP using BAPI ?