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

Application log.

Former Member
0 Likes
448

Hello friends,

I have a query regarding the application log ( Transaction SLG0, SLG1 etc ). I would like to be able to write to the application log and at the same time be able to read and siplay the application log. Want to know the function modules for doing the same. It would be nice if the same could be shown with some example.

Useful answers will be rewarded.

Cheers,

Jaydeep.

2 REPLIES 2
Read only

Former Member
0 Likes
352

You have to call a couple of function module in a sequence..

Please see the following code:

call function 'APPL_LOG_INIT'

EXPORTING

object = w_object

subobject = w_sub_obj

EXCEPTIONS

others = 0.

call function 'APPL_LOG_WRITE_HEADER'

EXPORTING

header = wa_prot_head

EXCEPTIONS

others = 0.

call function 'APPL_LOG_WRITE_MESSAGES'

EXPORTING

object = w_object

subobject = w_sub_obj

TABLES

messages = it_prot_mess

EXCEPTIONS

object_not_found = 0.

call function 'APPL_LOG_WRITE_DB'

TABLES

object_with_lognumber = it_prot_nr

EXCEPTIONS

others = 0.

Hope this helps...

Read only

0 Likes
352

Hi Abaper,

Thanks for the reply.

Could you please also mention the various parameters being passed in the form of an example ( like object, subobject etc ), so that it makes it easier to follow. Your first answer was pretty helpful in the first instance.

Cheers,

Jaydeep.