cancel
Showing results for 
Search instead for 
Did you mean: 

How can a Rule assigned to Send mail step in Workflow

Former Member
0 Kudos

Hi all,

I have created a Rule which fetches the mail id from ztable againt a plant to which the alert is to be send

And assigned this rule to the mail step as default rule . But mail was not going and the workflow gives error at mail step . Pls suggest what to do.

Thanks in advance

V.Kumar

Accepted Solutions (0)

Answers (4)

Answers (4)

bpawanchand
Active Contributor
0 Kudos

when ever yuou create a mail step in the workflow then by defalut a custom task is created by using the BO SELFITEM and the method SENDTASKDESCRIPTION now if at all you want to use the rule in the mail step then then elements that are exported to the RULE those elements must need to be declared even in the task container too. so define the exported exlements of the rule even in the mail TASK and then try to execute this will work.

former_member193382
Active Contributor
0 Kudos

Hi,

You can create a custom background task using BO SELFITEM & Method SENDTASKDESCRIPTION.

Then you can use rule in this task. You can write the subject in the work item text part and the body in the description part of the task. This should do the job.

Let me know if you have any queries.

Regards,

Raj

Former Member
0 Kudos

Hi,

Use macro coding in the subtype created by you in SWO1 transaction. If u r defining ur own business object then just create an object with out using subtype.When u r binding between the method to task and workflow containers be very careful that u pass agent in the "Container/Expression" of type character of width 14('US' concatenated to agent name) Give this in the expression of mail step .Hope this solves ur question

Below is a useful link,

http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4acef453d11d189430000e829fbbd/frameset.htm.

Regards,

Sivakaran.

Former Member
0 Kudos

Hi Vivek,

You cant fetch agent using rule in Mail step task. Before the mail step task write a backgroung method to fetch the agent store this value in a workflow container and pass this value to mail step as an Expression.

Hope this solves your issue.

Regards,

Dheepak

Former Member
0 Kudos

Hi dheepak ,

Can u Pls explain me in steps how can i define background method , how to pass it to mail step.

Thanks,

VK

Former Member
0 Kudos

Hi Vivek,

you have created a rule and in that specifed the user for each plant right.

Use that same logic in you BOR. Create a new method and in that use the agent fetching logic with select statement now that you have fetched the agent pass it SWC_Get and bind it to your workflow container. Don't forget to click the method as background.Call this method in a backgroung Activity

If you still have doubts.Please post.

Regards,

Dheepak

former_member185167
Active Contributor
0 Kudos

Hello,

You said: "And assigned this rule to the mail step as default rule ".

How did you do that? Was this a SendMail step, or something else?

regards

Rick Bakker

Hanabi Technology