Exception Handling in ABAP OO and Workflow
Alon Raskin
araskin at 3i-consulting.com
Tue Nov 14 11:05:13 EST 2006
So I finally took the plunge and created my first ABAP OO Workflow.
I implemented a class which inherits from IF_WORKFLOW, BI_PERSISTENT and BI_OBJECT.
Everything was going well till I tried to raise an exception from my method using the standard exception classes. Here is an excerpt from my code...
...
IF sy-subrc <> 0.
RAISE EXCEPTION type cx_bo_application.
ENDIF.
...
When I compile I get the error saying that You cannot generate instances of the abstract class 'cx_bo_application'. I can see that the instantiation scope is marked as abstract but surely I don't have define a concrete child class of cx_bo_application for every exception that I want to raise? Or do I just need to do one per workflow (seems redundant).
Oh and I went to the method definition and checked the exception classes checkbox (in the class builder) and pasted in cx_bo_application. It seemed happy with that but it didn't make my syntax error go away.
Perhaps I am using the wrong syntax in the method ? I checked OSS... nothing. I checked SDN... nothing.
I am using ECC 6.0 with SAP_BASIS and SAP_ABA release 7.00
I will keep trying other things but I welcome your comments.
Alon
Your comments are welcome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4755 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20061114/ecfaa7b3/attachment.bin
More information about the SAP-WUG
mailing list