Calling SLG1 for Application log creation
Hi All,
I have a requirement for writing logs in SLG1 transaction. I embedded the logic for creating log in a method of a class. The method is getting called in CRM inbound proxy where I would need to make mutiple calls to this log. If I use a call more than one time, I am getting only the log for the first call. The second and the rest of the calls are not throwing any message in SLG1 but shown as greyed out. Could we not call the log SLG1 more than one time in the same application?
Any ideas would be appreciated.
Thanks
Anand
Hi,
did you have a look at my weblog:
/people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
Similar Messages
-
Function Module for Application Log(SLG1)
HI SapAll.
may i know what is the Function Module to read the data for Applicaiton Log (tcode-SLG1).
waiitng for your response.
regards.
VarmaHi Danish.
running the program 'SBAL_DISPLAY' is similar to running the FM'APPL_LOG_DISPLAY' .However when i run any one of these i have to manually press the 'Execute button' to display the log(there is no option to save the log into spool or to get into some Internal table)
i have tried running the program 'SBAL_DISPLAY' by putting the Break point at the line ( CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
EXPORTING
i_t_log_handle = l_t_log_handle)
,while debugging the values are as below:
L_T_LOG_HANDLE : Sorted Table[1x1(44)]
1 ZoDNJw4vg3BX0000h1GOdm.
could you please help me in getting the log into spool wihtout having to press the execute button and without having to look at the Log.
regards.
Varma -
Transaction for application log
Using IDOCS. One has errored but cannot get into application log as pop up not appearing (memory issue or something) for me to double click the log number and go into the application log to view it. Does anyone know the transaction or menu path to access the application log direct so I can see what the error is about?
Many thanks
LarissaHi,
USE SLG1 Transaction.
Thanks,
Naga -
How to setup rotation for application.log?
In order to get the Portal Performance Statistics running, we need to retrieve the page views from file application.log in directory <ORAHOME>\j2ee\OC4J_Portal\application-deployments\portal\OC4J_Portal_default_island_1.
This file continues to grow and therefore we want to set up rotation, in order to get one file per day.
We are following note 264373.1 and have read all documents and manuals about logging, but can not figure out how to manage this.
Can anyone help us? We are working with 9.0.4.1.
For Oracle employees: see also tar 4193327.994.I can't speak for how portal uses the log file, but in general, the way you do it for a deployed J2EE application on OC4J is as follows.
Deploy the application EAR file. Lets say the app is called Test.
In the j2ee/home/application-deployments/Test directory, a file will be created called orion-application.xml.
If you look in this file, you will see an entry which looks like
<log>
<file path="application.log" />
</log>
This defines the log file for this application.
Now if you want to setup log file rotation for this app, edit the orion-application.xml file and firstly, comment out the above.
Note: you can leave the log tag in if you wish, but you'll get double log messages. Remove it if you do this in production and are trying to conserve space ;-).
Then add in the below to setup ODL based logging for this application:
<log>
<odl path="logdir"
max-file-size="1000" max-directory-size="10000" />
</log>
What this does it to tell OC4J to output the log messages using it's ODL format model, to create a directory called logdir (in the current directory) and then to start writing to log files called log.xml in that directory.
The max file size of log.xml is 1000KB, and the max directory size of the new logdir directory will be 10MB.
The ODL logging system will manage the log files in this directory according to these constraints -- when a log file gets bigger than max-file-size it gets archived as logN.xml. When the overall directory size gets bigger than the max-directory-size specified, the oldest log file from the list is removed so that the max directory size is honoured.
I don't think we can specify a rollover period (ie one day) with ODL. I'm pretty sure it's just file size based only.
I think the above should apply to Portal since it runs on OC4J. In which case, you'd change the orion-application.zml in the <ORAHOME>\j2ee\OC4J_Portal\application-deployments\portal directory instead of j2ee/home/application-deployments/<app-name>.
However, I can't speak officially for Portal since I don't work with that product. From a pure OC4J perspective the above holds true and works.
cheers
-steve- -
How to get event's application log handle for application log mssg
Hi,
I would like to get the application log handle for an event call, can someone pls help.
Rgds.Hello wong ,
Did u get the solution for this respective query.
if so can u please send it to me also .
i am struck over with the similar problem.
Thanks,
pavankumar. -
Create Object and Subject for Application Log
Hello Experts,
Could anyone tell me how to create the Z Object and subobject for the Application Log.
ie) <b>BALOBJ_D & BALSUBOBJ</b>
Could you please tell me the Tcode for that.
Since I have to save the application in the new object so that it can be displayed using this Key.
Thanks & Regards,
VasanthHello Vasanth
The transaction is SLG0 (Object Maintenance).
Regards
Uwe -
How to use Application log (slg0 & slg1)
Hi all,
Can u please give me some hints to utilize Application log?
Hope you will help me.
Thanq in advance,
Bye.hi John,
Check these FM's out
BAL_GLB_SEARCH_LOG
BAL_LOG_CREATE
BAL_LOG_EXC_ADD
BAL_LOG_HDR_CHANGE
BAL_LOG_HDR_READ
BAL_LOG_MSG_ADD
BAL_LOG_MSG_ADD_FREE_TEXT
BAL_LOG_MSG_CHANGE
BAL_LOG_MSG_CUMULATE
BAL_LOG_MSG_DELETE
BAL_LOG_MSG_DELETE_ALL
BAL_LOG_MSG_READ
BAL_LOG_REFRESH
SBAL_DETAIL Application Log: Display: Detail Screens
BAL_DSP_LOG_PARAMETERS Application Log: Display: Display log header parameter set
BAL_DSP_LOG_TECHNICAL_DATA Application Log: Display: Display log header technical data
SBAL_DISPLAY Application Log: Display Log
BAL_DSP_LOG_DISPLAY Application Log: Fullscreen log output
BAL_DSP_LOG_PRINT Application Log: Print log
SBAL_PROFILE Application Log: Display Profile
BAL_DSP_PROFILE_SINGLE_LOG_GET Application Log: Display profile: Standard profile (SLG1) for one log
SBAL_SERVICE Application Log: Service Functions
BAL_LOG_HDR_CHECK Application Log: Log: Header data: Check
BAL_LOG_MSG_CHECK Application Log: Log: Message: Check
SBAL_TOOLBOX Application Log: Toolbox
BAL_DB_LOGNUMBER_GET Application Log: Database: Get internal log number from number range
BAL_LOG_DELETE Application Log: Log: Delete log (from DB also at save)
BAL_LOG_EXIST Application Log: Log: Check existence (in memory)
BAL_LOG_MSG_EXIST Application Log: Log: Message: Check existence (in memory)
BAL_LOG_MSG_REPLACE Application Log: Log: Message: Replace last
BAL_STATISTICS_LOG_GET
BAL_STATISTICS_LOG_SET
Regards,
Santosh
Note: Reward Points if helpful -
Hello,
we are trying to use application logging feature provided with ABAP by way of function modules BAL_LOG_ADD/SAVE etc. the results of these are visible in trasnaction SLG1.
In our scenario, we want to keep track of different abnormal situations which a background Job of a user with dialogue operation faces. So these situations could be part of a successful or un-successful transactions i.e. there could be and overall COMMIT or ROLLBACK for each transactions for which the log operations have been carried out.
Now the problem is that , the Logs are not getting saved for unsuccessful transactions i.e. where there is no COMMIT.
I need your help to get over this situation so that I able to save the Logs (in standard Log objects which are visiible in SLG1) even if the business transaction is not committed.
regards
SushilHow come code always looke like this? I cut and pasted it right in my replay. Highlighted it, and selected "code"?
Oh well, here is the FM I call I tried several times to get it to display properly.
FUNCTION ziu_message_logging.
*"*"Local interface:
*" IMPORTING
*" REFERENCE(I_LOG_OBJECT) TYPE BALOBJ_D
*" REFERENCE(I_EXTNUMBER) TYPE STRING
*" TABLES
*" T_LOG_MESSAGE STRUCTURE ZZLOG_MESSAGE
*" EXCEPTIONS
*" LOG_HEADER_INCONSISTENT
*" LOGGING_ERROR
CONSTANTS: c_message TYPE syst-msgid VALUE 'ZMESSAGE',
c_999 TYPE syst-msgno VALUE '999'.
DATA:
l_log_handle TYPE balloghndl,
l_s_log TYPE bal_s_log,
l_dummy TYPE string,
l_ext_no TYPE bal_s_log-extnumber,
l_s_mdef TYPE bal_s_mdef.
* IF t_log_message[] IS NOT INITIAL.
l_s_log-object = i_log_object.
l_ext_no = i_extnumber.
l_s_log-extnumber = l_ext_no.
* Create the log with header data
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = l_s_log
IMPORTING
e_log_handle = l_log_handle
EXCEPTIONS
log_header_inconsistent = 1
OTHERS = 2.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
RAISE log_header_inconsistent.
WHEN OTHERS.
RAISE logging_error.
ENDCASE.
ENDIF.
l_s_mdef-log_handle = l_log_handle.
* Set the default value
CALL FUNCTION 'BAL_GLB_MSG_DEFAULTS_SET'
EXPORTING
i_s_msg_defaults = l_s_mdef
EXCEPTIONS
others = 0.
* Loop the message table and write the messages into the log
LOOP AT t_log_message.
* Use the message type ZMESSAGE and msg no 999
* Issue the message in a dummy variable
MESSAGE ID c_message TYPE t_log_message-msgty NUMBER c_999
WITH t_log_message-msg_text_1 t_log_message-msg_text_2
t_log_message-msg_text_3 t_log_message-msg_text_4
INTO l_dummy.
* The parameters set by message statement will be used
* Add the message in the log
PERFORM msg_add.
ENDLOOP.
* save logs in the database
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_save_all = 'X'
EXCEPTIONS
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* ENDIF.
endfunction.
* FORM MSG_ADD
* Add the message to the log
FORM msg_add.
DATA:
l_s_msg TYPE bal_s_msg.
* define data of message for Application Log
l_s_msg-msgty = sy-msgty.
l_s_msg-msgid = sy-msgid.
l_s_msg-msgno = sy-msgno.
l_s_msg-msgv1 = sy-msgv1.
l_s_msg-msgv2 = sy-msgv2.
l_s_msg-msgv3 = sy-msgv3.
l_s_msg-msgv4 = sy-msgv4.
* add this message to log file
* (I_LOG_HANDLE is not specified, we want to add to the default log.
* If it does not exist we do not care =>EXCEPTIONS log_not_found = 0)
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
* I_LOG_HANDLE =
i_s_msg = l_s_msg
EXCEPTIONS
log_not_found = 0
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM.
Edited by: Tom Matys on Mar 9, 2010 1:15 PM -
Configure CCMS alert to Analyze Application log
Hi ,
Please provide the prodecure to configure CCMS alert for Applications logs from SLG1 tcode.
If any error log(prefarably Important logs ) is created then a alert should be triggered .
Background : We are using Solution Manager 7.0 as Central monitor system for Satellite systems of verions ECC6.0.
Thanks & Regards
ganeshthis answer is no longer needed
-
OC4J Logging into Application.log
Hi someone,
i try to log into the Application.log configure in the orion-application.xml.
how can do this in Java?
Thanks to all for help
MatthiasAfter 10 Hours i find the solution ;-(
The Application.log can be write with this code:
FacesContext fc = FacesContext.getCurrentInstance();
ServletContext sc = (ServletContext) fc.getExternalContext().getContext();
sc.log("My log message for Application.log");
very simple but not find in the OC4J Doc's -
Calling error/application logs in CRM inbound proxy
Hi All,
In inbound proxy of CRM, I have to call Error/Application logs (for eg:SLG1) whenever an integration process throws some error. Has anyone worked on this kind of scenario to call different application logs in CRM or R3 side inbound proxy.
If so, please give some ideas on this.
Thanks
DenoHi Deno,
did you have a look at my blog in which I describe it ?
/people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
Regards,
michal -
Application logging in SLG1..
Hello Gurus,
I want to know how can I insert message to application log through ABAP. In one of the programs following condition occurs. When this happens , I want the error message to be written to error log so that later it can be accessed by SLG1 T-code.
IF SY-SUBRC <> 0.
lv_error_msg = 'User Workitem creation failed'.
ENDIF.
Please help.
Regards,
Tushar.Please refer to the below thread and look for Sandra Rossi's answer
Re: How to create info. bar/window which displays success and error messages -
What are F. M's used for creating application log in application server
Hello
plz suggest which F.M's i have to use to create application log
Regards
KanthHi 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. -
How to determine SLG1 Application Log Size
Hi, Can anyone tell me how we might be able to determine the size of our SLG1 Application Logs on our BW System?
We want to be sure they are not taking up too much space. If they are we'll purge with SLG2, and if not then we will keep them around.
Thanks!Hello,
system does writes the application log in to the database.
SAP_COLLECTOR_FOR_NONE_R3_STAT is designed to collect non ABAP Statistic Data in/for a central repository.
look service.sap.com/notes and search for SAP_COLLECTOR_FOR_NONE_R3_STAT
Hope it will hep you.
Regards, -
Tcode for Analyze application log
Hello BW Experts,
What is the transaction code for analyze application log.
I am accessing it in this way:
Ods > manage > activation > log > application log
Thanks,
BWerHi,
You can try SLG1.
Hope this helps...
Maybe you are looking for
-
What is the best way to put LabVIEW DSC data into an Oracle database?
I have been collecting data using LabVIEW DSC 7.0 for several years and have always accessed the data from the Citadel database via the Historical Data Viewer. I would now like to begin putting this data into an Oracle database. My company stores a
-
How can I measure my daily usage of my macbook
Hey, I would like to know how many hours I use my macbook on a daily basis. Is there any application which just starts a timer as soon as the mac boots and then provides an overview of the total time, average usage time per day etc.? Thanks for your
-
Landscape and portrait mode in Epub
Hey! When I export from Indesign to .epub with a fixed layout - is there a way to use it in landscape and portrait mode on an Ipad or Iphone? Mine stays in landscape.
-
I have been using Skype for one year almost pretty much daily to audio and video chat with friends in Nigeria and Guatemala. I use Skype because the quality of iChat over the exact same connections is unusable. I am extremely disappointed with it.
-
Content in IDOC Segment getting truncated
Hi Experts, We have a problem with one of our SAP Interface set up with Mobile Application (Ventyx). From Ventyx we receive data in an IDOC through WebMethods (Middleware). We recently changed the length of one of the fields in a segment from 80 to 5