Trigger on a standard table

Dear All,
Can I create a trigger for a standard SAP Table (say TCJ1T).
If so, how do I go about it?
Regards,
Ashwin Bhat

Hello Ashwin
If "trigger" means any changes of the DB table then there is the option <b>Log data changes</b> in the <b>technical settings</b> of a table.
On our ECC 5.0 system the data changes on table TCJ1T are logged, meaning that the flag is marked.
However, logging requires that the system profile parameters are set accordingly.
This is what the F1 help says:
DE DDPROTOCOL
Short Text
     Log data changes
Definition
     The logging flag defines whether changes to the data records of a table
     should be logged. If logging is activated, every change (with UPDATE,
     DELETE) to an existing data record by a user or an application program
     is recorded in a log table in the database.
     Note: Activating logging slows down accesses that change the table.
     First of all, a record must be written in the log table for each change.
     Secondly, many users access this log table in parallel. This could cause
     lock situations even though the users are working with different
     application tables.
Dependencies
     Logging only takes place if parameter rec/client in the system profile
     is set correctly. Setting the flag on its own does not cause the table
     changes to be logged.
     The existing logs can be displayed with Transaction Table history
     (SCU3).
I actually do not know but believe that it is possible to raise "events" in the system resulting from Log data changes.
Regards
  Uwe

