on 02-10-2016 9:23 AM
Hello Team,
How to pass Special Charecter ( & ) in the filter URL ?
Is there any alternative solution which we can handle in UI5 code ?
URL : /sap/opu/odata/sap/ZGW_XXX _SRV/AddressSet?$filter=Name eq 'A&B'
While calling the above URL i was getting error "Invalid Token Detected at position" , due to the special character .
Thanks,
Arun
Just replace & with %26. (Its ASCII code)
It is called as escaping special characters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adding to krishna, As Edm.String are fixed- or variable-length UTF-8 character, %26 is the UTF-8 form of '&'.
Correct me if I'm wrong.
Reference:HTML URL Encoding Reference
Regards,
--PG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Arun,
What is the Property type for property Name in AddressSet?
Is it Type="Edm.String ??
I am not sure but, with Edm.String it should work fine.
Let us know.
Regards,
--PG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.