Show TOC

Creating BAPI WrappersLocate this document in the navigation structure

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. 1. In SAP NetWeaver Application Server ABAP, start the Data Orchestration Workbench by entering the transaction code SDOE_WB .
  2. Choose the BAPI Wrapper Wizard button.
  3. Choose Continue .
  4. Make the following entries:

    Field

    Value

    Backend Destination

    [RFC destination of the DOE]

    Function Group

    ZTR_BAPIFG

  5. Choose Continue .
  6. 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

  7. Choose Continue .
  8. 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

  9. Choose Continue .
  10. Check the key fields of the structures used in the BAPI wrappers:
    1. For Parameter Name , select ORDERHEADER .

    2. Make the Key Field checkbox for Orderid is marked.

    3. Mark the checkbox Import the BAPI Wrappers into DOE .

    4. Choose Continue .

  11. Create a new software component version (SWCV)
    1. Select the radio button Create new SWCV .

    2. 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

    3. Choose Continue .

  12. On the BAPI Wrappers to Import tab, specify details about the back-end adapter that to be generated.
    1. For Backend BO , enter ORDER_BO .

    2. Mark the checkbox for Generate runtime objects on import .

    3. Do not mark the checkbox for Send confirmation .

    4. Choose Continue .

  13. Specify the key fields of the data objects child node ORDERITEM.
    1. In the Data Object Node dropdown list, select ORDERITEM

    2. Mark ORDERID and ITEMNO as Key Fields .

    3. Choose Continue .

  14. Choose Finish .
  15. 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.

  16. 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.