Hi All,
I have 3 questions.
1) When we create a class, there is a provision of selecting
defining or selecting exception classes under tab exception.
Path is method->parameter->exception. What is the significance of this?
Please provide me some examples as well?
2) I have an exception class ZCL_exception and a method to raise exception
I coded like this.
TRY.
if condition = 1.
RAISE EXCEPTION TYPE ZCX_apple
EXPORTING textid = ZCX_apple=>DATANOTFOUND.
endif.
CATCH ZCX_apple INTO exc.
text = exc->get_text( ).
MESSAGE text TYPE 'I'.
endtry.
but i am not not getting any message as output when I called this
method. Any idea the reason behind?
3) I want to validate the incoming message id using a method.
ie, if message id = 001, then message is 'DATANOTFOUND'.
if message id = 002, then message is 'invaliddata'.
it continues like this.
Is this logic possible to implement in a method
without using if else or switch case statements. ( I am thinking
of using an internal table) Any idea on this. Thanks in advance
for all the replies.
Michael