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
600

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

  • SAP Managed Tags:
1 ACCEPTED SOLUTION

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
532

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
  • SAP Managed Tags:
4 REPLIES 4

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
533

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
  • SAP Managed Tags:

Nikhil1
Explorer
0 Kudos
532

Thanks, Andre

  • SAP Managed Tags:

0 Kudos
149

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 ? 

 

  • SAP Managed Tags:

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
85

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
  • SAP Managed Tags: