Z- T code usage log table.

hi All,
I am looking for T-code or program usage log standard table to fulfill my requirement.
Like I can get these values username, run date, run time etc.
-Thanks
  Amit

Hello Amit,
although it was not specifically meant for this purpose, transaction STAD is an alternative how you can check the usage of a Z-transaction.
Usage of transaction STAD is:
enter the starting date / time
enter the length which indicates how long the server should be analysed from the starting date / time
in field "Transaction" enter the transaction name you need to check
simply press <enter>
Transaction STAD contains a huge amount of information about program statistics, so the information won't be kept here for long. However, the amount of storable program statistics should be raised only with care, as it can give a huge additional load on the server.
Best regards,
Laszlo

Similar Messages

  • How to transfer data in change log table of dso to z-table using abap code

    Hi  can you please explain me how to transfer data in change log table of dso to z-table using abap code ,with out using Function module concept

    PROGRAM NAME:   ZBW_DELTA_TO_GSTAR                                 **
    report ZBW_DELTA_TO_GSTAR no standard page heading
                                     line-size 120
                                     line-count 75
                                     message-id ZBW_MSG_CLS.
    tables:   ZGIV_DLTA_EBV_BB,
              ZGIV_DLTA_EM2_BL,
              ZGIV_DLTA_EM2_BK.
    Selection Screen Definitions
    SELECTION-SCREEN: BEGIN OF BLOCK INNER WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN: SKIP 1.
    PARAMETERS:       EBVBB RADIOBUTTON GROUP ROLL,
                      EM2BL RADIOBUTTON GROUP ROLL,
                      EM2BK RADIOBUTTON GROUP ROLL.
    SELECTION-SCREEN: END OF BLOCK INNER.
    Data:  WS_UPDATE_FLAG  Type C,
           UCounter(9)      Type N,
           ICounter(9)      Type N.
    DATA:  T_ZGIV_DLTA_EBV_BB Type Standard Table of ZGIV_DLTA_EBV_BB,
           s_ZGIV_DLTA_EBV_BB LIKE line of T_ZGIV_DLTA_EBV_BB.
    DATA:  T_ZGIV_DLTA_EM2_BK Type Standard Table of ZGIV_DLTA_EM2_BK,
           s_ZGIV_DLTA_EM2_BK LIKE line of T_ZGIV_DLTA_EM2_BK.
    DATA:  T_ZGIV_DLTA_EM2_BL Type Standard Table of ZGIV_DLTA_EM2_BL,
           s_ZGIV_DLTA_EM2_BL LIKE line of T_ZGIV_DLTA_EM2_BL.
    Standard Internal Tables - Describe usage.
    data: begin of i_AEPSD_O0140 occurs 0.
            include structure /BIC/AEPSD_O0140.
    data: end of i_AEPSD_O0140.
    data: begin of i_AEPSD_O0240 occurs 0.
            include structure /BIC/AEPSD_O0240.
    data: end of i_AEPSD_O0240.
    data: begin of i_AEPSD_O0340 occurs 0.
            include structure /BIC/AEPSD_O0340.
    data: end of i_AEPSD_O0340.
    data: begin of i_GIV_DLTA_EBV_BB occurs 0.
            include structure ZGIV_DLTA_EBV_BB.
    data: end of i_GIV_DLTA_EBV_BB.
    data: begin of i_GIV_DLTA_EM2_BK occurs 0.
            include structure ZGIV_DLTA_EM2_BK.
    data: end of i_GIV_DLTA_EM2_BK.
    data: begin of i_GIV_DLTA_EM2_BL occurs 0.
            include structure ZGIV_DLTA_EM2_BL.
    data: end of i_GIV_DLTA_EM2_BL.
    Miscellaneous Program Variables and Constants.
    TOP-OF-PAGE
    top-of-page.
    START-OF-SELECTION
    start-of-selection.
      Clear: i_GIV_DLTA_EBV_BB,
             i_GIV_DLTA_EM2_BK,
             i_GIV_DLTA_EM2_BL,
             UCounter, ICounter.
      IF EBVBB = 'X'.
        PERFORM 100_EXTRACT_EBV_BB_DELTA_RECS.
      ELSEIF EM2BK = 'X'.
        PERFORM 100_EXTRACT_EM2_BK_DELTA_RECS.
      ELSE.
        PERFORM 100_EXTRACT_EM2_BL_DELTA_RECS.
      ENDIF.
    FORM 100_EXTRACT_EBV_BB_DELTA_RECS
    FORM 100_EXTRACT_EBV_BB_DELTA_RECS.
      Refresh:   i_AEPSD_O0140,
                 i_GIV_DLTA_EBV_BB.
      Clear:      UCounter, ICounter, s_ZGIV_DLTA_EBV_BB .
      Select * From /BIC/AEPSD_O0140
        Into TABLE i_AEPSD_O0140.
      IF SY-Subrc = 0.
        LOOP AT i_AEPSD_O0140.
          MOVE-CORRESPONDING i_AEPSD_O0140 TO s_ZGIV_DLTA_EBV_BB.
          MOVE SY-DATUM to s_ZGIV_DLTA_EBV_BB-create_dt.
          INSERT ZGIV_DLTA_EBV_BB FROM s_ZGIV_DLTA_EBV_BB.
          IF SY-Subrc = 0.
            ICounter = ICounter + 1.
          ELSE.
            UPDATE ZGIV_DLTA_EBV_BB FROM  s_ZGIV_DLTA_EBV_BB.
            IF SY-Subrc = 0.
              UCounter = UCounter + 1.
            ELSE.
              Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "100_EXTRACT_EBV_BB_DELTA_RECS
    FORM 100_EXTRACT_EM2_BK_DELTA_RECS
    FORM 100_EXTRACT_EM2_BK_DELTA_RECS.
    Refresh:   i_AEPSD_O0240,
               i_GIV_DLTA_EM2_BK.
      Clear:      UCounter, ICounter, s_ZGIV_DLTA_EM2_BK .
      Select * From /BIC/AEPSD_O0240
        Into TABLE i_AEPSD_O0240.
      IF SY-Subrc = 0.
        LOOP AT i_AEPSD_O0240.
          MOVE-CORRESPONDING i_AEPSD_O0240 TO s_ZGIV_DLTA_EM2_BK.
          MOVE SY-DATUM to s_ZGIV_DLTA_EM2_BK-create_dt.
            INSERT ZGIV_DLTA_EM2_BK FROM s_ZGIV_DLTA_EM2_BK.
          IF SY-Subrc = 0.
            ICounter = ICounter + 1.
          ELSE.
            UPDATE ZGIV_DLTA_EM2_BK FROM  s_ZGIV_DLTA_EM2_BK.
            IF SY-Subrc = 0.
              UCounter = UCounter + 1.
            ELSE.
              Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "100_EXTRACT_EM2_BK_DELTA_RECS
    FORM 100_EXTRACT_EM2_BL_DELTA_RECS
    FORM 100_EXTRACT_EM2_BL_DELTA_RECS.
    Refresh:   i_AEPSD_O0340,
               i_GIV_DLTA_EM2_BL.
      Clear:      UCounter, ICounter, s_ZGIV_DLTA_EM2_BL .
      Select * From /BIC/AEPSD_O0340
        Into TABLE i_AEPSD_O0340.
      IF SY-Subrc = 0.
        LOOP AT i_AEPSD_O0340.
          MOVE-CORRESPONDING i_AEPSD_O0340 TO s_ZGIV_DLTA_EM2_BL.
          MOVE SY-DATUM to s_ZGIV_DLTA_EM2_BL-create_dt.
            INSERT ZGIV_DLTA_EM2_BL FROM s_ZGIV_DLTA_EM2_BL.
          IF SY-Subrc = 0.
            ICounter = ICounter + 1.
          ELSE.
            UPDATE ZGIV_DLTA_EM2_BL FROM  s_ZGIV_DLTA_EM2_BL.
            IF SY-Subrc = 0.
              UCounter = UCounter + 1.
            ELSE.
              Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "100_EXTRACT_EM2_BL_DELTA_RECS
    END-OF-SELECTION
    end-of-selection.
      perform D1000_REPORT_DATA.
    D1000_REPORT_DATA
    form D1000_REPORT_DATA.
    *Display the title of the program
      write: /25 SY-TITLE.
      skip.
    Diaplay the details of the user and time
      write: /1 'Executed by', 15 SY-UNAME, 30 'Date',
      38 SY-DATUM, 53 'Time', 60 SY-UZEIT.
      skip 2.
      write: /  'Delta Records have been extracted  ',
             /   'Updates : ', UCounter,
             /   'Inserts : ', ICounter.
      skip.
      skip 3.
      write: /20 'End of the report'.
    endform.                                           "D1000_REPORT_DATA
    chgeck it out this also may hep you

  • Table to check the T.codes usage

    Hi,
    I want to know the table name in R/3 which will be displaying the transaction codes usage details as i can check the current days usage in st03n by selecting the transaction profile but intend to have the list for the previous days
    Appreciate for your solution and <removed_by_moderator>
    Read the "Rules of Engagement"
    Regards,
    Dheeraj
    Edited by: Juan Reyes on Feb 11, 2009 12:24 PM

    Use tables TSTC (list of tcodes) and CDHDR(where used list of tcodes) to write a ABAP program.
    Or If else you can use ST03N to see the list of tcodes used by users.
    Re: User Information
    Regards,
    Jazz

  • How can i log transaction codes, programes and tables used by a user?

    Hi everyone,
    i need to log transaction codes, programes and tables a user has used in a certain time. how can i trace that and is it possible with timestamps?
    i tried something with the badi workload_statistic but thats not what i need. is there a simple function which can do that or is this really much more complicated?

    In SE13 there is an option to log table changes for a table.
    If you search for "SCU3" you will find plenty of information on this. Also search for "RECCLIENT" (without the "/") and you will find some more specialized threads.
    Cheers,
    Julius

  • OBIEE 11G - Usage Tracking - Table S_NQ_DB_ACCT

    Hi
    I successfully set up usage tracking in Obiee 11 and the table S_NQ_ACCT gets a lot of new records. Basically it's working.
    In the nqserver.log I get some errors concerning a new table S_NQ_DB_ACCT:
    [nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist
    at OCI call OCIStmtExecute: INSERT INTO S_NQ_DB_ACCT (ID,LOGICAL_QUERY_ID,QUERY_TEXT,QUERY_BLOB,TIME_SEC,ROW_COUNT,START_TS,START_DT,START_HOUR_MIN,END_TS,END_DT,END_HOUR_MIN) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12).
    This is an additional Usage Tracking Table which didn't exist in OBIEE 10G.
    I configured the table as S_NQ_ACCT in the same place in the repositry/connection pool. Writing to this table should be possible.
    Does anybody has an idea what could be wrong? Does another user fill data to this table than the user which fills data to S_NQ_ACCT?
    Thank you

    Hi
    Thank you.
    I use the table within the default RCU created schema. What I don't understand ist why the table S_NQ_ACCT gets a lot of records (because I set the loglevel) but S_NQ_DB_ACCT keeps empty with the error in the nqserver.log. I mean if one table works then the other should be working too? I checked also the permissions which are the same for both tables.
    [2012-06-04T15:14:39.000+00:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 7d4f9e9d968c0bfe:-39c197c9:13773b9d89f:-8000-000000000005c768] [tid: 18e0] [nQSError: 17011] SQL statement execution failed. [[
    [nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist
    at OCI call OCIStmtExecute: INSERT INTO S_NQ_DB_ACCT (ID,LOGICAL_QUERY_ID,QUERY_TEXT,QUERY_BLOB,TIME_SEC,ROW_COUNT,START_TS,START_DT,START_HOUR_MIN,END_TS,END_DT,END_HOUR_MIN) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12).
    ]]

  • How can we find the most usage and lowest usage of table in Sql Server by T-SQL

    how can we find the most usage and lowest usage of table in Sql Server by T-SQL
    The table has time stamp column
    StartedOn datetime
    EndedOn datetime

    The Below query has been used , but the textdata column doesnot include the name of the table ServiceLog.
    SELECT
    FROM
    databasename,
    duration
    fn_trace_gettable('F:\Program
    Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\log_148.trc',
    default)
    WHERE
    DATABASENAME='ZTCFUTURE'
    AND TEXTDATA
    IS
    NOT
    NULL
    --AND TEXTDATA LIKE 'SERVICE%'
    order
    by cpu
    desc; 

  • DML Error Logging Tables?

    How can I use DML Error Logging Tables with OWB10gR2 (in tab-definition and mappings)?
    btw: what really is a shadow-table?

    Hi,
    What you can do to solve this is to add a Pre-mapping to your mapping which calls a procedure that alters the constraint on the target table in which you use the "EXCEPTIONS INTO <error_table> " clause.
    like:
    PROCEDURE "ENABLE_CONSTR_WITH_EXCEPTIONS"("P_TABLE" IN VARCHAR2,  "P_CONSTRAINT" IN VARCHAR2) IS
    v_table            varchar2(30) := p_table;
    v_constraint          varchar2(30) := p_constraint;
    v_command           varchar2(200);
    e_CannotValidate      exception;
    PRAGMA EXCEPTION_INIT(e_CannotValidate, -2437);
    -- main body
    BEGIN
    /* Enable Constraint and write error into exception table */
      BEGIN
        v_command := 'ALTER TABLE ' || v_table || ' ENABLE CONSTRAINT '|| v_constraint ||' EXCEPTIONS INTO exceptions';
        execute immediate (v_command);
        commit;
      END;
        EXCEPTION
            WHEN e_CannotValidate THEN
               -- In my case when Unique Constraints are violated I will delete the duplicates.
               DELETE_DUPLICATES(v_table, v_constraint);
            WHEN OTHERS THEN
                NULL;  -- enter any exception code here
    END;
    -- End of ENABLE_CONSTR_WITH_EXCEPTIONS;Greetz,
    Ilona Tielke

  • The Connection String for the Query Log table is automatically encrypted.

    When I try to use the Usage Based Optimization to apply Aggregation Design to my measure group, it shows me the following
    error message.
    The connection string cannot be found. Open Microsoft SQL Server Management Studio and, in the Analysis Server Properties
    page, check the value of the Log\QueryLog\QueryLogConnectionString
    property.
    I encountered this error like two weeks ago.  At that time I just reset the connection string and every things seem
    to be fine.  A week ago, I successfully applied the Usage Based Optimization for one of my cubes.  However when I tried to apply UBO for my other cubes today, I encountered the same issue again!  I believe no one has changed the property of
    the connection string.
    Also if I query the Query Log table, I can see those latest queries made by the users.  I'm sure the queries are still
    logging into this table.
    This is really strange.  Anyone else has encountered the same issue?  Thanks.

    Hello Thomas,
    I encounterd this issue. And I am struggling trying to solve this problem. If you have resolved this issue and I guess you must've, because this post is two years old, could you kindly post how you resolved this issue?
    Thanks in advance
    Best Regards,
    Neeraja

  • OBIEE Usage Tracking Table Is Not Populated

    Hello everybody,
    OBIEE Usage tracking table (s_nq_acct) is not populated correctly for last a few weeks. I have no experience on configuring / managing usage tracking jobs, so I do not know where to start to solve this problem. First of all, which log file should I go to find the problem? And also which parameters should I look? Can you help me please.
    Regards,
    Dilek

    Check that the absolutely correct and precise connection pool information contained in your RPD matches what your entries in the MBeans which then get written to the NQSConfig.ini.
    Check that your UT physical model in the RPD physical layer isn't and old (11.1.1.5) setup running on a 11.1.1.7 env where the column definitions don't match.
    Several log files. NQServer.log and NQQuery.log to begin with.

  • Log table in replicate

    Hi,
    I would like to register transactions not fullfilling a replicate filter to a log table and then abend.
    When starting up the replicate process again I would like to start with the transaction initiating the abend.
    I have tried the following, but the process starts on the next transaction.
    How can i handle this?
    My code:
    replicat r_gtmgts
    userid goldengate, password goldengate
    assumetargetdefs
    discardfile ./dirrpt/r_gtmgts.dsc, append
    GETUPDATEBEFORES
    REPERROR (21000, EXCEPTION)
    MAP user1.table1, TARGET user1.table1,
    SQLEXEC (ID tab394, ON UPDATE,
    QUERY "select count(*) c from user1.table1where 1=1 and DBID_=:p1 and STATE_=:p4 and TIMESTAMP_=:p3",
    PARAMS (p1=BEFORE.DBID_,p4=BEFORE.STATE_,p3=BEFORE.TIMESTAMP_), BEFOREFILTER, ERROR REPORT, TRACE ALL),
    FILTER (ON UPDATE, 0 <> tab394.c, RAISEERROR 21000);
    MAP user1.table1 TARGET user1.konflikt_gg
    EXCEPTIONSONLY,INSERTALLRECORDS,EVENTACTIONS (STOP),
    COLMAP (konflikt_type = "UPDATE KONFLIKT OPPDAGET", eier = "USER1", tabell = "TABLE1", dato = @DATENOW(), pk = @STRCAT(DBID_), beskrivelse = @STRCAT("DBID_=", BEFORE.DBID_,">", DBID_, ", ","STATE_=", BEFORE.STATE_,">", STATE_, ", ","TIMESTAMP_=", BEFORE.TIMESTAMP_,">", TIMESTAMP_));
    Thanks for Your help!

    Duplicate post.
    See:
    How do I implement a log table for transaction initiating an abend?

  • How can we know the usage log information in BW?

    Hi,
    How can we know the usage log for Infocubes & ODS in BW ?
    What transactions/tables can we use?
    Plz help.

    Hi,
    you have to activate the BW Statistics
    Use the BW Statistics tables
    RSDDSTAT          
    RSDDSTATAGGR      
    RSDDSTATAGGRDEF   
    RSDDSTATBCACT     
    RSDDSTATCOND      
    RSDDSTATDELE      
    RSDDSTATEXTRACT   
    RSDDSTATLOG       
    RSDDSTATWHM
    Happy Tony

  • Can anybody help me to understand the CPU usage logs

    Hello community,
    I try to find the faulty machine in our network, but I don`t understand the logfiles. We have many servers which normally work very fast and reliable.
    But sometimes we have such a huge cpu usage drain on our server. Nobody knows where it comes from, so I looked in the vsphere web client and looked in the cpu usage logs.
    Following you can see two pictures. One is from the main host. It shows only a cpu usage of a maximum of 45 %.
    When I look on the vmware machines I can see a cpu usage of more than 150%.
    This is something I completely not understand. How is it possible that the main host machine has only a 45% cpu usage and the clients are exploding?
    I don`t have set a cpu usage limit in our resource pool.
    The next thing is. When I look on the vmmachines, I can not identify the faulty machine. Because when one machine increases the cpu usage many others increase too. Whatever why.
    Can somebody explain me the pictures below please:
    Thank you for your time
    Paul

    You don't have any need to understand this code. The complication is due to the registry needing a fixed objectID.
    You just need to know the methods of java.rmi.registry.LocateRegistry class. This allows you to start an RMI Registry inside your JVM and give it any TCP port number you like.

  • Maintaining log table

    Hi Experts,
    The below procedure is scheduled using DBMS_JOB.
    I want to maintain log table for the actions performed by this procedure
    and as well as the job information.
    CREATE OR REPLACE PROCEDURE load_proc (P_ID IN NUMBER)
    IS
       CURSOR C
       IS
          SELECT   GROUP_ID, tablename, target_table
            FROM   temp_table
           WHERE   GROUP_ID = p_id;
    BEGIN
       FOR I IN C
       LOOP
          EXECUTE IMMEDIATE   'INSERT INTO '
                           || I.target_table
                           || '(SELECT * FROM '
                           || I.tablename
                           || ' WHERE '
                           || 'last_dt<=SYSDATE-500'
                           || ')';
         EXECUTE IMMEDIATE   'DELETE FROM '
                           || I.tablename
                           || ' WHERE '
                           || 'last_dt<=SYSDATE-500';
          COMMIT;
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          ROLLBACK;
          DBMS_OUTPUT.PUT_LINE (
             'An error was encountered - ' || SQLCODE || ' -ERROR- ' || SQLERRM
    END load_proc;
    DECLARE
      X NUMBER;
    BEGIN
      SYS.DBMS_JOB.SUBMIT
      ( job       => X
       ,what      => 'ARP.load_proc(1);'
       ,next_date => to_date('20/01/2013 00:00:00','dd/mm/yyyy hh24:mi:ss')
       ,interval  => 'TRUNC(SYSDATE+1)'
       ,no_parse  => FALSE
      SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    COMMIT;
    END;
    /I want to capture the below information in the log table.
    SNO RECORDS_INSERTED               RECORDS_DELETED              JOBID   JOB_START_TIME         JOB_END_TIME          JOB_LAST_RAN_ON       JOB_STATUS  
    1  2000 records inserted into     2000 records deleted from      1     20/01/2013 00:00:00    20/01/2013 02:30:00  20/01/2013 02:30:00   completed successfully
       table WEDB_EMPLOYEE            table WEDB_EMPLOYEE
    2                                            1     21/01/2013 00:00:00     21/01/2013 01:00:00                   Failed: error message
    3                                                                1                                     NULLIf the job is not started on the particular day NULL value has to be inserted in the JOB_LAST_RAN_ON column.
    If the job is not failed in the middle on a particular day FAILED: ERROR MESSAGE value has to be inserted in the JOB_STATUS column.
    Script for log table creation.
    CREATE TABLE log_load_proc
    (sno NUMBER,
    records_inserted VARCHAR2(4000),
    records_deleted VARCHAR2(4000),
    jobid NUMBER,
    job_start_time TIMESTAMP,
    job_end_time TIMESTAMP,
    job_last_ran_on TIMESTAMP,
    job_status VARCHAR2(4000));Please help me on this.
    Thanks in advance.

    973205 wrote:
    >If the job is not started on the particular day NULL value has to be inserted in the JOB_LAST_RAN_ON column.
    If the job is not failed in the middle on a particular day FAILED: ERROR MESSAGE value has to be inserted in the JOB_STATUS column.
    Thanks for posting the Procedure, Job and Table Details.
    How do you want to represent the data in Log table, if you are processing Multiple Tables in a Single Job Run?
    Certainly, to comply with your First requirement, you will have to setup another job that does the Logging for you.
    Or, Calling of Job procedure has be modified like below
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job       => X
    ,what      => 'ARP.some_procedure(1);'           ----------> some_procedure will call Log Procedure, followed by load_proc(1) and further followed by Log procedure to indicate success/failure of Job;
    ,next_date => to_date('20/01/2013 00:00:00','dd/mm/yyyy hh24:mi:ss')
    ,interval  => 'TRUNC(SYSDATE+1)'
    ,no_parse  => FALSE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    COMMIT;
    END;
    /Below is a sample code, which you can modify according to your requriements:
    create or replace procedure log_load_job
      p_rec_inserted                varchar2,
      p_rec_deleted                 varchar2,
      p_job_id                      number,
      p_start_date                  date,
      p_end_date                    date,
      p_job_status                  varchar2
    is
    declare
      pragma autonomous_transaction;
    begin
      insert into log_load_job (records_inserted, records_deleted, job_id, start_date, end_date, last_run_date, job_status)
      values (p_rec_inserted, p_rec_deleted, p_job_id, p_start_date, p_end_date, decode(instr(p_job_status, 'ERROR'), 0, p_end_date, null), p_job_status);
                                                               --> Decode to check if Job Status is Error, do not enter Last Run Date
      commit;
    exception
      when others then
        null;             ---> Failure of LOGGER must not interrupt the normal execution.
    end log_load_job;
    CREATE OR REPLACE PROCEDURE load_proc (P_ID IN NUMBER)
    is
      v_inserted        varchar2(4000);
      v_deleted         varchar2(4000);
      v_start_date      date;
       CURSOR C
       IS
          SELECT   GROUP_ID, tablename, target_table
            FROM   temp_table
           WHERE   GROUP_ID = p_id;
    begin
      v_start_date := sysdate;
       FOR I IN C
       LOOP
          EXECUTE IMMEDIATE   'INSERT INTO '
                           || I.target_table
                           || '(SELECT * FROM '
                           || I.tablename
                           || ' WHERE '
                           || 'last_dt<=SYSDATE-500'
                           || ')';
          v_inserted := sql%rowcount || ' records inserted into ' || i.tablename;
         EXECUTE IMMEDIATE   'DELETE FROM '
                           || I.tablename
                           || ' WHERE '
                           || 'last_dt<=SYSDATE-500';
          v_deleted := sql%rowcount || ' records deleted from ' || i.tablename;
          log_load_job(v_inserted, v_deleted, p_id, v_start_date, sysdate, 'Completed');
          --COMMIT;
          v_inserted := null;
          v_deleted := null;
       end loop;
       commit;                ---> Commit After Entire Tables have been Deleted and Inserted.
    EXCEPTION
       WHEN OTHERS
       then
        log_load_job(v_inserted, v_deleted, p_id, v_start_date, sysdate, 'Error :: ' || sqlerrm);
          ROLLBACK;
    end load_proc;
    /Untested piece of code.

  • Capture PO errors to log table

    Please let me know if there is a way to capture SAP standard errors raised during PO creation into a Z log table.
    EX: SAP raises Message 06, message number 882, is there a way to capture this error into a log table.
    Thanks for your help.

    In PO processing using ME21N/ME22N a lot messages are not issued individually, but are presented in a list in a pop-up window.  Not sure if this is true of the messages you want to capture.
    If you look at the following code implemented in the CHECK method of "ME_PROCESS_PO_CUST" BADI, you will see it adds a customer message to this list using the macro MMPUR_MESSAGE from the MM_MESSAGES_MAC include.
    Perhaps there is also a macro for reading the messages. 
    Even if not, the macro code should show how you could read them and then you could place code in this user exit to get the messages and log the relevent ones to a Z table
    [code]
    METHOD if_ex_me_process_po_cust~check.
    NB: Add Type Group MMMFD to implementing class properties tab
    DATA: lt_items TYPE purchase_order_items,
    l_item_wa TYPE purchase_order_item,
    l_item TYPE mepoitem,
    l_total TYPE brtwr,
    l_matkl TYPE matkl,
    l_flag TYPE c.
    INCLUDE mm_messages_mac. "useful macros for message handling
    CLEAR: l_total, l_flag.
    CALL METHOD im_header->get_items
    RECEIVING
    re_items = lt_items.
    Loop through items and calculate total
    LOOP AT lt_items INTO l_item_wa.
    CALL METHOD l_item_wa-item->get_data
    RECEIVING
    re_data = l_item.
    l_matkl = l_item-matkl.
    l_total = l_total + l_item-brtwr.
    Check if any lines missing contract number
    IF l_item-konnr IS INITIAL.
    l_flag = 'X'.
    ENDIF.
    ENDLOOP.
    IF l_flag = 'X'.
    IF l_total > 5000.
    mmpur_metafield mmmfd_agreement.
    mmpur_message 'E' '06' '999'
    'Purchase order over $5000.00 requires a contract' '' '' ''.
    invalidate the object
    CALL METHOD im_header->invalidate( ).
    LOOP AT lt_items INTO l_item_wa.
    CALL METHOD l_item_wa-item->invalidate( ).
    ENDLOOP.
    ENDIF.
    ENDIF.
    ENDMETHOD.
    [/code]
    Hope this is of some use.
    Andrew

  • [59053] Usage Tracking stopped because the specified Usage Tracking table

    Immideatly after server startup, I am gettting this log in the NQServer.log.
    [59053] Usage Tracking stopped because the specified Usage Tracking table contained the wrong number of columns or a column with an inappropriate data type.
    Any idea how I can find out which table needs update?
    Thanks
    -SJ
    Here are the details of hte tables I have in the Usage tracking schema :
    CREATE TABLE "RMI"."S_NQ_ACCT"
    (     "USER_NAME" VARCHAR2(128 BYTE),
         "REPOSITORY_NAME" VARCHAR2(128 BYTE),
         "SUBJECT_AREA_NAME" VARCHAR2(128 BYTE),
         "NODE_ID" VARCHAR2(15 BYTE),
         "START_TS" TIMESTAMP (6),
         "START_DT" TIMESTAMP (6),
         "START_HOUR_MIN" CHAR(5 BYTE),
         "END_TS" TIMESTAMP (6),
         "END_DT" TIMESTAMP (6),
         "END_HOUR_MIN" CHAR(5 BYTE),
         "QUERY_TEXT" VARCHAR2(1024 BYTE),
         "SUCCESS_FLG" NUMBER(10,0),
         "ROW_COUNT" NUMBER(10,0),
         "TOTAL_TIME_SEC" NUMBER(10,0),
         "COMPILE_TIME_SEC" NUMBER(10,0),
         "NUM_DB_QUERY" NUMBER(10,0),
         "CUM_DB_TIME_SEC" NUMBER(10,0),
         "CUM_NUM_DB_ROW" NUMBER(10,0),
         "CACHE_IND_FLG" CHAR(1 BYTE) DEFAULT 'N' NOT NULL ENABLE,
         "QUERY_SRC_CD" VARCHAR2(30 BYTE) DEFAULT '',
         "SAW_SRC_PATH" VARCHAR2(250 BYTE) DEFAULT '',
         "SAW_DASHBOARD" VARCHAR2(150 BYTE) DEFAULT '',
         "SAW_DASHBOARD_PG" VARCHAR2(150 BYTE) DEFAULT '',
         "PRESENTATION_NAME" VARCHAR2(128 BYTE) DEFAULT '',
         "ERROR_TEXT" VARCHAR2(250 BYTE) DEFAULT '',
         "RUNAS_USER_NAME" VARCHAR2(128 BYTE) DEFAULT '',
         "NUM_CACHE_INSERTED" NUMBER(10,0) DEFAULT NULL,
         "NUM_CACHE_HITS" NUMBER(10,0) DEFAULT NULL
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "RMI_DATA" ;
    CREATE INDEX "RMI"."S_NQ_ACCT_M1" ON "RMI"."S_NQ_ACCT" ("START_DT", "START_HOUR_MIN", "USER_NAME")
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "RMI_DATA" ;
    CREATE INDEX "RMI"."S_NQ_ACCT_M2" ON "RMI"."S_NQ_ACCT" ("START_HOUR_MIN", "USER_NAME")
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "RMI_DATA" ;
    CREATE INDEX "RMI"."S_NQ_ACCT_M3" ON "RMI"."S_NQ_ACCT" ("USER_NAME")
    PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "RMI_DATA" ;
    CREATE OR REPLACE FORCE VIEW "RMI"."NQ_LOGIN_GROUP" ("LOGIN", "RESP") AS
    Select DISTINCT USER_NAME as "LOGIN", RUNAS_USER_NAME as RESP From S_NQ_ACCT
    Edited by: SachinJ on Aug 3, 2009 7:54 AM

    Compare the S_NQ_ACCT table you created with the table structure defined in the rpd under the physical layer database object "Oracle Analytics Usage".

Maybe you are looking for

  • I have a problem twitter update

    when updating twitter, it saied that my login name is different, to log in with that user name. I dont have a different login name

  • Help with blinking ink light on printer

    I have a office jet printer and my computer states my printer is out of ink. I replaced the ink cartridges and the printer continue to blink on the ink lights and when I try to send something to the printer it keeps saying the printer is out of ink.

  • How to upload photos from my computer tp picasa

    i want to upload my pictures that I have on facebook to picasa

  • Help -- files suddenly losing "Date Modified"

    I have an external USB drive that I use for backing up important files. I use File Synchronizer to sync folders on my internal drive(s) with their counterparts on this external drive. Today when attempting to sync my Photos folder, I was shocked to s

  • How do I change the color of the rollover on stock iWeb Pages?

    Hi, I have used a template from iWeb 08. I allowed the page navigation menu to be the one from the blank page template. Unfortunately, the text is Dark Gray, and is Black when in use. I want to be able to change at least the rollover color. How can I