cancel
Showing results for 
Search instead for 
Did you mean: 

Highlight the Screen InputField for wrong entry by User

Former Member
0 Kudos

Hi Experts,

I am developing a web dynpro abap application for password forgot functionality. in this regard we have a requirement that when user asks for password reset, he will be given a set security questions to be answered(we will compare the answers which are already there at ztable, which are given by user while registering).

so if the answer is not correct, i have to highlight that particular input field and give the message to re-enter the value,

this option is provided for 3 times only.

i can enable and disable ..but highlight that particular field is required in this scenario.

So please anyone who can throw some light in this is gr8 help.

Thanks in Advance

Sateesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Error message need to be displayed next to the inputfield.

former_member199125
Active Contributor
0 Kudos

HI Sateesh,

Use the Message area UI element.

Place message area ui element below input field in your view.

Then automatically message will display below input field.

Regards

Srinivas

former_member184578
Active Contributor
0 Kudos

Hi.,

Create a TextView side by input field with design as negative (for red color ). initially hide the text view.

in onAction Event if it is error show the textview .

hope this helps u.,

Thanks & Regards,

Kiran

Former Member
0 Kudos

HI,

I have 5 input fields and i am validating through the values from ztable. for each input field i need to show the error message individually after each input field. where as currently i am getting the all the 5 error message in a single textview or message ui element. how to show individually.

thanks

sateesh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

HI,

> I have 5 input fields and i am validating through the values from ztable. for each input field i need to show the error message individually after each input field. where as currently i am getting the all the 5 error message in a single textview or message ui element. how to show individually.

>

>

> thanks

> sateesh

Sorry, but that isn't how messages work in WDA. All messages are consolidated into the MessageArea and you can only have one message are per view. This is designed for user experience consistency.

If you want what you describe, you can't use standard messages and the message manager. Instead you will have to put a non-visible textView after each inputField and bind to a context attribute for each. You can then place messages in there and show the textViews where necessary. However this sounds tedious as you must maintain all of this yourself.

former_member184578
Active Contributor
0 Kudos

Hi,

If you want to display error message side by the input field. As described in my previous reply you have to create 5 text views side by the input fields ., initially hide the text views if error occurs show them..

hope this helps u.,

@thomas sir: Please don't scold me..

Thanks & Regards,

Kiran

Former Member
0 Kudos

Thanks to you all for your kind attention. I am leaving the messages to get displayed on top which was by default.

Best Regards

Sateesh J

Former Member
0 Kudos

Hi Jabi,

use REPORT_ATTRIBUTE_ERROR_MESSAGE to highlight field when error occurs.

if <condition>

*   get message manager
      data lo_api_controller     type ref to if_wd_controller.
      data lo_message_manager    type ref to if_wd_message_manager.

          lo_api_controller ?= wd_This->Wd_Get_Api( ).

          CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
            RECEIVING
              MESSAGE_MANAGER = lo_message_manager.

* report message
          CALL METHOD lo_message_manager->REPORT_ATTRIBUTE_ERROR_MESSAGE
            EXPORTING
              MESSAGE_TEXT   = 'Pick Quantity Should not be 0... '
              ELEMENT               = wa_temp          // your  element
              ATTRIBUTE_NAME = 'PICK_QTY'.   // your attribute
endif.

Cheers,

Kris.

Former Member
0 Kudos

Thank you Kissnas for your quick response. your answer however solved my problem.

Can you please suggest, as i need the message to be displayed next to the inputfield, but we are getting the error message on top of the screen.

Thanks & Regards

Sateesh J