Skip to Content
avatar image
Former Member

Input field validation in a Table based on the value of other column

Hi all

I have a table with 2 columns. column1 is of text view and column2 is Input field.

The user should not be allowed to enter a value in the column2 ( input field) greater than the value populated in column1(textview).

So for Eg; if the column1 is populated with value 100, The user should not be able to enter a number greater than 100 in the column2 input field.

Please let me how this can be achieved.

I appreciate the help.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 03, 2008 at 06:44 PM


    Take a look on this: [] at page 22.

    And you can do validations on user inputs in the method WDDOBEFOREACTION. You can get more help on this in the following document [] at page 36.


    Add comment
    10|10000 characters needed characters exceeded

  • Jul 03, 2008 at 08:18 PM


    Let me make sure u r working with table control.

    First u have to create a event(VALIDATE) to do the validation.

    Inside the event,

    1. First get the current index where user has pointed the curson

    2. Once u get the index read the internal table with index value.

    3. Now u can compare the col1 and col2 values and populate the error message.

    1. DATA : lo_elt TYPE REF TO if_wd_context_element,

    l_index type i.

    lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).


    above code should be written inside the event.


    Add comment
    10|10000 characters needed characters exceeded