RFC to update/ reject work flow
Is there any RFC/ FM to approve or reject the work flow?
I am using SAP_WAPI_DECISION_COMPLETE, with following inputs:
LANGUAGE = EN
USER = <user id>
DECISION_Key = 0001
return code = 2
message line: M = E, line = Work item 000000665113 is not a user decision
MSGID M MSG MSGV1
SWR E 205 000000665113
Where am I going wrong? Need help.
It shows ready status after execution at SWIA.
Is there an alternative?
Modak Gupta replied
the workitem you are trying to end is not of type USER DECISION. It may be a workitem of type dialog. See how it actually ends in the workflow...by way of terminating events? or the users just open it and close and then it completes?
You can try using SAP_WAPI_WORKITEM_COMPLETE ... but after knowing fully how the WI is handled in the actual WF.