Você está na página 1de 8

By : P.

Renjith Kumar
Bonus material for 201 ABAP interview book 1
How-To-Guide
Using BAPI function module in ABAP reporting
Bonus Material for 201 ABAP Interview questions

Table Of Contents

Business Object Repository........................................................................................ 2
BOR Definition........................................................................................................... 2
Selecting The BAPI .................................................................................................... 3
ABAP Report using BAPI .......................................................................................... 5
Testing the Report:...................................................................................................... 7
By : P. Renjith Kumar
Material Code : HTG1
By : P.Renjith Kumar
Bonus material for 201 ABAP interview book 2
Business Object Repository
BOR Definition
All SAP Business Object types and SAP Interface Types and their methods are defined
and described in the R/3 Business Object Repository (BOR). The Business Object
Repository was introduced in R/3 Release 3.0, at the same as time as SAP Business
Objects and SAP Business Workflow. Presently, the BOR is mainly used by SAP
Business Workflow.
The BOR has two essential functions:
It defines and describes SAP Business Objects and SAP Interface Types and
their BAPIs.
It creates instances of SAP Business Objects
BAPI programming
BAPIs are defined in the Business Object Repository (BOR) as methods of SAP Business
Objects or SAP Interface Types and are implemented as function modules. The
separation of a BAPI definition from its actual implementation enables you to access a
BAPI in two ways:
You can call the BAPI in the BOR through object-oriented method calls
You can make RFC calls to the function module on which the BAPI is based
Some Standard BAPIS
GetList
Delivers a list of key fields objects that satisfies certain selection Criteria
GetDetail
Delivers detailed information of an object, whose complete key has been
Specified
CreateFromData
By : P.Renjith Kumar
Bonus material for 201 ABAP interview book 3
Generates new objects in R3 from key fields and returns information.
Selecting The BAPI
1. Give Transaction BAPI, You will get the Following Screen
Now based on you requirement you have to search for BAPI, Here we are going to search
for BAPI related to Purchase Order. Purchase order is in MM so we select that from the
list.
By : P.Renjith Kumar
Bonus material for 201 ABAP interview book 4
We have to get purchase order detail, So Double click on the GetDetail. The right
frame will show the BAPI name.

Now Expand The GetList by pressing > , you will get the screen as below
We need Purchase Order Header detail, so double Click Header; you will get Right
Frame with the Dictionary Reference. The Dictionary Reference is BAPIEKKO; Note
that you have to use that in Report. Double click that BAPIEKKO to see the fields that
can be displayed in Report.
1
2
By : P.Renjith Kumar
Bonus material for 201 ABAP interview book 5
Note Down the Fields name from the Components Column that you need in the Report
output.
ABAP Report using BAPI
Now in The ABAP editor (SE38) create a new report and write the Code

8eport 28^1



8^1 10 6L1 0 11LM 0L1^1lS


8L081 28^1

0^1^ 8L61u 0I 1011LM 0CCu8S
1uClu0L S18uC1u8L 8^1Lk0 1nc1ude the Structure o1 dctonary 8e1
0^1^ Lu0 0I 1011LM


^8^ML1L8S L8Llu l1kL Lkk0L8Llu de1au1t 1nput


By : P.Renjith Kumar
Bonus material for 201 ABAP interview book 6
C^ll IuuC110u 8^106L10L1^1l
Lx0811u6
u8Cu^SL080L8 L8Llu
11LMS x
^CC0uu1^SS16uMLu1
SCuL0ulLS
u1S108Y
11LM1Lx1S
uL^0L81Lx1S
SL8v1CLS
C0uI18M^110uS
SL8v1CL1Lx1S
Lx1LuS10uS
1M0811u6
0uL^0L8
0^008LSS
1^8lLS
0uL^0L81Lx1S
011LMS 1011LM ^ssgn the 1nterna1 1ab1e
011LM^CC0uu1^SS16uMLu1
011LMSCuL0ulLS
011LMC0uI18M^110uS
011LM1Lx1S
011LMu1S108Y
011LMu1S108Y101^lS
011LMl1M11S
011LMC0u18^C1l1M11S
011LMSL8v1CLS
011LMS8v^CC^SSv^luLS
8L1u8u
0SL8v1CLS1Lx1S
Lx1LuS10u0u1


l00 ^1 1011LM

W811L 0 uuM8L8 1011LM0uuM8L8 C0l08 C0luL^01u6
11LM 1011LM011LM
M^1L81^l u^ML 1011LMM^1L81^l
M^1L81^l 1011LMu8M^1
Cu^u6L0 0u 1011LMCu^u6L00u
Su081 1Lx1 1011LMSu0811Lx1
C0M^uY C00L 1011LMC0C00L
l^u1 1011LMl^u1
M^1L81^l 680u 1011LMM^168
0u^u111Y 1011LM0u^u111Y lLI1JuS11I1L0
uu11 1011LMuu11
uL1 81CL 1011LMuL181CL lLI1JuS11I1L0
ul1uL

Lu0l00

Note: You can write any no fields from the Dictionary BAPIEKPO in the output, just
Note the field and give that in the Write statement within LOOPENDLOOP


Output of the Report

By : P.Renjith Kumar
Bonus material for 201 ABAP interview book 7




Testing the Report:
Give transaction ME23 and give the Purchase order no, you can see the details of the
report there.
By : P.Renjith Kumar
Bonus material for 201 ABAP interview book 8
.

Você também pode gostar