on 11-13-2013 12:06 PM
Hello Experts,
We are working on SAP BW 7.3. We need some guidance on including hyperlinks in email body, the email being set via an ABAP routine.
We have an ABAP routine to send out certain emails after the BW data-load is complete. This ABAP routine is included in the process chain. The routine uses function module ‘SO_NEW_DOCUMENT_SEND_API1‘ to send out emails.
We want to include a static link (that navigates to a Webi Report) in the body of the email. The two issues we are facing are-
Sample Code:
DATA t_mail_content LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
..
..
..
CONCATENATE
'Link: '
‘http://XXXXXXXX:1111/BOE/OpenDocument/opendoc/openDocument.jsp?'
'sIDType=CUID&iDocID=ATAhFFwzWwBKobXkRYIYmFY'
INTO t_mail_content .
APPEND t_mail_content.
CLEAR t_mail_content.
..
..
Please guide us through this.
Regards,
Chetana
Hi Chetana,
Try wrapping your text/address into some html code:
<a href="http://XXXXXXXX:1111/yourLink">
Did that help?
Br,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Thanks for your response. I tried putting the HTML tag as follows -
CONCATENATE
'Link: '
'<a href="http://XXXXXXX:1111/BOE/OpenDocument/opendoc/openDocument.jsp?'
'sIDType=CUID&iDocID=ATAhFFwzWwBKobXkRYIYmFY">'
INTO t_mail_content .
APPEND t_mail_content.
CLEAR t_mail_content.
But the output is -
Link:<a href="http://XXXXXXX:1111/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=ATAhFFwzWwBKobXkRY...">
The link is now a hyperlink, but the HTM tags '<a href=" ">' are also displayed in the email body.
Tried a number of options with display, but nothing seems to work.
Was wondering if it is something to do with the setting. The settings for output format in t-code SCOT -> SMTP are -
Business Object/Link - HTM
RAW Text - TXT.
I hope these setting are right.
Kindly guide me through this.
Hi,
Can you please check that you are passing doc_type = HTM in the packing_list
table. This differentiates a text based email from an HTML one.
Also check this wiki link for sending HTML emails from SAP.
Thanks,
Kush Kashyap
Message was edited by: Kush Kashyap
Hi Chetana,
This happens most likely because the </a> tag is missing in the end.
Take a look at that:
CONCATENATE
'<a href="
http://www.sdn.sap.com"
" target="_blank" >'
'SAP Developer Network (SDN) </a>'
' '
INTO
XXXXX SEPARATED BY
''.
The code snippet was taken from: http://wiki.scn.sap.com/wiki/display/Snippets/ABAP+-+Mail+with+link+to+outlook
This guide explains the use of the function module ‘SO_NEW_DOCUMENT_SEND_API1‘.
That should fix your problem.
By the way. Why are you using the function module 'SO_NEW_DOCUMENT_SEND_API1' ?
'CL_BCS' is way easier to use for sending mails through ABAP.
Here is some useful information regarding the topic:
http://wiki.scn.sap.com/wiki/display/ABAP/Sending+Mails+-+Home+Page
Br,
Christian
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.