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: 

Using RFC_MAIL

Former Member
0 Kudos

Hallo,

has anyone a Documentation or other Information

by Using the statement CALL FUNCTION 'RFC_MAIL' ...

thanks

Regards,

Dieter

Message was edited by: Dieter Gröhn

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI

GOOD

CHECK WITH THIS CODE

REPORT Z_SENDITAB_EMAIL_SREE_13424 .

tables : mara.

DATA IT_MAIL(200) TYPE C OCCURS 0 WITH HEADER LINE.

  • message body:

IT_MAIL = '1st line.'. APPEND IT_MAIL.

IT_MAIL = '2nd line.'. APPEND IT_MAIL.

IT_MAIL = '3rd line.'. APPEND IT_MAIL.

IT_MAIL = '4th line.'. APPEND IT_MAIL.

  • to view the following function (cannot be viewed in se37):

  • go to sm59, select 'TCP/IP connections',

  • select and open 'SERVER_EXEC' or 'LOCAL_EXEC',

  • look on the pull down menu SYSTEM INFORMATION->FUNCTION LIST

data : begin of itab occurs 0,

matnr like mara-matnr,

mtart like mara-mtart,

mbrsh like mara-mbrsh,

meins like mara-meins,

end of itab.

select

matnr

mtart

mbrsh

meins

from mara

into table itab.

if sy-subrc = 0.

CALL FUNCTION 'RFC_MAIL' DESTINATION 'LOCAL_EXEC'

EXPORTING USER = 'srini_paru@yahoo.com'

  • TABLES MAIL = IT_MAIL.

TABLES MAIL = ITAB.

endif.

CASE SY-SUBRC.

WHEN 0. WRITE 'E-mail sent successfully.'.

WHEN OTHERS. WRITE 'Error sending E-mail!'.

ENDCASE.

THANKS

MRUTYUN

3 REPLIES 3

Former Member
0 Kudos

HI

GOOD

CHECK WITH THIS CODE

REPORT Z_SENDITAB_EMAIL_SREE_13424 .

tables : mara.

DATA IT_MAIL(200) TYPE C OCCURS 0 WITH HEADER LINE.

  • message body:

IT_MAIL = '1st line.'. APPEND IT_MAIL.

IT_MAIL = '2nd line.'. APPEND IT_MAIL.

IT_MAIL = '3rd line.'. APPEND IT_MAIL.

IT_MAIL = '4th line.'. APPEND IT_MAIL.

  • to view the following function (cannot be viewed in se37):

  • go to sm59, select 'TCP/IP connections',

  • select and open 'SERVER_EXEC' or 'LOCAL_EXEC',

  • look on the pull down menu SYSTEM INFORMATION->FUNCTION LIST

data : begin of itab occurs 0,

matnr like mara-matnr,

mtart like mara-mtart,

mbrsh like mara-mbrsh,

meins like mara-meins,

end of itab.

select

matnr

mtart

mbrsh

meins

from mara

into table itab.

if sy-subrc = 0.

CALL FUNCTION 'RFC_MAIL' DESTINATION 'LOCAL_EXEC'

EXPORTING USER = 'srini_paru@yahoo.com'

  • TABLES MAIL = IT_MAIL.

TABLES MAIL = ITAB.

endif.

CASE SY-SUBRC.

WHEN 0. WRITE 'E-mail sent successfully.'.

WHEN OTHERS. WRITE 'Error sending E-mail!'.

ENDCASE.

THANKS

MRUTYUN

Former Member
0 Kudos

hi

check this link

where a person had posted an example for RFC_mail

hope this helps,

priya.

former_member184569
Active Contributor
0 Kudos

HI Dieter,

You can check this forum thread too..

Regards,

Susmitha