cancel
Showing results for 
Search instead for 
Did you mean: 

Error handling in workflow

priyank_dev2
Participant
0 Kudos

Hi Everybody,

I need to handle a scenario for a particular condition,

If the Quote is not a valid quote then i need to throw an error in my custom workflow.

I have tried with-

1)custom class->method with the following code-

MESSAGE e002(zdev) with wa RAISING error_log.

But when i check the status in SWI1,it shows the Wi into completed status.

2)I tried using the FM 'SAP_WAPI_SET_WORKITEM_STATUS' but i didnt work.

My requirment is,In the workflow log it should show an error(Quote:Quote Number) does not exists.

The workflow admin wants to see the error(red color) with the message 'Quote:Quote number' doesnot exists.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member185167
Active Contributor
0 Kudos

Hello,

Have you defined that e002 exception in the method?

regards

Rick Bakker / hanabi technology

anjan_paul
Active Contributor
0 Kudos

HI,

  why you want to show error in workflow log. It is better you design with return parameter from method to workflow. Based on return parameter you can obsolete the workitem using process control step