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

Get log text messages from slg1 tcode

Monikakathore
Explorer
0 Likes
1,476

After execution of slg1 tcode , we can see lots of messages date time , but i want those log messages and need to store in excel and send it to  perticular person...i have code for sending email and how to store it in excel but first i want those messages .....any idea how to get those...i am using appl_log_read_db fm for now and getting msg id , msgv1 msgv2,msgv3 something like that...need to concatenate those messages but what to do with msg id?? Please help...

1 REPLY 1
Read only

Ulrich_Schmidt1
Product and Topic Expert
Product and Topic Expert
0 Likes
1,427

The meaning of message ID and message number (SY-MSGID, SY-MSGNO) can be looked up in transaction SE91. (Here "message ID" is called "message class". This can be a bit confusing, but it's just another word for the same thing...)

For example, if you specify Message Class = D0 and Message Number = 004, SE91 will tell you that the error text is:
"&: Act. table parameter & is empty"

You then replace the placeholders "&" with the values of SY-MSGV1 and SY-MSGV2. For example with MSGV1 = "Warning" and MSGV2 = "ORDER_HEADER_IN" we would get the final error message as
"Warning: Act. table parameter ORDER_HEADER_IN is empty"

Function module MESSAGE_PREPARE can be used to format a message text (=fill all the placeholders). As input it takes the language, message ID, No, V1-V4 and as output it returns the final error message.