Show TOC

Defining a Data Model for the ServiceLocate this document in the navigation structure

You create the data model for the service by redefining the service of the ODP framework.

Context

To create services for the extraction of ODP data, you can use the wizard in the SAP Gateway Service Builder.

Procedure

You have opened the previously created project in the SAP Gateway Service Builder (transaction SEGW). If the project is not open, choose Start of the navigation path Project Next navigation step Open End of the navigation path.

  1. In the context menu of the Data Model folder, chosoe Start of the navigation path Redefine Next navigation step ODP Extraction End of the navigation path.

    The system opens the popup Wizard - Step 1 of 3: OData Access for Operational Data Provisioning. You specify ODP-specific parameters here.

  2. Select the RFC destination for the system where the ODPs are located that you want to extract using the service.
    Note

    The RFC destination describes the connection between the system that you are using the SAP Gateway Service Builder to define the ODP OData service on (SAP Gateway Application) and the back end system that the ODPs should be distributed to other systems from.

    Background: With the configuratio of the system alias for the OData service and an optional BAdI implementation, the connections in the processing of an OData request between the SAP Gateway hub, the SAP Gateway Application and the BW back end system can be defined. Various combinations are possible for this. Two extreme scenarios are as follows:

    1. All three systems are located on the same system (embedded deployment).

    2. All three systems are located on different systems that are connected via an RFC connection.

  3. Select the ODP context.
  4. Define the quantity of ODPs for the selected context. ODPs that have already been selected are displayed in a table in the popup. To select the ODPs, you have the following options. These can be performed multiple times and independently of each other:
    • Select an ODP and press Add ODP. For ODP contexts that offer a hierarchy, yo can select the ODP from the hierarchy by pressing (Hierarchy).

      The ODP is added to the table displayed in the popup.

    • If you want to enhance the data model of the service, add the associated ODPs. You can add master data ODPs to a fact ODP for example, and then add text ODPs to them.

      You can use the following pushbuttons for this:

      Pushbutton

      Description

      (Delete Row)

      You can use this button to delete one or more selected ODPs from the data model.

      Add Associated ODPs (Add Associated ODPs)

      You can add the associated ODPs to the data model for one or more selected ODPs.

      (Delete Associated ODPs)

      You can remove the associated ODPs from the data model for one or more selected ODPs.

  5. Choose Continue.

    The system opens the popup Wizard - Step 2 of 3: OData Access for Operational Data Provisioning. Here you define the name for the service-specific classes, the model and service name, and the package and transport request.

  6. To proceed to the next step in the wizard, you have to enter the required data in all of the input-enabled fields:

    Fields

    Description

    Package

    Enter the package name in which generated artefacts (in particular model provider class and data provider class) should be after being generated.

    Transport Request

    Enter a valid transport request number.

    Model Provider Class

    The system creates a proposal for the name in accordance with the following naming convention: CL_<Projektname>_MPC_<X>. You can change this proposal.

    Data Provider Class

    The system creates a proposal for the name in accordance with the following naming convention: CL_<Projektname>_DPC_<X>. You can change this proposal.

    Mode name, version and description

    • The system creates a proposal for the name in accordance with the following naming convention: <Projektname>_<X>_MDL. You can change this proposal. Note that the name of the model must be unique.

    • When the model is redefined for the first time, the system sets the system value to <X>1.

    • Enter a description. Note the entering a description is mandatory. You cannot proceed to the next step in the wizard if you have not done this.

    Service Name, Version and Description

    • The system creates a proposal for the name in accordance with the following naming convention: <Projektname>_<X>_SRV. You can change this proposal. Note that the name of the model must be unique.

    • When the model is redefined for the first time, the system sets the system value to <X>1.

    • Enter a description. Note the entering a description is mandatory. You cannot proceed to the next step in the wizard if you have not done this.

  7. Choose Continue.
  8. Enter a package for the model and choose Continue.

    The system opens the popup Wizard - Step 3 of 3: OData Access for Operational Data Provisioning. The system displays all generated artefacts of the service here. This includes in particular the entity types for the selected ODPs, together with function imports. The generated function imports are operations that are specific for ODP extraction, such as terminating the delta extraction (TerminateDeltasForFactsOf<ODP-Name>).

  9. Select the required artefacts.
  10. Choose Finish.

    The Service Builder runs a consistency check and dislays a message accordingly. The data model is created (model provider class), and the service is implemented (data provider class).

    The artefacts selected during definition of the data model are displayed in the corresponding Data Model folders for the project. In the Model References folder, the name and version of the service are displayed. The Service Implementation folder contains references to the operations and methods for the service.