Professional Documents
Culture Documents
SAP AG 1999
BAPI Basics
Test Data for the Asset Master
Transfer of Assets Using BAPIs
Contents:
BAPIs
SAP AG BC420 11-1
0.2
SAP AG 1999
Describe external data transfer using BAPIs
Transfer asset aster data into !"# using BAPIs
At the conclusion of this unit $ou %ill be able to:
BAPIs: Unit &b'ecti(es
SAP AG BC420 11-2
0.#
SAP AG 1999
Course &(er(ie% Diagra
Daten)bernahe
D* +or,bench
-.M +or,bench
Princi/les of .tandard
Data Tansfer
D
i
r
e
c
t
I
n
/
u
t
BAPI
T
A
!
e
c
o
r
d
e
r
Course &(er(ie%
B
a
t
c
h
I
n
/
u
t
C
a
l
l
T
r
a
n
s
a
c
t
i
o
n
#
0DI
Basics
1
2
3
4 50
6
50
6
55
53
52
55
52
5
2
5555
5#
SAP AG BC420 11-3
0.3
SAP AG 1999
BAPIs
BAPI Basics
BAPI Basics
Test Data for the Asset Master
Test Data for the Asset Master
Transfer of Assets Using BAPIs
Transfer of Assets Using BAPIs
SAP AG BC420 11-4
0.1
SAP AG 1999
&(er(ie% of .tandard Transfer Using BAPIs
Flat SAP
Structure
SAP Record
Layout
Structure
SAP IDoc
Structure
BAPI
This unit deals with the transfer of legacy data using BAPIs.
SAP AG BC420 11-5
0.7
SAP AG 1999
Interfaces for .tandard Transfer Using BAPIs
SAP System
8! 8!
9I 9I
MM MM
SAP IDoc
Structure
BAPI
BAPI
BAPI
External data in the IDoc format is required for calling BAPIs from the DX-B. !a""ing tools#
such as the $egacy %ystem !igration or&'ench ($%!)# must therefore 'e used to con*ert the
external data to the IDoc format.
SAP AG BC420 11-6
0.2
SAP AG 1999
Business A//lication Prograing Interface
Business A//lication Prograing Interface
A BAPI is a /recisel$:defined interface for /rocesses
and data of a business a//lication s$ste and is
i/leented as a ethod
of an ob'ect in the Business &b'ect !e/ositor$ ;B&!<.
Each BAPI that creates an o'+ect instance or changes the data 'elonging to an o'+ect lea*es the
data'ase consistent. All data'ase changes are carried out com"letely or not at all.
The ,-.!!IT ./01 command to sa*e the data'ase changes are not called 'y the BAPI itself.
They ha*e to 'e called 'y the calling "rogram.
BAPIs are non-dialog methods that do not ha*e any screen dialogs with the user.
SAP AG BC420 11-7
0.4
SAP AG 1999
Characteristics of BAPIs
&b'ect:oriented
I/leented as ob'ect ethods of the B&!
.table interface
The interface of a BAPI is =fro>en?
Can be used internall$ and externall$
BAPIs can be used in !"# and fro external s$stes
@o /resentation la$er
Callers ha(e to dis/la$ the results thesel(es
.uccess and error essages in ex/ort /araeter
!0TU!@
.tructure or internal table ;de/ending on BAPI <
BAPIs can also 'e called 'y external clients as methods of o'+ects that are instantiated in the client
itself.
%AP guarantees that the interface of an %AP BAPI will not 'e changed.
Also within /23 BAPIs can 'e used locally to access 'usiness data. This ma&es customer and "artner
enhancements of /23 functionality easier.
The calling "rogram must "resent the data that is "assed to or from a BAPI.
The return parameter RETURN contains success and error messages of the BAPI and de"ending
on the /23 /elease it has the Dictionary structure BAPI/ET4/5# BAPI/ET4/56# BAPI/ET6#
BAPI/ET7 or BAPI/ET789IX. The (common) rele*ant fields of these structures are:
T;PE (message ty"e: %(uccess)# E(rror)# (arning)# I(nformation) ) <
ID (message class) < 54!BE/ (message num'er) < !E%%A=E (message text) <
!E%%A=E8>6 # !E%%A=E8>7 # !E%%A=E8>3 # !E%%A=E8>? (message *aria'les)
If the message transfer is successful# /ET4/5 is either em"ty (all fields ha*e their initial *alue) or
the field T;PE contains the *alue @%@. /efer to the documentation on the BAPI in question to find
out which o"tion a""lies.