Work Item Approval/Rejections

David G Cooper davidgcooper06 at gmail.com
Mon Feb 25 06:37:22 EST 2013


HI fellow experts,

I have a requirement for a custom developed application that requires
workflow approval.

This is a complete customer application from top to bottom.

The standard user decision option in our current version does not support a
mandatory reason for rejection that can be enforced.

As a result the custom application has an approval sub screen with two
buttons.  This is delivered to the user via a BOR object method/Task using
Set parameter ID and a "Call Transaction".  The idea being that once the
decision is made the result can be returned to the work item.

The Task is contained within an Until Loop to make sure a decision is made,
before the work flow continues.  I now need to return the result of the user
decision from the custom application back to the work item.

What have I tried,
1) Raise Event and leave program where the task has terminating events.  
    When pressing BACK/EXIT/CANCEL buttons the user experiences a continual
loop back to the approval screen.
    The current work item completes, but as a decision has not been made, a
new instance of the work item is created and immediately redisplayed to the
user without going through the SAP Inbox again.  Result no way to exist
without choosing a decision.
   If one of the decision buttons is pressed an event is raised and the
program completes.  However this results in the work item completing, but
not returning the correct event, so loops back and presents the transaction
again without going through the SAP Inbox.

2) Next tried Function SAP_WAPI_WORKITEM_COMPLETE.  Work Item is locked and
function returns an ENQUEUE Error.  Even though the work item is locked by
the same user, as the one executing the function.   (Possible SAP Error).

Suggestions most welcome.



More information about the SAP-WUG mailing list