Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

default value to a field in PBO

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Are you able to store some other value than zero in this field?

Regards,

Atish

4 REPLIES 4

Former Member
0 Kudos

Are you able to store some other value than zero in this field?

Regards,

Atish

0 Kudos

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

0 Kudos

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

0 Kudos

Hi Athis,

Can i declare it as a integer,