Application Development 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: 

Create Hyperlink when sending mail via Outlook

Sm1tje
Active Contributor
0 Kudos

Hi all,

I want to mail a hyperlink from within function module via outlook. Creating the hyperlink and starting function <new mail> in outlook works just fine. But when the document (word, pdf, etc.) contains blanks, the hyperlink gets interrupted.

For example:

h:\temp\word1.doc (this will work just fine).

h:\temp\word 1.doc (error when displaying hyperlink in body of new mail).

I know that sometimes on the internet blanks are displayed as %20. But how to insert this in an ABAP statement using CONCATENATE?

Best regards,

Micky.

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos

Hi,

or use :

concatenate f1 f2 f3 into f separated by '%20'.

regards Andreas

6 REPLIES 6

Former Member
0 Kudos

Hi Micky,

Try using replace command... to replace SPACE with %20

Regards,

Raj

See the example below:

REPLACE

Basic form

REPLACE f WITH g INTO h.

Addition

... LENGTH len (length specification for field f )

Effect

Replaces the first occurrence of the contents of field f in field h with the contents of field g . All fields are handled in their defined length; this means that closing blanks are not ignored.

The return code value indicates whether the string f was found in h and replaced by g :

SY-SUBRC = 0 String replaced.

SY_SUBRC = 4 String not replaced.

Example

DATA FIELD(10).

MOVE 'ABCB' TO FIELD.

REPLACE 'B' WITH 'string' INTO FIELD.

returns:

FIELD = 'AstringCB', SY-SUBRC = 0

andreas_mann3
Active Contributor
0 Kudos

Hi,

or use :

concatenate f1 f2 f3 into f separated by '%20'.

regards Andreas

0 Kudos

Hi,

first of all, thanks for your quick replies. But, reading your answers, I realise I have to rephrase my question. The problem isn't how to use the statement CONCATENATE or REPLACE. The problem is, after replacing the spaces / blanks in the name of a document, by '%20', along the way these are somehow erased again. So when the hyperlink is displayed in the mail, the link is interrupted, so when clicking the link, nothing happens. So question actually is how to achieve this?

Were using this functionality in combination with Easy DMS (Document Management System). When clicking the right mouse button on a document, you can send this URL via mail.

Kind regards,

Micky.

0 Kudos

Can you try putting your hyperlink between <>.

Ex: <http://h:/temp/word 1.doc>

This is what happened when I checked this in outlook.


server\share\location\file 1.doc

shows the hyperlink only upto file

<
server\share\location\file 1.doc>

shows the whole thing as a hyperlink.

Hope this helps.

Cheers,

-Ramesh

Message was edited by: Ramesh Adusumilli

Message was edited by: Ramesh Adusumilli

0 Kudos

Ramesh,

this looks very promising, but unfortenately I haven't been able to fully test it, since we're experiencing some problems with our browser. But the link is displayed the way it should.

Thanks a lot.

Micky.

0 Kudos

Happy that it is working for you.

Cheers,

-Ramesh