Last change on table

Hello.
I need to find out when the last change table (INSERT, UPDATE, DELETE). Is this possible using a SQL command?
Thank you Pavel

No it's not possible
You've to create AUDIT or track all DDL statements using triggers
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com

Similar Messages

  • Last time the table structure changed

    What is the best way to find out as to when a table structure was last changed? (Like adding or modifying a column) ?
    I queried LAST_DDL_TIME in the dba_objects view but the problem is that it stores the last time the table was truncated (using TRUNCATE TABLE table_name), as we do truncates often. I was interested in find out when the table was altered. Any ideas ?

    Hi,
    i think database trigger will do better according to your need....
    its simple and best.
    Just create a new table and database trigger.
    Like
    create table db_ddl_log
    username varchar2(30),
    ddl_date date,
    ddl_type varchar2(30),
    object_type varchar2(18),
    owner varchar2(30),
    object_name varchar2(128)
    create or replace trigger db_DDL_Trigger
    AFTER DDL ON DATABASE
    BEGIN
    insert into db_ddl_log
    username,
    ddl_date,
    ddl_type,
    object_type,
    owner,
    object_name
    VALUES
    ora_login_user,
    sysdate,
    ora_sysevent,
    ora_dict_obj_type,
    ora_dict_obj_owner,
    ora_dict_obj_name
    END;
    now check it.
    SQL> select * from db_ddl_log;
    no rows selected
    SQL> desc a
    Name Null? Type
    NO NUMBER
    SQL> alter table a add (name varchar2(1));
    Table altered.
    1* select * from db_ddl_log
    USERNAME DDL_DATE DDL_TYPE OBJECT_TYPE OWNER OBJECT_NAME
    SYS 06-MAR-06 ALTER TABLE SYS A
    SQL> truncate table a;
    Table truncated.
    sql> select * from db_ddl_log
    USERNAME DDL_DATE DDL_TYPE OBJECT_TYPE OWNER OBJECT_NAME
    SYS 06-MAR-06 ALTER TABLE SYS A
    SYS 06-MAR-06 TRUNCATE TABLE SYS A
    Thanks
    Kuljeet Pal Singh

  • How to get the "last changed by" for a set of function modules?

    How to get the "last changed by" for a set of function modules?
    is there any table to get it??

    See [this|Re: Date of creation of function module] I posted earlier.
    >TFDIR will give you the name of the function group program and the include number.
    >E.g. SAPLZFUNCGROUP Include 01.
    >From this you can construct the include name: LZFUNCGROUPU01.
    >You can look this up in TRDIR to find the creation date (CDAT) of the function module.
    In your case, you need unam and udat.
    matt

  • Transaction IW32.How to find out the person name.(Last changed By)

    Hi all,
    When i executed the transaction IW32.Its displays changed by and created by fields. please any body can tell me how to find out the person  name who had made last change with respect to the field changed by.
    Please tell me the table and field name for the field last changed by......
    Regards,
    Munna.

    hi,
    check the table AUFK field AENAM for the order number(AUFNR) in IW32..........

  • How to find out Last Changed Fields for a line item of a PO

    Dear All,
    Pls let me know is there any FM or procedure to find the last changed fields for each line item of a PO. I should be able to get the details on the basis of Last changed Date. Can u pls guide me in this?

    Hello,
    Check the table CDHDR,CDPOS for PO items,
    Check this code:
    REPORT ZV_GET_LATEST_SO .
    DATA: BEGIN OF ITAB OCCURS 0,
            OBJECTCLAS TYPE CDHDR-OBJECTCLAS,
            OBJECTID TYPE CDHDR-OBJECTID,
            CHANGENR TYPE CDHDR-CHANGENR,
            USERNAME TYPE CDHDR-USERNAME,
            UDATE TYPE CDHDR-UDATE,
            UTIME TYPE CDHDR-UTIME,
            TCODE TYPE CDHDR-TCODE,
            TABNAME TYPE CDPOS-TABNAME,
            TABKEY TYPE CDPOS-TABKEY,
            FNAME TYPE CDPOS-FNAME,
            CHNGIND TYPE CDPOS-CHNGIND,
          END OF ITAB.
    TABLES: CDHDR,CDPOS.
    DATA: LT_CDHDR LIKE CDHDR OCCURS 0 WITH HEADER LINE,
    LT_CDPOS LIKE CDPOS OCCURS 0 WITH HEADER LINE.
    *REFRESH AUSG.
    CLEAR CDHDR.
    CLEAR CDPOS.
    CDHDR-OBJECTCLAS = 'EINKBELEG'.
    CDHDR-OBJECTID   = '0000001784'.  " Purchase order number
    **SELECT A~OBJECTCLASS A~OBJECTID A~CHANGENR A~USERNAME A~UDATE A~UNAME
    **B~TCODE
    **B~TABNAME B~TABKEY B~FNAME B~CHNGIND INTO TABLE ITAB FROM CDHDR AS A
    **INNER JOIN CDPOS AS B ON A~OBJECTCLASS = B~OBJECTCLASS
    **                         A~OBJECTID    = B~OBJECTID
    **                         A~CHANGENR    = B~CHANGENR
    **                    WHERE OBJECTCLAS = 'VERKBELEG'
    **                      AND OBJECTID = '0000001784'.
    *SELECT * FROM CDPOS INTO TABLE LT_CDPOS WHERE OBJECTCLAS = 'VERKBELEG'
    *                                    AND OBJECTID = '0000001784'.
    *IF NOT LT_CDPOS[] IS INITIAL.
    *  SELECT *
    *  INTO   TABLE LT_CDHDR
    *  FROM   CDHDR
    *  FOR    ALL ENTRIES IN LT_CDPOS
    *  WHERE  OBJECTCLAS = LT_CDPOS-OBJECTCLAS
    *  AND    OBJECTID = LT_CDPOS-OBJECTID
    *  AND    CHANGENR = LT_CDPOS-CHANGENR.
    *ENDIF.
    **  SORT ITAB BY OBJECTCLAS ODJECTID DESCENDING.
    *LOOP AT ITAB.
    *  WRITE: ITAB-UDATE."ITAB-UNAME.
    *ENDLOOP.
    *--- Interne Tabellen -------------------------------------------------
    DATA: BEGIN OF ICDSHW OCCURS 50.       "Ausgabeaufbereitung
            INCLUDE STRUCTURE CDSHW.       "Zwischendatei
    DATA: END OF ICDSHW.
    CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
         EXPORTING
              DATE_OF_CHANGE    = CDHDR-UDATE
              OBJECTCLASS       = CDHDR-OBJECTCLAS
              OBJECTID          = CDHDR-OBJECTID
              TIME_OF_CHANGE    = CDHDR-UTIME
              USERNAME          = CDHDR-USERNAME
         TABLES
              I_CDHDR           = LT_CDHDR
         EXCEPTIONS
              NO_POSITION_FOUND = 1
              OTHERS            = 2.
    LOOP AT LT_CDHDR.
      CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
        EXPORTING
    *   ARCHIVE_HANDLE                = 0
          CHANGENUMBER                  = LT_CDHDR-CHANGENR
    *   TABLEKEY                      = '00000000 '
    *   TABLENAME                     = ' '
    * IMPORTING
    *   HEADER                        =
       TABLES
         EDITPOS                       = ICDSHW
    *   EDITPOS_WITH_HEADER           =
    * EXCEPTIONS
    *   NO_POSITION_FOUND             = 1
    *   WRONG_ACCESS_TO_ARCHIVE       = 2
    *   OTHERS                        = 3
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT ICDSHW.
        IF ICDSHW-TABKEY+3(10) = '0000001784'
           AND ICDSHW-TABKEY+13(6) = '000001'.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    Vasanth

  • How to get the Change Log Table name of the ODS from the system table

    Hi,
    I have a list of ODSs in the system and I am interested in finding the corresponding Change Log Table and the number of records in that table.
    Can any one please tell me the name of the system table where this information is stored.
    I dont want to get in this information manully (from the Contents tab of the ODS maintenane).
    Regards,
    Harikiran Gunnala

    Hi
    Go to SE16
    Give the table name as "RSTSODS".
    For User application field give CHANGELOG as input
    and execute. You will get all the list of Changelog tables Along with below mentioned data
    PSA
    Version
    To
    Valid from
    Object Status
    Technical ODS name
    Program Name
    Maint  Program
    Object Name
    Last changed by
    UTC Time Stamp in Short Form
    Partition number
    Regards
    Raj

  • Last Changed On field in User Maintenance

    Is there any possibility to delete last record in Last Changed On field in SU02 transaction?
    Where is (in what database table) this record stored?
    Firstly I checked USH2-4-10-12 tables but with no luck, then I discovered that recent changes can be seen via Change Documents (Information -> Change Documents for Users). There I can see chenges but cannot delete them.
    Then I discovered RSCDOK99 report that allowed their deletion but even when last record is deleted (from CDHDR) the value in maintenance window doesn't change.
    What is the trick? Can you suggest the db table that stores this record?

    Why do you want to Change / Delete history data?
    - Abhinab

  • It's possible to audit what was changed in tables ?

    Hi,
    I need to audit what was changed in some tables in my ECC 5.0 sytem.
    It's possible ?
    I know Tcode SM19 and SM20 has some audit options, but i didn't find anything about what was changed in tables.
    Thanks.

    Hi ,
    There are few ways by which u can trace the Changes made by User.
    1. Goto Tcode  SE03
    2. Double click on Search for objects in Requests/Tasks
    3. Enter the table/view name you want to find the changes in.
    4. Execute.
    In this case, you will find all the change request/tasks that were used to make modifications in the table. Provided, you have settings to record all the chanes made in your SAP system in change requests.
    Go to SE11---> Select Display  mode
    Go to Utilities Tab---->Version--> version Management
    check out the last change in the transport request.
    Otherwise Checkout  for the attributes of the table in SE11 transaction.
    Thanks
    Ramakrishna.

  • Objects last change and history of task/method usage

    Dear all,
    I'd like to find out the last modifcation date and also the user who did it. Do you know if there is a possibility to display the user and also the date of the last change within UCWB for instance for task or method change?
    The task/method settings in SEM-BCS are time dependent: Do you have any idea if it's possible to see the time frame in which a method is in use?
    Example:
    I've assined method M1 to task A in period 01/2009. Since 01/2010 method M1 is not any longer in use and was substituted by method M2.
    Is there any report, transaction, table or option to check this constellation? At the moment, I've always to change the parameters in order to find out differences, but this is not very comfortable.
    I thought that if I change a task for a period that then this change will become effective for all following periods. But this is not the case. Is this system behaviour correct? For instance, customize a task in period 01/2009 and afterwards the same task in period 01/2008. Settings in period 01/2009 remain the same.
    Thanks in advance for your help!
    Best Regards,
    Daniel
    Edited by: Daniel Lampe on Aug 26, 2010 4:42 PM

    Hi Daniel,
    Is there any report, transaction, table or option to check this constellation?
    - none that I'm aware of.
    I thought that if I change a task for a period that then this change will become effective for all following periods. But this is not the case. Is this system behaviour correct? For instance, customize a task in period 01/2009 and afterwards the same task in period 01/2008. Settings in period 01/2009 remain the same.
    - it's the real system behaviour. When you do everything consequently (by time) - everything is ok. But, if you change something in the past periods and do not repost all entries afterwards- expect the trouble. Though, even reposting may not correct the situation - because of the SAP's time dependency treatment.

  • Function Module for updating Username( last changed by field)-

    Hi,
    Do we have any standard RFC function modules/BAPI available for updating a field in R/3 ( for eg:"last changed by field" of an item of a notification(plant maintenance).
    As the FM is an RFC FM, it always updates this field with the RFC user name.My requirement is to update this field  by a value(user name) which is either keyed in in the FM or an SAP login name.
    This requirement is for a scenario in the mobile application as I need to update the notification item details by the user(mobile user- the mobile user name is available in R/3 also.) who is updating the notification item in the mobile.When synchronisation is done ,the filed gets updated by the RFC username which is used to exceute the BAPI wrapper..
    Do we have an option to change the user name?
    Regards,
    Muralikrishna T

    Hi
    try these.
    READ_TEXT_INLINE-Like READ_TEXT. In addition, it passes the first few text lines to a second lines table.
    EDIT_TEXT_INLINE-----Merges the inline lines with the other text lines and calls the text editor.
    Thanks,
    usha

  • Update Last Changed Date when attaching a Document to Opportunity/Activity

    Hi my CRM peers,
    we have the requirement to update the last changed date of the one order object (Activity, Lead, Opportunity) when a user attaches a document to the object. Has anyone solved this requirement?
    Best regards
    Gregor

    Hi Stephen,
    what do you think about using the SEARCH_DOCUMENTS method of CL_CRM_DOCUMENTS to get the documents uploaded during the last day. I fill the table IT_QUERY_PROP is filled to search for the Documents Created starting yesterday:
    Query:
    IT_QUERY_PROP[1]
      PROP_NAME      CREATED_AT
      SIGN           I
      OPTION         BT
      LOW            20100217000000
      HIGH           99991231235959
    And I get this result:
    LT_SRES[1]
      OBJTYPEP       P
      CLASSP         CRM_P_ORD
      OBJIDP         DF1C76C7D7D02BF1ABA8005056857C4E
      OBJTYPEL       L
      CLASSL         CRM_L_ORD
      OBJIDL         DF1C76C7D7D02AF1ABA8005056857C4E
      RANKV          05000
      DOCREFER       0000000001
    When I now use the WHERE_USED method I can find the Business Object where this document is attached to by filling the
    IS_IO parameter:
    IS_IO
      OBJTYPE                        P
      CLASS                          CRM_P_ORD
      OBJID                          DF1C76C7D7D02BF1ABA8005056857C4E
    Now my follow up question is: How can I update the last changed date of the document without changing any data?
    Best regards
    Gregor

  • Who last changed a data source

    Hello all,
    Could you please tell me how can I find out who last changed a data source in a R/3 system.
    Thank you
    Ramona

    Hi,
    in your R/3 customizing client, execute RSA2 with you DSource; you'll see the last changed by and when....
    or
    table ROOSOURCE fields TSTPNM, TSTPDAT, TSTPTIM...
    hope this helps...
    Olivier.

  • How to find obsoleted tablespace? (scn or time of last change or access)

    Hi,
    there are many tablespaces in the database which are probably not yet used by applications...
    Please, how do I find which of these can be dropped? That means, how to find last update time or scn of last change or access (last used select for that tablespace)?
    Many thanks in advance in any info how to get forward.
    Pavol

    user10858565 wrote:
    Hi,
    there are many tablespaces in the database which are probably not yet used by applications...
    Please, how do I find which of these can be dropped? That means, how to find last update time or scn of last change or access (last used select for that tablespace)?
    Many thanks in advance in any info how to get forward.
    PavolI suppose you meant tables (in that tablespace)
    There is no direct way where you can find this information if auditing is not enabled.
    To check if insert/update/delete has been performed on table you can use function ora_rowscn to check when it was done last.
    Regards
    Anurag

  • How to fetch last changed date for Header in me22n?

    Hi Experts,
    I need to create a report for PO, where I have created one screen tab in Header level(customer data), therefore I need to fetch last changed date for header , I must mention that I do not want last changed date for item level, only for header last changed date is required.
    Kindly assist me on this.
    Thanx
    Shireen

    Read table CDHDR (object "EINKBELEG") and CDPOS (look for table name EKKO), keep the last CDHDR record with "EKKO" data actually changed.
    Regards,
    Raymond

  • Get last changed date by Program ID/Object type/Object name of a task

    Hi to all.
    I'm looking for a way to get last changed date of an object by task number(CR). Any SAP function or utility someone has??
    For example if I have a task with the object list:
    R3TR PROG  ZSD_ORD_COND_P
    R3TR TABL    ZCNDSLCTN
    LIMU  REPS  ZSD_ORD_COND_CLS
    R3TR TRAN   ZZDIS
    R3TR VIEW   ZSD_VBAK_KONV
    I need to get last changed date for each object.
    Thanks,
    Yuval Kaduri, Cellcom, Israel.
    Edited by: yuval kaduri on Mar 2, 2008 2:59 PM

    Hi Venu, thanks for the input.
    In the table I don't have all changes made in objects that the CR is not released. I need to know all changed date of objects even if the CR is not released. There are  few tables containing the date and time object last changed for the deferent types but I'm looking for a function or some utility someone wrote that gets the CR line info as - PgmID/Obj/Object name - and gives back last changed date and time.
    Thanks,
    Yuval Kaduri, Cellcom, Israel.

Maybe you are looking for

  • How do I create a hyperlink to a specific section of a flash website?

    Ok, I have no experience coding in flash, I just want to create links to specific parts of a flash website (website that were created by other people, not that I am building). In other words, I just want to create the hyperlink that will open a certa

  • Cloning EBS R12.2.4

    Hi all, I am cloning our EBS R12.2.4 source CRP to UAT. db location    : /home/oracrp/CRP   to  /home/orauat/UAT apps location: /home/applcrp/CRP  to /home/appluat/UAT The db part is just easy and very fast to complete. But the app part take so long

  • How to split a string using IndexOf?

    How would you split a string using indexOf and not using the .split method? Any help is appreciated :D Message was edited by: billiejoe

  • Could someone explain me about ADF Security in UI Shell?

    Hello. I have my application main page implemented with a dynamic region and it's working fine. The application is secured using ADF Security and it is fine too. All the bounded taskflows are imported as ADF Libs. They have their permissions in jazn-

  • Enterprise License Manager login issue...

    Hey guys, Trying to log into Enterprise Licensing Manager (on a Be6K v9) and am getting the error Invalid Username or Password. Please try again.  I am using the admin login that I use to log into Cisco Unified CM Administration. Would I log into the