cancel
Showing results for 
Search instead for 
Did you mean: 

SET workitem in error status

Former Member
0 Kudos

Hi, i want to force the status error in one workitem. I have one Z objetc, in one of the method of this object i want to return an error to avoid the termination of the workitem. ¿Somo idea?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Its better to cancel(set status as CANCEL) the workitem and trigger the vent again so that workflow will be re-triggered.

Former Member
0 Kudos

I dont wont to re-trigger the workflow. I only want to set the workitem in error status. I found a macro exit_return can this be used for this porpouse?

Former Member
0 Kudos

see, try this...

change the container, remove some mandatory field values. and execute the work item, this will cause the workflow to goto error as some uncaught exception might occur because of this.

or i am guessing that you are using a dialog workitem for now!! if yes, then go inside the debugger for this task method and do some activity some that it will dump

Edited by: Soumyaprakash Mishra on Dec 14, 2011 12:31 AM

Former Member
0 Kudos

try FM SAP_WAPI_SET_ERROR

Former Member
0 Kudos

how can i obtain the workitem_id to call this FM? i need to obtain this id withim the method of Z object

Former Member
0 Kudos

i dont get it... so you dont have an workitem number?

are you trying a dynamic procedure? to set the status to error? please explain i am confused now.

Former Member
0 Kudos

SAP_WAPI_SET_WORKITEM_STATUS

Former Member
0 Kudos

¿Have you one example where i can see how to use this FM?