cancel
Showing results for 
Search instead for 
Did you mean: 

EXIT_RETURN SWO_INVOKE goes wrong

Former Member
0 Kudos

Hello experts,

We have a problem here regarding error handling when calling a methode via SWO_INVOKE in the workflow. When the method is called, a version of DECISION, we do an 'EXIT_RETURN 9002' in that method. This goes correctly and the system returns to method EXECUTE_METHOD_BOR from class CL_SWF_UTL_RUN_SERVICES.

On development and test this goes without a hitch, but on production we get the problem that the errorcode 9002 is not processed correctly.

When SWO_INVOKE has been called, it returns with the error code in LS_RETURN.

But the entry of LS_RETURN in production is different from development/test. In development/test LS_RETURN is filled correctly.

But in production LS_RETURN is filled like below which means that the error handling goes wrong. The coding and the workarea are filled with SAP standard, and not with the code/workarea I need. The errorcode 9002 is now a variable, and not the code itself.

Does anybody have any idea what might cause this difference? The settings of the tasks (exception settings for instance) are the same on all systems. I've been looking in SPRO for a setting but can't find anything there.

Regards,

Marcel Schoenmakers

Accepted Solutions (1)

Accepted Solutions (1)

I042439
Employee
Employee
0 Kudos

Hello Marcel

A silly question ...do we have the message 005 of class ZWFM in your production?

Regards,

Modak

Former Member
0 Kudos

Hello Modak,

Yes, the message class is present in production. The strange thing is, is that the message itself is not the problem. The problem is that, even though the exception is present in SWO1 on production for that method, SAP gives the error 'exception not found'.

I'm now trying to regenerate the object/method to see if that has any effect.

Reimporting the object with a new transport didn't do the trick.

Regards,

Marcel

I042439
Employee
Employee
0 Kudos

Hello Marcel

though the Symptom text does not matches your issue, but it has the OL818 message listed in the following note:

1732734  - Binding errors in workflow runtime after updating your Basis Support Pack or Upgrading

or maybe:

2103177  - SWO1: Exception '0001' is not defined for method 'DISPLAY'

Regards,

Modak

I042439
Employee
Employee
0 Kudos

See note1696315 ...which is the first one mentioned in the note 1732734 given above...the coding correction may resolve your issue. Though the description is different!

See if this works for you

Regards,

Modak

Former Member
0 Kudos

Hello Modak,

Thank you very much, that seems to do the trick! We've implemented that note and now everything seems to go well. The customer is still testing but my tests have indicated that the problem we had have gone.

So the solution to the exceptions which weren't seen as active by SAP is note 1696315.

Thanks again very much for your and Rakesh's help.

Regards,

Marcel Schoenmakers

Former Member
0 Kudos

Very nice tip Modak. Thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Marcel,

When you added the exception to the method , you need to set the method to "Release" and then again the whole BOR , re-generate it. Now transport to production and it will come correctly.

Thanks

Rakesh

Former Member
0 Kudos

Hello Rakesh,

The exception wasn't added recently. Everything worked fine until this weekend when the hardware got a different IP adres. After that we got this error. The exception has been part of the production system for some time now.

Regards,

Marcel

Former Member
0 Kudos

I can completely understand your point, but the only thing which is left is to regenrate the object so that it can take the latest version to production. Somehow it is not calling the correct exception .

Thanks

rakesh

Former Member
0 Kudos

Hello Rakesh,

Sadly it didn't work. I've generated the object again and transported it to production but still the error persisted in production. The search goes on. 🙂

Regards,

Marcel

Former Member
0 Kudos

Hi Marcel,

One more hint , i guess your program is getting terminated before exit_return or generating dump in exit_return itself and trying to return the error. Can you debug in prod and see the line where you have raised it ?

if it is background method , you can test it by SWO1 and pass all the values in PROD and see what is happening. There might be some condition etc failing before it reaches to exit_return.

Thanks

Rakesh

I042439
Employee
Employee
0 Kudos

Hello Marcel

I guess some of the transport requests may not have gone in to your production system completely.

Your BO Method ZDECISION, method PROCESSREPLACE is trying to issue an exception using EXIT_RETURN 9002, but the exception is not defined in the 'Exceptions' section of your BO. Check in SWO1 in production.

The system then issues an error of Message Class OL (WORKAREA in LS_RETURN), message Number 818 (MESSAGE in LS_RETURN). if we check in SE91, here is the message:

Exception '&' is not defined for method '&' object type '&'

LS_RETURN-VARIABLE1 is 9002 and  LS_RETURN-Variable2 is PROCESSREPLACE and  LS_RETURN-Variable3 is ZDECISION.

hence : "Exception 9002 is not defined for method PROCESSREPLACE object type ZDECISION'"

regards,

Modak

Former Member
0 Kudos

Hello Modak,

Thanks for your reply.

When I check the method in production, it does give me the proper exception. So I had checked that and I thought the definition was correct. You're saying the situation below needs to be adjusted further?

Regards,

Marcel