cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

Trying to run a search on the odata service generated out of CDS view. But getting an error which says "Search not possible because the search scope is empty".

Attached screenshot of the same. Did not find any results on the internet for this error.

Could anyone point out how this is to be implmented?

Regards

Vaibhav Surana

0 Likes
View Entire Topic
rahullohia
Product and Topic Expert
Product and Topic Expert

Hi,

I faced the same issue recently and the way to solve is to redefine the method

IF_SADL_GW_QUERY_CONTROL~SET_QUERY_OPTIONS of your DPC_EXT class and then provide the scope parameters by specifying the 'Search' enabled fields from entity.

CASE iv_entity_set.

WHEN 'ApplicationSet'.
"Set basic search scope to include the following fields:
lt_search_scope = VALUE #( ( |{ 'DESCRIPTION' }| ) ( |{ 'APPLICATION' }| ) ).

io_query_options->set_text_search_scope( lt_search_scope ).

ENDCASE.

Thanks,

Rahul