cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

WF: method cannot be executed, object doesn't exist

former_member246634
Active Participant
0 Likes
1,873

Hi experts,

I have a problem with WorkFlow. I had to copy it from one system to another. System versions are different. First, there wasn't any block scheme, so I had to import it from XML file. Everything looked fine, no errors where found during activation. First steps in this workflow are: "Set Title" and "Set Text":

2 - se80 workflow steps.PNG

First step works fine, but there is an error in second block:

I have no clue what is wrong with it. More screens:

WF task:

Binding WF -> task:

Task (in PFTC):

Task container:

5a - standard task container.PNG

Task -> method Binding:

Method in the object:

What I have already tried:

1. Changing method do "Instance-independent" - not working

2. Infinite loop in method - I can't even enter this method, so problem is somewhere earlier - not working

3. SWU3 -> Send to Objects and HR Objects is active - not working

4. Authority: WF-BATCH has SAP_ALL, so it's not a problem - not working

5. Some parameters in object's methods had newer version, so I changed it to older version - not working

6. All tasks used in WorkFlow exist

7. Refreshing buffers didn't help

I have no more ideas what's wrong with that step in WorkFlow, everything looks fine to me.

I'd be really greatful for some clues.

Bartłomiej

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member246634
Active Participant
0 Likes

Thanks for your reply.I took the first, longer path, but it finally worked (I've deleted unnecessary and unused objects). I hope that I've checked everything, but next time I'll rebuild workflow by hand.

Thank you all for helping me.

Greetings,

Bartłomiej

pokrakam
Active Contributor
0 Likes

Hello Bartlomiej,

From experience, I can only say steer clear of the XML import. It doesn't work for all but the simplest workflows. Especially if your versions are different, you can have all kinds of weird stuff hidden in the WF definition tables that can be a right pain to trace. 


Transport your objects, possibly even tasks, but rebuild the WF template by hand. It doesn't take as long as you think, from an hour to half a day. Much faster and reliable than two days debugging and fixing. In my experience it's not worth the effort to even try, because errors won't be obvious straight away and you will sit with something unknown.


Regards,

Mike

Former Member
0 Likes

Hello,

Most obvious: Does that &ZWFZPZ& have a value at workflow level *before* the step is called?

If that is okay then the first thing I would do is remove all of the Task to Method binding. It's usually not necessary and can mess things up if it's wrong.

regards

Rick

StephaneBailleu
Active Contributor
0 Likes

Hi

I agree with Rick, your BOR is not instanciated,

What is ZWFZPZ ?  have you tried to instanciate it in SWO1 ?

One of the first thing a BOR does is checking if it exist (so if you said that the key was in a table then it check that there is an entry in this table)

If you want to use the workflow to make the entry go for an ABAP OO. it does not require the object to exist before the workflow starts;

Cheers

Stephane

former_member246634
Active Participant
0 Likes

"Most obvious: Does that &ZWFZPZ& have a value at workflow level *before* the step is called?" No, it doesn't. Because it's not used in that step I removed it from WF->Task binding. I've restarted workflow in SWPR, bo I got the same error. Now I'll try to remove Task->Method binding.

EDIT:

Removing binding Task->Method also didn't help.

ZWFZPZ Object has no instane (fields are empty). I checked the same workflow on system from which I copied it and everything works fine, even with that object empty.

StephaneBailleu
Active Contributor
0 Likes

.... Fields empty, attributes may be empty, but is there a key ?

Cheers

Stephane

Former Member
0 Likes

Hello,

It's not going to work if that object is empty. That is what the error message also said.

regards

Rick

former_member246634
Active Participant
0 Likes

It worked with that object empty. All I did was copying the method used in task (SetTaskText) and used it in the same place as SetTaskText2... It helped in that one block, but another is throwing the same error, but here copying the method didn't help