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

Sending a hyperlink through mail

Former Member
0 Likes
1,420

HI all,

I am sending a mail to outlook mailbox of a user using FM SO_NEW_DOCUMENT_ATT_SEND_API1. In that i need to send a link also. When the user clicks on that link it should go to a webpage.

Example : Mail format.

Hi,

Please <b>click here</b>.

thanks.

when user clicks on the "Click here" words it should point to webpage(html). So if anyone has come across such requirement please give your ideas.

Thanks in advance,

Shyam.

PS: Please go through the FM which i mentioned. In that FM data is taken as text elements.

HI all,

I am sending a mail to outlook mailbox of a user using FM SO_NEW_DOCUMENT_ATT_SEND_API1. In that i need to send a link also. When the user clicks on that link it should go to a webpage.

Example : Mail format.

Hi,

Please <b>click here</b>.

thanks.

when user clicks on the "Click here" words it should point to webpage(html). So if anyone has come across such requirement please give your ideas.

Thanks in advance,

Shyam.

PS: Please go through the FM which i mentioned. In that FM data is taken as text elements.

3 REPLIES 3
Read only

Former Member
0 Likes
954

Hi,

I am not sure that this is possible. Maybe if you build your email as an HTML and pass it to the FM; you'll have to play with it...

Cant you have a text like:

Please click on the following link: <b>sdn.sap.com</b>

The recipient's email client should convert this into a hyperlink automatically (worst case you might have to add "http://" in front of the link).

This would be much easier

Thanks,

Guenther

Read only

Former Member
0 Likes
954

Hi sHyam,

use the fm CALL_BROWSER which might be a lot good help for u.

here is a very sample code..

data : link type string value 'google.com'.(pass the comments whatever u want..

in ur program..like click here..and correspondingly change the variable)

CALL FUNCTION 'CALL_BROWSER'

EXPORTING

URL = 'link'

  • WINDOW_NAME = ' '

NEW_WINDOW = 'X'

  • BROWSER_TYPE =

  • CONTEXTSTRING =

EXCEPTIONS

FRONTEND_NOT_SUPPORTED = 1

FRONTEND_ERROR = 2

PROG_NOT_FOUND = 3

NO_BATCH = 4

UNSPECIFIED_ERROR = 5

OTHERS = 6

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

hope this helps u a bit,

all the best,

regards,

sampath

  • mark helpful answers

Read only

sudhindra_chandrashekar
Product and Topic Expert
Product and Topic Expert
0 Likes
954

Hi,

You will have to construct your email as a HTML mail including the tags. For the link you can use the tag:

<a href="www.google.com">click here</a>

Then in the interface of the function module SO_NEW_DOCUMENT_ATT_SEND_API1 you will have to set the import parameter PACKING_LIST-DOC_TYPE to 'HTM'.

Hope this helps,

Sudhi