cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger mail to dynamic Agents

Former Member
0 Kudos

Hi Experts,

My requirement is to trigger a email to user based on document type.

Lets say my doc. type is DOC1 then Approver will be USER1

DOC2 then Approver will be USER2.

and mail should be triggered to this agents dynamically based on document type.

I have created one z table and maintained this entries.

created one Rule .

If I pass my document type to rule, it fetches USER correctly.

Now how to use this Rule in work flow to trigger mail to fetched User ??

Please give me a step by step guide to do it.

Accepted Solutions (1)

Accepted Solutions (1)

former_member650566
Active Participant
0 Kudos

Hi,

Since you want to send email to the user based on doc type, I would suggest instead of using

rule ( used basically if you want to send workitem to the fetched USER ID ) write the code

to fetch uerid and the email id in a custom method of your business object and pass

the email Id in the workflow container. Use this container element in the expression to send the mail.

Regards

Kedar

Former Member
0 Kudos

Hi KedarPrasad,

Thanks a lot for your answer.

can you please give me brief idea on how to write Custom method for business object

and pass email id in the work flow container, how to use this container element in the expression.

That will help me a lot.

Waiting for reply.

former_member650566
Active Participant
0 Kudos

Hi Sunil,

Probably you need to go through some basic material related to Business object and workflow.

Go through the below link.

http://help.sap.com/erp2005_ehp_04/helpdata/EN/c5/e4ac12453d11d189430000e829fbbd/frameset.htm

http://wiki.sdn.sap.com/wiki/display/ABAP/SAPBusinessWorkflow

Regards

Kedar

Former Member
0 Kudos

Thank you guys..

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

for doucmentation use the below link.

http://wiki.sdn.sap.com/wiki/display/ABAP/BindingDefinitionin+Workflow

Create a method in a task and bind the task with rule container. from the rule container you will get the email id to task container.

in created method use that email id and send a mail.

~linganna