Capturing Log changes made to Z Table

Hi All,   
      I have to detect changes for a Z-field in a Z-table. I’m going to use CDHDR table and CDPOS table to check if any changes are made to field. I enabled log data changes in technical settings of Z-table and also change document for the Z-field. I created an object class (Z….) and generated update program and function modules. It generated a FM “ZMMARC_WRITE_DOCUMENT”. I think this will write the change document records to CDHDR. I checked in SCU3, there were activation logs and also checked the entry in TCDOB.it was ok. But when this field is being changed by a custom transaction (YM11, YM12) this entry (change records) does not go into CDHDR table. So I’m not able to detect any change records for the particular field ( and the object class).
Am I missing any step here? Because, I read somewhere that the function module “ZMMARC_WRITE_DOCUMENT” has to be called in all the programs that update the Z-table. Can you please provide any help on this? Any help on this would be appreciated.
Thanks.
Regards
s.anilkumar

Here are the errors I'm getting.
CONNECT SCOTT/TIGER
Connected.
create or replace trigger audit_tablea
after insert or update or delete on tablea
for each row
begin
insert into tableb values(
:new.field1,
:new.field2,
:old.field1,
:old.field2)
end;
Warning: Trigger created with compilation errors.
insert into tablea values('hello','world')
ERROR at line 1:
ORA-04098: trigger 'SCOTT.AUDIT_TABLEA' is invalid and failed re-validation

