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: 

Sending a link in email

Former Member
0 Kudos

Hi All,

I have to send a mail with some text along with a web link(Once the link is clicked it should take to the corresponding page). How to send the link? Is there anything specific for sending the link or it can be send as like the text.

Thanks in Advance

10 REPLIES 10

Former Member
0 Kudos

Hello Balaji,

Send the mail through the FM SO_NEW_DOCUMENT_SEND_API1,

To activate the link use the FM WS_EXECUTE

Reward if helps.

Vasanth

0 Kudos

Vasanth,

thanks for ur immed. reply.

How to activate it using WS_Execute. Aslo the FM is obselete.

Balaji

0 Kudos

Hello Balaji,

Use like this. This Fm is working in 4.7

DATA: LV_CMDLINE(100),

LV_PGMNAME(30) VALUE 'IEXPLORE.EXE'.

CALL FUNCTION 'WS_EXECUTE' "#EC *

EXPORTING

COMMANDLINE = LV_CMDLINE

PROGRAM = LV_PGMNAME

EXCEPTIONS

FRONTEND_ERROR = 1

NO_BATCH = 2

PROG_NOT_FOUND = 3

ILLEGAL_OPTION = 4

GUI_REFUSE_EXECUTE = 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.

If useful reward.

Vasanth

0 Kudos

Vasanth,

Consider my text to be sent thru mail is like this,

" Hi, You have to update your address. Please visit

www.xyz.com/test. (this is the link)

Thank You".

In this case, what should be given in the command line and program name. I want the link to be underlined

Thanks in Advance,

Balaji

Former Member
0 Kudos

check this program

SF_XSF_DEMO_MAIL

.

Regards

Prabhu

former_member188685
Active Contributor
0 Kudos

Hi Balaji,

Sending the Link..

that means the E-mail should be as HTML attachment.

you have to use HTML tags , and send the HTML table as attachment.

Regards

vijay

former_member184619
Active Contributor
0 Kudos

Hi Balaji,

U can use fm 'SO_NEW_DOCUMENT_SEND_API1' to send e-mail

then use document type as 'HTM' in exporting parameters

and move the link into a variblae say LINK

and use it as follows:-

See documentation of above mentioned FM used to send e-mail..

then use like this

wa_objcont = '<p align="right">Date:-'.

APPEND wa_objcont TO objcont.

CONCATENATE sy-datum6(2) '.' sy-datum4(2) '.' sy-datum+0(4)

INTO wa_objcont.

APPEND wa_objcont TO objcont.

<b>wa_objcont = '<A href="'.

APPEND wa_objcont TO objcont.

wa_objcont = LINK

APPEND wa_objcont TO objcont.

wa_objcont = '">Text to link</A>'.

APPEND wa_objcont TO objcont.</b>

hope this helps

reward if helpful.

Regards

-


Sachin Dhingra

0 Kudos

Hi Sachin,

Your post was very helpful. But have a small problem.

The input which i gave in the pgm is

" FORM populate_message_table.

APPEND 'Hi' TO it_message.

APPEND '<A href="https://www.sdn.sap.com/html/needlogin.htm">Want to post to the community forums?</A>' TO it_message.

APPEND 'Thank you' TO it_message.

ENDFORM. "

The email i am getting is

"Hi

<A href="https://www.sdn.sap.com/html/needlogin.htm">Want to post to the community forums?</A>

Thank you"

Here I want only the link. but all the tags also are getting displayed.

Help me in this,

Balaji

0 Kudos

*-populate body text

it_objtxt = 'ARCOS Reporting Extraction Error file is attached'.

APPEND it_objtxt.

it_objtxt = 'www.google.com'.

APPEND it_objtxt.

and in the body of the mail i got like

ARCOS Reporting Extraction Error file is attached www.google.com

check this, i am getting exact link in the body of that mail.

regards

srikanth

Message was edited by: Srikanth Kidambi

0 Kudos

Hi Balaji,

The Problem may be that u havn't used

DOCUMENT_TYPE = 'HTM' in exporting parameter.

Check this 1.

Hope this helps...

Regards

-


Sachin Dhingra