2010 Oct 28 5:26 AM
Hi experts,
Am able to send an email Having a URL successfully.
But when i click on the link in the email received, its not directing to the webpage.
Any pointers to open a webpage when we clicked on the link in the email.
Here is the piece of my code.
it_message = 'Test the URL, and check whether directing to given page'.
APPEND it_message.
it_message = '<html><body><a href="www.google.com" target="_blank">Google</a></body></html>'.
APPEND it_message.The mail bodylook like: Test the URL, and check whether directing to given page Google
TIA.
Regards,
Raj
1. Try removing the target part from the html code and see if it works.
OR
2. You can use WS_EXECUTE FM to execute url in ABAP.
DATA: BEGIN OF table OCCURS 0,
url(60),
END OF table.
table-url = 'http://www.google.com'.
APPEND table.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'
commandline = table
inform = ' '
EXCEPTIONS
prog_not_found = 1.
2010 Oct 28 5:41 AM
Hi all,
The problem is solved.
Replaced the link "www.google.com" with "http://www.google.com".
Regards,
Raj
2010 Oct 28 5:51 AM
1. Try removing the target part from the html code and see if it works.
OR
2. You can use WS_EXECUTE FM to execute url in ABAP.
DATA: BEGIN OF table OCCURS 0,
url(60),
END OF table.
table-url = 'http://www.google.com'.
APPEND table.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'
commandline = table
inform = ' '
EXCEPTIONS
prog_not_found = 1.
2010 Oct 28 5:57 AM
Hi,
*****************Data definition***********************
data:
lt_text type table of soli,
ls_text type soli.
******************HTML*********************************
Begin of HTML page******************
append '<HTML>' to lt_text.
append '<BODY>' to lt_text.
****HTML link
concatenate '<a href=' '"' 'www.google.com' '"' '>' 'Google' '</a>' into ls_text.
append ls_text to lt_text. clear: ls_text.
*End of WEB Page*********************
append ls_text to lt_text. clear: ls_text.
append '</BODY>' to lt_text.
append '</HTML>' to lt_text.
SEND EMAIL ************************************
**Send email from SAP
DATA: OBJECT_HD_CHANGE LIKE SOOD1 OCCURS 0 WITH HEADER LINE,
RECEIVERS LIKE SOOS1 OCCURS 0 WITH HEADER LINE.
Populate Email input parameters
object_hd_change-objdes = 'Email Title'.
object_hd_change-objla = sy-langu.
object_hd_change-objnam = 'List'.
object_hd_change-objsns = 'F'.
object_hd_change-vmtyp = 'T'.
object_hd_change-skips = 'X'.
object_hd_change-acnam = 'SP01'.
object_hd_change-objcp = 'X'.
receivers-rcdat = sy-datum.
receivers-rctim = sy-uzeit.
receivers-sndex = x. " Express-Mail
receivers-recesc = 'U'.
***************put email address in next row, SDN doesn't aprove to put email address to message
receivers-recextnam = 'emailaddress''.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = object_hd_change
object_type = 'HTM'
owner = sy-uname
TABLES
objcont = lt_text
receivers = receivers.
**It very important set up OBJECT_TYPE = 'HTM' !!!!!!!!!!!!!!!!
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |