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: 

Email Smartform to multiple recipients

former_member187506
Contributor
0 Kudos
666

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'

exporting

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

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?

4 REPLIES 4

Former Member
0 Kudos
112

Hi

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.

Cheers

0 Kudos
112

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
112

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.

Cheers.

0 Kudos
112

Sanjay:

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.

Alas...

Thanks for your help.

Roger Myers