cancel
Showing results for 
Search instead for 
Did you mean: 

Value 0 and cl_wd_dynamic_tool=>check_mandatory_attr_on_view

Former Member
0 Kudos

I use the method  cl_wd_dynamic_tool=>check_mandatory_attr_on_view to check if all required input fields are filled.

This works perfect for my text fields, but I have some problems with numeric fields.

I have a percent field in my structure with the Data Element TDPERCENT, a NUMC Data Type with a length of 3 and a value range from 0 to 100.

If I enter 0 as value into the field the check_mandatory_attr_on_view method marks it as not filled. I think this happens because 0 is also the initial value of the Data Element.

Is there a possibility to allow 0 as a valid input?

Best regards,

Philipp

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

For NUMC, 0 is the initial value.  You could either use a different data element (of type char 3), or use CHECK_MANDATORY_ATTRIBUTES method and do not pass the attribute (which is of type numc when it's initial/ 0) to the Attribute_List.

hope this helps,

Regards,

Kiran

Answers (0)