Writing to system log(sm21)

Hi All,
I have a requirement to write custom generated log to system log(sm21), Is there any FM for the same or how to do the same.
thanks
bobby

You cannot use the system log for your own purpose.
Actually, you can, using the kernel functions available, shown in the SLOG package programs.  The system log is nothing more than a local file that gets written to and then synchronized across app servers.  But you are correct that the poster needs to use the application logs, as I also stated.

Similar Messages

  • How to write messages into system log(sm21) using c_write_syslog_entry

    Hi,
    May i know how to write my application messages into system log(sm21)
    using "c_write_syslog_entry". Any explanation regarding the Type. ID, Data
    will be useful with examples. Incase of any other FM's or C functions does
    the same Please let me know.
    Thanks
    Prasath

    Hello Prasanth
    I agree with Kareem that you should prefer the application log. If interface IF_RECA_MESSAGE_LIST is available on your SAP system this is the first choice for collecting messages AND storing them as application log.
    For an example you may have a look at my Wiki posting [Message Handling - Finding the Needle in the Haystack|https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack]
    Not shown in this example is the storage of the application log. However, if you look at method CF_RECA_MESSAGE_LIST=>CREATE you see that you can add the application log references here.
    Regards
      Uwe

  • Job that must be programmed to collect information for system log (sm21)

    Please, Who is the job that must be programmed to collect information for system log (sm21) ?
    Thank you very much.
    Hugo.

    Before you reinitialize your log shipping configuration, check to see if you can take a differential backup and restore that on top of your standby database. This is relatively easier than to take a full database backup just to reinitialize
    Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
    Blog |
    Twitter | LinkedIn
    SQL Server High Availability and Disaster Recover Deep Dive Course
    I can take a diff backup.. But in my secondary, when i right click standby >tasks-->restore-->i can see only option to restore transaction log file. Other options are greyed out. How can i restore a diff backup now. If i bring the DB online with
    restore with recovery, i have to restore a full backup before i can apply a diff backup. 
    Somebody provide me insight on below error
    This secondary database is not functional because
    the required copy or restore job cannot be found. You must remove this secondary database by clicking Remove. To resume log shipping to this secondary database, add it as a secondary again using the same settings.If
    you resume log shipping and you specify the same restore path that you used before, any backup files that are uncopied or unrestored to this database will be copied and restored when it is added as a secondary again.  Reinitializing the secondary database
    is unnecessary."
    I can see the LS_restore job and the job is running as per the schedule, we dont run copy job because
    the backup directly falls in secondary server. wats the reason for the above error.

  • System Log SM21

    Hi,
    In system log it is showing the following message.could you please explain me the meaning of it.
    Enqueue: Accumulated wait time for lock: 1300 seconds              
    > Uname: LVARA enxxhead8324                                      
    > Obj: SLEEP # enxxhead8328                                        
    > Key: 20070419082004848475002600TC030D71........................# 
    Regards,
    Neeraj

    Neeraj,
    Check the below stuff:
    Check which of the below are the reasons for your issue....
    During loading
    you are not permitted to
    •        Delete data
    •        Archive data
    •        Delete indexes and reconstruct them
    •        Reconstruct statistics
    While indexes are being built
    you are not permitted to
    •        Delete indexes
    •        Fill aggregates
    •        Roll up requests in aggregates
    •        Create statistics
    •        Compress requests
    •        Archive data
    •        Update requests to other data targets
    •        Perform change run
    While statistics are being built
    you are not permitted to
    •        Delete indexes
    •        Build indexes
    •        Fill aggregates
    •        Roll up requests in aggregates
    •        Compress requests
    •        Archive data
    •        Update requests to other data targets
    •        Perform change run
    During roll up
    you are not permitted to
    •        Delete indexes
    •        Build indexes
    •        Create statistics
    •        Fill aggregates
    •        Compress requests
    •        Perform change run
    During compression
    you are not permitted to
    •        Delete indexes
    •        Build indexes
    •        Create statistics
    •        Fill aggregates
    •        Roll up requests in aggregates
    •        Archive data
    •        Update requests to other data targets
    •        Perform change run
    During deletion
    you are not permitted to
    •        Load data
    •        Delete indexes
    •        Build indexes
    •        Create statistics
    in certain circumstances you are not allowed to
    •        Fill and roll up aggregates
    •        Perform change run
    •        Compress requests
    •        Update requests to other data targets
    During updating
    you are not permitted to
    •        Compress requests
    •        Archive data
    [email protected]

  • System Log(SM21), how I can achieve this?

    How I can display the fields that were changed during the debug mode through System Log. What are the Function Modules to read the system log.

    Look at these Function Groups :
    SLO2 System log: Read and analyze
    SLO3 System log: Table caches
    SLO4 System log: Parameter buffer
    SLO5 System log: Errno analysis
    Regards

  • SAP NetWeaver System Logging (SM21) - ABAP Test and Analysis Tools - SAP Library

    To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English.
    You can also go back to the SAP help page.

    Hi Vikas,
    thank you very much for your quick answer.
    Am I getting it right that you installed the Web Application Server and the XI on the same machine? I read about the mandatory installation on two seperate machines but I hope that the installation on one machine is also possible when using the server for testing purposes.
    What processor do you have? Do you think my Pentium 4 2.8 GHz processor will do it?
    Very appreciative greetings,
    Florian

  • System Log - Stop Workproc

    Dear all,
    We are running SAP ECC 6.0 with Oracle 11g on AIX 5.1.
    The system log (SM21) have entries like 'Stop Workproc 5, PID 2760756'  every now and then for different users.
    The details of the entry are as follows :
    Task...... Process         User...... Terminal Session TCode        Program                        Cl Problem cl      Package
    27607      Dialog work process No. 005 TESTUSER    terminal06       1 START_REPORT GP47VTF200KGK52BL7PWMWOGWT1100 S  Operation Trace STSK
    Module nam Line Error text         Caller.... Reason/cal
    dpuxtool   269# Workproc 5 2760756 wp_halt    WPStop
    Documentation for system log message Q0 2 :
    The specified process has been stopped
    File Offset RecFm System log type             Grp N variable message data
      12 913140 m     Error (Function,Module,Row) Q0  2 Workproc 5 2760756                    wp_haltWPStop dpuxtool269#
    The previous and succeeding log entries in SM21 are for different users.
    Are these issue due to any disconnection due to network inconsistency or so.
    The entry in SM50 trace display at this time is as follows:
    Tue Oct 18 10:17:42 2011
      User requested cancel of current SQL on connection 0
      db_sqlbreak() = 0
      program canceled
        reason   = soft cancel
        user     = TESTUSER
        client   = 100
        terminal = terminal06
        report   = GP47VTF2FDMDRK3KO41KRL8KU8L710
    Thanks in Advance !
    Regards,
    Kiran

    I would say that someone executes a transaction, it takes too long and he cancells the transaction through GUI.
    I would trry to find out, who's user "TESTUSER" and ask what is going on.
    Markus

  • System Log in BW

    hi,
    could you please tell me the use of system log (SM21). How can i trace the reason for failure in SM21.
    Regards,
    Jagadeesh

    Hi,
    Here is a link to answer quite a few of your questions.....
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/1f/8311784bc511d189750000e8322d00/frameset.htm">System Log</a>
    Cheers
    Neeraj

  • BP_JOB_MODIFY error at system log

    Hi,
    I am having this recurring log from tcode SM21 which logs hourly.  It shows the error message "BP_JOB_MODIFY: Job cannot be modified. Reason: The attempt to modify a job of background processing (by means of function module BP_JOB_MODIFY) failed. The reason for this is described in more detail in a subsequent system log entry." I have also seen about no free server issue for the background processor.
    Do you know what's causing the error? Can you help me out?
    Thanks,
    Jennah

    Dear Markus,
    Thanx  for ur suggestion.but  i m getting the  next error in the SM21.its only warning or i have to rectify it.
    while checking the system log sm21 sys log i m facing error but im not able to get it..plz suggest me..i m pasting here
    15:16:32 UP1 005 100 PWC R6 7 > Update module: UMSETZEN_PLANAUFTRAG
    15:16:47 UP1 005 100 PWC D0 1 Transaction Canceled 61 034 ( 10000023 00010 )
    15:16:47 UP1 005 100 PWC R6 5 Update terminated
    15:16:47 UP1 005 100 PWC R6 6 > Update key: 6BD241DDD424F13D8261001635B0CD06
    15:16:47 UP1 005 100 PWC R6 7 > Update module: UMSETZEN_PLANAUFTRAG
    15:16:47 UP1 005 100 PWC D0 1 Transaction Canceled 61 034 ( 10000024 00010 )
    15:16:47 UP1 005 100 PWC R6 5 Update terminated
    15:16:47 UP1 005 100 PWC R6 6 > Update key: 6BD241DDD424F1418261001635B0CD06
    15:16:47 UP1 005 100 PWC R6 7 > Update module: UMSETZEN_PLANAUFTRAG
    15:16:47 UP1 005 100 PWC D0 1 Transaction Canceled 61 034 ( 10000025 00010 )
    15:16:47 UP1 005 100 PWC R6 5 Update terminated
    15:16:47 UP1 005 100 PWC R6 6 > Update key: 6BD241DDD424F1428261001635B0CD06
    15:16:47 UP1 005 100 PWC R6 7 > Update module: UMSETZEN_PLANAUFTRAG
    15:16:47 UP1 005 100 PWC D0 1 Transaction Canceled 61 034 ( 10000026 00010 )
    15:16:47 UP1 005 100 PWC R6 5 Update terminated
    15:16:47 UP1 005 100 PWC R6 6 > Update key: 6BD241DDD424F1438261001635B0CD06
    Regard's

  • System Log error in PROD Server (SM21 - system log)

    Dear All,
    i am getting the below error in SAP Prod server from SM21 (System log).
    10:03:38 BTC  007                              Q0  1 Start Workproc 7, 1 times since system startup. PID 1560660
    10:04:26 BTC  009 000 SAPSYS                   EB  F Failed to activate authorization check for user S2K_BASIS
    10:04:26 BTC  009 000 SAPSYS                   D0  1 Transaction Canceled 00 560 ( S2K_BASIS 000 )
    10:19:39 BTC  009                              Q0  1 Start Workproc 9, 1 times since system startup. PID 1622152
    10:34:26 BTC  009 000 SAPSYS                   EB  F Failed to activate authorization check for user S2K_BASIS
    10:34:26 BTC  009 000 SAPSYS                   D0  1 Transaction Canceled 00 560 ( S2K_BASIS 000 )
    10:49:26 BTC  007 000 SAPSYS                   EB  F Failed to activate authorization check for user S2K_BASIS
    10:49:26 BTC  007 000 SAPSYS                   D0  1 Transaction Canceled 00 560 ( S2K_BASIS 000 )
    11:03:37 BTC  007                              Q0  1 Start Workproc 7, 1 times since system startup. PID 1560662
    11:04:26 BTC  009 000 SAPSYS                   EB  F Failed to activate authorization check for user S2K_BASIS
    kindly suggest

    Hi Sathees
    Please check the link below
    Failed to activate authorization check for user SAPSYS SAP_CCMS_MAPPING_SCH

  • SM21 System Log shows error

    Dear All,
    We are having SAP ECC 6.0 which is on Microsoft Windows Server 2003 R2 Enterprise x64 Edition. The Oracle is 10.2.0.2.0. The SAP_Basis is 700 & level is 10.
    The SM21 System Log shows below text in log which appears in transactions,
    Enqueue: Transfer error while reading lock entries
    > Destination: eccprd_PRD_00                     
    > ENQUE_READ exception code: 4                   
    > RFC error when sending logon dat               
    > a.                                             
    You are requested to kindly look into the above error and provide your help to resolve this issue.
    I am awaiting for your valuable feedback for the above.
    Regards
    Pikal

    Hi Deepak,
    I have refereed the SAP Note as you said, however our SAP_Basis Release is 700, Level 10 SAPKB70010.
    The SAP Note says SAP_Basis Release 702,730 & 731 and our is 700. Kindly go through for the same.
    Thanks for your helping.
    Regards
    Pikal

  • Canot display the remote system logs in the A51 system in the sm21

    Hi firend,
       could you plase help to me, i could not able to see the remote system logs in sm21 transaction.How can overcome this problem
    Thanks,
    Lakshmankumar.

    Lakshmankumar,
    Have you done system copy? or is it a new installation?
    We had this problem after we have done system copy on to new system (New Hardware).
    You can check the URL provided by Juan Reyes.
    I also suggest checking few more things like below.
    Are you able to see instances from SM21 u2192 system log u2192 choose u2192 remote system log u2192 instance name u2013 check to see if you are able to see other application servers are not.
    If you are not able to see other apps servers try these steps.
    Execute the function module TH_SERVER_LIST on all application servers (start SE37, insert TH_SERVER_LIST, press F8, press F8 again). As a result you will get a table "LIST", with a mouse clickthe contents of the table will be displayed. In the column "SERV" normally the sapdp* services should be displayed,these are used to connect to the dispatcher of the instance. Most probably you will not see a sapdp<nn> entry but some strange names,e.g. cpq-tasksmart, intraintra, tick-port.
    In this case please check the/etc/services file (if using Unix) of all application servers. All duplicate entries of the interval 3200 to 3299 should be commented out if they are already used for the sapdp<nn> services.
    After the restart of the instances the function module should return allsapdp* ports correctly and all remote syslogs should be displayed now.
    Thanks,
    Venkat.

  • SM21 system log

    Hi,
    In SM21 what is the use of Local System log,Remote system log, All remote system log and central system log.
    Regards,
    Neeraj

    It determines from what Web AS instance(s) you're reading the system logs.
    Local - Web As you're currently logged on
    Remote - Let you pick an instance to read the system log
    All Remote - System logs from all Web AS instances for the system
    Central - System logs from central instance

  • ICal writing tons of log messages into system.log

    Hi all,
    I've got an issue with iCal under Leopard 10.5.1.
    Sometimes my syslogd process grabs ~100% CPU time and so I took a look into system.log.
    I saw MANY lines like this:
    Jan 27 19:23:34 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:34.363 iCalExternalSync[4230:10b] ISyncSession deleteRecordWithIdentifier: ignoring delete for unknown record Event/p774
    Jan 27 19:23:34 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:34.364 iCalExternalSync[4230:10b] ISyncSession deleteRecordWithIdentifier: ignoring delete for unknown record Event/p2754
    Jan 27 19:23:34 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:34.364 iCalExternalSync[4230:10b] ISyncSession deleteRecordWithIdentifier: ignoring delete for unknown record Event/p288
    Jan 27 19:23:34 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:34.365 iCalExternalSync[4230:10b] ISyncSession deleteRecordWithIdentifier: ignoring delete for unknown record Event/p2056
    Jan 27 19:23:34 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:34.366 iCalExternalSync[4230:10b] ISyncSession deleteRecordWithIdentifier: ignoring delete for unknown record Event/p148
    Jan 27 19:23:34 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:34.367 iCalExternalSync[4230:10b] ISyncSession deleteRecordWithIdentifier: ignoring delete for unknown record Event/p73
    Jan 27 19:23:42 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:42.497 iCalExternalSync[4230:10b] SyncServices precondition failure in [ISyncConcreteSession clientAcceptedChangesForRecordWithIdentifier:formattedRecord:newRecordIdentifie r:]: you can't change the record identifier from 4183D93C-A813-4AB4-BA0F-C246414B2DA1 to node_BirthdayCalendar/p7: it is already associated with a different record.
    Jan 27 19:23:42 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:42.521 iCalExternalSync[4230:10b] [ICalExternalSync ]Encountered [ISyncConcreteSession clientAcceptedChangesForRecordWithIdentifier:formattedRecord:newRecordIdentifie r:]: you can't change the record identifier from 4183D93C-A813-4AB4-BA0F-C246414B2DA1 to node_BirthdayCalendar/p7: it is already associated with a different record.
    Jan 27 19:23:42 Tigger com.apple.syncservices.SyncServer[4225]: 2008-01-27 19:23:42.526 iCalExternalSync[4230:10b] [ICalExternalSync ]NSException name:NSInvalidArgumentException reason:[ISyncConcreteSession clientAcceptedChangesForRecordWithIdentifier:formattedRecord:newRecordIdentifie r:]: you can't change the record identifier from 4183D93C-A813-4AB4-BA0F-C246414B2DA1 to node_BirthdayCalendar/p7: it is already associated with a different record.
    Any idea how to fix this?
    Here's another problem that might be related to this: my "Private" calendar was published in 10.4 but now the webdav server that was used for this is no longer existent (and can't be setup again).
    So I wanted to unpublish my Private calendar but this wasn't possible. When trying to unpublish it I get the error message "This calendar could not be unpublished. Authentication information may be incorrect."
    If I select the "Cange location..." menu entry in the context menu of the Private calendar I still see the webdav server address and the Login and Password fields are filled. But because this server no longer exists publishing is no longer possible. Which is fine with me.
    So, how can I get rid of the publishing? Because I get tons of error messages in system.log, too, for this behaviour. Everytime the system tries to publish this calendar...
    Thanks,
    Stefan.

    I am not much of a help, but I just wanted to say that my iCal just experienced the same problems for the first time today...

  • Trcing down to JOB or program level from Short dump or system log in APO.

    Hi Guru's
    Can anyone please guide me how to trace down to JOB or program level from ST22 and SM21 logs.
    I have SQL errors and lock entries in APO system, I want to find which program or job writing them.
    Thanks in advance,
    Sreerama.

    Hi,
    Thanks for the replay,
    I have checked same way as you suggested >>>> in ST22 dump, but it is taking me to Include "LARFCF06" which is trying to delete ARFCSTATE table.
    and I have error message :
    Database error text........: "[1205] Transaction (Process ID 291
    deadlocked on lock resources with another process and has been
    deadlock victim. Rerun the transaction."
    Internal call code.........: "[RSQL/DELE/ARFCRSTATE ]"
    Please check the entries in the system log (Transaction SM21).
    User and Transaction
        Client.............. 100
        User................ "APORFC"
        Language Key........ "E"
        Transaction......... " "
        Transactions ID..... "002FE8DE2A71F1B182E80019BB345F90"
        Program............. "SAPLARFC"
        Screen.............. "SAPMSSY1 3004"
        Screen Line......... 2
        Information on caller of Remote Function Call (RFC):
        System.............. "P48"
        Database Release.... 700
        Kernel Release...... 700
        Connection Type..... 3 (2=R/2, 3=ABAP System, E=Ext., R=Reg. Ext.)
        Call Type........... "synchron and non-transactional (emode 0, imode 0)"
        Inbound TID.........." "
        Inbound Queue Name..." "
        Outbound TID........." "
        Outbound Queue Name.." "
        Client.............. 100
        User................ "APORFC"
        Transaction......... " "
        Call Program........."SAPLERFC"
        Function Module..... "ARFC_DEST_CONFIRM"
        Call Destination.... "NONE"
        Source Server....... "debosap172_P48_21"
        Source IP Address... "10.132.184.172"
        Additional information on RFC logon:
        Trusted Relationship " "
        Logon Return Code... 0
        Trusted Return Code. 0
        Note: For releases < 4.0, information on the RFC caller are often
        only partially available.
    Information on where terminated
        Termination occurred in the ABAP program "SAPLARFC" - in
         "DELETE_ARFC_ORPHANS_WO_COMMIT".
        The main program was "SAPMSSY1 ".
        In the source code you have the termination point in line 508
        of the (Include) program "LARFCF06".
        The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
        procedure "DELETE_ARFC_ORPHANS_WO_COMMIT" "(FORM)", but it was neither handled
         locally nor declared
        in the RAISING clause of its signature.
        The procedure is in program "SAPLARFC "; its source code begins in line
        489 of the (Include program "LARFCF06 ".
    Now I want to find how this dead lock is created and which two (programs or JOB's) causing this dead lock.
    And program "APLARFC" is not a exicutable program and even I try to where used list I am not able to find exicutable program.
    now I need to find which are the two programs or jobs causing this loack.
    Thanks in Advance,
    Sreerama.

Maybe you are looking for