Mentor SAP

For example, for an entity set called SalesOrders, the following methods are created in the base class:

 

The Service Builder allows for easy navigation from the tree structure in the Service Builder into the actual service implementation.

 

 

 

Mapping CRUD Methods to Data Source

For the RFC, the BAPI Generator, and the Search Help, the Service Builder enables you to map the create, read, update, delete, and query operations separately for each entity set of your data model.

 

For the CDS views, the whole entity set is mapped to the business object rather than individual methods. Using both approaches, the implementation of the corresponding methods, such as SALESORDERITEMS_GET_ENTITYSET, is generated in the Data Provider Base Class based on your mapping.

 

To map an operation, right-click the operation you want to map, and choose Map to Data Source.

 

 

Gateway Service Registration and Testing

We have seen that the Service Builder generated four ABAP classes for our service: a model provider and a data provider base class, as well as a model provider and data provider extension classes.

 

The model provider classes and the data provider classes are hosted on an SAP Business Suite system, that is, a backend system where the SAP Gateway backend add-ons are installed.

 

Using the Service Builder, we registered a model as the configuration wrapper for our model provider classes, as well as a service as the configuration wrapper for the data provider classes in the backend system.

 

 

Publish Service on the Hub

To create an entry in the Service Catalog, you have to make sure that the following system prerequisites are fulfilled:

 

 

Service Registration

In the Service Builder, by choosing Register from the context menu of the entry that points to your Gateway system, the Service and Maintenance transaction is called remotely in the hub.

 

In a dialog box, you confirm to be redirected from the SAP backend system to a remote system, the SAP Gateway hub system.

 

 

Service Maintenance

A custom Gateway Service is always developed on top of the Gateway backend add-ons.

 

To publish your new Gateway Service to the outside world, you create an entry in the Service Catalog on the Gateway Hub server.

 

Using transaction /IWFND/MAINT_SERVICE you can list all the services that are published on the SAP Gateway hub and add new services that have been registered in the connected backend systems. You can also test the services using the browser or the SAP Gateway client.

 

 

Basic Error Handling

To test your Gateway service, you use the Gateway Client (transaction /IWFND/GW_CLIENT). This is a powerful tool that acts as an HTTP client.

 

To test a service with the Gateway Client, perform the following steps:

  1. Select the HTTP method, such as GET, POST, PUT, or DELETE, that you want to use for the request by selecting the appropriate radio button.
  2. Enter the request URI that you want to test in the Request URI input field.
    Some frequently-used URI options can be added to the URI by pressing the Add URI Option
  3. In the HTTP Request