Skip to Content

additional field validation


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,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 20, 2008 at 05:55 AM

    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|editable ALV - how to throw an error message for a specific line & field; in which Andreas was trying to validate & highlight an ALV's cell with the same report_attribute_error_message.



    CALL METHOD lo_message_manager->report_attribute_error_message
                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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 19, 2008 at 08:08 PM


    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.



    Add comment
    10|10000 characters needed characters exceeded

  • Nov 20, 2008 at 07:56 AM

    thanks a lot for your help !!

    the element needs to be of the right index and then it works perfect

    Add comment
    10|10000 characters needed characters exceeded