12-07-2005 12:33 PM
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.
12-07-2005 1:20 PM
Hi,
or use :
concatenate f1 f2 f3 into f separated by '%20'.
regards Andreas
12-07-2005 12:53 PM
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
12-07-2005 1:20 PM
Hi,
or use :
concatenate f1 f2 f3 into f separated by '%20'.
regards Andreas
12-08-2005 8:36 PM
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.
12-08-2005 11:41 PM
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
12-09-2005 8:25 AM
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.
12-09-2005 2:15 PM