Skip to Content
author's profile photo Former Member
Former Member

ABAP: Valdation of required fields

Hello,

This has been mentioned here and there but the question remains.

I have to perform validation of required fields that I have on a page. I do not know how many fields (input fields, drop down by key, etc.) I might have on a page since the content is very dynamic. When a user tries to submit the form I need to validate all of these fields and make sure they contain values.

Is there an efficient way in WD ABAP to validate fields?

Or I have to manually parse the page get element, get value of an element, check it and if is NULL (INITIAL) raise a message?

Thank you.

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Posted on Jul 10, 2006 at 02:20 PM

    Hi Georgy,

    the check fpr mandatory fields is not implemented in the framework, but you can use the service function cl_wd_dynamic_tool=>check_mandatory_attributes.

    You have to pass a list of nodes, elements and attributes, and we check, whether values are entered.

    More information is available in note 948753.

    Regards, Regina

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 10, 2006 at 08:06 AM

    Hi Georgy,

    Since you bind the primary attribute of those ui elements to a context attribute, just check the context attributes for being initial. There is no need to iterate through the screen.

    Best regards,

    Thomas

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 10, 2006 at 10:45 AM

    .

    Message was edited by: Arun Bhat J

    Add comment
    10|10000 characters needed characters exceeded