SAP Gateway OData Transaction Codes Reference
This reference lists the SAP Gateway transactions used to build, activate, test and troubleshoot OData services, with whether each runs on the hub (IWFND) or the backend (IWBEP). It applies to SAP NetWeaver 7.4 and 7.5, S/4HANA embedded Gateway and separate hub systems.
| Transaction | Hub or backend | Purpose | When you use it | Gotcha |
|---|---|---|---|---|
SEGW | Backend (IWBEP) | Gateway Service Builder: model entities, import DDIC or RFC, generate runtime artifacts | Building or changing an OData V2 service | Code goes in the *_DPC_EXT and *_MPC_EXT classes; the base classes are regenerated. |
/IWFND/MAINT_SERVICE | Hub (IWFND) | Activate and maintain OData V2 services: add service, system alias, ICF node | After generating a service, or to check why a service is not found | Embedded deployment uses system alias LOCAL; on a hub pick the backend alias. |
/IWFND/GW_CLIENT | Hub (IWFND) | Gateway client to send OData requests with headers and payloads | Testing GET, POST, $batch and $metadata without a browser | Fetch an X-CSRF-Token with a GET first for write requests from outside the client. |
/IWFND/ERROR_LOG | Hub (IWFND) | Gateway error log with request, response and call stack | First stop for HTTP 400 and 500 errors from a Fiori app | Use Replay to send the failed request to the Gateway client. |
/IWBEP/ERROR_LOG | Backend (IWBEP) | Backend error log for the business logic side | Hub log points to a backend error | On a hub setup log on to the backend system to read it. |
/IWFND/APPS_LOG | Hub (IWFND) | Gateway application log | Messages written during service processing | Equivalent to SLG1 with object /IWFND/; on backend use SLG1 with object /IWBEP/. |
/IWFND/TRACES | Hub (IWFND) | Payload and performance trace for a user or request URI | Capturing what an app really sends, timing per step | Traces are switched on for a limited time; switch them off after use. |
/IWFND/STATS | Hub (IWFND) | Gateway performance statistics per service | Finding slow services and the share of hub vs backend time | Shows aggregated data; use /IWFND/TRACES for a single request. |
/IWFND/CACHE_CLEANUP | Hub (IWFND) | Clean the metadata (model) cache on the hub | After model changes, when $metadata still shows old fields | Clean the backend cache as well in a hub setup. |
/IWBEP/CACHE_CLEANUP | Backend (IWBEP) | Clean the backend metadata cache | After transporting model changes | Run on the backend client used by the service. |
/IWFND/V4_ADMIN | Hub (IWFND) | Publish OData V4 service groups and assign them to a system alias | Activating V4 services, including RAP V4 bindings | V4 services are published as service groups, not in /IWFND/MAINT_SERVICE. |
/IWBEP/V4_ADMIN | Backend (IWBEP) | Register OData V4 service groups on the backend | Hub deployment of V4 services | Register on backend first, then publish on the hub. |
/IWBEP/REG_SERVICE | Backend (IWBEP) | Register a technical service and assign its model | Services built without SEGW registration or after a broken assignment | Model name and version must match the registered model. |
/IWBEP/REG_MODEL | Backend (IWBEP) | Maintain registered models | Checking that a valid model exists for a service | A service with a missing model fails at $metadata. |
/IWFND/IWF_ACTIVATE | Hub (IWFND) | Activate SAP Gateway | Initial setup of a Gateway system | Usually done once by Basis; a deactivated Gateway rejects all OData calls. |
STC01 | Both | Task manager for technical configuration, e.g. task list SAP_GATEWAY_BASIC_CONFIG | Basic Gateway setup on a new system | Read the log of each task; some steps need manual follow-up. |
SICF | Hub | ICF nodes: /sap/opu/odata for V2 and /sap/opu/odata4 for V4 | Service returns HTTP 403 or 404 at the ICF layer | A service can be active in MAINT_SERVICE while its ICF node is inactive. |
SPRO | Hub | SAP NetWeaver > SAP Gateway > OData Channel > Configuration > Connection Settings > SAP Gateway to SAP System > Manage SAP System Aliases | Defining the alias that points a hub to a backend | The alias RFC destination must exist and work in SM59. |
SM59 | Hub | RFC destination from hub to backend, typically trusted | Hub deployment setup and logon errors | Trusted RFC needs trust relationship (SMT1) and authorization S_RFCACL. |
PFCG | Both | Roles with start authorization S_SERVICE for the service | HTTP 403 for a user while the admin can call the service | Hub roles use TADIR type R3TR IWSG; backend roles use R3TR IWSV. |
SLG1 | Both | Application log, object /IWFND/ on hub and /IWBEP/ on backend | Reading Gateway application logs with standard tools | Log level is set in SPRO under the OData Channel administration settings. |
Transactions follow the SAP Gateway Foundation documentation for NetWeaver 7.50 and ABAP Platform. In embedded deployment IWFND and IWBEP run in one system, so both prefixes work there.
Get help with a failing service
Send us the error log entry and your deployment type and we will tell you where the request is failing and what to check next.
Optional. The tool and every export work without this. No spam.
Where this lives in SAP
Gateway has two layers. IWBEP is the backend framework where the model and data provider classes live, built in SEGW or generated from CDS or RAP. IWFND is the hub that exposes services through ICF under /sap/opu/odata and routes calls to a backend through a system alias. In embedded deployment, common with S/4HANA, both run in one system and the alias is LOCAL. In hub deployment the IWFND transactions run on the Gateway system and the IWBEP ones on the ERP backend, connected by an RFC destination.
- OData V2: activate in /IWFND/MAINT_SERVICE.
- OData V4: publish service groups in /IWFND/V4_ADMIN.
- Logs: /IWFND/ERROR_LOG on hub, /IWBEP/ERROR_LOG on backend.
How to activate an OData service
Generate the runtime objects in SEGW. Then in /IWFND/MAINT_SERVICE choose Add Service, enter the system alias (LOCAL for embedded), find the technical service name and add it with a package. Check that the ICF node under /sap/opu/odata is active in SICF and that users have a role with the service authorization. Test with /IWFND/GW_CLIENT using /sap/opu/odata/sap/SERVICE_NAME/$metadata. For a V4 service or a RAP V4 binding, publish the service group in /IWFND/V4_ADMIN instead.
Worked example: Fiori app shows an error
A user reports an HTTP 500 in an app. Open /IWFND/ERROR_LOG, filter on the user and time, and read the error text and the call stack. If it says the error came from the backend, read /IWBEP/ERROR_LOG on that system. Use Replay to send the request to the Gateway client and reproduce it with a breakpoint in the DPC_EXT method. If $metadata still shows an old field after a transport, clean the caches with /IWFND/CACHE_CLEANUP and /IWBEP/CACHE_CLEANUP. An HTTP 403 points to missing S_SERVICE authorization: check with SU53.
Common mistakes
People add the service in MAINT_SERVICE but forget the ICF node or the role, or add it with the wrong system alias on a hub. Code written in the generated base classes is lost at the next generation. Traces in /IWFND/TRACES are left switched on. Model caches are cleaned on the hub only. V4 services are searched for in MAINT_SERVICE, where they do not appear. Roles are built for the backend service type IWSV when the start check runs on the hub against IWSG.
Frequently Asked Questions
What is the tcode for the SAP Gateway client?
/IWFND/GW_CLIENT. It sends OData requests to services activated on the hub, with editable headers and payloads, and can save requests. Use it to test $metadata, GET with $filter, POST and $batch calls. Failed requests from /IWFND/ERROR_LOG can be replayed into it.
Where is the error log for an OData service?
On the hub or embedded system use /IWFND/ERROR_LOG. Backend errors in a hub deployment are in /IWBEP/ERROR_LOG on the backend. Application log messages are in /IWFND/APPS_LOG or SLG1 with object /IWFND/ (hub) or /IWBEP/ (backend).
How do I activate an OData service in SAP?
For V2, use /IWFND/MAINT_SERVICE, choose Add Service, enter the system alias, find the service and add it. Make sure its ICF node is active and users have the S_SERVICE authorization. For V4, publish the service group in /IWFND/V4_ADMIN.
Why does $metadata not show my new field?
The model is cached. After changing the model or transporting it, run /IWFND/CACHE_CLEANUP on the hub and /IWBEP/CACHE_CLEANUP on the backend, then reload $metadata. Also check that the runtime artifacts were regenerated in SEGW.
If you want your team to ask SAP questions in plain English through your own Gateway services, on your own servers, Netray can build that AI layer.
Related Tools
ABAP CDS Annotations Reference (Common On-Premise Annotations)
The annotations you actually write in on-premise CDS views, with allowed values, scope, effect and the difference between DDIC-based views and view entities.
SAPABAP Developer Transaction Codes Reference
A searchable cheat sheet of development, debugging, transport and monitoring transaction codes used by ABAP developers.
SAPSAP SUM 2.0 Roadmap Phases Reference (Upgrade, Conversion, DMO)
The SUM 2.0 roadmap steps and key phases for upgrades, S/4HANA conversions and DMO, with uptime or downtime, what happens, typical issues and where the logs are.
Developer ToolsABAP New Open SQL Syntax Reference by Release (7.40 to 7.58)
Look up each ABAP SQL feature with the classic form, the new syntax and the SAP_BASIS release that first allows it, from 7.40 SP05 to 7.58.
More SAP tools
See all- SAP Transport Return Codes Reference (tp RC 0, 4, 8, 12, 16)
- SAP Transport Request Tables Reference (E070, E071, E07T)
- How to Transport Variants, SO10 Texts, Table Entries and Layouts in SAP
- SAP Work Process Types and SM50 Status Reference
- SAP GUI Connection Error Codes Reference (88, 10054, 10061)
- SAP NetWeaver Release to SAP_BASIS and Kernel Reference
- SAP Kernel Upgrade Command Generator (Linux, SAPCAR)
- SAP ABAP Extended Memory and Heap Sizing Calculator
- SAP Gateway OData Service Activation and Transport Checklist
Keep exploring
Free tools
- SAP Gateway OData Service Activation and Transport ChecklistStep by step checks to activate, test and transport an OData service on SAP Gateway, embedded or hub, V2 or V4.
- SAP Gateway SEGW DPC_EXT CRUD Methods Generator (ABAP)Fill in your SEGW project, entity set and backend table and get the five redefined DPC_EXT methods for an OData V2 service, with $filter, $top, $skip and $inlinecount handled.
- SAP Basis Transaction Codes Cheat SheetA searchable reference of the SAP Basis, security and system administration transaction codes you use every week, grouped by area.
ERP fixes and how-tos
- API_MATERIAL_STOCK_SRV: reading SAP stock by plant and storage location with ODataHow to call the SAP API_MATERIAL_STOCK_SRV OData service: activate it, read A_MatlStkInAcctMod, filter by plant and storage location, and fix auth errors.
- SAP S/4HANA API Documentation: Where It Is and How to Use ItWhere to find S/4HANA API documentation (SAP Business Accelerator Hub), OData vs SOAP, authentication on cloud and on-prem, and key manufacturing APIs.
- API Creation Process in SAP S/4HANA: From CDS View to OData ServiceHow to create a custom API in SAP S/4HANA: CDS view entity, service definition, service binding, activation, authorization and when to use the Business Hub.