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

Similar Messages

  • Wdr:select_options and highlight Error Message with a Link to Inputfield

    Hi,
    I have created a InputField on a View using WDR_SELECT_OPTIONS. I want to validate this Input Field and give
    Error Message, when User fill it with wrong Values. How can we achieve this and important is to mark it on Screen WITH a RED STAR. ( e.g. highlighted )
    Thanks!
    Best Regards
    Beserithan Malabakan

    I've not tried it with select options before, but you might wan to have a look at setting the REPORT_ATTRIBUTE_ERROR_MESSAGE method of the message object.  This way the message gets attached to any UI element bound to the context attribute you issue the message for. But as I type this and think about it some more; I see where the problem lies.  The Select Options component doesn't follow an approach of cross component context binding.  It dynamically generates its own context.
    If I had a little more time I would test this out; but it might be worth your while to research.  When you initialize the Select-Options, you normally get access to the interface controller:
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
    * get a pointer to the interface controller of the select options
    *component
      wd_this->lv_wd_select_options =
           wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->lv_sel_handler =
           wd_this->lv_wd_select_options->init_selection_screen( ).
    This interface controller (LV_WD_SELECT_OPTIONS in my case). Has a GET_API method that returns the component controller.  In turn you might be able to access the context of the Select-Options directly. Its a crazy idea, but worth a try.

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

  • How to compare two currency form fields and display a message if the fields do not equal?

    My form has 2 fields named Total_1 and Total_2. If one of the fields does not equal the other, a hidden field will display a message in red on the form alerting the user. Otherwise, the message does not display. Looks like a validation script but I would greatly appreciate help in getting it started. Any ideas?
    Thanks, Charlie
    charlie6067

    Since the field values that you want to compare are the results of calculations, you should not normally compare their string values, but rather their numeric values when rounded appropriately (and perhaps then converted to a string). For example, if you have two values that display as 3.14, one could be 3.1400000001 and the other could be 3.13999999999991234. When you get the field values as strings and compare them, they won't be equal though they appear to be. Even some values that are numerically identical won't be equal when compared as strings ("0.0" != "0.00") So the code could be changed to:
    // Get the two field values, rounded to two decimals
    var v1 = util.printf("%.2f", getField("Total_1").value);
    var v2 = util.printf("%.2f", getField("Total_2").value);
    // Hide/Show the error message
    event.value = (v1 === v2 || (+v1 === 0 && +v2 === 0)) ? "" : "Error message here.";

  • I am creating a request for proposal form and I need to add a commission structure field.  I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?

      I created a table using the ranking field and now I need to delete the "dots/buttons" and turn them into text fields, is this possible?

    It sounds like what you are trying to do is edit the choices in a likert field to something other than the default radio button. This is not something that you can do in Formscentral at this time.
    Andrew

  • 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 validate VO result and display error message?

    Hi,
    I have created 2 pages:
    Page 1: User to enter employee number and click 'Go' button to search (redirect to Page 2)
    Page 2: To display employee details
    In situation where employee is suspended, employee detail will be display as blank in Page 2.
    At the same time, we would like to display error message which inform user to refer to HR Department for this scenario.
    Need guidance on how to perform the validation and display error message.
    Thanks and Regards,
    Shiau Chin

    Hi Shiau,
    In this case instead of redirecting to next page, throw an exception on the same page.
    If you want redirect it to next page then while redirecting it to next page pass some info that can indicate that employee is suspended, get this value in Process request if it has value then throw exception else query details.
    Regards,
    Reetesh Sharma

  • Help req for check customer table maintenance with XD02 if not throw error

    hello ABAP GURUS,
    check customer of the table maintenance with XD02 if not throw error i have given the codition for passing the values in the table but before that it has to check whether the customer i am passing in to the table is a customer from xd02.Here whatever no i am passing it is accepting it should not happen, but when i give the customer which is not a customer it should not accept but it has to throw the message as 'customer does not exist.Its urgent please help me
    TYPES: BEGIN OF TY_KNVI,
    KUNNR TYPE KUNNR,
    TATYP TYPE TATYP,
    TAXKD TYPE TAKLD,
    END OF TY_KNVI.
    DATA : VALIDFROM TYPE GUEBG,
    VALIDTO TYPE GUEEN.
    DATA : IT_KNVI TYPE STANDARD TABLE OF TY_KNVI,
    WA_KNVI TYPE TY_KNVI OCCURS 0 WITH HEADER LINE.
    DATA : V_NAME TYPE SYUNAME.
    SELECT KUNNR
    TATYP
    TAXKD
    FROM KNVI
    INTO TABLE WA_KNVI
    WHERE KUNNR = YYV_CFORM-KUNNR
    AND TATYP = 'ZCST'
    AND TAXKD = '1'.
    V_NAME = SY-UNAME.
    YYV_CFORM-ENTEREDBY = V_NAME.
    IF SY-SUBRC NE 0.
    MESSAGE E000(E4) WITH 'Please change the tax classification of ZCST as' '1' ', in Sales Area Data'.
    ENDIF.
    I have used the following code to enter the data into the table maintenance it is working fine and throwing the error when the tax type is not the one which i have given in the select statements but the problem is when i have given the customer no which is not there in the XD02 tcode, it is accepting and showing the error message as MESSAGE E000(E4) WITH 'Please change the tax classification of ZCST as' '1' ', in Sales Area Data'. now i have to check the customer no from XD02 and if it is existing in that tcode it should allow to save in the table maintenance otherwise throw a message as the 'Customer no does not exist, this I am unable to write so how can i check please help me .
    thankx in advance.
    Edited by: soni khadary on Apr 22, 2008 7:55 AM

    Hi Kelly,
    I guess <wa_tab>-handle_style is of type lvc_t_styl therefore you can do the following:
    ls_edit-style = cl_gui_alv_grid=>mc_style_enabled.
    "I assume you know your non-key fields' names so you can use subrotuine to perform update on each of them
    ls_edit-fieldname =  'First field name' .
    PERFORM update ls_edit.
    ls_edit-fieldname =  'Second field name'.
    PERFORM update ls_edit.
    ls_edit-fieldname = 'Third field name'.
    PERFORM update ls_edit
    FORM update USING fs_edit type lvc_s_styl.
    field-symbols: <style_tab> type lvc_t_styl,
                         <style_wa> type lvc_s_styl.
    LOOP AT <tab> ASSIGNING <wa_tab>.
       if e_row = sy-tabix .
         "get you style table
         assign component 'HANDLE_STYLE' of structure <wa_tab> to <style_tab>.
         "as <style_tab> is typed fully you can read the row you are interested in
         read table <style_tab> assigning <style_wa> with key fieldname = fs_edit-fieldname
         if sy-subrc = 0.
           "update this entry
            <style_wa> = fs_edit.
    *        modify table <style_tab> from <style_wa>. 
         endif.
       endif.
    endloop.
    endform.
    Note!
    Though, this should work, the use of RTTI as Uwe suggested would be best practise approach as far as dynamic programming is concerned. Anyhow it is still up to you which one you pick.
    Regards
    Marcin
    I noticed now that this line is not necessary
    modify table <style_tab> from <style_wa>. 
    as we simply are working with field symbols, so changes made to <style_wa> are already visible in that table <style_tab>.
    Edited by: Marcin Pciak on Mar 15, 2009 12:44 PM

  • Tools for validate HTML and CSS Error in DW?

    Hello Guys,
    Want to know any addon or menu tool in Dreamweaver to validate HTML and CSS error.
    Because every time i have to check in w3c validation. If DW having in this options it wouldbe great to develop website with out error.
    Please let me know your suggestion for that.
    Cheers
    Abdul
    www.ilearnsmart.com
    www.whitehouseit.com

    DW does provide tools to help with validation:
    http://articles.sitepoint.com/article/dreamweaver-8-standards/1
    http://www.adobe.com/support/dreamweaver/htmljava/migrating_hs_to_dwmx/migrating_hs_to_dwm x06.html
    I find it a bit more comfortable though to use teh W3 Validator and I always access that with the Firefox Browser and the Web Developer plug-in.  Another good plug in for FF is Firebug.
    Martin

  • I am running Windows 7 64Bit system and everything was working normal.  However, I am now getting an error message stating objc.dll is missing.  I've re-installed Itunes but to no avail.  How can I get this error message corrected?

    I am running Windows 7 64Bit system and everything was working normal.  However, I am now getting an error message stating objc.dll is missing.  I've re-installed Itunes but to no avail.  How can I get this error message corrected?

    See this User Tip by turingtest2
      https://discussions.apple.com/docs/DOC-6562

  • Updating iTunes 12.1 and get error message "The procedure entry point CMBlockBufferCopyDataBytes could not be located in the dynamic link library CoreMedia.dll - what went wrong and how to resolve this?

    Updating iTunes 12.1 and get error message "The procedure entry point CMBlockBufferCopyDataBytes could not be located in the dynamic link library CoreMedia.dll". What went wrong and how to resolve this?

    Entry point errors can often be fixed by deleting the offending dll, then repairing the component it is part of.
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    If the advice above doesn't resolve things you could try this alternate version:
    iTunes 12.1.0.71 for Windows (64-bit - for older video cards) - itunes64setup.exe (2015-01-28)
    which is a 64-bit installer for the 32-bit version of the core application, similar to previous 64-bit releases.
    Or roll back to the previous build:
    iTunes 12.0.1.26 for Windows (32-bit) - iTunesSetup.exe (2014-10-16)
    iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16)
    tt2

  • HT1386 Error message says only one library per device. My previous computer crashed and now I want to sync with new computer. How do I overcome the error message?

    Error message says only one library per device. My previous computer crashed and now I want to sync with new computer. How do I overcome the error message?

    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • I purchased the TV FRIENDS in HD on iTunes (the iTunes store stated with every HD purchase you get the SD version as well) and want to download on my I Pod Classic and get error message the I POD can play this video.  How do I download?

    I purchased the TV FRIENDS in HD on iTunes (the iTunes store stated with every HD purchase you get the SD version as well) and want to download on my I Pod Classic and get error message the I POD can not play this video.  How do I download?

    I see there's no answer.
    This issue has ****** me off for a long time, and I am fed the **** up with it.
    I DO NOT WANT TO DOWNLOAD the Movies and TV shows to every *^&%^$%# Apple device, ONLY the MUSIC!!!
    COme on Apple!!!  FIx this!!!

  • I tried to install up date 3.6.13 and received error message that I didn't have the right permissions on this mac book , but I am the administrator on my Mac Book Air? Any ideas how to resolve this?

    I tried to install up date 3.6.13 and received error message that I didn't have the system permissions required to install it. I am the administrator on my Mac Book Air? Any ideas how to resolve this?

    * Download a new copy of the Firefox program: http://www.mozilla.com/firefox/all.html
    * Trash the current Firefox application to do a clean (re)install.
    * Install the new version that you have downloaded.
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

Maybe you are looking for

  • Multiple values from a single function to be used SQL

    I have some pl/sql code that calculates multiple values in the same procedure (multiple out parameters). Now I want to use these separate values in an SQL select. One way to do it, is creating functions for each separate value. Performance wise, I do

  • HT1119 MacBook Pro late 2011 won't turn on

    I was working late and let my battery drain while working. The computer shut down. I immediately plugged it in but the light on the power adapter didn't turn on (either orange or green) I tried other plugging it into other outlets. Nothing. I left it

  • How to use an binary stream file to generate Arb from Agilent 33250A?

    I used Lv6.1 and ag33xxx.llb (download from NI web page). And I want to generate Arb waveform from Agilent33250A, this Arb according to an binary stream file, just like 0101110010100011....... I used "Getting Started 2.vi" module, to try first, and a

  • My new MacBookPro (Mac OSX 10.6.7) trackpad preferences not useful...

    My new MacBookPro (Mac OSX 10.6.7) trackpad preferences is trying to detect a bluetooth enabled trackpad instead of displaying the standard trackpad preferences. I really want to be able to set the trackpad preferences, but can't. How to fix this?

  • How to get twiiter data?

    How to get twitter data?  For my project I want  large amount of twitter tweets. How do I get?