on 2021 Jul 26 5:08 PM
Hello Experts,
When I execute Fiori App which is based on CDS custom Entity( data fetching through FM) is giving below error. Could you please help me how we can over come this issue. i have tried pagination but its limiting to 25 records on screen but unable to load further data.
I am unable to display all records in fiori preview while testing. i haven't created Fiori App.
Your help would be apricated.
Runtime Error(ST22):
The application has indicated exception "CX_SADL_DUMP_APPL_MODEL_ERROR" as the reason for the termination:
Processing was aborted because of an application modeling error: See previous in exception chain.
The exception is related to the previous exception
"CX_RAP_QUERY_PAGE_SIZE_OVERRUN" that occurred in program "CL_RAP_ABQI_ADAPTER===========CP", in line 320 of include "CL_RAP_ABQI_ADAPTER===========CCIMP".
The reason for this exception was:
Page size overrun: Query implementation of 'ZI_ZVOML_CUST' returned too many records
andre.fischer
Request clarification before answering.
With rap custom entity you are in the unmanaged area. That means you have to do almost everything by yourself.
If you use Chrome and look with F12 ( Developer Console ) how the Odata Requests to the backend look like you can see something like this:
GET Your-Custom-Entity?sap-client=12345&$skip=0&$top=20&$select=your-select-statement.
as soon as you scroll:
client=12345&$skip=20&$top=20&$select=your-select-statement..
This means that as soon as you scroll, your implementation class is called again.
You have to program it so that you return not more than 20 lines with each call.
With skip you know which entry you are at.
"Use this to see which part of your table you have to return
DATA(skip) = io_request->get_paging( )->get_offset( ).
DATA(top) = io_request->get_paging( )->get_page_size( ).
I then did something like this:
data: lt_line_out type table of lty_line,
DATA( lv_start ) = skip + 1.
DATA (lv_end ) = skip + top.
append lines of lt_line from lv_start to lv_end to lt_line_out.
io_response->set_total_number_of_records( lines( lt_line ) ).
io_response->set_data( lt_line_out ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
33 | |
21 | |
16 | |
8 | |
8 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.