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.
Showing results for 
Search instead for 
Did you mean: 

Email Smartform to multiple recipients

0 Kudos

We are emailing smartform output to multiple recipients with some regularity.

A request has come through to identify all of the mail recipients a particular output has been emailed to.

For instance a single output has been issued as email to three different recipients.

I am looping through the call to my smartform for each recipient and and passing in the mail parameters.

The structure for recipients (mail_recipient) appears to be flat rather than an internal table.

call function function_name

*call function '/1BCDWB/SF00000002'





control_parameters = control_parameters

mail_appl_obj = o_mail_appl_obj

mail_recipient = o_mail_recipient

mail_sender = o_mail_sender

output_options = ls_output_options

Is there any way to pass in a list of recipents so that the subsequent email message identifies all receipients?


Former Member
0 Kudos


You can use SAP Office Distrbution List.

Here you can maintian multiple email ( internet ) ids.

In Recipients the rectyp will be "C" .

Mail will goto all three maintained in DIST LIST.


0 Kudos

Thanks for the input Sanjay.

Unfortunately, the distibution is dynamic, based on partners in transaction. Email recipients are identified as partners in a sales transaction based on user input.

I am not certain the distribution list approach would work.

Is there a way to build a virtual distribution list?

Roger Myers

Former Member
0 Kudos

You can get the OTF back ( LS_CONTROL_PARAM-GETOTF ='X'.

) from SMARTFORM and then use function SO_NEW_DOCUMENT_ATT_SEND_API1 to send multiple mails.

We have done this for purchase orders and some other output.


0 Kudos


I had thought of that, we are sending html emails via the so_new_document... FM, that do what we want.

I was just hoping there was a way to do it via the email interface in the Smartform.


Thanks for your help.

Roger Myers