Skip to Content
avatar image
Former Member

UDF with valid values as mandatory field

Hello Experts!

I would like to create a UDF with valid values as a mandatory field. I think SAP does not allow this function because I keep getting this error (please see attached screenshot).

Is there a query I can attach to the UDF where an error message would say that it is mandatory field?

Please help. Thank you! :)

4.jpg (272.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 24, 2016 at 11:35 PM

    Hi Nikka,

    You cannot add mandatory fields without default values to a table containing records.

    In this situation you need check the checkbox "Set Default Value for Field" and choose a default value from list to be the default value. Look the image:

    img.png

    The default value that you select will be inserted in this field in the registers where the field is null.

    About the message for mandatory field, SAP will provide a generic message telling the field "xxx" cannot be null.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded