on 04-06-2023 5:35 AM
Hello All,
We have data coming from Ariba in form of JSON and residing in JSON collections in HANA Cloud DB, then Calculation Views are exposing the fields, all fields are string types and are storing nested data also like example, customer { first name:,,,last name }, project ID { att1, attr2 },. and many other nested data in different sets and forms.
Is it possible to do deep calls ? like customer and it's first name etc. Because the data type in calculation view is String type, we are facing challenge and using the $expand parameter in API calls, we always get 'navigation property x' not defined.
Any suggestions please, what is the best approach for it and if it's feasible ?
regards,
MV
andre.fischer , Hello, thank you for your reply, Sure I will try to explain as below in detail:
We have data coming (in JSON Format) from ARIBA system that is stored in HANA CLOUD DB (SAP BTP) in one JSON Collection object in a HDI Container. (as per SAP recommendation).
As it's a large JSON, many fields have nested data in them also.
For Example, {ID: 123, Owner : { Name : ABC, Address : CDE, Phone:995 }}, Origin : USA}.......and so on.
You can see, field Owner field has further fields Name Address etc.
Now in SAP Business Application Studio, CAP application is created, an hdbview is created over this single JSON collection exposing all the fields, then a calculation view (CV) is created over this hdbview (where all fields are automatically are of data type NVARCHAR5000.)
Then using CDS file, this CV is exposed as entity with all fields defined in CV, followed by a ready only service in srv file. So, building deploying creates the API Endpoint. When we apply $expand it asks for Navigation property and gives error for the field OWNER. (Testing in POSTMAN).
So this is the first question please, if this approach is correct or what we want to achieve like accessing OWNER->NAME etc. via API parameters?
Finally, we have created a API using this API endpoint in Integration Suite.
$Select, $filter etc. are all working for this OData v4 it seems but expand needs different approach,
If you can please guide on it.
thanks,
regards,
MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
9 | |
9 | |
7 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.