cancel
Showing results for 
Search instead for 
Did you mean: 

fiori manage supplier line item enhancement: cds extension view not sending data at custom odata get query

0 Kudos
787

Hi Everyone,

I have created extension for standard CDS view which has 2 mandatory parameters date and language. custom Odata service is created on top of this in s4hana 1709 release system. Now, i am able to load metadata, problem - unable to fetch data from cds view at odata level. the process what should i follow to read data directly from CDS than redefining the get_entityset, and filling explicitly at custom odata for Item entityset?

problem - how to pass these parameters value from fiori screen or at odata call - https://<server>/sap/opu/odata/sap/ZFAP_VENDOR_LINE_ITEMS_SRV/Items?sap-client=110.

parameters are (P_KEYDATE = '20201201',P_LANGUAGE = 'E').

note - At CDS level - there is no OData. publish annotation.(s4hana 1709 release) How should i access data from cds view at odata? Regards, Soumya

View Entire Topic
Amith_Nair
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi soumyar

Just wondering if you're referring to the S4HANA Cloud system or is this issue happening in your OP S4HANA system. S4HANA 1709 is an on premise system.

I can explain how this works in Cloud( as this platform is focused to handle only S4HANA Cloud Queries)

But here is how you will have to handle if you have a mandatory parameter linked to the custom CDS view that you intend to use.

Create your custom CDS view using the data source with API/ODATA enabled you intend to build and lets say we name that YY1_Test.

Now once YY1_Test is published, this is how you should frame your ODATA query to access the data from the CDS view YY1_Test

Link that to a communication Arrangement(CA).Here is a complete link on how to establish

https://developers.sap.com/tutorials/abap-extensibility-custom-cds.html

https://my300***-api.s4hana.ondemand.com/sap/opu/odata/sap/YY1_TEST_CDS/YY1_Test((P_KEYDATE = '20201201',P_LANGUAGE = 'E')/Results

Hope this helps!

Thank you!

Amith Nair

0 Kudos

Hi Amith,

thats very useful information. yes i am in onPrem system. this fiori applications are not available in this release. so, i just enabled them with annotation in custom cds extension.

i am now make these fields as value help enabled, as smart filter property.

Thanks,

Soumya