‎2007 Feb 03 11:08 AM
hi experts,
I have gone thruogh Fm documentation regarding application log.In many FM like BAL_DB_LOAD, BAL_LOG_CREATE etc we come across the sentense saying that the logs are stored in memory.
Which memory are they referring ?? Can anybody please help me?
‎2007 Feb 03 11:46 AM
‎2007 Feb 03 2:39 PM
Hi
Logos are saveing in this table -
MCEXLOG
And goto OAOR transaction, Here u can have a option to upload logos
‎2007 Feb 03 4:01 PM
Hi srinivas,
the documentation sys the logs are stored in memory
- after the log has been loaded
- when a message is created
If you want to keep the messages, you have store them in database using
FUNCTION 'BAL_DB_SAVE'
The messages are stored in the BAL_LOG_* function group memory.
This means when you create a log you will not waste any time with database accesses before you save the log.
Feel free to explain your situation that I could help you with the logs. We built an inbound IDOC interface and created our own object to create a log, store messages and save the log to the dabase at the end of the process.
This way we could go to the application log directly from IDOC administration.
Regards,
Clemens
‎2007 Feb 05 3:51 AM
Hi clemens Li.
I am a beginner in ABAP and have been given with an assignment to do a presentation on Application log.I have collected revelant data.In case you have some more data as you have done some work in this topic,please forward it to me.
Your views on this topic would be of tremendous help to me.
If you have any documentation on this topic please send it to srinivas1984@gmail.com.
Thank you.
‎2007 Feb 05 4:36 AM
hi
good
BAL_DB_LOAD->
Application Log: Database: Load log
Functionality
The function module BAL_DB_LOAD loads logs from the database.
Which logs are to be loaded into memory can be specified in one of several ways:
I_T_LOG_HANDLE
A table of log handles
I_T_LOGNUMBER
A table of internal log numbers
I_T_LOG_HEADER
A table of log headers (returned by function module BAL_DB_SEARCH)
The result of loading can be a table of log handles (Exporting parameter E_T_LOG_HANDLE) or message handles (Exporting parameter E_T_MSG_HANDLE).
This function module is cross-client:
If you specify I_T_LOG_HANDLE it searches in all clients (this is not critical because the log handle is globally unique)
If you specify I_T_LOGNUMBER the client in the parameter I_CLIENT is taken into account. If it is not specified, the current client is used.
If you specify I_T_LOG_HEADER the client in the table field MANDANT is taken into account (it is filled automatically by the function module BAL_DB_SEARCH).
Other parameters:
You can specify that only the log headers are to be loaded in memory with the Importing parameter I_DO_NOT_LOAD_MESSAGES. See Read log messages as required.
You can specify that the exception LOG_ALREADY_LOADED be raised if one of the logs to be loaded is already in memory, with the Importing parameter I_EXCEPTION_IF_ALREADY_LOADED = 'X'. In this case no logs are loaded.
I_EXCEPTION_IF_ALREADY_LOADED = ' ' (default) ignores a log to be loaded if it is already in memory. All other logs are loaded correctly.
Note
To load the database status, use the function module BAL_DB_RELOAD, which first deletes a log from memory if necessary before loading it.
Example
Report SBAL_DEMO_05 ( ==>Run ==>Coding) simulates a settlement run for all flights on a specified date. You can choose:
Simulate settlement.
The documents are only collected in memory with temporary numbers, which are logged.
Perform settlement.
A log is saved in the database after the temporary document numbers have been replaced by permanent ones in the log.
Display logs.
Related function modules
Save and load logs
Delete logs
Further Information
Quick start documentation
Application Log: Technical documentation
Parameter
I_T_LOG_HEADER
I_T_LOG_HANDLE
I_T_LOGNUMBER
I_CLIENT
I_DO_NOT_LOAD_MESSAGES
I_EXCEPTION_IF_ALREADY_LOADED
E_T_LOG_HANDLE
E_T_MSG_HANDLE
Exceptions
NO_LOGS_SPECIFIED
LOG_NOT_FOUND
LOG_ALREADY_LOADED
Function group
BAL_LOG_CREATE ->
Short text
Application Log: Log: Create with header data
Functionality
The function module BAL_LOG_CREATE opens the Application Log whose header data is in the Importing parameter I_S_LOG_HEADER, which has the structure BAL_S_LOG.
The function module BAL_LOG_CREATE returns the log handle (LOG_HANDLE, CHAR22).
The LOG_HANDLE is a GUID (globally unique identifier) which uniquely identifies a log. You can access this log with this handle, e.g. to subsequently change the header data ( BAL_LOG_HDR_CHANGE) or to put a message in the log ( BAL_LOG_MSG_ADD).
The LOG_HANDLE has its permanent value straight awys, so it remains valid after saving.
==>Note:
Logs in memory and in the database are referred to in the new Application Log by the log handle (LOG_HANDLE), but the previous LOGNUMBER, which is assigned from number range interval 01 of number range object APPL_LOG when you save, still exists. A lot of applications have a reference to this LOGNUMBER in their structures, so it is still supported. The LOGNUMBER is also more understandable for users than the LOG_HANDLE. There is a 1:1 relationship between LOG_HANDLE and LOGNUMBER.
Related function bausteine
Simple log creation call
Methods of collecting messages
Further Information
Quick start documentation
Application Log: Technical documentation
Parameter
I_S_LOG
E_LOG_HANDLE
Exceptions
LOG_HEADER_INCONSISTENT
Read these ,i hope these ll hlep you to give the clear idea about these two function modules.
Thanks
mrutyun^