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 Configuration
- You have the authorization for using activation functionality in the transaction
/IWFND/MAINT_SERVICE.
Procedure
- 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.
- 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.
- Click the Add Service button in the toolbar.
- Enter the System Alias of your front-end server.
- Enter the Technical Service Name
(in our case: <CDS_VIEW>_CDS).
Figure 1:
Editing details for the service to be activated in the Gateway
hub (in our case: LOCAL system)
- Click the Get Services button in the toolbar to request the services available.
As a result, the service is displayed for selection.
- 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.
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.
- Specify the package for service activation.
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.
- 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.
Figure 4:
Dialog that informs you about a successful service creation (example for $TMP package)
- 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.
Figure 5:
The new OData service is displayed in the Service Catalog (example for $TMP package)