Dear Srikant,
You can add the following code to get the error messages:
loop at i_messtab into wa_messtab.
call function RPY_MESSAGE_COMPOSE
IMPORTING
LANGUAGE = sy-langu
MESSAGE_ID = wa_messtab-MSGID
MESSAGE_NUMBER = wa_messtab-MSGNO
MESSAGE_VAR1 = wa_messtab-MSGV1
MESSAGE_VAR2) = wa_messtab-MSGV2
VALUE(MESSAGE_VAR3) = wa_messtab-MSGV3
VALUE(MESSAGE_VAR4) = wa_messtab-MSGV4
EXPORTING
MESSAGE_TEXT = LV_LISEL
" TABLES
*" LONGTEXT STRUCTURE TLINE OPTIONAL
EXCEPTIONS
MESSAGE_NOT_FOUND = 1.
"Use LV_LISEL to either populate ALV or Write message".
endloop.
Alternatively you can also use FM "BAPI_MESSAGE_GETDETAIL".
Best Regards,
Imran