How is your experience with the OutSystems Community?
14
Views
3
Comments
Solved
Odata API throwing 400 error
Question
Application Type
Mobile

I have below get API,

https://dev-mobile.abc.com/sap/opu/odata/sap/ZTOUCHLESSI9_SRV/PrqDecCreateRec?CdObj='{CdObj}'&Approver='{Approver}'&Sender='{Sender}'

Note: i change base url in post for some reason

i am passing 3 query parameters  

In IS module if i add hardcoded values(for test)  CdObj =' 123',Approver ='BRT', Sender ='XYZ' quotes it works fine 200 ok status but without quotes it is not working, even though with dynamic values it is throwing 400 bad error .

in sap side i got error which i  attached in screenshot . 

what will be the issue. 

i am sending you one more screen shot which is input values onbefore request. 

and the same api is working fine on postman 




SAPERRor.png
image (3).png
2026-06-20 17-43-43
Sherif El-Habibi
Champion
Solution

Hi @Bharat koshti,

I guess the root issue comes down to modifying the actual URL structure instead of the value itself. When you put quotes directly into the URL definition, different platforms (OutSystems or SAP) handle the encoding differently, which leads to conflicts.

Instead of changing the URL template, try to add the single quotes to the data value itself before passing it to the API.

For example, if you are retrieving these values from an Aggregate, you can format the values during the assignment step like this:

  • CdObj = "'" + GetData.List.Current.CdcyObj + "'"

You keep the base URL completely clean, and you are passing the actual value already wrapped in the single quotes that SAP expects.

2023-02-28 05-45-34
Bharat

Thanks Above both solution helps me . thanks a lot 

2026-06-20 17-43-43
Sherif El-Habibi
Champion
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.