Application Development and Automation 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: 
Read only

OData query without manually writing code

raffinkira
Participant
0 Likes
829

Hi all,

Currently, after building OData models, I re-define the READ/Query method, writing SQLs to access the table.

I am wondering if automatic mapping can be done between URI and SQL.

Does SAP provide a standard solution or framework for that?

Regards,

Ming

1 ACCEPTED SOLUTION
Read only

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
643

More or less automatically. At least without the need to code anything.

When using 750 you would go for Referenced Data Source

https://blogs.sap.com/2016/06/01/odata-service-development-with-sap-gateway-using-cds-via-referenced...

When using 740 you would have to use the mapped data source approach.

https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/ed/2ed4e2cbc54ffdba3aead4f3a73640/frameset.htm

Regards,

Andre

ceterum censeo RAP esse utendam
3 REPLIES 3
Read only

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Likes
643

Hi Ming,

the way you develop OData Services in SAP would be to develop a CDS view. When Publishing the CDS view as an OData Service you don't have to implement the READ/Query Methods.

What platform are you working on ?

SAP NetWeaver ABAP AS or HANA XS Engine?

Regards,

Andre

ceterum censeo RAP esse utendam
Read only

0 Likes
643

Hi Andre,

I am developing on SAP NetWeaver for ABAP.

So do you mean I just need to define a CDS view for DB table then the query would be automatically implemented?

Read only

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
644

More or less automatically. At least without the need to code anything.

When using 750 you would go for Referenced Data Source

https://blogs.sap.com/2016/06/01/odata-service-development-with-sap-gateway-using-cds-via-referenced...

When using 740 you would have to use the mapped data source approach.

https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/ed/2ed4e2cbc54ffdba3aead4f3a73640/frameset.htm

Regards,

Andre

ceterum censeo RAP esse utendam