cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi Experts,

I have never worked on workflows earlier.

There is a workflow in our system in which user receives email in SAP inbox to approve/reject a PR item.

Once the user takes action, the workflow has custom code to approve/reject the PR item, then send emails in workflow tasks & cancel the workflow.

However, sometimes users also approve/reject PR item through ME54N transaction.

This does not update in the workflow due to which workflow keeps on sending reminder emails and(or) escalation emails.

Client do not want to use the option of substitution.

Following is the approach that I have determined to resolve this issue (after having an offline discussion with the developer who is not with our project anymore):

1. Find user-exit which gets triggered when user approves/rejects from ME54N

2. In that user-exit I need to code following:

   a. Obtain the workflow pertaining to this PR item

   b. Cancel the workflow

   c. Send the approval/rejection emails as given in workflow

I need help on the Function Modules to be used for points 2.a & 2.b.

Also for point 2.c, I was wondering whether is it possible to call the same workflow task (using some Function Module) which sends emails along with the required data.

If it is not possible then I would need to code logic for email separately in the user-exit. Due to this the email subject & body content & format would have to be managed at 2 places: Workflow & User-exit which I want to avoid.

Thanks in Advance.

Apologies if requirement of points 2a & 2b is very common & available elsewhere.

0 Likes
View Entire Topic
Former Member
0 Likes

Hi,

Please don't use exits or other abap heavy ways in fixing this issue.

I guess that the workflow was not designed properly. Usually you design a workflow in such a way that either approval through user decision (and some bg task) or through normal means using transactions will in both cases continue the flow.

In sap standard for PO and PR the task used for approval has several terminating events. These events could come from the release transaction or even from a bapi/function module. That way the workflow doesn't mind where approval comes from and will subsequently go to the next step in the workflow.

Kind regards, Rob Dielemans