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: 

small issue with field displaying 0

Former Member
0 Kudos

hI all,

I have a field type numc length 4 in my ztable.

i am placing this field in one my screen,its only an out put field.

when i go to this screen i see a value 0 in the box .

when i go into debug mode before going to pbo and in pbo of this screen. i has a value 0000 an in the screen 0.

i don't want to this 0 to be displayed because when iam saving a number is generated for this field . when i am generating the zero is replaced by generated number but i don't want to display the number 0 in the screen before saving.

Let me know if iam missing anything

kajol

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Hi Kajol,

In the screen program declare the variable as a character type variable and finally when saving to the database move that value to the ztable's numc field.

Numc fields will have 0s by default.

hence you have to use a char type variable atleast in the screen.

Regards,

ravi

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

Hi Kajol,

In the screen program declare the variable as a character type variable and finally when saving to the database move that value to the ztable's numc field.

Numc fields will have 0s by default.

hence you have to use a char type variable atleast in the screen.

Regards,

ravi

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Hi, this is the behavior of the data type and the dynpro rendering. You can not change this. You can however make the field a type C, or character field, and handle the conversion in your program from the screen to the db table. If the screen field is character and the value is 0, you can simply not pass the 0 to the screen field, then it will show blank.

Regards,

Rich Heilman

0 Kudos

Hi ,

THANK YOU GUYS

kajol