11-01-2007 10:30 PM
Hi all,
I need to set a default value to a fields in a screen.
But when i declared field as NUMC , i am not able to store 0 (zero value) into it .
and also when iam declaring as integer also iam not able to store 0 .
Pls anybody let me know how to set the defualt value.
its urgent
11-01-2007 11:19 PM
Are you able to store some other value than zero in this field?
Regards,
Atish
11-01-2007 11:19 PM
Are you able to store some other value than zero in this field?
Regards,
Atish
11-02-2007 12:06 AM
yes athish,
i am able to store 1 as default value but in debugging i am able to see 0 in that field but i am not to display at execution, but when i declare field as character type
0 is setting as a default value..
As iam deaalring as character type , it is storing alphabets also whereas in my case it should not accept it .
so i am declaring it as numeric data type
11-02-2007 12:18 AM
Hi Madhavi,
This is the issue with NUMC type field. It will not display zero on the screen. As you want it only numeric field then NUMC not suit your need as it can also store CHAR values. So you better declare it as CHAR field and in the code give error if someone enters CHAR values for that field like below.
IF l_field CA sy-abcde.
ERROR -Only numeric values allowed.
ENDIF.
Regards,
Atish
11-02-2007 8:55 AM