I am trying to define the exception whose message can be defined at run time as
EXCEPTION: 9001 of type Application with message contents & & & &
and using it in the method as : exit_return 9001 l_msg1 l_msg2 l_msg3 l_msg4.
l_msg1 l_msg2 l_msg3 l_msg4 gets filled with error messages after calling a Function module when sy-subrc is not 0.
Although its throwing the error at method level , it does not throw the error at task level i.e after executing the workflow.