on ‎2019 Nov 27 11:01 AM
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.
Request clarification before answering.
"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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.