cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to call URL due to space in url parameters

former_member199125
Active Contributor
0 Kudos

Guys,

I need you all ideas on this.

I need to pass file name( generally file name contains spaces, right? ) as parameter in One URL.

I am calling URL using external window  concept, but while calling it is throwing error , and it says fata error script ..... it means url contains spaces....

URL is

  http://xxxxxxxxxxxxxxxxxxxxx/sap/bc/gui/sap/its/webgui?~transaction=*ZPMS_UPLOAD%20P_DOCID=LV_AP_DOC...

here lv_file_name is string contains file name say for ex:C:\Users\srinivassana\Documents and Settings.................

So while calling URL it is throwing error due to space in file name.

Thanks and Regards

Srinvias

Accepted Solutions (1)

Accepted Solutions (1)

UweFetzer_se38
Active Contributor

No only the blanks but also the backslashes must be URL encoded.

blank = %20

\ = %5C

C:\Users\srinivassana\Documents and Settings\test.txt

C%3A%5CUsers%5Csrinivassana%5CDocuments%20and%20Settings%5Ctest.txt

former_member199125
Active Contributor
0 Kudos

Thaks Uwe,

Thats the correct solution.

Did you ever come across that situation? if not, how do you find above convention (%5C )?

Regards

Srinivas

9052020259

UweFetzer_se38
Active Contributor
0 Kudos

This is the standard for all URLs, has nothing to do with SAP.

see also http://en.wikipedia.org/wiki/URL-Encoding )

Answers (2)

Answers (2)

Former Member

When ever you are passing any URl take care that if there is any space then insert %20 in that space and then it would work.

Thanks

Phani

Former Member
0 Kudos

I think when we open any URL in which parameters are separated by space, the browser replaces each space with a specific character string. Something like %20. Just try executing the URL on your own, find this string and in your application replace spaces in file name with this string.

Hope this works.

former_member199125
Active Contributor
0 Kudos

Still am getting above error..

Regards

Srinivas

Former Member
0 Kudos

Are you sure this error is coming because of spaces in file name? Have you tried with a file name without any spaces?

Former Member
0 Kudos

Also, this thread suggests that it could be browser issue as well.

http://scn.sap.com/message/13394186

former_member199125
Active Contributor
0 Kudos

Without that file name am able to open the tcode, but when i pass file name in url, it is throwing fatal error

Regarsd

Srinivas