
Feed (GET_ENTITYSET), Paging
To retrieve values for $top and $skip, use the following code:
lv_top = io_tech_request_context->get_top( ).
lv_skip = io_tech_request_context->get_skip( ).
Call the RFC function module with or without the parameter MAXROWS only if $top has been passed as a query parameter by using the following lines of code:
*- get number of records requested
lv_top = io_tech_request_context->get_top( ).
*- get number of lines that should be skipped
lv_skip = io_tech_request_context->get_skip( ).
IF lv_top IS NOT INITIAL.
*- calculate number of rows that must be retrieved
lv_maxrows-bapimaxrow = lv_top + lv_skip.
CALL FUNCTION 'BAPI_EPM_PRODUCT_GET_LIST'
EXPORTING
MAX_ROWS = lv_maxrows
*- delete the entries that have to be skipped.
IF lv_skip IS NOT INITIAL.
DELETE et_entityset TO lv_skip.
ENDIF.