Show TOC

Activate OData Service in the SAP Gateway HubLocate this document in the navigation structure

After you have generated the SAP gateway artifacts in your development environment, you can continue with the next step towards consumption of the OData service. For this you need to activate the OData service in the SAP Gateway hub. In other words: The OData service has to be enabled in SAP Gateway which establishes a mapping between the technical OData service name and the corresponding back-end service.

Prerequisites

  • The service artifacts are successfully created in the back end of the application server AS ABAP.
  • The SAP Gateway Hub (target system for the OData service) is set up and configured for managing OData services. More on this: Quick ConfigurationInformation published on SAP site
  • You have the authorization for using activation functionality in the transaction /IWFND/MAINT_SERVICE.

Procedure

  1. Open the SAP GUI for the relevant ABAP project by starting the SAP GUI Launcher ABAP Development Tools (icon in the toolbar). Within the embedded SAP GUI, you are able to access the complete functionality of the classic ABAP Workbench.
    Note Alternatively, you log in to the corresponding development system using the SAP GUI mode.
  2. In the command field, enter the transaction code /IWFND/MAINT_SERVICE.

    The entry screen of the transaction displays in the target system all activated Gateway services in the Service Catalog and allows you to add new services.

  3. Click the Add Service button in the toolbar.
  4. Enter the System Alias of your front-end server.
  5. Enter the Technical Service Name (in our case: <CDS_VIEW>_CDS).
    Editing details for the service to be activated in the Gateway hub (in our case: LOCAL system)
    Figure 1: Editing details for the service to be activated in the Gateway hub (in our case: LOCAL system)
  6. Click the Get Services button in the toolbar to request the services available.

    As a result, the service is displayed for selection.

  7. Select the service created as a result of last procedure and then choose Add Selected Services or alternatively click the object link for further selection.
    Adding a gateway service to the Gateway service catalog
    Figure 2: Adding a service to the Gateway service catalog

    The Add Service dialog that appears, suggests already the name Z<CDS_VIEW>_CDS for the Technical Service, and for the Technical Model.

    The dialog that now appears informs you that the model metadata for the Gateway service is going to be created.

  8. Specify the package for service activation.
    Adding a service with a $TMP package as example
    Figure 3: Adding a service with a $TMP package as example
    Caution Change the suggested name from Z<CDS_VIEW>_CDS to <CDS_VIEW>_CDS (remove Z) for the Technical Service and for the Technical Model - if you have assigned a productive package (none $TMP package) for service activation. Otherwise, leave the suggested names unchanged.
  9. Leave the other details on the dialog screen unchanged, and choose (Continue).

    The dialog that now appears informs you that the model metadata for the Gateway service has been created successfully in the Gateway.

    Dialog informing you about a successful service creation (example for $TMP package)
    Figure 4: Dialog that informs you about a successful service creation (example for $TMP package)
  10. In the information dialog, complete the procedure with (Further for All).

Results

As a result of the successful procedure, the OData service has been activated in the Gateway hub. During the course of this activation, further new objects have been created:

  • SAP Gateway: Service Group Metadata object (object type: R3TR IWSG) with the name Z<CDS_VIEW>_CDS_<VERSION> that object type IWSG that includes the service group metadata of the Gateway represents the actual OData service.
  • An SAP Gateway: Model Metadata object (object type: R3TR IWOM) with the name Z<CDS_VIEW>_CDS_<VERSION>_BE that represents the structure of the actual OData service.

The OData service is also added to the Service Catalog of transaction /IWFND/MAINT_SERVICE.

The new OData service is displayed in the Service Catalog (example for $TMP package)
Figure 5: The new OData service is displayed in the Service Catalog (example for $TMP package)