Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple issues with CDS Views and ODATA

angeliev
Explorer
0 Kudos

Hello guys!

I haven´t found answer to my question, so I hope someone could answer my quiestions here...

So there´s this project we have at our company where I have to deliver Data from our S4/HANA Database with CDS Views through an ODATA Services to the Frontend (SAP UI5). I managed to "write" the CDS Views but apperantly I did something "wrong" or maybe am I missing something, because I become this errors the whole time. I will attatch some screenshots to clairfy it better.


As far as I unterstood, I should be able to find this view "Z_PROF_VIEWS_CDS" in the transaction "/IWFND/MAINT_SERVICE" where I can add it. Unfortunateliy it does not appear there.


Any suggestions how can I fix this ? That would be great help.

Thank you guys in advance and wish you to have a good day! 🙂

Best Regards
Angeliev

  • SAP Managed Tags:
4 REPLIES 4

bygineben
Explorer
0 Kudos

May I ask which S/4 HANA version are you working with? I believe with > S/4 1909, you can create service definition by right clicking the CDS View -> New Service Definition.

  • SAP Managed Tags:

0 Kudos

Good morning Bygine and thank you for your answer.

I believe I have a newer version:




I tried to create a new service by right clicking on the cds views and became this as a result:



but I still can´t find it in the service explorer in:

/IWFND/MAINT_SERVICE -> add new service

Any further ideas ? 😕

  • SAP Managed Tags:

bygineben
Explorer
0 Kudos

Hi Angeliya,

Good Day. I don't think you need to add it in the /IWFND/MAINT_SERVICE transaction. Go ahead and create Service Binding(by right clicking Service Definition) and Publish it. And after that if you search it in /IWFND/MAINT_SERVICE you can see the Service Binding(and not service definition). But still you don't have to add it. Please refer below blog I found which explains the steps you are after. Good luck.

https://blogs.sap.com/2022/12/14/creating-a-service-from-cds-and-useful-annotations/#:~:text=Creating%20a%20Service%20From%20CDS%20View&text=Right%20click%20on%20the%20CDS,Referenced%20Object'%20field%20automatically%20filled.

  • SAP Managed Tags:

0 Kudos

Hi Bygine,

thanks a lot for your help! I managed to fix this as I changed the data types of the parameters. After I changed the data types the error message disappeared and I could register the service.

The topic you have posted looks also very interesting, I would try this also to see how does it work! 🙂

Anyways, big thanks for the help, have a wonderful day! 🙂

  • SAP Managed Tags: