Generally the error occured by the result of any statement or FM is shown like the following
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
So here this message is already stored from T100 table. this wll be displayed based on the message class. correct me if I am worng.
My question: Is there any table or transaction where you can see the log of these messages ? If this is not clear please let me know. Your help will be appreciated.