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

generate Email id

Former Member
0 Likes
351

hi,

i need to send an email to one of the email id if the data doesnot exist for the values i have given in the selction screen.

i used FM 'EFG_GEN_SEND_EMAIL'

Please see my code below.

IF gt_final[] IS INITIAL.

PERFORM SEND_MAIL.

ENDIF.

**************************************************************

SEND_MAIL

****************************************************************

gt_msg-line = 'The set report could not be generated.

APPEND gt_msg.

CLEAR: gt_msg-line,gt_msg.

CONCATENATE sy-sysid 'job failured' INTO

l_email_hdr SEPARATED BY space.

l_email_sndr = sy-sysid .

l_email_recvr = p_recvr(mail id mentioned in the selcetion screen).

CALL FUNCTION 'EFG_GEN_SEND_EMAIL'

EXPORTING

i_title = l_email_hdr

i_sender = l_email_sndr

i_recipient = l_email_recvr

TABLES

i_tab_lines = gt_msg.

do i need to change anything else.

hi,

i need to send an email to one of the email id if the data doesnot exist for the values i have given in the selction screen.

i used FM 'EFG_GEN_SEND_EMAIL'

Please see my code below.

IF gt_final[] IS INITIAL.

PERFORM SEND_MAIL.

ENDIF.

**************************************************************

SEND_MAIL

****************************************************************

gt_msg-line = 'The set report could not be generated.

APPEND gt_msg.

CLEAR: gt_msg-line,gt_msg.

CONCATENATE sy-sysid 'job failured' INTO

l_email_hdr SEPARATED BY space.

l_email_sndr = sy-sysid .

l_email_recvr = p_recvr(mail id mentioned in the selcetion screen).

CALL FUNCTION 'EFG_GEN_SEND_EMAIL'

EXPORTING

i_title = l_email_hdr

i_sender = l_email_sndr

i_recipient = l_email_recvr

TABLES

i_tab_lines = gt_msg.

do i need to change anything else.

1 REPLY 1
Read only

Former Member
0 Likes
309

are you having any issues with sendign mails. As you could have imagined this is one of the most asked questions in the forum

Read the blog on how to email if you are having issues