on 11-19-2008 4:58 PM
Hi,
for example - I have a table element and one of its coloums is of type TIME. The automatic field validation (only valid times allowed) is working fine, but now i need to check that only full and half hours are entered. So if the user enteres "11:11" in a row I want this input-cell to be displayed with a red border and a message to be displayed.
I can check and show a message, but how to highlight that special cell?
Can I assign additional value checks to a context node and how to do this?
Whats the best approach?
Thanks for any help,
Stefan.
Hi Stefan,
As how pointed out by Karri you can make use of the report_attribute_error_message to throw an error message and highlight a particular cell of the table as well. Try going through this [link|; in which Andreas was trying to validate & highlight an ALV's cell with the same report_attribute_error_message.
Regards,
Uday
CALL METHOD lo_message_manager->report_attribute_error_message
EXPORTING
message_text = 'Sample message text'
element = lr_element " Reference of type if_wd_context_element to the cell u want to highlight
attribute_name = ls_modified_cells-attribute. " The context attribute name to which the column of this cell is bound to
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks a lot for your help !!
the element needs to be of the right index and then it works perfect
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you checked all the methods of the message manager (which you already are using for producing the error)? There is a method REPORT_ATTRIBUTE_ERROR_MESSAGE that should do what you are looking for. You need to give it the corresponding attribute as an import parameter, and it will highlight the field. To be honest I am not sure if it will work with tables (=context nodes with cardinality 0...n), and I don't have access to a system currently to check it. But I would guess that it works... At least it works perfecly with "single" input fields.
Regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.