Similar Messages

  • Can we update oracle standard table Attributes column by custom trigger?

    Can we update the oracle Standard table's Attributes column using custom trigger? Is it allowed by oracle? Is this supported?
    Thanks

    ATTRIBUTE columns store DFF information and therefore custom code can be used to update their contents. Care must be taken that such updates do not cause "logical" corruption (an ATTRIBUTE column may be designed to store the color of a product, for example, but an incorrect SQL statement can update the value to a numeric one, thus causing corruption - Oracle does not have a means to check the validity of these update statements). Also, some localizations, such as Brazil and India, reserve some ATTRIBUTE columns for their use - updating such columns is not supported. More information may be found in the Flexfields Guide for your release at http://www.oracle.com/technology/documentation/applications.html
    HTH
    Srini

  • Triggering event when entries inserted in standard table

    Hi Experts,
    I've a requirement to trigger an custom event when entries created in table TOA01 table. We can do this for Z-tables by through options available in table maintenance generator screen. But, in my case its standard table, so i cant change the table. And I dont want to use change document objects. Can you please let me know is there any other method to achieve this.
    Thanks in Advance,
    Siva Sankar.

    Have you checked that if there is a standard event triggered when an entry is done to this table? I think that there might be. If an event is triggered, you can for example create a check function module, and trigger your own event from there.
    Regards,
    Karri

  • Correct way to handle updates of XMLtype columns in standard tables.

    Hello to whoever may read this,
    I am currently studying the XML functionality of oracle DB for a uni project.
    We have been asked to compare/contrast solutions to publishing product and price data for data stored in standard relational tables, and data stored in XML type tables. For extra marks, i am looking at a table containing an XMLType column for multiple items of data relating to the primarykey.
    I have managed to get my head around publishing the data - pretty straight forward, but we have also been asked to show how we can update data, which isn't a problem within the standard tables/columns, but when it comes to the XMLType columns/tables, i dont have a clue.
    At the moment i am working on trying to update an XMLtype column. The table itself is a "product" table, and contains product information, as well as an XMLType column containing multiple changes to the prices. In the relational tables, this "product" table has a one-to-many link to another table called price_history which contains details about past prices (which is populated by a trigger on update/insert of a new price). But in this table all the product changes are stored in XML format in the XML type column "prices".
    Table columns: id number(4), name varchar2(25), prices xmltype;
    example data: 1781, CDW 20/48/E, <product_prices><price_change>
    <change_id>1</change_id>
    <date_changed>2009-10-13</date_changed>
    <details>price increased</details>
    <new_value>234</new_value>
    </price_change>
    <price_change>
    <change_id>2</change_id>
    <date_changed>2009-10-13</date_changed>
    <details>price increased</details>
    <new_value>235</new_value>
    </price_change></product_prices>
    We need to give examples of an update. I have been looking around the net, and these forums for a solution now for about 4 hours. My own thoughts are that to update this with a new price change i need to, SELECT the current data INTO a variable, then concatenate that variable with the new price change info e.g.
    <price_change>
    <change_id>3</change_id>
    <date_changed>2009-10-13</date_changed>
    <details>price decreased</details>
    <new_value>230</new_value>
    </price_change>
    then insert that whole chunk of data again to overwrite the old data.
    Now im fairly certain there is some function somewhere which will allow me to do this update/insert operation without going through this process... After i am done with this update of XMLType column data, i need to tackle updating data in an XMLType Table with XQuery(? apparently), so if you have any pointers for that please let me know.
    Could one of you experts point me in the right direction for this? Any advice at this stage is a great help and will stop me losing my mind.
    p.s. im sorry about the lengthy description of the problem/solution required. How to describle something i dont understand? I ask myself.

    Hi,
    You really need to take a look at the XMLDB Developers guide.
    For updating XML with SQL/XML see UPDATEXML and for XQuery see [Using XQuery with Oracle XMLDB|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb_xquery.htm#sthref1673]
    HTH,
    Chris

  • Column in standard table disabled

    Hi ,
    I am working on standard webdynpro components. Now my issue is with newly added field to an standard table in layout of standard SRM Webdynpro component that is /SAPSRM/WDC_UI_SC_DOTC_BD.In this component I added VNAME  field as an input field and added it as an  column 2 and maintained all the properties as required in metadata thru spro .But now the issue is whenever I get the table the column is showing as an read only ..but once if i am entering all the details in an row and trigger enter  button then I am getting this input field as non - read only .But by default I want to make it as an non read only .I checked with all the properties in SPRO and Properties of the column .All are enabled but I am getting as disabled .So pls help me in this to solve the issue ..
    Thanks ,
    Sandeep

    Hi Sandeep,
    Only newly added column is coming as read only or compelte table? what about other columns(fields).
    Try by creating one more attribute of type WDY_BOOLEAN say ENABLE and bind this to your added field enable property.
    and in WDDOINT of pre or post exit set this attribute to ABAP_TRUE. it might works..
    Cheers,
    Kris.

  • Can we insert data directly in standard table

    hi
    how can we insert data in standard table directly.
    pls reply urgently.

    Hi sapna yes u can insert data to the SAP tables, as shown below...
    use the table mara in the place of m
    REPORT  ZTEST_INSERT.
    TABLES: <m>.
    DATA: wa_m TYPE <m>.
    wa_m-ernam = 'ZTEST'.
    insert into <m> VALUES wa_m.
    if sy-subrc = 0.
      WRITE / 'Records inserted Successfully'.
    ENDIF.
    reward if usefull,
    Vishnu. R
    Edited by: vishnu ramanathan on Sep 18, 2008 2:17 PM

  • Can we enter data in any standard table directly through custom form??

    Dear All,
    Can we enter data in any standard table directly through custom form??
    I have create custom form in R.12. I want to insert data in quality standard table directly through custom form. Need experts guideline.
    Awaiting regards,

    Hi,
    Can we enter data in any standard table directly through custom form??
    I have create custom form in R.12. I want to insert data in quality standard table directly through custom form. Need experts guideline.
    Awaiting regards,
    I would not recommend touching the standard tables at all unless you are being guided by the SR. For a record to be in the standard table it should go through series of validations based on the what operation you are performing and some times datas are dependent upon the other tables, and also some times the same records are hit to so many other tables simultaneously.
    Therefore I would not recommend this brother.
    Thanks &
    Best Regards,

  • Standard table for finding query where used list

    Are there any standard tables available to find the list of web templates, bex reports and views using a particular query?
    i.e if i have the query name i should be able to find out where all it is being used.
    Thanks,
    Archna

    Hello,
    You have to join multiple tables to achieve this, here we go
    FOR QUERY Related Information
    RSRREPDIR - Directory of all reports (Query GENUNIID)
    Choose Type of a reporting component -> REP
    Tips :
    Choose Type of a reporting component -> QVW for query view
    SE11 -> RSZ* -> F4 gives you all tables related to queries
    For WORKBOOK Related Information
    Use the FM RRMX_WORKBOOK_QUERIES_GET to get the queries in a workbook by selecting the workbook ID from table RSRWORKBOOK
    Tips :
    SE11 -> RSRWB* -> F4 gives you all tables related to workbooks
    SE37 ->RRMX_WORKBOOKS* -> F4 gives you all the FM related to workbooks
    For Webtemplate Related Information
    Choose the dataprovider for query / view ID.
    SE11 -> RSZWOBJXREF - Structure of the BW Objects in a Template
    Also see,
    SE11 - > RSZWTEMPLATE - Header Table for BW HTML Templates
    Thanks
    Chandran

  • How do I read this "standard" table in my Function Module?

    I have a remote-enable Function Module (RFC).  I am receiving two tables as part of the parameters.  Table "A" is header information, and Table "B" is detail information.  So for every 1 "A" header record, I may have 1 to many "B" detail records.  I have a field we'll call "vendor_number" that is the common link between the two tables.
    Here's what I want to do:  I want to loop through table "A", and for each record, I want to do a READ on table "B", using the "ref_doc_no" from "A" as my key, to get the position of the first matching record.  I hold onto the value of the table index and then start looping table "B", adding 1 to the saved table index each time to process all of the detail records.
    Here's the problem:  This worked great as an ABAP program.  I had my "B" table declared with "ref_doc_no" as a non-unique key.  But when I ported my code over to the RFC, it told me that the RFC could only deal with standard tables.  I had to remove the "ref_doc_no" key declaration.  So now when I try to activate, I get an error similar to this:
    The declaration for the key field "another_field" is incomplete; however, "another_field" is contained in the key of table "B" and must be filled.
    I don't understand that.  I've not declared any keys for table "B".  I don't understand why it's thinking I need to populate "another_field" (I don't even know what the value would be).  My code to read the table (i.e. the line getting the error) is this:
    Priming read on table (sets the initial sy-tabix index value)
        READ TABLE it_incoming_invoice_line_item "table 'B'
          WITH TABLE KEY ref_doc_no =
                         wa_incoming_invoice_header-ref_doc_no
                    INTO wa_incoming_invoice_line_item.
    Is it possible for me to do some sort of direct read on a table in an RFC?  The only alternative I can think of would be to have to loop through table "B" until I find the first occurrence of a match.  Is that what I need to do?
    Thanks everyone.  Points, as always, awarded for helpful answers.

    Dave,
    1. You can fire SELECTS in an RFC as well, but in your case the data exists in SYSTEM A and the RFC is in System B, so you can't do that. You can fire SELECTS on tables in the same system.
    2. Quick example of two table loops - EKKO (HEADER) EKPO (ITEM).
    LOOP AT EKKO.
    LOOP AT EKPO WHERE EBELN = EKKO-EBELN.
    ENDLOOP.
    ENDLOOP.
    I hope this is clear now.
    Regards,
    Ravi

  • Changing field length of a standard field in standard table VBEP

    Hi,
    Please advice the possibility and the possible repercussions of changing field lengths in a standard table. Table in concern is VBEP.
    Thanks & Rgds,
    Pradeep

    No you cannot change the field length
    thanks
    G. Lakshmipathi

  • Maintenance view on the standard table

    Hi,
    We need to have a maintenance view on the standard XYZ table .
    Since it is a std table. we would not be able to create a maintenance view since we need an access key.
    So we have to :
    1. Copy the table XYZ into a Z_table. (just the structure alone).
    2. Create a table maintenance generator on this table.
    3. When the data is being saved in the maintenance view, update the record in the XYZ.
    How we can populate the XYZ when the Z_table is populated with data?
    Can anyone help in this regard.
    Thanks and regards,
    Kapil

    Hi Rich,
            Thanks for your reply.
    I am referring to standard table "comc_settyp_attr" in SAP-CRM system . I have copied it and created a z_table. But its not allowing me to create a maintainance view. Its giving an error :
    GUID in table key (Field name CUSTINFO) not supported.
    But when i create the z_table without the GUID(char 32) as key field, it generates table maintenance. But the key field is required.
    Can you help me in this regard.
    Regards,
    Kapil

  • Error while create trigger on for nested table

    I want to insert a record into a nested table.For this, I created a view for the table, which includes the nested table.It told me ORA-25015 cannot perform DML on this nested table view column.So I created a trigger for the nested table.However, it told me that ORA-25010 Invalid nested table column name in nested table clause.I think my nested table is valid, i don't konw why did it appear this kind of problem?
    My table is
    CREATE TABLE ENT
    ID NUMBER(7) NOT NULL,
    CREATE_DATE VARCHAR2(11 BYTE),
    UPDATE_DATE VARCHAR2(11 BYTE),
    DEPTS VARRAY_DEPT_SEQ
    CREATE OR REPLACE
    TYPE DEPT AS OBJECT
    ID NUMBER(8),
    ANCHOR VARCHAR2(20),
    CREATE OR REPLACE
    TYPE " VARRAY_DEPT_SEQ" as varray(930) of DEPT
    CREATE OR REPLACE VIEW ENT_NESTED_VIEW
    (ID, CREATE_DATE, UPDATE_DATE, DEPTS)
    AS
    select e.ID,cast(multiset(select r.id,r.anchor from ent z, table(z.depts) r where z.ID=e.ID )as varray_dept_seq)
    FROM ENT e
    Then when I created trigger;
    CREATE OR REPLACE TRIGGER EMP.ENT_NESTED_TRI
    INSTEAD OF INSERT
    ON NESTED TABLE DEPTS OF EMP.ENT_NESTED_VIEW
    REFERENCING NEW AS New OLD AS Old PARENT AS Parent
    FOR EACH ROW
    BEGIN
    END ;
    I met the problem: ORA-25010 Invalid nested table column name in nested table clause
    Could you please tell me the reason
    Thank you!
    My insert SQL is:
    insert into table(select depts from ent_nested_view where id=1856) values(varray_dept_seq(dept(255687,'AF58743')))
    Message was edited by:
    user589751

    Hi,TongucY
    Compared with the "Referencing Clause with Nested Tables" part of this reference -
    http://psoug.org/reference/instead_of_trigger.html, I found the answer of this
    quesion. That is "CREATE OR REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of
    DEPT". It turns to be a varying array, not a nested table. It should be "CREATE OR
    REPLACE TYPE " VARRAY_DEPT_SEQ" as table of DEPT". That is OK. Thank you very
    much!
    While there is an another question, if I create a varying array like" CREATE OR
    REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of DEPT " and I want to insert
    a record into the varying array, which the record has been existed.The method that
    create a view and a trigger seems not to be effective.
    For instance,
    There is a record in the table
    ID:1020
    CREATE_DATE:2005-10-20
    UPDATE_DATE:2007-2-11
    DETPS: ((10225,AMY))
    I want to ask this record to be
    ID:1020
    CREATE_DATE:2005-10-20
    UPDATE_DATE:2007-2-11
    DETPS: ((10225,AMY),(10558,TOM))
    How should I do?
    Could you please help me?
    Best regards.
    Message was edited by:
    user589751

  • Regarding creation of a standard table

    Hi,
    In my landscape, somebody deleted a standard table in one of my systems. when i am trying to access this table it is throwing an error message stating that table does not exist. check name.
    Now i want to know how to create this standard table and how to get the structure of that table.
    kindly help me regarding this issue.
    thanks & regards,
    eeswar

    Hi
    Well the solution you are thinking for this problem, doesn't seem to be a right way to me. Although recreation is no where possible for standard table, you can carry out transport.
    As the table is standdard one, and deleted you should rather think of restoring your backup. Because even if you transport it from one system to other, the data missing from your active server cannot be recovered and system can become inconsistent.
    So think about it once. Before applying transport.
    Regards
    Rahul

  • What are the standard tables for plant maintenance in r/3

    I need the list of standard tables for plant maintenance in r/3. and also
    is there any way we can find the field name  and table which it belongs to in r/3,  based on the description of the field.

    I NEED THE FIELD NAMES FOR FOLLOWING FIELDS AND CORRESPONDING TABLE NAMES
    Equipment status
    registration number
    insurance type
    insurance type description
    registration date
    expiry date
    insurance companies
    expiry date
    policy number
    amount insured
    premium paid
    created by  ..so ..on
    for our report in PM  .. insurance data report
    THANKS

  • How to change the lenth of existing field in sap standard table

    Hi all,
    can anybody help,my requirement is, how to change the length of existing field in sap standard table....
    thanks in advance..

    Which field are you thinking of in particular?  Are you wanting to increase or decrease the length?
    Some fields are used so extensively that a change to their length will mean adjusting many tables, some of them potentially very large, and hence taking a long time to adjust.
    Some standard SAP programs expect certain fields to be of specific lengths and won't work if the length is changed.
    Some screens could cease to work.
    If you decrease length, then you could lose data.
    matt

Maybe you are looking for