Skip to Content
avatar image
Former Member

Making input select option or input field mandatory....

Hello Gurus,

I have been through some material to create select options in web dynpro ABAP. Now I want to make one of the fields mandatory so that if user executes it without filling data in that filed, it gives error message or enforces user to input in the manadtory field.

I know how to do this in ABAP but how do I achieve the same in ABAP webdynpro ?

Please help.

Regards,

Jainam.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 03, 2010 at 05:49 AM

    Hi ,

    Set i_obligatory parameter as X. This will set the select options as mandatory and standard error message will popup in case it is not filled.

    wd_this->m_handler->add_selection_field(
      i_id = 'S_CARR_ID'
      it_result = lt_range_table
    *  i_obligatory = 'X'   ,  " To make it mandatory
    ).

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 02, 2010 at 10:05 PM

    Hi Jainam,

    There are a few ways to do this depending on how your screen is set up. Take a look at this thread:

    mandatory-check-for-select-option

    -Scott

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 03, 2010 at 01:58 AM

    Hi,

    In the method IF_WD_SELECT_OPTIONS->ADD_SELECTION_FIELD, there is an exporting parameter I_OBLIGATORY. Just set this.

    Thanks.

    Nagendra

    Add comment
    10|10000 characters needed characters exceeded