01-10-2008 11:18 AM
Hello friends,
Regarding Application Log Processing...
How to use this technique to assign to a specfic report or ALV report or particular BAPI to create logs.
Waitihng for your replies
01-10-2008 12:00 PM
Hi,
The Application Log is a tool for collecting messages, saving, reading and deleting logs in the database and displaying logs.
Situations can arise at runtime in application programs which must be brought to the attention of the user in some way. These are usually errors. It can also be useful to report a successful completion (this should not be so often as to overload the user with unimportant information).
We are not distinguishing here between Exceptions, Errors, Messages, etc. It is only important that information arises (usually a T100 message or a message text for an exception) that has to be logged either immediately or later. We call this information a message.
These messages are not to be output individually (with the ABAP commands MESSAGEand Raise), they are to be collected and displayed later as a log.
The set of messages is a log. A log usually also has header information (log type, creator, creation time, etc.). A transaction can generate several logs.
The Application Log provides an infrastructure for collecting messages, saving them in the database and displaying them as a log.
The application log is used to temporarily store messages. The logs should be deleted in intervals. Data that, for reasons of revision security, have to be available for a long period of time, should not be stored with the application log but with the change documents.
To get information on using it in your scenario:
http://help.sap.com/saphelp_nw70/helpdata/en/bb/6811ea80ae11d3966f00a0c930660b/frameset.htm
Regards,
Renjith Michael.
Edited by: Renjith Michael on Jan 10, 2008 5:30 PM
01-10-2008 12:11 PM
Thank you for your response ..But I am looking for
How to extend this to a particular Report or Script or interface
01-10-2008 12:20 PM
hi
good
Application logs are a part of the Extended application functions library :
The standard SAP help is very useful and you can find it here :
http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0216493111d182b70000e829fbfe/frameset.htm
thanks
mrutyun^
01-10-2008 12:23 PM
Hi Satya,
The function modules described here (beginning with APPL_LOG_) exist since Release 3.0. New, more flexible and powerful function modules (beginning with BAL_) exist since Release 4.6.
The three most important function modules are:
BAL_LOG_CREATE
Open a log
BAL_LOG_MSG_ADD
Put a message in the log
BAL_DSP_LOG_DISPLAY
Display log
Function module documentation exists for these and all other function modules. There is also a complete technical documentation.
You write the application log records with these function modules.
APPL_LOG_WRITE_HEADER
With this function module, you write the log header data in local memory.
APPL_LOG_WRITE_LOG_PARAMETERS
With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory.
If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly.
If you do not specify an object or sub-object with the call, the most recently used is assumed.
APPL_LOG_WRITE_MESSAGES
With this function module you write one or more messages, without parameters, in local memory.
APPL_LOG_WRITE_SINGLE_MESSAGE
With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created.
If you do not specify an object or sub-object with the call, the most recently used is assumed.
APPL_LOG_WRITE_MESSAGE_PARAMS
With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like APPL_LOG_WRITE_SINGLE_MESSAGE.
APPL_LOG_SET_OBJECT
With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the APPL_LOG_WRITE_ messages are written in local memory or are output on the screen.
APPL_LOG_INIT
This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
APPL_LOG_WRITE_DB
With this function module you write all data for the specified object or sub-object in local memory to the database.
If the log for the object or sub-object in question is new, the log number is returned to the calling program.
Reward if useful.
Thankyou,
Regards.