Similar Messages

  • How can we log changes made in RSA1 in BW/BI

    How can we log changes made in RSA1 in BW/BI ?
    Please advise.
    Regards,
    Archana

    Hi Arun,
    Thanks for your reply.
    Basically I wanted to get the log for a particular user when executing RSA1 tcode (the user has change access).
    Do we have any table which records the RSA1 changes.
    Thanks.
    Regards,
    Archana

  • How to capture multiple change in webDynPro(ABAP) Table

    Hi ,
    I would like to know 'How to Capture Multiple Change' of a node . For example , a table is bound to a node and I select Multiple entries in the table . Then, how to capture Multiple entries of the table  . Is there any method ?
    There is a method 'GET_CONTEXT_CHANGE_LOG' of 'if_wd_context' which captures single change of the node .
    Regards
    Sid

    Post this in Webdynpro forum at
    Web Dynpro Java
    have you seen these tutorials.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783
    Regards
    Raja

  • How to access changes made in a table?

    Hi Brothers,
    I have a table showing information that was read from the backend. The user is able to make changes to cells in the table.  access the now, I need to access the changes made by the user for processing.Unfortunately, I do not know how to that...
    Do I have to create an Object containing the changed table? Do the chnages take effect in the actual Context node so that I just have to use this?
    Thanks, Johannes

    I solved it completely,
    here the coding for version 7.1:
    public void onActionValidateChangesCustomer(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionValidateChangesCustomer(ServerEvent)
           for( int i=0; i < wdContext.nodeE_Customer().size(); i++ ){
                wdContext.currentI_CustomerElement().set__Bic__Epskufuer(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Epskufuer());
                wdContext.currentI_CustomerElement().set__Bic__Rbampisbr(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbampisbr());
                wdContext.currentI_CustomerElement().set__Bic__Rbbrand(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbbrand());
                wdContext.currentI_CustomerElement().set__Bic__Rbcustgrp(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbcustgrp());
                wdContext.currentI_CustomerElement().set__Bic__Rbgroup(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbgroup());
                wdContext.currentI_CustomerElement().set__Bic__Rbkunde(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbkunde());
                wdContext.currentI_CustomerElement().set__Bic__Rbprod(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbprod());
                wdContext.currentI_CustomerElement().set__Bic__Rbsubgrp1(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbsubgrp1());
                wdContext.currentI_CustomerElement().set__Bic__Rbsubgrp2(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbsubgrp2());
                wdContext.currentI_CustomerElement().set__Bic__Rbwwrpnkz(wdContext.nodeE_Customer().getE_CustomerElementAt(i).get__Bic__Rbwwrpnkz());
                wdContext.currentI_CustomerElement().setChanged(wdContext.nodeE_Customer().getE_CustomerElementAt(i).getChanged());
                wdContext.currentI_CustomerElement().setDatefrom(wdContext.nodeE_Customer().getE_CustomerElementAt(i).getDatefrom());
                wdContext.currentI_CustomerElement().setObjvers(wdContext.nodeE_Customer().getE_CustomerElementAt(i).getObjvers());
                wdContext.nodeI_Customer().addElement(new __Bic__Mrbkunde());
                wdContext.nodeI_Customer().moveNext();
           // trigger the RFC
           wdThis.wdGetInfoObjectCustController().executeZ_Customer_Front_Controller();
        //@@end
    Thanks, Johannes

  • Changes made in the table not visible in the AM

    Hi,
    I have few validation that i need to conduct on the data that is modified in the table. The problem is that when i create a new VO instance in the AM method it does not show me the updated VO. Instead it shows me the VO before update.
    However, if i use gettransaction.postchanges, i am able to see the changes in the new VO instance i create. Can you please tell me if that is the right way of doing this or do i need to change some property to make the updated VO visible in the new instances i create.
    Thanks,
    Ankit

    Ankit,
    Just to extend to what Ankur said, any VO instance stores cache in JVM when u execute query for the first time....., now when when do some changes... these are there in cache, till u do transaction.commit(). After that they are gone in DB.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to remove uncommitted changes made in a table through JAG?

    Hi,
    Is there any possibility to remove the uncommitted row from a Table through JAG.
    For Example,
    If I Click " AddRow " button in a Table and enters value for all the Attributes in that particular Row and if I click the " Cancel " Button, that newly added uncommitted row should be removed by refreshing the Particular page.
    Simillarly , if i update a column in a Row and press cancel button , the uncommitted value of that column should be rollBack to its commited value(ie., to its previous value).
    Thanks,

    You can generate a Delete? column in the table by setting the Group property Multi-Row Delete Allowed.
    Other than that, you can generate it through JAG by using custom generator templates, like described in section 4.7 of the JHeadstart Developer's Guide. You can for example drag and drop the Rollback operation of the Application Module as a button and call it a Cancel button.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Using a change document for Z table maintenance generatro to log changes

    Hi Forum,
    I have created a a change document for one of the Z tables now I want to use it in the table maintenance generator of this table so that any changes made to this table using maintenance generator are logged in table CDHDR and CDPOS.
    I am using the event 02     After saving the data in the database
    and have created a new FORM..ENDFORM for this event and it is working fine till here.
    But I am unable to find any table or structure where the information of the action performed in maintenance generator is kept for eg. what action was performed like add, delete or change and on how many records and contents of those records.
    I can update the tables CDHDR and CDPOS only if I have the above information.
    Please guide me as to where can I find all this information within the maintenenace generator program?
    Thank you,
    Anubhav

    Hello Anubhav,
    Are you calling the change document function module in your save event ? The function module needs to be first created using SCDO for your Z table, select the fields on which you want to track the changes.  Auto generate the programs for this change object. Once the FM is generated, you will have to call this FM in your SM30 event.
    The change document tracking also needs to be enabled at the data element level..
    Regards,
    Jay

  • How to Track the changes made to the custom table field value

    I want to track the changes made to the custom table field value in table maintenance generator.please help me it is very urgent
    Thanks & Regards,
    Kranti

    Hi Satya,
    These are the steps you've to do.
    1. Enable the change document flag in the data element level for the fields of the tables you want to monitor.
    2. Go to transaction SCDO. Create a new change object, and add your table to this object. After generation, you'll get a function module.
    3. Call this function module in the table maintainence generator screen, after the data is saved to the database table. This function module automaticallly writes the changes, with the old and new values, and the fields that were changed to the tables CDHDR and CDPOS.
    4. You can keep track of the changes made to the table by monitoring these tables.
    Regards
    Anil Madhavan

  • Changes made in SO needs to be sent back to customer in ORDRSP

    Dear Experts,
               As per the client req, we configured the IDOC message type "ORDRSP" for customer purchase order confirmation. Also when ever any changes made in the sales order then, automatically another ORDRSP will get populated and sent to customer.
           But issue is, now customer wants to know which data got modified. Meaning, Quantity, price, schdule date got modified then, accourdingly customer wants to know the status that which fields got modified.
             Example if Quantity got modified then, customer wants the status as (e.g. ACTION) like "Item accepted-Qty modified". 
                if Schedule Date got modified then, customer wants the status as (e.g. ACTION) like "Item accepted-Date modified"
    But we were not able to sure how to achieve this requirement by capturing the changes made in the sales order since its very difficult to capture the changes happened in sales order.
    Please give your valuable feedback on this issue.
    Warm Regards,
         Nag

    Hi,
    first, standard IDoc does not support what your customer requires. The report RVSCD100  gives you log of changes for SO. You can try to use it for your requirement. At time of change you would check log and figure out what was changed. You can define a new custom message or extend standard IDoc with additional info.
    Cheers

  • Can we capture changes made to the objects other than tables using streams

    Hello All,
    I have setup a schema level streams replication using local capture process. I can capture all the DML changes on tables but have some issues capturing DDL. Even though streams are used for sharing data at different or within a database I was wondering if we can replicate the changes made to the objects like views, procedures, functions and triggers at the source database. I am not able to replicate the changes made to the views in my setup.
    Also, when I do a "select source_database,source_object_type,instantiation_scn from dba_apply_instantiated_objects" under the column 'object_type' I just see the TABLE in all the rows selected.
    Thanks,
    Sunny boy

    Hello
    This could be a problem with your rules configured with capture,propagation or apply. Or might be a problem with your instantiation.
    You can replicate Functions, Views, Procedure, Triggers etc using Streams Schema level replication or by configuring the rules.
    Please note that the objects like Functions, Views, Procedure, Triggers etc will not appear in the DBA_APPLY_INSTANTIATED_OBJECTS view. The reason is because you do a schema level instantiation only the INSTANTIATION_SCN in DBA_APPLY_INSTANTIATED_SCHEMAS is accounted for these objects. At the same time tables would get recursively instantiated and you would see an entry in DBA_APPLY_INSTANTIATED_OBJECTS.
    It works fine for me. Please see the below from my database (database is 10.2.0.3):
    on capture site_
    SQL> connect strmadmin/strmadmin
    Connected.
    SQL> select capture_name,rule_set_name,status from dba_capture;
    CAPTURE_NAME RULE_SET_NAME STATUS
    STREAMS_CAPTURE RULESET$_33 ENABLED
    SQL> select rule_name from dba_rule_set_rules where rule_set_name='RULESET$_33';
    RULE_NAME
    TEST41
    TEST40
    SQL> set long 100000
    SQL> select rule_condition from dba_rules where rule_name='TEST41';
    RULE_CONDITION
    ((:ddl.get_object_owner() = 'TEST' or :ddl.get_base_table_owner() = 'TEST') and
    :ddl.is_null_tag() = 'Y' and :ddl.get_source_database_name() = 'SOURCE.WORLD')
    SQL> select rule_condition from dba_rules where rule_name='TEST40';
    RULE_CONDITION
    ((:dml.get_object_owner() = 'TEST') and :dml.is_null_tag() = 'Y' and :dml.get_so
    urce_database_name() = 'SOURCE.WORLD')
    SQL> select * from global_name;
    GLOBAL_NAME
    SOURCE.WORLD
    SQL> conn test/test
    Connected.
    SQL> select object_name,object_type,status from user_objects;
    OBJECT_NAME OBJECT_TYPE STATUS
    TEST_NEW_TABLE TABLE VALID
    TEST_VIEW VIEW VALID
    PRC1 PROCEDURE VALID
    TRG1 TRIGGER VALID
    FUN1 FUNCTION VALID
    5 rows selected.
    on apply site_
    SQL> connect strmadmin/strmadmin
    Connected.
    SQL> col SOURCE_DATABASE for a22
    SQL> select source_database,source_object_owner,source_object_name,source_object_type,instantiation_scn
    2 from dba_apply_instantiated_objects;
    SOURCE_DATABASE SOURCE_OBJ SOURCE_OBJECT_NAME SOURCE_OBJE INSTANTIATION_SCN
    SOURCE.WORLD TEST TEST_NEW_TABLE TABLE 9886497863438
    SQL> select SOURCE_DATABASE,SOURCE_SCHEMA,INSTANTIATION_SCN from
    2 dba_apply_instantiated_schemas;
    SOURCE_DATABASE SOURCE_SCHEMA INSTANTIATION_SCN
    SOURCE.WORLD TEST 9886497863438
    SQL> select * from global_name;
    GLOBAL_NAME
    TARGET.WORLD
    SQL> conn test/test
    Connected.
    SQL> select object_name,object_type,status from user_objects;
    OBJECT_NAME OBJECT_TYPE STATUS
    TEST_VIEW VIEW VALID
    PRC1 PROCEDURE VALID
    TRG1 TRIGGER VALID
    FUN1 FUNCTION VALID
    TEST_NEW_TABLE TABLE VALID
    5 rows selected.
    These Functions, Views, Procedure, Trigger are created on the source and got replicated automatically to the target site TARGET.WORLD. And note that none of these objects are appearing in DBA_APPLY_INSTANTIATED_OBJECTS view.
    I have used the above given rules for capture. For propagation I dont have a ruleset itself and for apply I have same rules as of the capture rules.
    Please verify your environment and let me know if you need further help.
    Thanks,
    Rijesh

  • How to find out the changes made to the customized table entries

    Hi Team
    i want to know the changes made to the customized table. i have a 'Z' table in my production system, in that table i would like to know whether any table entry is deleted or not. if at all there is any deletion happened, i want to know who had done it.
    So i request you to please let me know the procedure for the same.
    Thanks
    Raj

    Hi Nagaraju,
                       Go to Table Maintenance (SM30)- Display mode-- Utilities-- change Logs. Give the Date range. before giving the date range click on display status , this will show you If the display is active or not. Kindly please let me know If you need any more information on this.
    Regards
    Ram Pedarla

  • Tracking the changes made to the custom table  field value

    Hi all,
           can we track the changes made to the custom table field values. if yes..plz specify how it can be done.
    Example: if i changed the  value of field  'NAME' of table 'YYHCUSTOMER'. i would like to know the old value and the new value of the field. For this, I set the flag 'LOG DATA CHANGES' in the technical settings of the table 'YYHCUSTOMER'.

    -> try TA: SCU3
    regards Andreas

  • ! Materialized View log VS Trigger to trace table changes !

    Hi All
    I have to trace changes on couple tables and only those changes then send to other system.
    What do you think is better solution to create a Status table and update it via trigger.
    I saw that MV log can be used for such purpose, but I am not able to create a MV logging on more than one table.
    Or is there any other more effective way to trace changes on table?
    Thanks a lot
    Martin

    It sounds like you should be looking at something like Change Data Capture (CDC). You could also create materialized view logs on each table where you wanted to track changes, create appropriate materialized views on the remote database, and consume the data there. It really depends on what exactly you want to do with the changes you're tracking.
    Justin

  • How to save change log for a particular standard table in ZTABLE

    Hi Experts,
    Wouldlike to make one ztable in R3 which should  record changes made( say particualr field)  in standard SAP DB table ( say TXPDAT). I  think that there has to beway to do it.
    Could you please share the way to achieve it?
    Will appreciate a quick reply.
    Thank you
    Best Regards

    Hi,
    or else do like this...
    In order to maintain the log changes the main pre reuisite is to checkmark the checkbox in dataelement of table filed.
    To do this...
    goto transaction SE11>enter ur table name>cleck on fields tab>cleick on dataelement->click on Furthercharacterstics tab-->select the checkbox'Change Document'.
    If u dont select dis the u cannot see the log entry of the particuylar field..Do like this for each dataelement for each table field...selecting all the fields is not mandatory..u can choose the table field u want to see the log report..
    Once u done with dat...
    Goto SCDO transaction> click on create>give a name change doc startwith Z or Y only>Follow the prodedure and in-->name of table field>enter u r TABLE NAME->click on individual field checkbox.--->insertentries..
    Once u done with dis..
    Goto SE16->enter CHDIR or CDPOS->press ENTER->enter u r object id>F8
    U can see the new and old value of a table entry.....

  • Log for changes in the SAP table

    Hello All,
    I have a SAP table in which we want to log all the changes being made by the number of users like modifying some record or adding a new record.
    Now What I have done is in the SE11 under technical settings I have checked the checkbox which is "Log data changes", Needless to say I have the developer access key to the system.
    Now I want to test whether changes being made by me in the SAP table are logged somewhere or not I want to know where can we see the changes being logged made by me.
    Is there a tcode to see the changes being made in the table or a SAP table exists for this.
    Thanks,
    Mark

    Hi,
    BAL_OBJECT_SELECT --> To get the LOG for a object
    You can use below Tables/Structures
    DDPRT -->  Structure of ABAP/4 Dictionary logs
    DDPRTXT
    Regards
    Sudheer

Maybe you are looking for