cancel
Showing results for 
Search instead for 
Did you mean: 

Mail send requirement in my new WF.

Former Member
0 Kudos

Hi Experts,

I have a business requirement like below.

In my SAP system Extended Notification(SWNCONFIG) is already implemented so when ever there is any pending workitem with a correct agent mail is sent to that person with some text and a hyperlink which is a global template for all the WFs in the system. Now my new requirement is to crate one new WF where I need to send a different template with some container element values as well as the hyper link.

My question is can I send different mail template with runtime container values in it from SWNCONFIG settings or I need to do this via method and FM SO_NEW_DOCUMENT_SEND_API1 ?

If I send a mail from separate method two mails will be send to the approver because of Extended Notification setting in the system.. if yes how to restrict SWNCONFIG mail for this case.

Quick response appreciated.

Thanks

Debnath.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member185167
Active Contributor
0 Kudos

Hello,

"Now my new requirement is to crate one new WF where I need to send a different template with some container element values as well as the hyper link."

Extended Notifications will send a copy of the Task Description of the workitem so in a way it does already provide customizable workflow notifications. Just add the container elements to the Task Description of the workitem. I would explore that option first before adding mail steps.

regards

Rick Bakker

Former Member
0 Kudos

Extended Notification(SWNCONFIG) is a separate background program that sends emails about new work items that are in users' inbox. You can configure lot of things in transaction SWNCONFIG - for example, if you don't want email from certain task (e.g. the task(s) of your new workflow), this is easily done by modifying the filter in SWNCONFIG.


As far as I understand you correctly, you could also configure another "variant" in SWNCONFIG for your new task.


There is also a possibility that you don't want to use the extended notifications for your new task. You could just add an email sending step to the workflow template. There is a standard email sending step in workflow builder. It works normally without problems. If you have some fancier requirements (sending the email in html format or whatever) you might want to develop your own email sending step (and method). For this you can use SO_NEW_DOCUMENT_SEND_API1 or preferably class cl_bcs. For both there are multiple examples if you use search.


Regards,

Karri

Former Member
0 Kudos

Thanks Karri for your quick response.

"this is easily done by modifying the filter in SWNCONFIG."

As far as I know we can include task number in the config filter so that mail will be send for those tasks. Is there any exclude functionality present in SWNCONFIG ? If present could you please provide any document link or any detail step info how to achieve exclusion functionality. That will be great help.


Thanks

Debnath.

Former Member
0 Kudos

I am not aware of any excluding option. Perhaps possible with coding a custom handler, but probably not worth it.

In the filter just maintain only the tasks that you want the notifications to be sent. Easy and simple.

Regards,

Karri

anjan_paul
Active Contributor
0 Kudos

Hi,

  To exclude user in SWNCONFIG you can find this document

http://scn.sap.com/docs/DOC-41471