cancel
Showing results for 
Search instead for 
Did you mean: 

WorkFlow Error ........ Can we debug it ? Help.. it's urgent

former_member184067
Active Contributor
0 Kudos

Hi All,

I'm newbie in SAP and I realy need more explaination about worklow. I have two workflow : wf1 and wf2; and both of them will update complaint document status.

The scenario is if Event 1 raised then both of workflow will be triggered and both of workflow will check claim amount inputed by user.

If claim amount is greater than US$ 1000, wf2 will be cancelled and wf1 will ask approval from user, if the user approved then wf1 will update complain status from A to B.

If claim amount is less than or equals with US$ 1000 , wf1 will be cancelled and wf2 will update complain status from A to B.

In condition 1 ( claim amount > US$ 1000 ), the workflow works properly and there's no error occured.

But in condition 2 ( claim amount <= US$ 1000 ), an error occured while updating status.

Is there any reason why this happens ? Both of workflow used the same method from BUS2000120, that is USERSTATUSSET but in wf2 an error occured and the error code is 1005 ( Status Not Allowed ) but in wf1 wofks properly.

Is it because there's no delay in wf2 and the record still used by another process ? please advice me ....

Beside that I've tried to debug why error happens but it seems it can't be debuged because it works in background.

Is there any way to debug background process that done by WF-BATCH ?

Or can we simulate a workitem / action node in workflow ?

If there is any way please tell me step by step ...

Please advice me and many thanks in advance.

regards

eddhie kurnianto

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Eddie,

It sounds like you might have a problem with your bindings, tjek them manually, and if that does not work look into the container debugging with SWUD. In the bottom of every window, it states if there are any binding errors.

As to SM50, you choose the program an SM50 and choose Program/Mode -> Program -> Debug.

Good luck

Regards

Mikkel

former_member184067
Active Contributor
0 Kudos

hi Mikkel,

thanks for your answer and replies. I have solve this issue.

unfortunately, the user id that I used don't have any authority to debug from process overview. but many thanks for the information.

your answer and help very usefull for me to solve this issue.

many thanks bro (",)

Answers (3)

Answers (3)

former_member184067
Active Contributor
0 Kudos

hi all,

many thanks for the reply, sory I'm wrong in giving the workflow scenario. I need 2 workflow because each workflow triggered by different event. wf1 triggered by event1 and wf2 triggered by event2.

if event1 raised then wf1 will be triggered, and wf1 will check the claim amount. if the claim amount > US$ 1000 then, wf1 will ask approval for the claim payment. If approved then complain status will be updated from B to C.

This condition works well and no error occured.

if event2 raised then wf2 triggered, and wf2 will check claim amount. if the claim amount <= US$ 1000 then the complain status will be updated from A to C automatically.

This condition doesn't work and an error occured.

If I trace the the workflow, the error code is 1005. That error code refer to method UserSetStatus in BUS2000120. In that method, it called Function CRM_STATUS_CHANGE_EXTERN_OW .

If I simulate the function CRM_STATUS_CHANGE_EXTERN_OW via t-code SE37, it works well to update status from A to C.

Last nite after I posted this question, I created the event2 ( use t-code SWUE ) to simulate the error but the workflow works fine. But if the event created through transaction the workflows error....

please advice .....

Btw, Mikkel, for your answer for debuging, I have another question. Must I implements infinite loop to be able to debug via process overview ( SM50 ) ? And how to jump into debugger from process overview ?

Many thanks in advance

Former Member
0 Kudos

Create only one workflow and in the workflow by using the condition activity you can split the flow of Work based on Amount and change the status.

To debug the binding of the task use tcode SWUD then click in test environment and execute Swithc on container monitor. By activating this you will get popup while executing workflow. In the popup you can check the binding variable inbound and outbound.

To debug the background you need to put endless loop.

Former Member
0 Kudos

Hi Eddhie

You can simulate your methods in SWO1 if you create an instance of your object.

Using transaction SWUD you can enable container debugging, to see inbound and outbound containervalues.

If you really need to debug a method in a running workflow, you must implement a endless loop and then jump into the debugger by the process overview (SM50). (NOT NICE)!

A question, why start two workflows and cancel one? You could start a single workflow and implement the amount differences in the same workflow.

Kind Regards

Mikkel