exception - CX_ROOT with Message Class -
I have several custom exception classes, which were created "with message class" since I did not receive a message directly from them So, I want to create a utility method which returns How do I get message details with an unspecified exception? Should I make any such method that gets a You can prepare a type descriptor (one time) of the interface: And then check each exception because it comes your way: BAPIRET2 to
IF_T100_MESSAGE ~ T100KEY with the exceptions given on the basis of values. However, I can not provide that method with a normal
CX_ROOT import parameter because it is not class-enabled message. I can not even create a normal message-enabled exception class because the new classes are
CX_STATIC_CHECK is inherited from one of the ,
CX_DYNAMIC_CHECK , or
CX_NOCHECK .
CX_ROOT and then three calls to the imported methods for each of the three potential sub-classes? Or what are the better options?
data: lr_t100_descr type reef to cl_abap_intfdescr lr_t100_descr? = Cl_abap_typedescr = & gt; description_by_name ('IF_T100_MESSAGE')
Data: lr_t100_exception Type Reef to I_t100_message. IF lr_t100_descr-> Does apply_ (ir_any_exception) = abap_true Lr_t100_exception? = Ir_any_exception "... ENDIF.
Comments
Post a Comment