Tag: odata
-
How to use MongoDB in combination with SAP CAP?
If you know the SAP Cloud Application Programming model (short SAP CAP), you may already be familiar with the OData interface and the CDS entities, which you can create with it. This is a cool definition framework, where you simply define the properties and associations to business objects and later create from it a real…
-
How to enable a value help in a CDS view for Fiori Elements?
In this short tutorial, I would like to show you how to simply apply a value help to your CDS fields by simply annotate them with another database table. First of all, we need a simple database table, that already contains some information. We have here a table (ZAIRORTS) containing two entries with airport id…
-
How to register a validation event in SAP RAP for create and update?
At a certain point in our RESTful Application Programming (RAP) model, we want maybe to extend it with our own logic. Mostly, we want to this, when we create or update an entry in our database, as in the following image: After we continue from this dialog and click save, we want to trigger our…
-
How to add a generic filter for an OData service?
You may want to automate the filter for your already retrieved data from the OData service in ABAP. This allows you to just send that data back, that the frontend has been requested. Please note that you already need an internal table, filled with all the data, in the best case also unfiltered to use…
-
How to automatically order your entity set in an OData service in ABAP?
If you want to give the $orderby property via an OData service an automatically sort function, you can simply use a small piece of code, to adjust the entity set, which will be later returned to the OData gateway classes in ABAP. You can see the IT_ORDER importing parameter in the signature of the GET_ENTITYSET…
-
The different count modes in SAPUI5
In the UI5 framework, we do differ how we want to setup the count requests, when an OData service gets called. The mode how this count should be sent and retrieven, can be set in the manifest.json file. Therefore we can set the following options: Count mode Description Inline Count is retrieved by adding $inlinecount=allpages to data…
-
Fetch an empty structure of an entity in an OData service
Did you asked yourself, how to get an empty structure, with empty strings and booleans set to false from your OData service to use it later in a local JSON model. To achieve this, we need here again the service metadata from our OData model. Test case To test our code from above, we have…
-
Fetch a JSON meta structure from an entity of an OData service in SAPUI5
I recently had to fetch a complete structure of an entity in my OData service to get the labels and attribute type like Edm.DateTime etc. Please note that this tutorial only has been tested with an OData V2 service. This allows you to works with large entities for example to handle an Excel export function,…