cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ODATA : how to convert iv_filter_string to lt_select_options

2,869

Hi All,

I am facing a issue of converting iv_filter_string to IT_FILTER_SELECT_OPTIONS.

Tried below standard one which works in some cases and fails in some other cases.. not sure why.

CALL METHOD cl_clb2_tools=>odata_filter2select_option
EXPORTING
iv_filter_string = lv_filter_string
RECEIVING
rt_filter_select_option = lt_filter_select_options.

Tried few other custom conversions from SDN but none gave me luck.

Thanks

Rajesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Likes

No, you have not.

You have to use the object

h_request_context

that is passed as a parameter not the deptecated parameters.

Simply try out my code.

DanieleInc
Participant
0 Likes
Where is h_request_context? In the method sign I have IO_TECH_REQUEST_CONTEXT but get_filter_select_options returns empty table
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Likes

Why aren't you using

lt_filters = io_tech_request_context->get_filter( )->get_filter_select_options( ).
0 Likes

Hi Andre,

I have tried the same earlier, lt_filter_select_options is empty only iv_filter_string having my filters from UI.

This is happens only when I select multiple combination from UI, if I select only one record than my filters are present in lt_filter_select_options.

Multiple selection will routing to iv_filter_string.

Thanks

Rajesh