08-29-2008 11:16 AM
Hello
plz suggest which F.M's i have to use to create application log
Regards
Kanth
09-01-2008 12:00 PM
Hello Kanth.
I have come across a Wiki code which deals with the use of function modules for application logging,
[SDN Wiki Code Gallery - Standard Reference - Application Logging in SAP Using ABAP|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/application%2blogging%2bin%2bsap%2busing%2babap]
Another Wiki for the same,
[SDN Wiki Code Gallery - Standard Reference - Using Application Log|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/using%2bapplication%2blog]
Hope that's usefull.
Good Luck & Regards.
Harsh Dave
08-29-2008 11:20 AM
hii
use FM
BAL_LOG_CREATE create the log
BAL_DSP_LOG_DISPLAY for Display log
BAL_LOG_MSG_ADD for put a message in the log
regards
twinkal
09-01-2008 7:26 AM
Can i use the following FMs for creating application log
APPL_LOG_INIT
APPL_LOG_WRITE_HEADER
APPL_LOG_WRITE_MESSAGES
is there any performance issue if i use the above FMs instead of the following FMs
BAL_LOG_CREATE create the log
BAL_DSP_LOG_DISPLAY for Display log
BAL_LOG_MSG_ADD for put a message in the log
Regards
Kanth
Edited by: Kanth on Sep 1, 2008 11:57 AM
Edited by: Kanth on Sep 1, 2008 11:59 AM
09-01-2008 7:45 AM
hiii
for creating application log use
BAL_LOG_CREATE create the log
FM.no performance issue.
you can not use APPL_LOG_INIT
as this FM checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
regards
twinkal
08-29-2008 11:20 AM
09-01-2008 7:38 AM
Hi Kanth
check out this link
http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0257493111d182b70000e829fbfe/frameset.htm
Application Logging in SAP Using ABAP
Cheers
Snehi
09-01-2008 7:39 AM
Hello Kanth.
I would like to suggest my opinion,
Preference is more on,
BAL_LOG_CREATE
Open a log
BAL_LOG_MSG_ADD
Put a message in the log
BAL_DSP_LOG_DISPLAY
Display log
as SAP HELP it self mentions as Power full ones.
[SAP HELP Library - Standard Reference - Create application log - Log Events|http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0216493111d182b70000e829fbfe/frameset.htm]
As compared to these,
APPL_LOG_WRITE_HEADER and so on.
[SAP HELP Library - Standard Reference - Create application log - Application Log records|http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa0257493111d182b70000e829fbfe/frameset.htm]
Hope this works out well.
Good Luck & Regards.
Harsh Dave
09-01-2008 7:42 AM
Hi Kanth,
You can go through the following Function Modules :
Application Log Maintenance
(i)APPL_LOG_DELETE With this function module you delete logs in the database according to specified selection conditions
(ii)APPL_LOG_DISPLAY With this function module you can analyze logs in the database.
(iii)APPL_LOG_DISPLAY_INTERN With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.
(iv)APPL_LOG_INIT This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
(v)APPL_LOG_READ_DB With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.
(vi)APPL_LOG_READ_INTERN With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
(vii)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
(viii)APPL_LOG_WRITE_u2026 messages are written in local memory or are output on the screen.
(ix)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.
(x)APPL_LOG_WRITE_HEADER With this function module, you write the log header data in local memory.
(xi)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.
(xii)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
(xiv)APPL_LOG_WRITE_SINGLE_MESSAGE.
(xv)APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory.
(xvi)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.
Regards,
Swapna.
09-01-2008 12:00 PM
Hello Kanth.
I have come across a Wiki code which deals with the use of function modules for application logging,
[SDN Wiki Code Gallery - Standard Reference - Application Logging in SAP Using ABAP|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/application%2blogging%2bin%2bsap%2busing%2babap]
Another Wiki for the same,
[SDN Wiki Code Gallery - Standard Reference - Using Application Log|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/using%2bapplication%2blog]
Hope that's usefull.
Good Luck & Regards.
Harsh Dave