cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

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

Thanks.

Nagendra

Former Member
0 Kudos

Hi Jainam,

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

-Scott