‎2010 Apr 16 6:23 AM
Hai..
I want to capture error messages. I am able to do so with the normal error messages that appear on the status bar at the down. But I am not able to capture error messages that appear in the error log and not on the status bar. How to capture it?
Thanks.
‎2010 Apr 16 6:35 AM
Hi,
In BDC call transaction mode you will get messages in MESSAGES table. In session it is handeled automatically. I don't think you can get any extra messages which are not captured be MESSGE addition.
‎2010 Apr 16 8:04 AM
Hi rajalaxmi,
Use the following code
CALL TRANSACTION 'ME51' USING bdcdata MODE 'N'
MESSAGES INTO t_msg.
DATA:
lw_msg TYPE string.
LOOP AT t_msg INTO fs_msg where msgid eq 'E'.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = fs_msg-msgid
lang = 'EN'
no = fs_msg-msgnr
v1 = fs_msg-msgv1
v2 = fs_msg-msgv2
v3 = fs_msg-msgv3
v4 = fs_msg-msgv4
IMPORTING
msg = lw_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE:/ lw_msg.
ENDLOOP.
Regards and Best wishes.
‎2010 Apr 16 8:06 AM