Use an OData Service
You can define OData services based on an existing on-premise SAP S/4HANA live connection in your system that was created via CORS (cross-origin resource sharing) connectivity. Additionally, you can also define OData services based on SAP BW systems, SAP HANA systems, and SAP Business Planning and Consolidation (BPC) systems that were also created via CORS.
You can create an OData service, define the endpoint URL and use script APIs to let viewers perform transactional actions at the backend, such as filling out an order form.
OData actions can be called from and run in the backend system via scripting. Furthermore, it's also possible to read and use the data of entity sets exposed via OData services via APIs.
What You Should Know
-
OData actions are operations exposed by an OData service, which may have side effects when invoked.
-
OData action imports, also called unbound actions, are not associated with any OData entity set or entity. They generally expose simple parameters. All parameters are set via POST body.
-
OData bound actions are actions that may be invoked on a specific entity. They always contain a first parameter that is set via URL to resolve the binding to the entity within the relevant entity set, and all other parameters are set via POST body.
In general, actions can be bound on every type, but only binding on single entities is supported.
-
For OData you should configure the direct connection CORS at the backend. To follow the instructions on the connection configuration, refer to Live Data Connections to SAP S/4HANA. In connection configuration, the CORS connection is referred to as direct connection.
-
Only parameters of simple types are supported. Actions with mandatory parameters of unsupported types are not available. For actions with optional parameters of unsupported types, the action itself is supported, but those parameters are not.
-
In case of bound actions, actions bound to an entity collection are not supported. Only actions bound to a single entity are supported. It's only possible to set this binding parameter by specifying the key of the entity on which the action should be carried out.
-
Only the JSON format is supported.
-
Only S/4HANA on-prem is supported.
-
Only direct connection, CORS, is supported.
-
The following types are not supported:
-
Edm.Stream
-
Edm.Untyped
-
All Edm.Geography types
-
All types defined in different name space
-
Add an OData Service
To run an OData action, you need to first add an OData service with the corresponding actions to your story.
Prerequisites
The end-point URL of the OData service is available. You need to enter it manually when creating the service.
Procedure
Results
Use APIs to Read Data from OData Services
With OData services you can not only can access OData actions, but also read and use the data of entity sets exposed via OData services.
-
getEntity: Retrieves a single OData entity from an entity set by specifying the key to the entity. This is similar to selecting a single row from a SQL table via SELECT * FROM T1 WHERE ID = <id>.
-
getEntitiesFromEntitySet: Retrieves all entities from an OData entity set. This is similar to SELECT TOP <N> * FROM T1. With this API you can use the OData system query options filter, orderby, select, count, top and skip.
-
getEntitiesCountFromEntitySet: Retrieves the number of entities from an OData entity set. This API works like the getEntitiesFromEntitySet API and you can also use the OData system query options filter, orderby, select, count, top and skip.
-
Chaining from one entity set to another isn't supported.
-
expand, analogous to joining, isn't supported.
-
Entity sets with parameters aren't supported.
-
Entity sets with mandatory filters aren't supported.
