Function | Writes an application log entry | |||||||||
Example | s10applicationlog( "..." ). | |||||||||
Format |
data: mymsgtext type string, mymsgtype type string. s10applicationlog( exporting   msgtext = mymsgtext   msgtype = mymsgtype ). |
|||||||||
Parameters |
|
|||||||||
Description |
The s10applicationlog() method is used by the S10 framework to write entries to
the "SAP Application Log" (displayed in transaction SLG1). Instead of s10applicationlog(), it is better to use one of the more specialized methods s10loginfo(), s10logwarning() or s10logerror(), as this automatically adds information about the current class and HTML page to the application log. Example:
S10loginfo( |Logon, user | && sy-uname ). If the application log is enabled, the display in transaction SLG1 then looks like this::
The first entry "Call method LOGON" was inserted by the S10 framework (flow logging).
s10session->applicationlog_level = 2.
Activates the application log of the desired level, here level 2.
Activates the application log
level 3 as default for the user in question and for all applications of the S10
framework.
We
recomend that you normally leave the default level 0 switched on and activate
one of the levels 1-3 for error tracing if necessary. Especially for testing an
application one should set level 2 or 3 and evaluate the resulting messages. The entries in the application log are made by default under the object "APPL_LOG", subobject "OTHERS", which you can select in transaction SLG1:
You can select another object in your application to better assign the entries. This is done with the statements (example values):
s10session->applicationlog_object = 'LPD'. Select an existing object and subobject or create your own with transaction SLG0:
The entries of the application log are managed in the database tables BALDAT and BALHDR. Since numerous SAP programs write application logs, these tables can become very large. You can archive the entries in the SAP system (program BC_SBAL_WRI) and delete them online with transaction SLG2 or by scheduling a batch job. |
|||||||||
Components | S10 Framework |