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: 

How to send spool by email

Former Member
0 Kudos

Hi,

I have a requirement where I need to send report to multiple ned user. The program runs daily once and generate one spool no daily. I have this spool no.

Can anyone tell me how to send this spool by email .

If FM SO_DOCUMENT_SEND_API1, how should I pass spool id.

4 REPLIES 4

Former Member
0 Kudos

HELLO,

Check this thread:

Vasanth

anversha_s
Active Contributor
0 Kudos

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

This is the sample code previously I achieved the same requirement.

FORM send_mail_2 USING msgid msgno msgv1.

  • mailuser oder Gruppe like sy-uname default 'Ruckerk'.

DATA: express_hold_time LIKE sovaltime.

DATA: text LIKE sotxtinfo.

DATA: receiver LIKE somlreci1 OCCURS 0 WITH HEADER LINE.

  • MESSAGE ZF100 (FTP an UDB fehlgeschlagen)

text-msgid = msgid.

text-msgno = msgno.

text-msgv1 = msgv1.

text-msgv2 = ' '.

text-msgv3 = ' '.

text-msgv4 = ' '.

  • express_hold_time

express_hold_time-days = 01.

express_hold_time-h_min_sec = 240000.

  • receiver

receiver-receiver = mreceivr.

  • Gruppe von Empfängern

receiver-rec_type = 'C'.

  • und Expressmeldung ausgeben

receiver-express = 'X'.

APPEND receiver.

CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'

EXPORTING

msgid = text-msgid

msgno = text-msgno

msgv1 = text-msgv1

msgv2 = text-msgv2

msgv3 = text-msgv3

TABLES

receivers = receiver.

IF sy-subrc <> 0.

WRITE:/ 'hat nicht geklappt', 'SY-SUBRC =', sy-subrc.

ENDIF.

PERFORM print_error_report.

  • Fehlermeldung zum Abbrechen des Report's ausgeben.

MESSAGE e398 WITH 'Jobabbruch' msgv1.

ENDFORM. " SEND_MAIL_2

Regards,

kumar