cancel
Showing results for 
Search instead for 
Did you mean: 

Email Url

Former Member
0 Kudos

Hi,

Emails are generated through WD4A. The email has an URL Link along with the text. How to provide

an on click option to the URl ?? I am looking in TC: SOST for generated e-mails.Any suggestion pls.

Thanks,

Kumar.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Kumar ,

u cn use the LTU ( link to URL ) UI element instead to send emails :

1)bind the "reference" and "target" property of ur Link to URL UI element to context attribute eg mailto

of type string.suppose u have created under node cn_mail of cardinality 1..1

2) u have to send mail to a email id , whcih is contained in a variable lv_sendto of type string

so do concatenation like

CONCATENATE 'mailto:' lv_sendto into lv_sendto .

3) set the context attribute mailto to lv_sendto

 ..

 DATA : lo_nd_cn_mail TYPE REF TO if_wd_context_node ,
         lo_el_cn_mail TYPE REF TO if_wd_context_element ,
         ls_cn_mail    TYPE wd_this->element_cn_mail ,
         lv_mailto     LIKE ls_cn_mail-mailto.
* navigate from <CONTEXT> to <CN_MAIL> via lead selection
  lo_nd_cn_mail = wd_context->get_child_node(
  name = wd_this->wdctx_cn_mail ).

* get element via lead selection
  lo_el_cn_mail = lo_nd_cn_mail->get_element(  ).

* get single attribute
  lo_el_cn_mail->set_attribute(
    EXPORTING
      name  =  `MAILTO`
      value =   lv_sendto ).

I hope it wud help u

rgds,

amit

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

For one I don't really see how this is a Web Dynpro ABAP question. It sounds like you want to know how to generate an HTML based email. This is something that belongs in ABAP general.

If you really want a link in the body of your email, then the email needs to be HTML based and not plain text.

Also consider the usage of the CL_BCS classes for sending email instead of the older 4.6 based function modules.

Former Member
0 Kudos

Hi,

Have you used the LinkToURL UI element and gave the reference as URL.

Can you be more clear...

Regards,

Lekha.

Edited by: Lekha on Sep 23, 2009 3:02 PM

Former Member
0 Kudos

Hi Lekha,

Am using the following code to generate the emails. Not using any UI elements .

Data: lt_objtxt type table of solisti1.

wa_objtxt = 'http://test.................................'. <-- URL link

append wa_objtxt to lt_objtxt.

*then using the fm

*Sending the document

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = wa_doc_chng

put_in_outbox = 'X'

commit_work = 'X'

TABLES

packing_list = lt_objpack

object_header = lt_objhead

contents_bin = lt_objbin

contents_txt = lt_objtxt

receivers = lt_reclist

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

OTHERS = 99.

Regards,

Kumar

Former Member
0 Kudos

Hi,

What next you want to do............ You got an Email... this EMail you want to set to some person right....

What is your requirement. On click of URL do you want to perform some action.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

The URL is a normal text in the email. Its not a link am trying to provide the URL as a link access in the email for users to click on this link .

Thanks,

Kumar

Former Member
0 Kudos

Hi,

My question is -

Wether this EMAIL body is shown as a text document or how are you showing it to the user.

The output of the abbove FM, how are you displaying it to user.

Former Member
0 Kudos

Hi Lekha,

Its a general/normal email with text . No documnets are attached to the e-mail.

Regards,

Kumar.

Former Member
0 Kudos

Hi,

I guess you are not understanding my question. When you have generated an EMAIL, how is it displayed to user on UI(is this the WDA). Have you used any UI elements to dispplay the text of the EMAIL.

Regards,

Lekha.