Exception handling for object methods and role resolution FM's
Michael Arter
marter at bigpond.com
Thu Jul 26 07:35:26 EDT 2001
Hi there,
I have a situation where I am coding exception conditions in a =
background object method that I have
created in our EBP system.
Within the object method there is an RFC to a FM in our standard =
(backend) R/3 system.
The FM in the backend system raises certain exceptions which are coded =
for in the call FM
i/face in the object method. =20
When I test the object method thru the test function of the business =
object TAC (SWO1), the
code tests fine - SY-SUBRC is set to the appropriate value as defined in =
the exception i/face.=20
SY-SUBRC is then evaluated and the 'exit-return' macro is called to =
raise the appropriate error as defined
in the object method exceptions (all the object method exceptions are =
coded as application errors).
When the workflow is run however, as soon as the exception is raised in =
the backend FM, a dump is produced in both systems which is basically a =
dump detailing the exception that was raised. The background step that =
runs the object method however stays in a 'started' status and is not =
set to an error status therefore not allowing the step to be rerun by =
the 'restart after errors' administration TAC.
A similar thing is occurring with a role resolution FM which as well is =
calling a remote FM in the backend system. As sson as the exception is =
raised, dumps are produced and the w/flow does not even show the dialog=20
step that has the role resolution attached as having started. Again the =
role resolution FM has the appropriate exceptions coded in the call FM =
i/face. If I test the role resolution via the test function of the role =
display TAC (PFAC_DIS) it works fine ie. actor_tab is empty and the role =
terminates in error as the 'terminate if no agents found' flag is set.=20
Is this standard functionality? Rather than raising exceptions should I =
be passing error messages to a 'return' table and evaluate it as per =
BAPI functionality? As I have quite a lot of exception conditions coded =
I would like to verify this before recoding it as a 'return' table. =20
Any ideas would be greatly appreciated.
NB: If I port the above code into an ABAP and test it it works fine - =
ie. sy-subrc is set to the value as defined in the call FM exception =
i/face.
=20
Regards
Michael Arter
SAP W/flow programmer
IBM GSA
61 3 9322 6946
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20010726/d7ad5ad4/attachment.htm
More information about the SAP-WUG
mailing list