cancel
Showing results for 
Search instead for 
Did you mean: 

Gateway Get Entityset unable to change requested values in parameter io_tech_request_context

former_member193947
Participant
0 Kudos

Hi Experts,

I am trying to change the search values of a requested call by changing io_tech_request_context input parameter.

I understand that input parameters can't be changed. But i tried copying to a like variable similar to this but still unable to change the values.

Is there a possibility to change the search values before proceeding to fill in the entity set ? The values will be retrieved from a CDS.

Thanks.

samson_moses
Explorer
0 Kudos

Hi,

I had earlier developed some work-arounds to call another DPC methods with custom filters, etc within methods of the current instance of the DPC. ( Example calling GET_ENTITYSET from EXPAND_ENTITYSET ).

But wanted to understand why would you be requiring to modify the URL request's search string. A context of your actual requirement would be helpful.

Regards,

Samson

zouzounos
Explorer
0 Kudos

Hi Samson,

Stumbled on this while looking for the same answer. I had a case with Fiori search fields looking up certain fields which have conversion routines in the backend, something that Fiori is not so comfortable with in general. Requirement was user having not to enter the leading zeroes for a field. Wanting to stay consistent, idea was just to change the filter and call the super method in the gateway extension class. Tried to change both the filter string and filter table but framework cares only about io_tech_request_context contents. Unable to do that had to change my filter string/table and then write my own custom code for the entity set. Having being able to change this, I would be able to call the super method and not bypass the logic coming from the original CDS view.

View Entire Topic
Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can the search string from

data(lv_search_string) = io_tech_request_context->get_search_string().

as described here:

https://blogs.sap.com/2017/02/01/avoid-using-deprecated-sap-gateway-apis-in-your-odata-service-imple.../

there is no other way to implement free search in SAP Gateway then evaluating the search string and to implement the search your self.

former_member193947
Participant

Thanks Andre. But the blog doesn't say how to change the values of search string to get entity set based on modified search string. I tried modifying variable iv_search_string with a local variable but it didn't change the search results due to values within the object io_tech_request_context. Any ways to modify the values within the request context object ?