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 mail

Former Member
0 Kudos

Hi,

How can we send a mail to the user intimating him that his report/BDC is completed in background?

Thanks,

Biju.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can use FUNCTION RS_SEND_MAIL_FOR_SPOOLLIST

If Unix is being used, you may send a report to any internet mail with the following:

REPORT ZSNDMAIL .

DATA: COMND(200) type c.

DATA: RESULT(200) type c occurs 100 with header line.

PARAMETERS: FILE(60) type c lower case default '/sapdata/sd_outbound/testmail.dat'.

PARAMETERS: SUBJECT(60) type c lower case.

PARAMETERS: EMAIL(60) type c lower case.

INITIALIZATION.

TRANSLATE EMAIL TO LOWER CASE.

START-OF-SELECTION.

TRANSLATE EMAIL TO LOWER CASE.

CONCATENATE 'cat' FILE '| elm -s "' subject '"' email into comnd seperated by space.

CALL 'SYSTEM' ID 'COMMAND' FIELD comnd 'TAB' FIELD UNIX_RESULTS-SYS.

Loop at Results.

write: /1 results.

endloop

end-of-selection.

Reward if helpful...

Cheers,

Sravani.

2 REPLIES 2

Former Member
0 Kudos

Hi,

You can use FUNCTION RS_SEND_MAIL_FOR_SPOOLLIST

If Unix is being used, you may send a report to any internet mail with the following:

REPORT ZSNDMAIL .

DATA: COMND(200) type c.

DATA: RESULT(200) type c occurs 100 with header line.

PARAMETERS: FILE(60) type c lower case default '/sapdata/sd_outbound/testmail.dat'.

PARAMETERS: SUBJECT(60) type c lower case.

PARAMETERS: EMAIL(60) type c lower case.

INITIALIZATION.

TRANSLATE EMAIL TO LOWER CASE.

START-OF-SELECTION.

TRANSLATE EMAIL TO LOWER CASE.

CONCATENATE 'cat' FILE '| elm -s "' subject '"' email into comnd seperated by space.

CALL 'SYSTEM' ID 'COMMAND' FIELD comnd 'TAB' FIELD UNIX_RESULTS-SYS.

Loop at Results.

write: /1 results.

endloop

end-of-selection.

Reward if helpful...

Cheers,

Sravani.

venkat_o
Active Contributor
0 Kudos

Hi Biju, We have one option in SM36 , when we define Background job, We can set intimating list when job is completed. Check the screen and marked parts, u have to set what needs to be done when job is completed means fax or mail or something else. [Click here for screen |http://bp2.blogger.com/_O5f8iAlgdNQ/SAtkc9RCgeI/AAAAAAAABBc/pbNPx9CI2vw/s1600-h/6-762929.JPG].Click on marked part. Regards, Venkat.O