TCODE-TABLE relationship(only insert/modify/update/delete)

Hi,
I would like to know whether a particular transaction(tcode) is updating/modifying which underlying tables. Is it possible?
Here i would be intesrested only in those tables which are getting insert/modify/update/delete states.
I have found one table D010TAB, but this includes all the tables related to a program, it wont give tables which are getting(INSERT/MODIFY/UPDATE/DELETE) states.
Regards
Munish Garg

HI,
Thanks for responses, as it was low priority earlier so i checked your messages now.
I read the support given by you, about activating SQL TRACE, i cannot do that. About "internal Program environment' link in 'Utilities' tab doesn't give me correct info. I have checked for MM01 and VA01.
I have to make a generic program which can fetch this information for any transaction so every time i cannot run each and every transaction. I have recording info of transaction, that is what fields user has touched. But as you all know in recording, not necessarily all the fields are from table, for e.g. for material master(MM01/MM02/MM03), matnr refers to RMMG1-MATNR not mara-matnr. So i dont know how can i fetch the info of tables which includes MARA. I tried doing through data element level but it gives me too many tables because MATNR as a data elements refers to too may tables.
I hope you are clear about my requirement now.
Regards
Munish Garg

Similar Messages

  • How can I insert, modify and delete entries on my table control?

    Hi,
    I already have build a table control. Now I want to make manipulations on it. Therefore I have created 3 buttons, insert, modify and delete. But how can I get actions on table control.
    This is my code for the internal table:
    BEGIN OF its OCCURS 0,
    mark TYPE C VALUE ' ',
    artikel_nr TYPE ZARTIKEL-ARTIKEL_NR,
    artikel_typ TYPE ZARTIKEL-TYPE,
    bezeichnung TYPE ZARTIKEL-BEZEICHNUNG,
    preis TYPE ZARTIKEL-PREIS,
    mwst TYPE ZARTIKEL-MWST,
    END OF its.
    and this is the code which i wanted to  delete a row in my table control:
    WHEN 'DELETE'.
    LOOP AT its WHERE mark EQ 'X'.
    DELETE its WHERE mark = 'X'.
    MOVE its TO ZARTIKEL.
    ENDLOOP.
    ENDCASE.
    ENDMODULE:
    and my PBO and PAI:
    PROCESS BEFORE OUTPUT.
    LOOP AT its INTO ZARTIKEL WITH CONTROL ARTIKEL.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE EXIT.
    LOOP AT its.
    MODULE V1.
    ENDLOOP.
    MODULE user_command_1060.
    But if I now open my table control and mark the line that I wanted to delete, nothing happens, not on my internal table and the data even not deleted on my table ZARTIKEL. Have you an idea what I did wrong??

    Hi,
    In the attributes of table control take the SELCOL as wa_zekpo-flag
    And in the internal table and work area add a field as flag(1) TYPE c
    Refer:
    At screen logic:-
    PROCESS BEFORE OUTPUT.
      MODULE status_8002.
      LOOP WITH CONTROL po_tab.
        MODULE pass_data.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_8002.
      LOOP WITH CONTROL po_tab.
        MODULE modify_data.
      ENDLOOP.
      MODULE function.
    In PBO,
    MODULE status_8002 OUTPUT.
      SET PF-STATUS 'ZTG_SELTB'.
      DATA : line_count TYPE i.
      DESCRIBE TABLE it_ekpo
      LINES line_count.
      po_tab-lines = line_count + 5.
    ENDMODULE.                 " STATUS_8002  OUTPUT
    *&      Module  PASS_DATA  OUTPUT
    MODULE pass_data OUTPUT.
      READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
    ENDMODULE.                 " PASS_DATA  OUTPUT
    In PAI,
    *&      Module  USER_COMMAND_8002  INPUT
    MODULE USER_COMMAND_8002 INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'BACK'.
          LEAVE TO SCREEN 8001.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_8002  INPUT
    *&      Module  MODIFY_DATA  INPUT
    MODULE DISPLAY_DATA INPUT.
      MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
    ENDMODULE.                 " MODIFY_DATA  INPUT
    *&      Module  FUNCTION  INPUT
    MODULE FUNCTION INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'SELECT'. "<--select all records
          LOOP AT IT_EKPO INTO WA_EKPO.
            WA_EKPO-FLAG = 'X'.
            MODIFY IT_EKPO FROM WA_EKPO.
          ENDLOOP.
        WHEN 'DESEL'. "<--deselect all records
          LOOP AT IT_EKPO INTO WA_EKPO.
            WA_EKPO-FLAG = ' '.
            MODIFY IT_EKPO FROM WA_EKPO.
          ENDLOOP.
        WHEN 'DELETE'.
          DELETE FROM it_ekpo WHERE flag = 'X'.
      ENDCASE.
    ENDMODULE.                 " FUNCTION  INPUT
    Regards,
    Tarun

  • Spry with DW insert, modify and delete behaviors

    I posted this question before and didn't get a response. I'm
    wondering if there is any documentation available for using Spry
    with DW insert, modify and delete behaviors? I'd like to be able to
    perform these functions without having to go from list to master to
    detail page as in traditional ASP etc. According to Alex July at
    Linecraft this is one of "many hidden features" in Spry.
    http://www.linecraft.com/b2/index.php?p=28&c=1

    "LAGooner10" <[email protected]> wrote in
    message
    news:fk71ad$5c7$[email protected]..
    >I posted this question before and didn't get a response.
    I'm wondering if
    > there is any documentation available for using Spry with
    DW insert, modify
    > and
    > delete behaviors? I'd like to be able to perform these
    functions without
    > having to go from list to master to detail page as in
    traditional ASP etc.
    Here you can find an article that covers data update:
    http://www.adobe.com/devnet/dreamweaver/articles/edit_data_in_ajax.html
    The server-side code is CFML, but the concept is the same.
    A more complete demo, with search, insert, update and delete
    is available
    here (code only, no article):
    http://www.massimocorner.com/spry/dynamic_spry.zip
    Massimo Foti, web-programmer for hire
    Tools for ColdFusion and Dreamweaver developers:
    http://www.massimocorner.com

  • When I drag an image over a clip to try and get picture in picture the options it gives me are only insert replace and delete not the picture in picture option how do i get the picture in picture option when i drag a picture over a clip

    When I drag an image over a clip to try and get picture in picture the options it gives me are only insert replace and delete not the picture in picture option how do i get the picture in picture option when i drag a picture over a clip?

    Go to this. http://help.apple.com/imovie/mac/10.0/#mova1aaa682b . It is the link to show you how to use picture in picture. I had this same problem not too long ago.

  • Unable to insert the record to table using pre-insert & pre-update trigger

    Hi All,
    I have tried to insert and update the backend table using the pre-update and pre-insert triggers. But its not working for me. Please find below the code which i have used in the triggers.
    Pre-insert trigger:
    DECLARE
    v_cust_num_cnt NUMBER;
    BEGIN
              SELECT      COUNT(customer_number)
              INTO      v_cust_num_cnt
              FROM cmw_bc_mobile_number
              WHERE substr(customer_number,1,15)=substr(:BLOCKNAME.CUSTOMER_NUMBER,1,15);
              IF      v_cust_num_cnt = 0 THEN
                        INSERT INTO cmw_bc_mobile_number (CUSTOMER_NUMBER
                                                                                                   ,MOBILE_NUMBER
    ,CREATION_DATE
    VALUES
    (substr(:BLOCKNAME.CUSTOMER_NUMBER,1,15)
    ,:BLOCKNAME.MOBILE_NUMBER
    ,SYSDATE
    COMMIT;                                                                                                    
    END IF;          
    END;
    PRE_UPDATE TRIGGER:
    BEGIN
              IF :SYSTEM.RECORD_STATUS = 'CHANGED' THEN
              UPDATE apps.cmw_bc_mobile_number
         SET mobile_number = :BLOCKNAME.MOBILE_NUMBER,
         creation_date = SYSDATE
              WHERE customer_number=substr(:BLOCKNAME.CUSTOMER_NUMBER,1,15);
              COMMIT;
         END IF;
    EXCEPTION
              WHEN OTHERS THEN
                   NULL;     
    END;
    Please let someone assist in gettting it resolved.
    Regards,
    Raj.

    Just use MESSAGE (we don't know what fnd_message is, that is some custom code):
    message('v_cust_num_cnt='||v_cust_num_cnt);
    IF v_cust_num_cnt = 0 THEN
      message('Now inserting...');
      INSERT INTO cmw_bc_mobile_number (CUSTOMER_NUMBER... 
    else
      message('Nothing to insert');
    end if;

  • Parameters for Table containing only inserts

    I'm on 11.2 DB and need to create an audit table that will be populated by DB triggers of other tables (after Insert,Update and Delete). The triggers will only ever be inserting data into the audit table. I have read that for insert only tables, you should define the 'pctfree' as 0. Is this correct? Do I need to set any other params (like pct_used) for tables only ever being inserted into?
    Thanks

    >
    I'm on 11.2 DB and need to create an audit table that will be populated by DB triggers of other tables (after Insert,Update and Delete). The triggers will only ever be inserting data into the audit table. I have read that for insert only tables, you should define the 'pctfree' as 0. Is this correct?
    >
    Yes - there is no need to reserver space for future updates that might expand the row if there will be no future updates.
    >
    The PCTFREE Parameter
    The PCTFREE parameter sets the minimum percentage of a data block to be reserved as free space for possible updates to rows that already exist in that block.
    >
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/logical.htm#i19164
    >
    Do I need to set any other params (like pct_used) for tables only ever being inserted into?
    >
    No - you will not be deleting rows.
    >
    The PCTUSED Parameter
    The PCTUSED parameter sets the minimum percentage of a block that can be used for row data plus overhead before new rows are added to the block. After a data block is filled to the limit determined by PCTFREE, Oracle Database considers the block unavailable for the insertion of new rows until the percentage of that block falls beneath the parameter PCTUSED. Until this value is achieved, Oracle Database uses the free space of the data block only for updates to rows already contained in the data block.

  • I want a user to only be able to update/delete the rows they inserted

    hi guys,
    I have a table 2 users are inserting into. They can also update/delete the rows in the table. However, I do not want them to be able to update/delete the others users row. I only want them to have update/delete at the row level.
    how can this be achieved?
    thanks

    Another idea if you really have just two (or a fixed set of N) users.
    Does your table have a generic primary key (PK)?
    You could use two (N) sequences having two (N) distinct sets of numbers as e.g user a is using sequences less than 1000000000, the other one values larger or equal to 1000000000.
    create sequence <user_a>.pk_seq start with 0;
    create sequence <user_b>.pk_seq start with 1000000000;An insert trigger uses <user_a>.pk_seq or <user_b>.pk_seq for generating the PK depending upon the current user for new records.
    An update trigger allows updates only, if the PK of the record to be updated is in the range of sequences belonging to the current user.

  • Insert/Update/Delete in forms6i using Objects table in Oracle9i server

    I am using Oracle 9i server and dev 6i (forms6i).
    i have a form based on Object tables (including REF's items). when i try to insert update, delete the reocrd in the form, it gives error.
    Insert/Update/Delete failed because of OCI_22132: hexadecimal string does not corresopond to a valid REF.
    when i remove REFs items from form (not from database) then it does all functions (insert,update,delete,query).
    Actually i haved used this form with Oracle 8i and it did all functions(insert,update,delete,query). i am using the same tables and types definations in Oracle 9i but it is not working.
    Note: Insert, Update, Delete, or Query is not being done through forms when using REFs items. Others tools like sql*plus are performing the same actions very well.
    Please help.
    I will be thankful to you.
    M. Faisal.

    user563114,
    As James (padders) told you in his reply to a similar question that you posted (Typed tables is treated in the same way as a relational table?) in the Typed tables is treated in the same way as a relational table? forum, the only way you can tell for sure is to try it out both ways, measure and compare the times.
    Of-course, there are many factors that effect the time, apart from whether you use a nested table or a regular table.
    Good Luck,
    Avi.

  • How to find out who made inserts/updates/deletes made to a SQL Table

    I want to know WHO MAKES INSERTS/UPDATES/DELETES TO a particular SQL Table. Bascially I want to AUDIT ANY Edites made to a SQL 2008 TABLE. I need info such as WHO AMDE THE Updates i.e. the user first/lastname, When update was made, what row was updated etc...How
    can I do that with SQL 2008?

    One way to achieve that would be to use triggers to detect when a change is made to the table, and then insert a record into another table/database detailing what changed and who by.
    You'd need three triggers, one for insert, update and delete respectively, and for each of those you use the "inserted" and "deleted" tables (system tables maintained by SQL) to retrieve what has been done. To retrieve who made the change you can query IDENT_CURRENT
    which returns the last identity value for a specific table.
    See :
    Triggers -
    http://msdn.microsoft.com/en-gb/library/ms189799(v=sql.100).aspx
    Inserted & deleted tables -
    http://technet.microsoft.com/en-us/library/ms191300(v=sql.100).aspx
    INDENT_CURRENT -
    http://technet.microsoft.com/en-us/library/ms175098(v=sql.100).aspx
    There may be better / more up to date ways to do this, but I've used this method successfully in the past, albeit a long time ago (on a SQL 2000 box I think!).

  • Using Case statement to insert,update,delete  the tables

    Hi All,
    I have to check the databse ,
    if it is developement then
    insert/update/delete values in tables;
    if it staging then
    insert/update/delete values in tables;
    if it is production then
    insert/update/delete values in tables;
    thers is function available to check the current database
    For doing the about i am trying to write CASE statement like this
    SELECT function,
    case
    when fun = 'developement' then insert into table1 values ('abcd','1234')
    when fun = 'staging' then insert into table1 values ('abcd','1234')
    when fun= 'production' then insert into table1 values ('abcd','1234')
    else null
    from dual
    its throughing me an error
    please help
    Thanks,

    Hi,
    You can use CASE staement any place where an expression is expected.
    For example, in:
    UPDATE  table_a
    SET     col1 = exp1
    ,       col2 = exp2
    WHERE   exp3 = exp4;all the expressions are labled lke expn.
    Note that table_a, col1 and col2 are not expressions: you must hard-code these names, or use dynamic SQL.
    So it's okay to say:
    UPDATE  table_a
    SET     col1 = CASE
                       WHEN  db = 'development'  THEN  0
                       WHEN  db = 'staging'      THEN  1
                   END
    ,       col2 = CASE
                       WHEN  db = 'development'  THEN  NULL
                       WHEN  db = 'staging'      THEN  col2
                   END
    WHERE   db != 'production';In this example:
    in the development database, col1 is set to 0 and col2 is set to NULL
    in the staging database, col1 is set to 1 and col2 is unchanged (that is, set to what it already was)
    in the production database, nothing is changed (the WHERE condition is always FALSE)

  • How to get last insert/update/delet row of a table?

    I hava a table A and table B which is a copy of A. I want to create a trigger to record the changes of A in B. So every time inserting/updating/deleting A I record the row inserted/updated/deleted in B, But I can't find a effiencial way to get the latest row changed.
    So is there any sys_var in oracle table like cur_rowid or something to record the latest inserted/updated/deleted in a table? I don't want to check a index or a table to get the max_seq_id again.

    user11228816 wrote:
    I hava a table A and table B which is a copy of A. I want to create a trigger to record the changes of A in B. So every time inserting/updating/deleting A I record the row inserted/updated/deleted in B, But I can't find a effiencial way to get the latest row changed.
    So is there any sys_var in oracle table like cur_rowid or something to record the latest inserted/updated/deleted in a table? I don't want to check a index or a table to get the max_seq_id again.Sounds like an ugly requirement, any reason you're not going for materialized views or advanced replication here?

  • Inserting and updating only if there is no locks

    Is there a way to insert or update or merge data in table only if there is no locks i.e. if another process is executing update into table with a key = 1 and I'm trying to perform update for the same row then nothing happens and if no one is locking row then update is performed.
    In sql server I can do it this way:
    update my_table with (NOWAIT) set row1 = 1 where key = 1;
    Is there a way to do something similar in oracle?

    LeopoldStoch wrote:
    Is there a way to insert or update or merge data in table only if there is no locks i.e. if another process is executing update into table with a key = 1 and I'm trying to perform update for the same row then nothing happens and if no one is locking row then update is performed.
    In sql server I can do it this way:
    update my_table with (NOWAIT) set row1 = 1 where key = 1;
    Is there a way to do something similar in oracle?I think you'd want to do some reading about optimistic and pessimistic locking. Assuming this is any kind of web app (stateless environment), you'd likely want to drop some optimistic locking routine in place to ensure that the row you are trying to update hasn't been changed since your last view of the data.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5771117722373
    When you have 2 sessions attempting to update the same data, Oracle locks the record for you. Session #2's update cannot be applied until session #1 has either committed or rolled back it's transaction against the row being modified. However session 2 will wait until session 1 commits or rolls back ... so you wouldn't "know" the row was being touched unless you did some programming to determine this.
    You also may want to understand how Oracle implements things (it's quite different than the default SQL Server implementation).
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/consist.htm#CNCPT221

  • It's possible ON UPDATE CASCADE in table relationships?

    Hi, how are you?
    Sorry my weak English, I'm brazilian.
    I like create an "ON UPDATE CASCADE" in my table relationship but find only "ON DELETE CASCADE" in Oracle 9i Database Online Documentation.
    I would like your help.
    Thank you.
    Eduardo A. Reche Lopes
    Team T.I.
    www.coodetec.com.br

    Tom Kyte wrote a package for this:
    UPDATE CASCADE PACKAGE
    Generates needed package and triggers to support update cascade in Oracle without removing or infringing on DECLARITIVE RI.
    This package supports:
    - Tables with multi-part primary keys (primary key(a,c,b))
    - Update cascade to many child tables from one parent
    - Self-referencing integrity such as that found in the SCOTT.EMP table (mgr->empno)
    - Is completely application transparent. The application does not know it is happening
    - Versions 7.0 and above of the database.
    - Tuned and optimized to fully avoid full table scans on all tables (complete with utility to show you un-indexed foreign keys in a schema, Cascading an update to un-indexed foreign keys can be bad).

  • Z database table needs to have field creation/update/deletion tracked

    Hi,
    I have a Z database table.
    I have a program that gets data from an excel file and uploads the content to the Z database table.
    I need to track the creation/update/deletion of the records in the Z database table.
    The Z database table can also have records changed/updated/deleted manually thru table maintenance. These changes also need to be tracked.
    How do I do this?
    ~ Eric

    Hi
    For a my z-table (called ZFAGTD01), I created the object for change documents, this is the log after generating it:
    Change documents: Display information about generated sources                                                                               
    Change doc. object Z_PROAGE_PRV                                                                               
    Generation on      23.07.2004 11:51:28                                 
                of     SVIL01                                                                               
    Include programs and function modules                                  
    Data declaration, TOP...................... FZAGPCDT                   
    Consisting of............................. FZAGPCDF                   
    and....................................... FZAGPCDV                   
    Update function module..................... Z_PROAGE_PRV_WRITE_DOCUMENT
    Call update function module................ FZAGPCDC                                                                               
    Dictionary structures                                                  
    VZFAGTD01
    Just as you see, the system has created the fm and some includes containing all data it needs to call the fm.
    So u need only to use those includes, just only u need to consider before calling the fm u need to fill:
    - The change flag: usually called UPD_<Z table>;
    - Fill the header Y<ZTABLE> of z-table with old data;
    - Fill the header X<ZTABLE> of z-table with new data;
    - Fill the variables   TCODE, UTIME,  UDATE,  USERNAME,
    - Fill the variable OBJECTID with the key of Z-table
    For example my object is used in my program in this way:
    FORM INSERT_CHANGE_DOCUMENT.
      CHECK FL_CHANGE_DOC = 'X'.
      CHECK SY-SUBRC = 0.
      CONCATENATE XZFAGTD01-MANDT XZFAGTD01-BUKRS XZFAGTD01-GJAHR
                                              XZFAGTD01-BELNR INTO OBJECTID.
      TCODE = SY-TCODE.
      UTIME = SY-UZEIT.
      UDATE = SY-DATUM.
      USERNAME = SY-UNAME.
    * Load old data: header
      IF ZFAGTD0K IS INITIAL.
        CLEAR YZFAGTD0K.
      ELSE.
        SELECT SINGLE * INTO YZFAGTD0K
                        FROM ZFAGTD0K WHERE BUKRS   = XZFAGTD01-BUKRS
                                        AND GJAHR   = XZFAGTD01-GJAHR
                                        AND BELNR   = XZFAGTD01-BELNR.
      ENDIF.
    * Load old data: items
      SELECT * INTO TABLE YZFAGTD01 FROM ZFAGTD01
                                FOR ALL ENTRIES IN XZFAGTD01
                                       WHERE BUKRS   = XZFAGTD01-BUKRS
                                          AND GJAHR   = XZFAGTD01-GJAHR
                                          AND BELNR   = XZFAGTD01-BELNR
                                          AND POSNR_P = XZFAGTD01-POSNR_P.
      SORT: XZFAGTD01 BY POSNR_P,
            YZFAGTD01 BY POSNR_P.
    * Check if heade was changed
      IF YZFAGTD0K <> ZFAGTD0K.
        UPD_ZFAGTD0K = 'U'.
      ELSE.
        CLEAR UPD_ZFAGTD0K.
      ENDIF.
      UPD_ZFAGTD01 = 'U'.
      PERFORM CD_CALL_Z_PROAGE_PRV.
      REFRESH XZFAGTD01.
    ENDFORM.                    " INSERT_CHANGE_DOCUMENT
    Max

  • SQL INSERT / SQL UPDATE don't work with form page, don't affect table

    The subject line says it all. No matter what I try, my updates on the form don't appear on the report page, which accesses the table. When I look at the table using SQL WORKSHOP, the changes aren't made there either. What am I missing? I have another report page and form page with a different table in the same application and updates in that table work fine. I coded them both the same. What should I be looking at?
    Steve "the n00b" in Raleigh NC

    Steve,
    How you have created the FORM page? Using FORM WIZARD? Or You have created blank page and after that you have manually created all the form items?
    If you have used WIZARD to create form page, then you can see a page process with Automatic Row Processing (DML) type. Here you need can set DML (Insert/Update/Delete) you wish to use on this form. APEX will take care of the rest.
    If there is no such process in your page, then you need to create one. You may have one process to do both (Insert and Update) and you can have two sepate processes. I prefer having two seperate page processes (after submit), one for Insert and one for Update.
    Now you can make the Insert process conditional so that it only execute when you click button - Create (Add or any similar button you have ) Also make the Update process conditional so that it only execute when you click button - Save (Update or any similar button you have )
    Just a quick note - From the above trigger, I can guess you are allowing users to enter Primary Key manually? In my opinion, Primary key should be always system generated using SEQUENCE. Users can only enter BUSINESS KEY (if any) and we should not use Business key as Primary Key.
    Good Luck :-)
    - Hari
    Edited by: Hari_639 on Oct 23, 2009 8:02 PM

Maybe you are looking for