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: 

Skip, top, Orderby,expand parameter handling in CDS Based odata service

Nikhil1
Explorer
1,265
  • SAP Managed Tags:

Hello All,

How does framework handle Skip, top, Orderby, expand etc.. parameter in CDS Based odata service ? IN SEGW Projects, these require ABAP coding to send the data in response.

is there any documentation regarding this topic ? Kindly help with the flow.

Regards,

Nikhil Kulkarni

1 ACCEPTED SOLUTION

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,197
  • SAP Managed Tags:

Hi Nikhil,

this all is handled out of the box by the underlying SADL framework when using OData Services using the Referenced Data Source approach as described here:

Referencing a Data Source (sap.com)

and here

Generating OData Service With Auto-Exposure | SAP Help Portal

Please note that in newer releases of SAP S/4HANA one would use CDS view entities instead of CDS Views (that require to have an additional DDIC structure).

Kind regards,

Andre

ceterum censeo RAP esse utendam
4 REPLIES 4

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,198
  • SAP Managed Tags:

Hi Nikhil,

this all is handled out of the box by the underlying SADL framework when using OData Services using the Referenced Data Source approach as described here:

Referencing a Data Source (sap.com)

and here

Generating OData Service With Auto-Exposure | SAP Help Portal

Please note that in newer releases of SAP S/4HANA one would use CDS view entities instead of CDS Views (that require to have an additional DDIC structure).

Kind regards,

Andre

ceterum censeo RAP esse utendam

Nikhil1
Explorer
0 Kudos
1,197
  • SAP Managed Tags:

Thanks, Andre

0 Kudos
814
  • SAP Managed Tags:

Hi @Andre_Fischer 

I am using a custom CDS view wrapped with RDS approach implemented to fetch Product Master(API_PRODUCT) & Customer Master(API_BUSINESS_PARTNER) data.

Upon applying the paging($top, $skip) to extract the full load data from the data provider system(S/4 2021), does SADL implement LIMIT & OFFSET during every HTTP request ? 

 

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
750
  • SAP Managed Tags:

To be honest, I don't understand your question.  

You said that you have built a custom CDS view with RDS. So you should be able to test yourself and see whether $top and $skip are handeld correctly.

I would expect that an RDS based service should do this, if not, this is probably an error and you can raise a ticket.

However it is also not clear for me what you are doing when you write that you have created a custom CDS view to product master API_PRODUCT and customer master API_BUSINESS_PARTNER.
API_PRODUCT and API_BUSINESS_PARTNER are SEGW projects, not CDS views. So I am wondering what your custom CDS view looks like.
Here as always it would help to provide code snippets of what you have developed so it is easier to judge what might have gone wrong here.

Kind regards,

Andre

 

ceterum censeo RAP esse utendam