on 02-10-2010 7:02 AM
Hello,
I have a requirement of highlighting a inputfield.
This inpufield is binded with an attribute DATE. I want to create an error message if the date is in the past and at the same time the inpufield for DATE attribute should be highlighted( = red border).
Please suggest.
Regards,
Yogesh
Hi,
Make use of REPORT_ATTRIBUTE_ERROR_MESSAGE method. This method will generate the error message. If the error message is clicked, the focus will be transferrred to the UI element which has caused the error.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Yogesh,
You need to declare a field-symbol of type csequence.
FIELD-SYMBOLS: <LV_MSG> TYPE CSEQUENCE.
And the implementation methodology for this method is:
ASSIGN 'Entered date is invalid' TO <LV_MSG>.
* 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.
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = <LV_MSG>
element = LO_EL_<ELEMENT> --> THIS IS YOUR CONTEXT ELEMENT.
attribute_name = 'DATE'.
Regards,
-Syed.
Edited by: wahid hussain syed on Feb 10, 2010 9:08 AM
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.