cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve the Email Address of Agent and write result to task container...

Former Member
0 Kudos

I have setup deadline monitoring for an approval task in workflow WS14000134. I added an email step and need to know where and how do I add the code for reading the user id from the "send mail" task container and determine the email address from the user ID and placing the result in a container we added to the "send mail" task.

I know enough about workflow to have added the "send mail" step, as well as a loop so that the workflow will continue to send emails every 24 hours, but I don't know where to add code to read the approval agent task container and fill the task container that I have added with the email address so that the "send mail" task will email the approvers instead of just putting the message in their inbox.

Also if it would be very helpful is someone has sample code that already has the logic described.

I will reward points to those who respond.

Regards,

-Paul

Accepted Solutions (0)

Answers (1)

Answers (1)

imthiaz_ahmed
Active Contributor
0 Kudos

Need to add a container of type BO BUS4101 and initialize it the &Agent_0001.Agents& and get the attribute email ( Take a look at BUS4101).

Regards, IA

Former Member
0 Kudos

Hi Imthiaz,

Thanks for the information. I have added BUS4101 to the task container. Now i was wondering how do I pass the user ID to the BUS4101 so that it will provide me the email address. I tried to goto the mail task container bindings and map the actual approver to the "UserName" element in BUS4101, but I get an error that says:

"Value of expression &Agent_0001.UserName& cannot be used as target of an assignment"

I even set the added container attribute as Import, but that doesn't seem to help.

Thanks again for your help and I have granted more points.

-Paul

imthiaz_ahmed
Active Contributor
0 Kudos

May be it doesn't like to take input rather just initialization. The other option will be to add background activity with a method to determine the user's email address using FM BAPI_USER_GET_DETAIL and pass it back to the WF.

Regards, IA