| Function | With InputAssistant plus GuiXT Controls you have a convenient way to use SAP OData services in GuiXT.
In particular, newer SAP systems implement numerous OData services provided by SAP; these also form the basis of the Fiori apps.
GuiXT supports the currently used OData versions v2 and v4.
SAP has already integrated all required authorization checks into the services, so there is no risk of displaying data to the user or allowing them to change data for which they are not authorized. On the website "SAP Business Accelerator Hub" SAP provides a catalog of all OData services. The OData Tool of the GuiXT Script Editor Pro offers a convenient search function, a live preview of the content, as well as automatic generation of the OData calls for your scripts. In addition to the OData services of the SAP standard, you can also call self-developed services. GuiXT supports all OData "CRUD" operations (Create, Read, Update, Delete):
In addition, there are the functions
You can find documentation on all calls in GuiXT API for SAP OData Services Detailed examples on individual topics are provided there in separate articles. |
| Example 1 |
Reading all maintenance orders for a given date
Result V[myorders]:
4001320 YBA1 Equipment Repair (T&M) 04.04.2025
4001321 YBA1 Pump Service 04.04.2025
4001322 YBA1 Equipment Repair (Fixed Price) 04.04.2025
4001323 YBA1 Follow-on for 4001322 04.04.2025
4001324 YBA1 Equipment Repair (Fixed Price) 04.04.2025
|
| Logon |
An explicit logon call is normally not necessary, since GuiXT automatically performs the logon internally with the first OData operation per SAP GUI session.
The server name for the https OData connection is taken from the GuiXT profile or the "guixt.ini" file, parameter "ODataServer". For authenticating the user, the username and password of the running SAP GUI session are used. If the SAP GUI logon is done via SSO, you can add "authmode=sso" to the specification of the OData server so that GuiXT instead chooses a different authentication method. The authentication methods OAuth 2.0, SAML and X.509 client certificates are used automatically by Windows if configured. You can work with an explicit logon call, for example if you want to establish an OData connection to another SAP system in order to compare data of the current system with another system. Any connection that may already exist is closed by an explicit logon. Example of a logon: Logging on to an OData session
|
| Example 2 |
Reading a country name
Result V[countrytext]: IT Italy Italian |
| Example 3 |
Reading a maintenance order together with its operations
Result V[myorder]: 4001324 YBA1 Equipment Repair (Fixed Price) 04.04.2025V[myoperations]:
4001324 0010 1710 RES-0500 Dismantle 1,0 STD
4001324 0020 1710 RES-0500 Repair 5,0 STD
4001324 0030 1710 RES-0500 Assemble 2,0 STD
|
| Authorizations and Security Model | GuiXT OData does not use its own technical service user to access SAP S/4HANA.
All requests run in the user context of the respective logged-on end user –
the library forwards their logon credentials unchanged to the SAP gateway server.
The SAP backend therefore performs exactly the same authorization checks as it would for any other HTTP client
that logs on to the same OData service with the same credentials
– such as a web browser or a tool like Postman. This includes in particular:
GuiXT OData itself does not implement its own authorization logic and does not filter or modify requests in any way that goes beyond what the end user could also request via direct access to the same OData service. Technically, the library merely represents an alternative HTTP client; authorization control remains entirely with the SAP gateway and backend. Verifiability: This property can be demonstrated specifically for each service by performing a test call via GuiXT OData with an active SAP authorization trace (transaction ST01 or evaluation via SU53
after a failed access attempt) and comparing it with an equivalent call via a browser or the
SAP Gateway Client Tool (/IWFND/GW_CLIENT).
Both access paths trigger the same authorization checks.
|
| Component | InputAssistant + GuiXT Controls |