Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding Session log messages format..

Former Member
0 Likes
401

Hi All,

I am reading session logs as follows,

CALL FUNCTION 'RSTS_READ'

TABLES

DATATAB = LOG_TABLE

EXCEPTIONS

FB_CALL_HANDLE = 4

FB_ERROR = 8

FB_RSTS_NOCONV = 12

FB_RSTS_OTHER = 16

OTHERS = 16.

I am getting all my messages in the Log_table,

But those messages or not formated is there any Function module to format the session log messages ??

Plz let me know if any ASAP.

Thanks

Suresh

2 REPLIES 2
Read only

Former Member
0 Likes
368

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = SY-MSGID

LANG = 'EN'

NO = t_error-MSGNR

V1 = t_error-MSGV1

V2 = t_error-MSGV2

V3 = t_error-MSGV3

V4 = t_error-MSGV4

IMPORTING

MSG = l_msg

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2

.

Read only

Former Member
0 Likes
368

hi,

try with FM format_message, it works.

see the sample code,

data: l_message type string.

if tab_error-msgtyp = 'I' or tab_error-msgtyp = 'S'.

call function 'FORMAT_MESSAGE'

exporting

id = tab_error-msgid

lang = 'EN'

no = tab_error-msgnr

v1 = tab_error-msgv1

v2 = tab_error-msgv2

v3 = tab_error-msgv3

v4 = tab_error-msgv4

importing

msg = l_message

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.

reward points if useful,

regards,

seshu.