Show TOC

Creating the Data ModelLocate this document in the navigation structure

  1. Start transaction SE80.

  2. Select SAP GW Data Model from the drop-down list.

  3. Enter a Data Model name (in this case we choose ZSFLIGHT02) and then press Enter.

    A popup tells you that this object does not exist and asks if you want to create it. Select Yes and the Create Data Model popup displays, with the model name you entered already filled in.

    Note

    Note that you have to specify a name that is in the customer namespace such as Z* or you can use another customer namespace.

    Create Data Model in the Generic Channel

  4. Enter a Type of PS (Public Solution) for the Data Model or press F4 to select it. This is the only type of Data Model you can create at this stage.

  5. Choose Generate from Data Source Object to have the Data Model created by the Data Model generator. There are other ways to create a Data Model but we are concentrating on this, the easiest option.

  6. Choose the green check mark to continue.

  7. In the next popup, enter the following additional data:

    • Enter an explanatory text in Description.

    • Select the Data Source Type which can be BOR, Screen Scraping, or RFC. In this case we select 0 BOR.

    • For System Alias you specify the system from where the data is being retrieved. Since we are using the BOR data source and since the SFLIGHT data model is delivered with any SAP system, you can select the option LOCAL.

      Note

      Note that in a real world example you would select the logical system name of a Business Suite backend system.

    Additional details

  8. Choose Continue.

  9. In the screen Create Object Directory Entry you have to provide information that will specify how the new Data Model (R3TR IWOM ZSFLIGHT02_0001_PS) will be handled by the Change and Transport System.

    In our example we have selected a name that is part of the Z namespace. Since we do not want to transport the Data Model, we select Local Object (package $TMP) and choose Save.

  10. From the data source (BOR) tree, select the BAPI that you want to publish as an SAP Gateway service.

    Note

    Note that the BOR tree displayed is the one from the system that you have specified through its system alias in step 7.

    In this example we select the GetDetail BAPI from the Business Object (BO) Flight and choose Create Mapping.

    Create mapping for GetDetail

  11. In the Map Operation screen, enter the following:

    1. Select an Operation Type of Read.

    2. Since you want to have an interface that is easier to consume than the original BAPI, deselect several values.

      Note

      In this step you could also rename the Properties that will be used by the SAP Gateway service.

    3. Choose Continue (Enter).

    Map operation

  12. Choose Generate.

    Generate

    After the Data Model has been successfully generated, a log is displayed.

    Logs

  13. Choose Continue (Enter).

Result

The Data Model has been successfully created.

Proceed with Creating the Consumption Model or, if you want to add Annotation, first proceed with Creating the UC Data Model, which you can then annotate.