Hi,
if you execute your query with $top=<some value>, you get the value of <some value > in parameter IS_PAGING-TOP in method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET of your data provider class. Next you need to return back the data based on the value of IS_PAGING-TOP. if you consider standard sample flight service, the code looks like
SELECT * UP TO lv_top ROWS FROM sflight INTO CORRESPONDING FIELDS OF TABLE <lt_sflight>.
where lv_top comes from IS_PAGING-TOP.
I think once you receive IS_PAGING-TOP in your Data Provider class you need to react to this.
Regards,
Atanu