Creating BAPI Wrappers
Context
In this procedure, you create BAPI wrappers that retrieve data from the tables ZTR_ORDER_ITM and ZTR_ORDER_HDR that you have created. Since BAPI wrapper interfaces need to conform to a certain syntax, you use the BAPI wrapper wizard for their creation.
Procedure
- 1. In SAP NetWeaver Application Server ABAP, start the Data Orchestration Workbench by entering the transaction code SDOE_WB .
- Choose the BAPI Wrapper Wizard button.
- Choose Continue .
- Make the following entries:
Field
Value
Backend Destination
[RFC destination of the DOE]
Function Group
ZTR_BAPIFG
- Choose Continue .
- Specify the names of the BAPI wrappers by making the following entries:
Field
Value
GetList
ZTR_ORDER _GETLIST
GetDetail
ZTR_ORDER_GETDETAIL
Modify
ZTR_ORDER_MODIFY
- Choose Continue .
- Specify two back-end structures used in the BAPI wrappers with the data in the following two tables:
Field
Value
Root Node
Select the radio button in the first line
Parameter Name
ORDERHEADER
Back-end Structure
ZTR_ORDER_HDR
Field
Value
Root Node
Do not select the radio button
Parameter Name
ORDERITEM
Backend Structure
ZTR_ORDER_ITM
- Choose Continue .
- Check the key fields of the structures used in the BAPI wrappers:
-
For Parameter Name , select ORDERHEADER .
-
Make the Key Field checkbox for Orderid is marked.
-
Mark the checkbox Import the BAPI Wrappers into DOE .
-
Choose Continue .
-
- Create a new software component version (SWCV)
-
Select the radio button Create new SWCV .
-
Make the following entries:
Field
Value
Name
ZTUTORIAL
Vendor
Yourcompany.com
Version
1.0
Data object package
$tmp
Uses
NW04s/MI
Application
Not marked
Data Object
ORDER
Category
STD Standard
Direction
Bidirectional
-
Choose Continue .
-
- On the BAPI Wrappers to Import tab, specify details about the back-end adapter that to be generated.
-
For Backend BO , enter ORDER_BO .
-
Mark the checkbox for Generate runtime objects on import .
-
Do not mark the checkbox for Send confirmation .
-
Choose Continue .
-
- Specify the key fields of the data objects child node ORDERITEM.
-
In the Data Object Node dropdown list, select ORDERITEM
-
Mark ORDERID and ITEMNO as Key Fields .
-
Choose Continue .
-
- Choose Finish .
- In the first and second dialog boxes, choose Local Object.
This ensures that your development is local to the current system and is not transported to subsequent systems.
- In the third dialog box, choose not to run generation asynchronously by clicking No .
After a short time for generation, the BAPI wrappers are ready for use.