Get Entityset 后加入下面这些方法,让OData更完善
Inlinecount
*** $inlinecount query option for all count entries.
IF io_tech_request_context->has_inlinecount( ) = abap_true.
DESCRIBE TABLE et_entityset LINES es_response_context-inlinecount.
ELSE.
CLEAR es_response_context-inlinecount.
ENDIF.
Filter
*** The module for Filter conditions
CALL METHOD /iwbep/cl_mgw_data_util=>filtering
EXPORTING
it_select_options = it_filter_select_options
CHANGING
ct_data = et_entityset.
Top&Skip
*** The module for $top and $skip Query Options
CALL METHOD /iwbep/cl_mgw_data_util=>paging
EXPORTING
is_paging = is_paging
CHANGING
ct_data = et_entityset.
Orderby
*** The module for Orderby condition
CALL METHOD /iwbep/cl_mgw_data_util=>orderby
EXPORTING
it_order = it_order
CHANGING
ct_data = et_entityset.
Variable
* DATA(lt_orderby) = io_tech_request_context->get_orderby( ).
* "Fileter
* DATA(lo_filter) = io_tech_request_context->get_filter( ).
* DATA(lt_filter_options) = lo_filter->get_filter_select_options( ).
* DATA(lv_filter_str) = lo_filter->get_filter_string( ).
** DATA(lt_navigation) = io_tech_request_context->get_navigation_path( ).
** DATA(lt_source_keys) = io_tech_request_context->get_source_keys( ).
* "skip
* DATA(li_skip) = io_tech_request_context->get_skip( ).
* "top
* DATA(ls_top) = io_tech_request_context->get_top( ).
*
* DATA(ls_entity_type) = io_tech_request_context->get_entity_type_name( ).
*