Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

What is an Application Log?

The Application Log is a tool for collecting messages, saving, reading and deleting logs in

the database and displaying logs.




Use of Application Log:

You can analyze the logs and their messages, and get more information about them, in the

Display log dialog box.

The log display is used in many SAP system applications, and has a slightly different format

depending on the number of messages and the data structure.




Features of Application Log:

In applications with a (potentially) large number of messages, the display is divided into

areas. A navigation tree provides an overview and allows navigation among the messages, and

either all or a selection of messages are displayed in a list (ABAP List Viewer). The

navigation tree can be either above or to the left of the list. Applications with little

data have no navigation tree.




Function module used to create Application Log

BAL_LOG_CREATE --> Create log with header data

BAL_LOG_MSG_ADD --> Put message in log

BAL_DB_SAVE --> Save logs in the database






Transaction Codes:

SLG0: Creation of Object and Sub object

SLG1: Display Application Logs





Step by Step procedure for Creation of Application Log:

Step 1:     Open the transaction code SLG0. This transaction 

        code is used to create Object and Sub object.

Step 2: Check for the Object which is already in created and in use by your

company/team/project. Else, Create a New Entry starting with Z or Y.

Step 3: After creating (if not exist) the object, select the object and go to its

sub-objects.

Step 4: If corresponding sub-objects doesn¡¦t exists, create a sub object.

Step 5: Now the ¡¥Object¡¦ and ¡¥Sub Object¡¦

are used in creation of Application Log.

Step 6: Three function modules are basically used to create the application log

Step 7: 'BAL_LOG_CREATE' „³ this function module creates the log handle

Step 8: 'BAL_LOG_MSG_ADD' „³ this function module is used to populate the messages

into the created application log. If we have more than one message to be passed into the

same log, then we can loop at the messages and pass them through this function module.

Step 9: 'BAL_DB_SAVE' „³ this function module is used to save the log. The

creation of log and addition of messages into the log are performed in the first two

function modules mentioned. This function module saves the log so that the user can view the

log in SAP.Transaction Code the view the log: SLG1.

SAMPLE CODE:

How to view Application Logs?

1. Choose the transaction SLG1. You go to the Analyze Application Log dialog box.

2. Enter Object, Subobject and Ext. number.

3. Choose a Time restriction.

4. Specify Log caused by.

5. Choose the Log class and Log creation.

6. Choose Execute.

You go to the Display log dialog box.

FURTHER REFERENCES

Help URL:

http://help.sap.com/saphelp_47x200/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/fr

ameset.htm



http://help.sap.com/saphelp_erp2005/helpdata/EN/d6/5d7f38f52f923ae10000009b38f8cf/
frameset.htm





Sample Program in SAP:

SBAL_DEMO_06