cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Implement DPC_EXT - GET_ENTITYSET without calling super

suwandi_cahyadi
Contributor
1,566

Hi,

Is it possible to implement the DPC_EXT - GET_ENTITYSET method without calling super's GET_ENTITYSET? I've tried to do this but, in the Fiori I get the "No Items Selected" response. The reason I want to do this is because I want to change the number of rows/completely override the data returned to the front end.

Thank you.

View Entire Topic
maheshpalavalli
Active Contributor

Hi Suwandi Cahyadi

"So where are u getting no Items Selected response message?"

Coming to the solution (guessing), You need to check if the odata request is calling enityset method 2 time (1 for data and 1 for count) or one time ( which has inline count, data +count).

If it is a separate count request, then you need to call the super class and get the data for normal request and for count request don't call the super class method and send ur own count. How u can differentiate is by the method.

io_tech_request_context->has_count( ).

Now how to know if is inline count request? so you need to call the super class method and send the inline count at the same time. by using the below code.
io_tech_request_context->has_inlinecount( ).

You need to fill the response for count and inlinecount in ES_RESPONSE_CONTEXT

BTW it is not really recommended to do like this as there will be gap between data and count and might cause issues. Any reason?

Thanks,
Mahesh

suwandi_cahyadi
Contributor
0 Likes

Hi,

I think it gives the "No Items Selected" because I didn't response to the inline count request, so the UI treats as no data.

I do this because I want to use CDS annotations for the UI but I want to provide my own custom data. Not sure if this is recommended, another way is to go full ABAP SEGW.

Thank you