Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Replace encoded characters in URL

Former Member
0 Likes
2,947

Hi gurus,

I have the following requirement and I don't know how to solve it in the best way.

I have a Z transaction for uploading a local file. This file contains URL's and after upload, there are stored in SAP.

I need to check this URL and replace encoded characters with corresponding codes, for example: space -> %20

How can I do this? I've been looking for a solution, but I haven't found anything usefull yet.

Any ideas?

Thanks a lot!

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,403

Have a look at class CL_HTTP_UTILITY. There are some methods which looks promising.

The method ESCAPE_URL is waht you needed.

pass UNESCAPED = 'http://forums.sdn.sap.com/edit!default.jspa?messageID=11060123'

output = HTTP%3a%2f%2fFORUMS%2eSDN%2eSAP%2eCOM%2fEDIT%21DEFAULT%2eJSPA%3fMESSAGEID%3d11060123

& for vice versa use UNESCAPE_URL

Edited by: Keshav.T on Feb 7, 2012 2:23 PM

Hi gurus,

I have the following requirement and I don't know how to solve it in the best way.

I have a Z transaction for uploading a local file. This file contains URL's and after upload, there are stored in SAP.

I need to check this URL and replace encoded characters with corresponding codes, for example: space -> %20

How can I do this? I've been looking for a solution, but I haven't found anything usefull yet.

Any ideas?

Thanks a lot!

2 REPLIES 2
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,404

Have a look at class CL_HTTP_UTILITY. There are some methods which looks promising.

The method ESCAPE_URL is waht you needed.

pass UNESCAPED = 'http://forums.sdn.sap.com/edit!default.jspa?messageID=11060123'

output = HTTP%3a%2f%2fFORUMS%2eSDN%2eSAP%2eCOM%2fEDIT%21DEFAULT%2eJSPA%3fMESSAGEID%3d11060123

& for vice versa use UNESCAPE_URL

Edited by: Keshav.T on Feb 7, 2012 2:23 PM

Read only

0 Likes
1,403

Thanks a lot!!!!!