‎2012 Mar 06 11:00 AM
Hi experts,
When I want to use the macro EXIT_RETURN i have to give a code. Here 9001.
exit_return 9001 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.I read i have to declare the exceptioncode as LIKE SWOTINVOKE-CODE.
How can I do this?
DATA: 9001 LIKE SWOTINVOKE-CODE.
does not work
Thanks,
Philippe
‎2012 Mar 06 2:07 PM
Hi,
You can declare it in the method you want to raise the exception.
Like -
DATA: w_exception_9001 LIKE SWOTINVOKE-CODE.
Now in SWO1, go to exceptions of that method and click on create.
There you can write 9001 and select w_exception_9001 in name in FM.
Then you can use it in exit_return.
Regards,
Harsh Bansal
‎2012 Mar 06 1:54 PM
Hi,
You can give it like this only -
exit_return 9001 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Regards,
Harsh Bansal
‎2012 Mar 06 1:56 PM
When I don't declare it the workflow error log says
Exception '9001' is not defined for method <method>' object type '<objecttype>'
‎2012 Mar 06 2:07 PM
Hi,
you have to define the exception in the method with the number you are specifying in EXIT_RETURN.
Regards,
Gaurav
‎2012 Mar 06 2:07 PM
Hi,
You can declare it in the method you want to raise the exception.
Like -
DATA: w_exception_9001 LIKE SWOTINVOKE-CODE.
Now in SWO1, go to exceptions of that method and click on create.
There you can write 9001 and select w_exception_9001 in name in FM.
Then you can use it in exit_return.
Regards,
Harsh Bansal