cancel
Showing results for 
Search instead for 
Did you mean: 

How to highlight an input field in FPM while occurring error

0 Kudos

Hello All,

I am using two input fields in a fpm_form_uibb. when the user does not enter anything in the input field and click the process button, it is giving an error message.

I want to highlight the field which is causing the error. Can any one provide me any information?

Thanks and Regards,

Rimi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rimi,

For highlighting the field first you have to set the property STATE of Input field as required.

And on action of button, you have to trigger following code. It will highlight Blank Input filed as red and show the message in message area.

data lo_api_controller type ref to if_wd_view_controller.

lo_api_controller = wd_this->wd_get_api( ).

  call method cl_wd_dynamic_tool=>check_mandatory_attr_on_view

    exporting

      view_controller  = lo_api_controller

      display_messages = abap_true

    importing

      messages         = lt_message_tbl.