Used this function module to capture the mesages into a internal table
used function module to capture the message into internal table , with the help of this function module we can captured the the messages..
return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = sy-msgid
lang = sy-langu
NO = sy-msgno
v1 = sy-msgv1
v2 = sy-msgv2
v3 = sy-msgv3
v4 = sy-msgv4
IMPORTING
msg = lv_text
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = sy-msgid
lang = sy-langu
NO = sy-msgno
v1 = sy-msgv1
v2 = sy-msgv2
v3 = sy-msgv3
v4 = sy-msgv4
IMPORTING
msg = lv_text
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
Comments
Post a Comment