cancel
Showing results for 
Search instead for 
Did you mean: 

Send email when Forward a work item

marcoantonio_romerosanche
Active Participant
0 Kudos

Hello,

I have this scenario.

A workflow workitem is with the correct agent approver and he got the email notification to release the purchase requisition.

Now, when he does the forward workitem to another agent, the workflow works, but we need also to send an email to the new agent who was sent the workitem.

how should we to proceed in the Workflow or activation of a event?

View Entire Topic
raghava_b
Discoverer
0 Kudos

Step 1) Implement the program exit in the User decision task. i.e., by providing a custom class name that implements the Interface 'IF_SWF_IFS_WORKITEM_EXIT' in it.

Step 2) In the 'event_raised' method of the class get the header details. Example code: data(ls_header) = im_workitem_context->get_header( ).

step 3) Now pass the work item id from ls_header to function module 'SAP_WAPI_GET_WI_AGENTS' to get the user id to which the workitem is forwarded.

step4) Now use BCS classes to send mail to the forwarded class.