14
Views
1
Comments
Consuming an SAP OData API
Question

I am consuming an SAP OData API in OutSystems.

The API URL contains OData parameters using "$", such as:

$filter

However, OutSystems automatically encodes "$" to:

%24

The problem is that this API does not accept the encoded value %24.The request only works when the URL is sent with the literal "$" character.

Expected:

...?$filter=Lifnr eq 'xxxxxxx'

Current request generated by OutSystems:

...?%24filter=Lifnr eq 'xxxxxxx'

I already followed the official OutSystems recommendation to change the URL inside OnBeforeRequest. 

Inside OnBeforeRequest, the URL appears correctly with "$filter". However, after the callback execution, it seems OutSystems encodes the URL again before sending the request.

https://success.outsystems.com/documentation/how_to_guides/integrations/how_to_consume_an_sap_odata_service_in_outsystems/

2026-06-05 12-38-17
Eduardo Jauch

Hello Carlos, 

Were you able to overcome this issue?

When you execute the OnBeforeRequest, how are the parameters arriving, and how are the parameters you changed at the output?

From the documentation: 

Due to encoding issues, any outgoing requests made to the service do not include the "$" (dollar sign) character for these input parameters. 

This makes me wonder if the problem you're facing is the same as the problem this code seems to fix, as it seems the problem here is that the $ sign is being removed, not replaced by %24

The code itself seems to represent this, as the comparison is being made against the parameter name without the "$", not against %24+Parameter Name (that it is what I was expecting to see there).

So, I would check the following solution, which seems to work when the URL is encoded:

https://www.outsystems.com/forums/discussion/70619/any-way-to-avoid-url-param-of-rest-request-getting-url-encoded/#

In your case, instead of the path, you probably need to decode the parameters.
So, similar to the code you saw, but replacing the %24 with $. Again, I am assuming the $ is there as %24, instead of simply missing like it seems to be the case with the documentation. 

Cheers!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.