Learn SAP from the Experts | The SAP PRESS Blog

How to Test ABAP Business Services in SAP Gateway Client

Written by SAP PRESS | Dec 8, 2025 2:00:03 PM

Working with OData services in SAP often begins with understanding how to access and test those services, and the service URL plays a central role in that process.

 

The service URL is used by the current ABAP system to access the business service. This URL specifies the virtual directory of the service and uses the following syntax (here it’s for OData V2):

 

/sap/opu/odata/<service.binding.name>

 

One use case where you need the service URL involves testing business services via SAP Gateway Client. To access SAP Gateway Client, you must run Transaction /IWFND/MAINT_SERVICE. Alternatively, you can also use Transaction /IWFND/GW_CLIENT.

 

You can now call your service (see figure below):

  1. Click on the Filter button, and select the desired business service. You can find the business service using the name you assigned as part of the service binding.
  2. Enter the name of the service in the Technical Service Name
  3. Start the service by clicking the SAP Gateway Client

You can tell whether the service has started successfully, for example, by the fact that the service metadata is read. Only if the service was found successfully will the metadata readout work.

 

 

To read the metadata, you need to add the URI option $metadata to the service URL. In the figure below, you can see the service URL for your service. If you access SAP Gateway Client via Transaction /IWFND/GW_CLIENT, you only need to copy the service URL from the service binding.

 

 

Evaluating the service metadata is an easy way to obtain an overview of an OData service. This metadata is made available to the consumer and helps you recognize the structure and organization of the entities, navigation, and service operations. Put simply, the service metadata is an interface description for OData services.

 

To retrieve this information, you can add the URI option $metadata to the service URL. The SAP Gateway Client supports you in this (see figure below):

  1. Click the Add URI Option button.
  2. A popup window opens where you select the URI option $metadata.
  3. Click on the Execute button. Now the metadata will be loaded. 

 

In the metadata, you can find entities, navigation elements, and operations of the business service. The next figure shows the metadata of the business service exposed via service binding ZUI_TRAVEL_ODATA_O2. Here, a function import (FunctionImport) is marked, which represents the setStatusBooked action defined specifically for the associated business object. You’ll find a function import in the OData service for all actions you define yourself. You’ll also find annotations for the standard operations (create, update, and delete) in the metadata (e.g., sap-creatable).

 

 

SAP Gateway Client has some advantages compared to other testing options, such as the automatic handling of ETags. When consuming a service on the same system on which SAP Gateway Client is installed, you don’t have to worry about authentication. It also interprets the metadata and can thus, for example, provide input help for the possible entity sets. On the other hand, the testing option via the SAP Fiori elements preview described in the following section can only be used for UI services.

 

Conclusion

Testing a business service through SAP Gateway Client offers a straightforward way to validate that an OData service is active, accessible, and correctly structured. By using the service URL, along with helpful features like built-in metadata retrieval, automatic ETag handling, and input assistance, you can quickly gain insight into the entities, navigation paths, and operations exposed by the service. While SAP Fiori elements previews provide UI-focused testing, SAP Gateway Client remains an essential tool for backend service inspection and troubleshooting, ensuring that your OData services are functioning as designed.

 

Editor’s note: This post has been adapted from a section of the book ABAP RESTful Application Programming Model: The Comprehensive Guide by Lutz Baumbusch, Matthias Jäger, and Michael Lensch. Lutz has worked as an SAP developer since 2000 and has been responsible for international SAP projects in various roles and areas. Matthias is a freelance full-stack ABAP developer, architect, and trainer. Michael leads a team of SAP developers at All for One Group SE.

 

This post was originally published 12/2025.