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

Similar Messages

  • 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.

  • 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

  • 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

  • EVENT problem in Table maintenance generator

    Hello all
                 I m working on 4.6C sytem. I m facing  2 problems in events in table maintenance generator
    (1) I am using 04 event (After deleting records from table)   I have written BREAK-POINT in the Form .....ENDFORM... But the control doesnt stop there , when i select  an existing record and press delete record button? not able to understand  this
    (2) When i implement even t 03( Before deleting records from table) , and select  an existing record and press delete record button . Control successfully Go  to corresponding FORM ...   BREAK-POINT ENDFORM . 
    But now the problem is.. in debuggin i can see the contents in TOTAL table  but when i try to code LOOP at TOTAL ..ENDLOOP...it gives me syntax error saying "  table TOTAL doesnot exists or not defined..but similar field TOTAL_S , TOTAL_M , TOTAL_L  exists.. ???
      how come i can see the same during debugging but cannot code it ?
    Plese help
    Nilesh

    Hi Nilesh,
    (1)  I think the control will stop there after you delete AND save. Not sure about that but give it a try.
    (2) I believe you are trying to access fields inside table TOTAL, is that right?
    Actually you have to declare a work area with your Z table type.
    DATA: w_workarea type ztable.
    LOOP at total.
      w_workarea = total.
    endoop.
    Then you can work with w_workarea.
    Best regards.

  • Event code in table maintenance generator

    Hi All,       Need to call event in Table maintenance generator of the z table. I have to use 1st event (Select ’01’ – Before saving data in the database).     Need to do fallowing job: Table cleaning : Delete all records with value year =< 2011 -New rule :      No save can be done with value (Pst Var, PA,PSA, Cost = ‘ *,*,*,*’). I am attaching table entry with this mail, I have written the code for this but not sure please suggest me modification if required for this.Because i have never done this before. Thanks and Regards Sankil     

    hi Sankil
    Some variable is not available in your code and you did not modify EXTRACT table.
    Try to modify your code as blow:
    This event has no standard routine. The following global data is available for the realization of the user routine:
    •internal table TOTAL
    •field symbols
    •field symbols <ACTION> and <ACTION_TEXT>
    •<STATUS>-UPD_FLAG
    If internal table data are to be changed before saving, t he changes should be made in both the internal table
    TOTAL and in the internal table EXTRACT.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM
    refer event 01: http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    regards,
    Archer

  • Field validation in table maintenance generator and input value grey out.

    i have created ztable with 3 fields as em_no,em_no and addrnumber.
    first two fields are custom fields but the third custom field need to validate the standard table adrc contains the value of the field addrnumber.
    i need the query of field validation query which we write in create entry events in table maintenance generator and also if we give wrong value for addrnumber in sm30 maintain table, the input field need not to be grey out for next entry...
    please help.

    Hi,
    create method -
    >before saving data.....write the logic between the method
    go to utilities->table maintanance ,,,after creating generator ---go to envirnment->modification->events.
    create event -.>.as zsave select event  type 1(before saving data to table) write code in include....
    consider data for field3 is 10 .
    lv_new = ztbr(table name)-field3.
    select field3  from ADRC(ZTABLE) into wa_new (TYPE ZTABLE) where field3 = lv_new.
    if sy-subrc = 0.
         working fine
         else.
        message  i888(sabapdocu) with 'data invalid'.
    endform.
    This will help u...
    Thank u.........

  • Validating non key fields in table maintenance generator

    Hi,
    I ma using events for table maintenance generator event 05 ,there i want to validate non key fields ......i am throwing error message ....all the non key fields are getting in display mode ...i need them to enable to enter values ....
    please suggest
    Thanks,
    Shailaja Ainala.

    Hi Shailaja,
    Its property of error message, which makes it as non-editable.
    You can display either status or info message after validation check.
    And finally before saving (before save event) display error message, so that it invalid entries doesnt get saved.
    Thanks,
    Nisha Vengal.

  • Event 03 in table maintenance generator

    Hello All,
    I have created a event 03 in table maintenance generator. Because I need to check if the deleted key is still referenced in an other table.
    I tried the following code, but only if I use the message the entry will not be deleted.
      MOVE uebergehen TO <mark>.
      MODIFY total INDEX sy-tabix.
      <xmark> = <mark>.
      MODIFY extract INDEX nextline.
      IGNORED_ENTRIES_EXIST = abap_true.
    *  MESSAGE e000 WITH 'Entry not allowed to delete'.
    Thanks in advance.
    Marcus

    had to put it in a generic form, hope it still works:
    FORM event_03.
      TYPES: BEGIN OF typ_extract,
               zview TYPE zview,   "or ztable, the one with the maintenance dialog!
               flags TYPE vimtbflags,
             END OF typ_extract.
      DATA: ls_extract TYPE typ_extract.
    * loop at marked lines
      LOOP AT extract INTO ls_extract.
        CHECK ls_extract-flags-vim_mark EQ 'M'.
    *   place existence check here!
    *   using the values in ls_extract-zview-...
    *   if value still being used, send message
        IF sy-dbcnt > 0.
          MESSAGE i...
          ls_extract-flags-vim_mark = '*'.
          MODIFY extract FROM ls_extract.
        ENDIF.
      ENDLOOP.
    ENDFORM.

  • Event for input validation in custom table (table maintenance generator)

    Hello all,
    I look for a solution to execute an event after the modification of a table field of a custom table to validate the user's input.
    I already tried event 07 (Execution : Before correcting the contents of a selected field) of the table maintenance generator but it will be executed after some modification made by the Edit -> Change field action.
    I could use the event 01 but in my opinion this event happens to late and errors are very uncomfortable for the user at that time.
    Editing the dynpro events is not a solution for me because it should be easy to maintain the table structure at any time.
    Thank you in advance
    Robert

    Thank you!
    Event 08 just starts after the saving process after Event 07.
    Event 18 gets executed when I click on the save button.
    I want to check the data after the enter button was pressed as you can see it in several transactions.

  • Table maintenance generator events

    Hi,
    I have created a table maintenance generator and want to populate sy-uname and sy-datum into two fields during SAVE. So I went to Environment -> Modification -> Events and selected "01" event i.e. "Before saving the data in the database" and entered Form routine as "F_UPDATE_UNAME_UDATE". Then if I go to SM30 transaction it goes to dump.
    Could you please tell whether I am missing any point?
    Regards,
    Balaji Viswanath.

    Hi,
    Pasted it below.
    Runtime Error          PERFORM_NOT_FOUND
    Except.                CX_SY_DYN_CALL_ILLEGAL_FORM
    Date and Time          01/31/2008 09:26:52
    ShrtText
         Call (PERFORM) to a non-existent routine.
    What happened?
         The current program attempted to call an externally defined routine
         that does not exist.
         Error in ABAP application program.
         The current ABAP program "SAPLZTEST321" had to be terminated because one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
         The current ABAP program had to be terminated because the
         ABAP processor detected an internal system error.
         The current ABAP program "SAPLZTEST321" had to be terminated because the ABAP
         processor discovered an invalid system state.
    What can you do?
         Print out the error message (using the "Print" function)
         and make a note of the actions and input that caused the
         error.
         To resolve the problem, contact your SAP system administrator.
         You can use transaction ST22 (ABAP Dump Analysis) to view and administer
          termination messages, especially those beyond their normal deletion
         date.
        is especially useful if you want to keep a particular message.
    Error analysis
        An exception occurred. This exception is dealt with in more detail below
        . The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_FORM',
         was neither
        caught nor passed along using a RAISING clause, in the procedure
         "PREPARE_SAVING" "(FORM)"
        Since the caller of the procedure could not have expected this exception
         to occur, the running program was terminated.
        The reason for the exception is:
        The program "SAPLZTEST321" is meant to execute an external PERFORM,
        namely the routine "F_UPDATE_UNAME_UDATE " of the program "SAPLZTEST321 ", but
        this routine does not exist.
        This may be due to any of the following reasons:
        1. One of the programs "SAPLZTEST321" or "SAPLZTEST321 " is currently being
         developed.
        The name "F_UPDATE_UNAME_UDATE " of the called routine may be incorrect, or
        the routine "F_UPDATE_UNAME_UDATE " is not yet implemented in the program
         "SAPLZTEST321 ".
        2. If the program SAPMSSY1 is involved in the runtime error, one of
        the function modules called via RFC is not flagged as remote-capable.
        (see Transaction SE37  Goto->Administration->RFC flag)
        3. There is an inconsistency in the system. The versions of the
        programs "SAPLZTEST321" and "SAPLZTEST321 " do not match.
    How to correct the error
        - Check that transports to the system are complete.
        - Conclude any developments already begun ("SAPLZTEST321" and/or "SAPLZTEST321
        - Check routine names
        You may able to find an interim solution to the problem
        in the SAP note system. If you have access to the note system yourself,
        use the following search criteria:
        "PERFORM_NOT_FOUND" CX_SY_DYN_CALL_ILLEGAL_FORMC
        "SAPLZTEST321" or "LSVIMF14"
        "PREPARE_SAVING"
        If you cannot solve the problem yourself and you wish to send
        an error message to SAP, include the following documents:
        1. A printout of the problem description (short dump)
           To obtain this, select in the current display "System->List->
           Save->Local File (unconverted)".
        2. A suitable printout of the system log
           To obtain this, call the system log through transaction SM21.
           Limit the time interval to 10 minutes before and 5 minutes
           after the short dump. In the display, then select the function
           "System->List->Save->Local File (unconverted)".

  • Table maintenance generator : EVENTS : please help me

    I need to use table maintenance generator to maintain a custom table through a custom transaction.
    I am using  event  BEFORE SAVE (01). It is working fine but small issues.
    1)After entering new entries for some fields(KEY FIELDS), when I press save button, remaining fields values to be populated. Seletion statements have written in FORM of the EVENT 01 (BEFORE SAVE).
    But the values for remaining fieldsare not populating immediately and but populating when I press BACK (F3). My requirement is with out presssing BACK  or F3 , fields to be populated.
    (note: SAP internal code..values are coming into TOTAL  structure..then I manipulated this internal table)
    PLEASE GUIDE ME, WHICH EVENT TO BE USED. importantly, which internal table/structure (like TOTAL we used for this requirement ) to be used for the proposed new EVENT? (Because lot of R&D to be done to find SAP structure)
    2) second requirement is: even after entering new entries, if we press ENTER, then also it should behave like SAVE like in the previous requirement. Please help me to find the EVENT and Internal SAP generated structure (like TOTAL we used for this requirement ).

    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.

  • Using Event 21 in Table maintenance generator

    Hi,
    How can i get the updated record when using event 21 in maintenance generator.

    >
    ABINASH VERMA wrote:
    > Hi,
    >
    > How can i get the updated record when using event 21 in maintenance generator.
    Can You give Us any Idea what is Event 21 in Maintenance Generator.
    Regards,
    Suneel G

Maybe you are looking for

  • Cs5.5 PC download doesn't work

    I bought the CS5.5 Production Premium years ago for my mac. I have only used the software on that one machine. I now have a Microsoft-based PC and would like to transfer the software over to this new computer so I deactivated the software on my mac a

  • Form not working in mobile devices

    Hi, i have created one form using adobe pro & it's work well in my pc. my form should work in the Adobe Reader app on iPads and Android tablets also. Unfortunately, it's crashes the app on both devices.my form has text fields & combo boxes. here i ha

  • WO basic start date - requirement date

    Good morning folks, Would anyone be able to shed some light on any config that would be suitable for the following: The materials are assigned to a task list that is then assigned to a plan.  That plan is then scheduled and the work orders are genera

  • Anyone else having trouble with Pages freezing on iPad 2?

    In just the last few days, Page documents are freezing. After I create a document it won't let me name it, file it with others, I don't see the little blue line telling me the document is being saved etc. I haven't lost anything but the program is no

  • How to make phone phone vibrate through j2me code

    how to make phone phone vibrate through j2me code thanks in advance