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

How to remove extra space %20 from URL?

Former Member
0 Likes
3,452

Hi Everyone,

I have a program that sends mail to the user.

To populate the mail body, I have maintained text in SO10.

In S010, I have a link/URL coded as shown below:

When I click the link from SOST everything works fine, but when I click this link from Outlook Mail I can see '%20' in the link.

I have checked while debugging, there is no space in the URL.

Could you please let me know how to remove this extra space from the URL.

Thanks,

Faraz Khan

8 REPLIES 8
Read only

LukaszPegiel
SAP Champion
SAP Champion
0 Likes
2,007

Hi Faraz,

storing html in SO10 sometimes brings some troubles, when I use SO10 for such things then I always replace "<" with "{" and ">" with "}" before storing in SO10 and then when I want to use it, then I replace it back in a program.

In other cases often the texts contains some additional characters when read by FM READ_TEXT.

Cheers

Łukasz

Read only

0 Likes
2,007

Hi Lukasz,

Thanks for the suggestion.

Changing program will be the last resort; I suppose.

Regards,

Faraz Khan

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,007

I'd like to know at which debug place you made sure there was "no space in the URL", as apparently the space has been added. If you use the paragraph format *, by definition it adds a newline. = concatenates lines. (cf Structure TLINE of the Lines Table - BC SAPscript: Printing with Forms - SAP Library)

Read only

0 Likes
2,007

Hi Sandra,

I checked the text in debugger just before sending the mail.

As I am using " '=' Extended line" in SO10, I don't see any space in the URL.

I tried with " '  ' Continuous Text" as well but to no luck.

The same URL when clicked from SOST has no space and opens the correct website.

The problem is when this link is clicked from Microsoft Outlook.

Thanks,

Faraz Khan

Read only

Former Member
0 Likes
2,007

At which point in the url are you getting the extra space? just after https:// or between the data in line 10 and 11 ?

Read only

0 Likes
2,007

Hi Sajid,

Space is between line 10 and line 11.

Thanks,

Faraz Khan

Read only

0 Likes
2,007

Hello Faraz,

Then I would suggest take a table of bigger length or string type..
and concatenate line 10 and 11.

or if the whold 255 characters are not used in line 10, add the remaining part of line 11 to line 10.

while concatenating into a table of type string, to make the code generic you can do something like each <br> on a new line

example:
you recevived a mail because .. this form.

<br>

<br>

you can access ... link below

<br>

<br>

<a href = ... >

<br>

<br>

this should solve the problem of extra space

Read only

0 Likes
2,007

Thanks Sajid.

We are now going to replace the existing URL with short URL.

This may solve the issue as the short URL will not be extended to the next line.

Regards,

Faraz Khan