BAPI-What Is It and How Its Used (Part 1)
BAPI-What Is It and How Its Used (Part 1)
BAPI's are basically function modules only. ALL BAPI's are remote enabled function modules
which enables to access via non SAP systems.
A remote function enabled FM(Function Module) will be attached to BOR(Business Object
Repository) , then only it is termed as BAPI. Using BAPIs you can develop applications without
detailed knowledge of the underlying R/3 System.
Each BAPI is having its own business application and area. The integration between R/3 and
third-party software, legacy systems, and custom-developed software can be achieved via BAPI.
BAPI explorer with TCODE 'BAPI'.
BAPI explorer
All BAPI's are arraigned according to the business area. Details documentation is also available
for some BAPI's to show the usage of the BAPI
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
lwa_bapihead-ind_sector = 'T'.
lwa_bapihead-matl_type = 'TROH'.
lwa_bapihead-basic_view = 'X'.
lwa_mara-base_uom = 'KGS'.
lwa_mara-matl_group = '00104'.
lwa_marax-matl_group = 'X'.
lwa_marax-base_uom = 'X'.
lit_makt-langu = '001'.
lit_makt-langu_iso = 'EN'.
lit_makt-matl_desc = ' This is created by using BAPI yeah !! '.
APPEND lit_makt.
lit_mltx-applobject = 'MATERIAL'.
lit_mltx-text_name = lwa_bapihead-material.
lit_mltx-text_id = 'GRUN'.
lit_mltx-langu ='001'.
lit_mltx-langu_iso = 'EN'.
lit_mltx-text_line =' This is 1st line'.
APPEND lit_mltx.
lit_mltx-applobject = 'MATERIAL'.
lit_mltx-text_name = lwa_bapihead-material.
lit_mltx-text_id = 'GRUN'.
lit_mltx-langu ='001'.
lit_mltx-langu_iso = 'EN'.
lit_mltx-text_line =' This is 2st line'.
APPEND lit_mltx.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata
= lwa_bapihead
clientdata
= lwa_mara
clientdatax
= lwa_marax
* PLANTDATA
=
* PLANTDATAX
=
* FORECASTPARAMETERS
=
* FORECASTPARAMETERSX
=
* PLANNINGDATA
=
* PLANNINGDATAX
=
* STORAGELOCATIONDATA
=
* STORAGELOCATIONDATAX
=
* VALUATIONDATA
=
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
* VALUATIONDATAX
=
* WAREHOUSENUMBERDATA
=
* WAREHOUSENUMBERDATAX
=
* SALESDATA
=
* SALESDATAX
=
* STORAGETYPEDATA
=
* STORAGETYPEDATAX
=
* FLAG_ONLINE
=''
* FLAG_CAD_CALL
=''
* NO_DEQUEUE
=''
* NO_ROLLBACK_WORK
=''
IMPORTING
return
= lit_return
TABLES
materialdescription
= lit_makt
materiallongtext
= lit_mltx
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT
=
* IMPORTING
* RETURN
=
.
WRITE:/ lit_return-type.