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: 

Decimal field is not taking 0 as input (it is becoming blank)

Former Member
0 Kudos
701

Hi all,

I have a custom field in a standard transaction (included by screen exit). My custom field belongs to data type DEC(length7, decimals 2). When the user enters a 0 in the field and hits an enter, it becomes blank again. This, I believe is standard SAP behaviour because 0 is taken as blank in terms of numeric fields.

Is there any possible solution to avoid this? I have searched for some threads and found an answer which says we can assign NUMCV conversion routine to the field screen attributes. But when I assign NUMCV and enter 0 in the field, it is resulting in DUMP.

Please let me know if there is any solution to avoid this.

Thanks,

Sudheshna.

5 REPLIES 5

kesavadas_thekkillath
Active Contributor
0 Kudos
177

hi,

In the screen attributes , in the dic tab change the format to char and try.

NUMCV is used to display the amount field in format 0.00 and not for this purpose.

0 Kudos
177

Hi Keshav,

Thanks for the reply.

I know that the problem can be solved by changing the type to char or numc; however, its a standard table field and changing the data type needs alot of adjustments.

This is the reason, I am looking for other solutions if available.

Regards,

Sudheshna.

0 Kudos
177

I did not tell you change the data type, just told to change the dictionary type of that field attributes in the screen layout.

0 Kudos
177

Hi Keshav,

Thanks again for your reply. But changing the data type in field attributes of the screen did not help. It is still behaving in the same manner.

Regards,

Sudheshna.

0 Kudos
177

Hi friend,

I'm afraid that we can not enter 0 for numeric screen field (but when you change to display mode for input fields 0 will show).

So, try to change your screen field data type to char and use FM to convert to number after users enter. Or set default number for screen field (0 or 0.00 if decimals)

Thanks,