Events in Table Maintenance, modify record and new record checking.

Hi,
I need to have a checking in the table maintenance for a custom Z table.
1.) First requirement is to check the changed data of an existing entry. An error must occur when pressing enter or when pressing the save button. What event should I use in order to accomplish this task?
2.) Second is when creating a new entry. An error must also occur when saving. I have already created the error message but my problem is that it does not return to the table maintenance screen but rather exits SAP.
Please advise on what to do regarding these matters.
Edited by: Al Vincent Bulacan on Mar 17, 2009 12:55 PM

Follow the given path
go in se11 to the Table Maintenance generator.
Envireonment --> Modification --> Events.
Here you will find a number for events. You can choose the one that fits your requirement.
Then you can create an Perform in the selected event and get your requirements done.
Hope it helps,
- RJ

Similar Messages

  • EVENTS in table maintenance Generator

    Hi, can u people help me while using EVENTS in Table Maintenance Generator. Means how can I perform different task using events.

    Hi,
    Using events in table maintenace generator, you can validate the fields, update the fields etc..There are events(01-New Entry), (02-Before Save); (03-After Save) etc... The respective events trigger on the action performed.
    To create events : Goto table maintenace generator screen->Enviorement->Modifications->Events.
    Select the from the list of events and peform based on ur requirement
    Regards
    Shiva

  • Events in table maintenance generator 01

    Hi all,
           I have an urgent requirement regarding the events in table maintenance generator.The requirement is i have a qty field in table i want to change the existing value it should allow only a lesser value.How to use TOTAL and EXTRACT structures.
    it is urgent.please help me out.
    Thanks & regards,
    Kranthi

    Follow the example below:
    form get_vendor_name.
      data w_extract type z_table.
      data begin of w_total.
              include structure z_table.
      data: action,
            mark,
      end of w_total.
      loop at extract into w_extract.
        check not w_extract-z_vend_no is initial.
        select single name1 from lfa1
                           into  w_extract-z_vend_name
                           where lifnr = w_extract-z_vend_no.
        modify extract from w_extract.
      endloop.
      loop at total into w_total.
        check not w_total-z_vend_no is initial.
        select single name1 from lfa1
                           into  w_total-z_vend_name
                           where lifnr eq w_total-z_vend_no.
        modify total from w_total.
      endloop.
    endform.
    Reward points if useful.
    Regards.

  • Can you please help me with validation logic for Events in Table maintenance generator

    Can you please help me with validation logic for Events in Table maintenance generator,i.e if i enter record in 1st internal table then automatically 2nd internal table should be updated.

    Hi Glen Anthony,
        Thanks for replay,
         I used foreign key relationship between those 2 internal tables....
    I used event 05: When creating a new entry. I want to know the custom logic by which my 2nd Internal table gets automatically updated when i update my 1st Internal table
    Thanks Glen.

  • Events in Table Maintenance - How validate fields and deliver error message

    Simple transparent table.  I have generated one step table maintenance.  I use a view variant to make some fields display only.  I would like to use Events to provide some validation.  For example: If field STATUS = 'T', then field QUANTITY must be > 0.
    So far, I have tried events 05 and 21.  When the user tries to enter a new row, I can issue an error message that is returned to the screen.  The problem is that the screen is no longer typeable, i.e. the user cannot correct the error.  They have to exit and start over.
    Is there a different event or different coding I should provide to open up the screen for typing?

    Hi,
    Tried 'message type 'I' display like 'E''', in event 5 and 21. The non-key fields are now typeable but the validation is not enforced, i.e. you get a message that you must enter a QUANTITY but you can save the row without entering a QUANTITY.
    Yes I was afraid of that... that's why I would use the event 01 (with 05, if user still tries to save invalid entries, 01 will block). Normally when you get the error and press the ENTER key, you should get back to your table in edit mode... Well this is happening on my system...
    I'll let you know if I got a better idea...
    Kr,
    Manu.
    Edited by: Manu D'Haeyer on Nov 10, 2011 5:01 PM

  • How to create event in table maintenance generator

    Hi guys,
    I need to create an event for my table maintenace generator such that when the field land1 is filled, the landx field should take its data from t005t table. and the ladnx field should be display only, it can not be modified in table maintenance.
    How can i create an event in table maint. gen? How am i going to do it?
    thanks always,
    mark

    Hi,
    As mentioned in the last post go to the event screen by
    Environment --> Modifications --> Events.
    There you click on new entries and try writing your logic for event 21 i.e. after selecting 21 give some name of your event and write down the logic how you want to do this.
    If event number 21 does not work then try 1. One of these two should work.
    Hope this helps!!!
    Regards,
    Lalit

  • Using an event in table maintenance view to populate a field

    I have a table maintenance view, and I would like to populate one field of the table with derived data. I am trying to do this by coding a routine for one of the events, but so far no luck. I have been able to chege the data in the TOTAL table, but still it does not populate the field on the screen.
    Note this is not for one row as it is entered, but I want all rows of the table displayed to show this field with derived data.
    So the question is: what is the correct event to use, and what is the correct internal table to update? Can I make changes to EXTRACT or TOTAL to do this?
    Kind Regards,
    Tony.

    Hi Rob,
    Sorry for being lazy; I'll close this and off and search :-}
    BR,
    Tony.

  • Table Maintenance- Condition Records

    Hi Friends,
    I have created a custom table and i have done a Table Maintenance for that custom Table..
    In that i have one field called DATBI(which is To-date).
    My Requirement is how to set condition in this table maintenance where IF TO-DATE < SYSDATE
    those records should not be displayed in Table maintenance but that should be there in Data base table..
    Can anyone help me on this.. I think something need to be done in PBO.
    Plz help me on this..
    Sample code will be helpful.
    Thanks in advance.
    kishore

    Hi genji,
    Goto ur table and then utilities----
    >table maintenance generator .
    Then double click on the overview screen u specifed..It will direct u to PBO screen.
    There inside PBO in the beginning create one module X(some name).
    inside that specify ur condition whichever you want to..
    piece of code which i have done for my condition records inside PBO
    module modif_screen output.
    data:  datbi type datbi.
    clear total.
    loop at total.
      move total+32(8) to datbi.
       if datbi < sy-datum.
       delete total.
       endif.
      clear : datbi.
    endloop.
    Here total is the internal table from where values are populated.
    Think this wil solve ur issue.

  • Table Maintenance: Modified or not?

    Hi,
    consider this situation: I appended a field to an existing customer DDIC table. There is an existing table maintenance. Before I just regenerate it to have the new field included i would like to check if there is any modification or extension of the maintenance dialogue.
    What is the best way to find out?
    Best regards,
    Clemens

    Hi,
    Goto SM30 and give that table name. check whether ur new field reflects over there or not.
    If not you need to regenerate table maintenance generater it seems.
    Thanks.
    If this helps you reward with points.

  • Table maintenance inserted records @ translation possibility

    Hi,
    I have created a table maintenance generator for a Z table and created a transactionfor it. 
    My requirement is that, for inserted records from transaction, should allow to include the translation possibility. I have check Table maintenance transaction screen from menu, translation button is in inactive (Gray colour).
    How to solve this?  Kindly Suggest.
    Thanks in advance....
    Thanks & Regards,
    Shaik

    Translations are posible only when you have a Text table related to the main table. First step is to create a text table which is related to the main table with foreign key relation and then creating a view cluster above both of these tables showing the main table entry as parent and the translatable column as a child. By doing this you can  maintain multiple language texts for each of the key in the main table using this view cluster. This is one of the solutions to your problem.

  • Events in TAble Maintenance

    I am using a FORM routine of Maintenance type as 05 - Create New Entry. Here when ever a new entry is made i am using the code as below.
      CALL FUNCTION 'UIPW_ENCRYPT'
        EXPORTING
          i_pw_decr = ztest_tm_logins-password
        CHANGING
          x_pw_encr = ztest_tm_logins-password.
    So When ever a new entry is created the entered password will get encrypted with the above FM. This is Fine.
    But while changing the password also, i need to encrypt the value. So under which Maintenance type i need to create the routine ?

    Hi,
    Try in this manner
    Double click on the screen of your TMG
    write a user defined module in PAI of the Flow Logic of your TMG screens.
    and in the Case Sy-ucomm under SAVE write the relevant code
    Try events 11 and 12 ( But I am Not sure )
    regards
    Prasanth
    Edited by: Prasanth Kasturi on Nov 5, 2008 11:11 AM

  • Changing data in events in Table Maintenance generator

    Hi,
    My requirement is to default two fields while changing a row..
    I tried using event 01, 02 and 03...
    I used the below code..
    ZYREN-userid = sy-uname.
    zyren-lupdate = 0.
    Please help me in solving this..
    Thanks

    I have done this recently using event 01. Code is as follows, but I don't think that is the ideal way of doing things, but it works in my case. You have to figure out how to define the structure in your case. You can do that by placing a break-point in the subroutine and checking how the internal table TOTAL looks. Then define your structure just like that.
    form populate_created_date.
      data: begin of rec_data,
              sfa_id type /bic/oizucsiebel,
              date   type erdat,
              dummy(2),
            end   of rec_data.
      loop at total into rec_data.
        rec_data-date = sy-datum.
        modify total from rec_data.
      endloop.
    endform.                    "POPULATE_CREATED_DATE

  • Event in Table maintenance generator

    Hi,
    We are using the event in the table maintainenace to validate the data entred by the user.
    In one of the scenarios when user does enter anything and press enter , an error message should come.
    I have created a form on event 01-before saving the data into database.
    But this form is not getting called .in which event should io code this.
    Regards
    Sohit

    Hi Sohit,
    It must work. you keep a break point and check. I had used the same  same thing in one of my object.
    the logic would be to
    LOOP AT TOTAL.
    Now check the record of TOTAL which you want to check by using offset like  TOTAL+0(4) i.e. the first four characters of the total which is for the first field and by taking it do the validation by checking teh database or whatever if fails raise the error message.
    ENDLOOP.
    If you have any doubt write back i'll help you.
    <b>Kindly reward points if it helps.</b>
    Thanks and Regards
    Tanweer zaki

  • Modification Events in Table maintenance Generatot

    Hi
    I hace coded some code which is checking entries in 2 fields while saving in event 1. If the entries are not there it diplays error msg.
    Problem is that it diplays error msg but it leaves the screen. I want it to contains that values which ere added and the screen so that user can change the entered entries.
    Thanks

    hi,
    In TMG screen go to the menu 'environment->modification->events', then use the events 05 and 18 and create a form with the code to do data validation as the following code:
    form z_check_fields_zlsot004.
      data: xfld_otype type char14 value 'ZLSOT004-OTYPE',
            xfld_objid type char14 value 'ZLSOT004-OBJID',
            xdyname    type sy-repid,
            xdynumb    type sy-dynnr.
      data tdynpfields type table of dynpread.
      data wdynpfields type dynpread.
      move: sy-repid to xdyname,
            sy-dynnr to xdynumb.
      refresh tdynpfields.
      wdynpfields-fieldname = xfld_otype.
      append wdynpfields to tdynpfields.
      wdynpfields-fieldname = xfld_objid.
      append wdynpfields to tdynpfields.
      call function 'DYNP_VALUES_READ'
        exporting
          dyname               = xdyname
          dynumb               = xdynumb
        tables
          dynpfields           = tdynpfields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          others               = 11.
      if sy-subrc eq 0.
    * Efetuar a leitura do primeiro registro, que possui os dados da tela
    * referentes ao campo otype
        read table tdynpfields index 1 into wdynpfields.
        move wdynpfields-fieldvalue to zlsot004-otype.
    * Efetuar a leitura do segundo registro, que possui os dados da tela
    * referentes ao campo objid
        read table tdynpfields index 2 into wdynpfields.
        move wdynpfields-fieldvalue to zlsot004-objid.
    * Validar se campos estão preenchidos
        if zlsot004-otype is initial or
           zlsot004-objid is initial.
          message e028(zlsom001).
        endif.
        zlsot004-erdat = sy-datlo.
        zlsot004-erzet = sy-timlo.
        zlsot004-ernam = sy-uname.
      endif.
    endform.                    "Z_CHECK_FIELDS_ZLSOT004
    regards,
    Fabio Saito

  • Table maintenance dialog event to modify the screen

    Hello All,
    Can anyone tell the Event in table maintenance generator where I can grayout the few fields of the SM30 screen dynamically?
    Thanks in advance.
    Best Regards,
    Sasidhar Reddy Matli.

    Hello Vijay,
    If I change the properties of the fields as output only in the screen, when ever they regenerate the table maintenance screen, these properties will go off. Could you please suggest any other method for this?
    Thanks in advance.
    Best Regards,
    Sasidhar Reddy Matli.

Maybe you are looking for