OData Gateway Part 5: Service Registration, $metadata and Gateway Client Testing
Preview · a free account unlocks the full lesson
Make a SEGW service reachable: activate it in /IWFND/MAINT SERVICE with a system alias, check the ICF node, read $metadata, test all CRUD operations in the Gateway client /IWFND/GW CLIENT, clear metadata caches and transport the registration.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 4 explained the frontend/backend split; now we make the service reachable and actually test it. Generating runtime objects registers the service in the backend, but it also needs to be activated on the frontend in /IWFND/MAINT_SERVICE: Add Service, pick the system alias (LOCAL in an embedded deployment), filter by the technical service name (ZSALES_SRV), and Add Selected Services into a transportable package. This creates the frontend registration and the ICF node /sap/opu/odata/sap/ZSALES_SRV, which you should also confirm is active in SICF.
$metadata is what shows clients what they'll actually see — entity types, keys, properties, and navigation — and it's worth reading at /sap/opu/odata/sap/ZSALES_SRV/$metadata before coding any consumer against the service. Check the entity sets, key properties, EDM types and lengths, navigation properties, and the sap:creatable/updatable flags; the service document at the root URL simply lists the entity sets.
The Gateway Client (/IWFND/GW_CLIENT) lets you test GET, POST, PUT, PATCH/MERGE, DELETE, and $batch directly inside SAP: enter the request URI, choose the HTTP method, and execute — adding $format=json to a GET gives readable output.
For POST, PUT, or DELETE, you first GET with header x-csrf-token: Fetch and then send that token (most releases handle this automatically in the client), and "Use as Request" lets you copy a response straight into the next request body. Test cases built this way can be saved in the Gateway client for regression testing.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.