Event For Field Validation in Table maintenance generator

Hi Friends,
i need to validate the filed in my ztable , when the value is entered in to that field i,e if the value of that field is > 100 its should give error message. I already wrote code in the event  "Creating A New Entry" of event nor 5 as follows.
FORM F_VALIDATE_BONUSRT.
  IF ZPRM_BONUS_RATE-BRATE > 100.
    MESSAGE 'Bonus Rate Should not exceed 100' TYPE 'S' DISPLAY LIKE 'E'.
  ENDIF.
ENDFORM  .
But this form is not triggering. pleas help me out.
regards,
linchon.

Hi,
Place a breakpoint in form.
I tried doing same. Form gets triggered but your message will not get displayed.
Use this format of message, then it will work -
MESSAGE 'Error' TYPE 'E' DISPLAY LIKE 'S'.
Regards,
Harsh Bansal

Similar Messages

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

  • Include a field in the table maintenance generator

    Hi All,
    There is a Z table with MATNR and another numeric field and the table maintenance generator exists for the table. The requirement is to include another field for MAKTX ( Material description) in the table maintenance generator with input disabled. Is it possible to do the same in the table maintenance generator else please suggest me the best solution.
    Thanks in Advance.

    Hi Srinivasa,
    This is quite simple, first add the field MAKTX into the Table and activate it .
    Now again generate the Table maintainence for the table.
    from Table maintainence generator go to the main program
    there click the screen maintained for Table maintainence generator .
    in the Pbo of the screen write the following code.
    assume table name is table1.
    Loop at screen.
    if screen-name = table1-maktx.
    screen-input = '0'.
    modify screen.
    endif.
    endloop.
    this will automatically disable the material description field in the Table Maintainence Generator.
    This is will solve your problem
    Regards,
    Madhavi

  • Table field validation in table maintenance

    Hi all,
    I have the following requirement.
    I created a Z table with 3 fields Zfield1, Zfield2, Zfield3 and key as Zfield1 and Zfield3.
    If Zfield1 is filled, then I need to make the rest of the fields as mandatory.
    How to do this?  Can we use the table maintenance event 05-Creating a new entry for this?
    A sample code would be appreciated.
    Thanks Alka

    hi alka,
    go to the table in SE11 -> click on tab utilities -> table maintenance generator -> click on environment -> modification -> events .
    mention here the event 01 - before saving the data in database.
    write there the code
    FORM
    put a check on ur field
    error  MESSAGE
      LEAVE TO SCREEN screen number.
    ENDFORM.

  • Fields update on Table maintenance generator screen

    HI All..
    I have a custom table with five fields. I did table maintenance generator on it. It has Screen 1 as overview screen and scree 2 as single screen.
    Now of the five fields two fields are user name and date. When i enter data on the other three fields and save it on the second screen - iam able to update the two fields for username and date and display on the screen two itself.
    But if iam not saving the data on the screen 2 and going back to screen 1 and then save it - iam not able to update the user name and date and also to display the username and date on the screen.
    Any suggestions are helpful..
    Thanks and will reward helpful answers.

    In this case..
    Iam having the functionality of SM30 through table maintenance generator.
    On Screen 2- single screen - user name and date is working as i had written the logic in the relevant PBO and PAI module.
    But if user is not saving the data in screen screen2 and coming back to screen 1- which is overview screen and then try to save it-- all other fields are getting saved except the username and date..
    Thanks.

  • How to disable a field in the table maintenance generator of a table

    dear experts,
    i have created a table with  2 fields A ,B . i had created table maintenance generator  for the table. i am entering the values for the table through table maintenance generator . for filed A i had given dropdown list which contains  only 2
    entries YES & NO. my requirement is if i select YES in field A , field B should be in enable mode(it must take some input), if i select NO in field A, field B should be in disable mode ( it should not take any input).
    kindly help me....
    thanks & regards
    krishna

    Hi Krishna,
    A further to the above, you can go to SE11 and in the table maintenance generator click on
    Fn.Gr.Text button, then go to Main program.
    Here you will see "User-defined Include-files (if necessary). "
    Just uncomment the PAI include and put your code..to make the field editable or un-editable.
    To do that you might have to go to the screen painter and change that screen, to include those fields in a group or something, so that you can control them better.
    Regards,
    Sameer

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

  • Search Help for field on table maintenance generator ECC 6.0

    Hi All.
    To maintain search help for a custom field on table maintenance generator.
    Only through coding.
    Cannot use domain or data element or table field search helps.
    Have to code only.
    Is there any way?
    Can I do modifications/additions to screen code and achieve this?
    Regards,
    Veeranji Reddy P.

    Scenarion:
    1. table with 2 fields.
    2. table maintenance generator.
    3. Function group with one screen(0001-mentioned in table maintenance) created.
    4. For one field on table maintenance generator...where we add new entries to table, i want a search help.
    Conditions : only coding has to be done..no search helps I can use.
    Coding where and what?
    one option is to code on the screen 0001- either in PBO/PAI.
    Is it a rite place...? or any other option? But no search helps as mentiond in my first message can be used.
    Thanks and Regards,
    Veeranji Reddy P.

  • Disabling fields in table Maintenance generator

    Hi Experts,
    I would like to restrict some fields in table maintenance generator dynamically/ statically.
    Here is the situation.
    I have generated table maintenance for the table ZMARA and I have created three transactions for the above single table maintenance generator.
    i.e .. Transaction      ---        Table
              ZT1                  ---         ZMARA
              ZT2                  ---          ZMARA
              ZT3                  ---          ZMARA
    I am using above three transactions in my module pool program. Based on the certain conditions I am calling different transactions i.e ZT1, ZT2, etc
    Here is my requirement:
    Suppose if I call ZT1 transaction, I need to display only few fields. i.e ZMATNR, ZMTART, ZPRODH.
    or remaining fields should disable. User should not allow to change the content, even if it is new entries/existing entries. only ZMATNR, ZMTART, ZPRODH.
    Suppose if I call ZT2 transaction, I need to display only few fields. i.e ZMATNR, ZMTART, ZHTSCODE
    How can we restrict dynamically when you call table maintenance generator table through transaction
    or
    How can we generate table maintenance for few fields?
    Edited by: r badveli on Mar 16, 2009 4:27 PM
    Edited by: r badveli on Mar 16, 2009 4:27 PM
    Edited by: r badveli on Mar 16, 2009 4:28 PM

    Hi ,
    go to Se11->Table maintenace generation. Double click on screen to edit and assign the field you want to display/hide to groups. In PBO , after the following lines..
    LOOP AT EXTRACT WITH CONTROL
    TCTRL_ZMARA                         CURSOR NEXTLINE.
       MODULE LISTE_SHOW_LISTE.
    ENDLOOP.
    Write a new module in PBO and edit the SCREEN as per the Tcode, you are calling,,'
    Hope this helps you
    Rj

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

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

  • Table Maintenance Generator : Editable Entry after validation fails

    Hi,
    I have created a Z table and a table maintenance generator to maintain the data.
    I have to carry out certain validations when user enters data on Key and Non- key fields.
    This is working fine, but the issue is with the key fields.
    If validation fails, the table maintenance screen is displayed the date-field is grayed out (non-editable) as it is the key field of the table.
    Now the user cannot change the data unlike the non-key fields were the user can modify the non-valid data and save again.
    How can make the date field (Key Field) editable after entry in case the validation fail, so that the user can make the changes.
    Please suggest the approach to handle the above scenario in events.
    Thanks,
    Keyur

    Thanks Kiran for your inputs.
    I have done the same thing what you have explained.
    I have used a Form Routine as CIP_SAVE with Event Number as 01, since on event SAVE i need to validate whether dates are
    overlapping the inputs dates or not.
    Fields are :
    Group ID (Key)
    Start Date (Key)
    End Date (Key)
    Value (Non -Key)
    Initial value in Table:
    Group ID = 12345
    Start Date = 01/01/2011
    End Date = 01/31/2011
    Value = 11.11
    Now if i try to enter value:
    Group ID = 12345
    Start Date = 01/02/2011
    End Date = 01/25/2011
    Value = 99.99
    & SAVE it... validation will fails because Start & End dates overlaps.
    Hence, on Table Maintainance Screen all key fields will be in non-editable display mode, whereas non-key field will be in editable mode.
    My requirement is that Start Date & End Date key fields must be Editable field.
    Thanks.

  • Modify Key Field Values of a table through Table Maintenance Generator

    Hi All,
       I have created a z table with below structure. In this fields upto Valid To are all key fields. This is to ensure that consistant valid record get stored in the table.
    MANDT     MANDT     CLNT     3     0     Client
    VKORG     VKORG     CHAR     4     0     Sales Organization
    VTWEG     VTWEG     CHAR     2     0     Distribution Channel
    SPART     SPART     CHAR     2     0     Division
    SKU     MATNR     CHAR     18     0     Material Number
    LZONE     LZONE     CHAR     10     0     Transportation zone to or from which the goods are delivered
    VALID_FROM     ZVALID_FROM     DATS     8     0     Valid From
    VALID_TO     ZVALID_TO     DATS     8     0     Valid To
    PLANT     WERKS_D     CHAR     4     0     Plant
    SNP_TZONE     ZSNP_TZONE     CHAR     20     0     APO Transportation Zone
    ERDAT     ERDAT     DATS     8     0     Date on Which Record Was Created
    ERNAM     ERNAM     CHAR     12     0     Name of Person who Created the Object
    AEDAT     AEDAT     DATS     8     0     Changed On
    AENAME     AENAME     CHAR     12     0     Last changed by
    I have created a Table Maintance program through the Table Maintenance Generator. And for that I have assigned a t code.
    I can able to create new entires but i can not able to modify Valid_from and Valid_to entries of existing records.
    Initially those two fields were in display mode but i went to its module pool program and made then as input enabled. But what the vales I was entering, its not getting saved in database. When we change the values of those fields and save it, the system is saying No Data Change.
    Any inputs how to solve this issue. I can not make VALID_FROM and VALID_TO fields as non key.
    Regards,

    Hi,
      As you have already said that the value for valid to is a part of the key so you should not have any issues when this value is changed and the value is saved using the table maintainence generator, but in case you want to save values where the value for valid from has changed but the key is same we would not be able to save as there is already a value for the key, so if you want to save these values there are two ways 1 would either to delete the existing value value and create the new value or to have one more field as the key field like a counter so when the value is saved with a key the value is saved with counter as 1 and then ever next time for the new values increase the value of the counter.
    In order to save these values use event 5 and put you code there.
    You can also carry out checks for new aithorization in that event also.
    Regards,
    Himanshu

  • 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

  • How to pre-populate fields for new entry in table maintenance

    Hey everyone,
    I have a table maintenance set up that I would like to pre-populate two date fields when the user creates a new entry or copies an existing entry.
    I can do this by adding a PBO module for the maintenance screen but then if the screens are regenerated my changes are lost so this is not ideal.
    I've also found that I can use the events (05 and 21 I believe) to set the dates but using these events I can not fill in the values in the screen so this is also not ideal.
    Is there an event that can be used to pre-populate fields in a table maintenance screen? If not, what is your suggested method for accomplishing this?
    Thanks in advance! I appreciate any help!

    Hi,
    Please use the below links...
    [Table maintenance Field Validations;
    [http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=93454609]
    Thanks,
    Manish

Maybe you are looking for

  • Very slow PDF generation when conditional text is hidden in FM 9.0

    I am working on 96-page chapter of a larger book. A 7-page section of the chapter needs to be hidden until the next release, so I hid it with conditional text. After doing this, the "Save as PDF" printing process goes from taking 6-7 seconds to takin

  • Back up question

    I'm new to Mac, and am reasonably proficient with MS Windows (Vista). I have a Vista machine and a Mac Mini without a DVD burner, along with a Timecapsule hardwired to the PC. To back up my Mac Mini, which I use exclusively for iTunes and media, I fo

  • Matching video sources: Panasonic DVX 100 and Canon G10

    I am trying to match digital video captured on mini-DV from a Panasonic DVX100 with video captured on a Canon G10 digital camera. The G10 footage is a good quality, but looks noticably different, the clips do not blend well. Has anyone tried somethin

  • Server returned HTTP response code: 411

    Hi I am getting the following exception Exception in thread "main" java.io.IOException: Server returned HTTP response code: 411 for URL: http://somehost/media/test/chriskennedydqv01-3.wmv      at sun.net.www.protocol.http.HttpURLConnection.getInputSt

  • I can not get a scroll bar in Adobe paper texture pro. I have a Mac and CC14.

    I have tried re downloading and turning my computer off and back on.