Application Development and Automation 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: 
Read only

Zero is not displaying in the screen input

Former Member
0 Likes
3,881

I've created a custom screen where most fields are amount. But upon execution, the requirement is 0,00 will appear on the screen but blank space is displayed.

I've tried this one:

in PBO.

module status_100.

loop at itab.

module show_zero.

endloop.

in program

module show_zero output.

if itab-fname = 0.

loop at screen.

if screen-fname 'ITAB-FNAME'.

screen-input = 0. " If you disable the screen input of Numeric filed it displays zero( I found ths for deciamal values give it a try )

modify screen.

endif.

endloop.

endif.

endmodule.

Zero appeared on the screen but, the field in grayed out, what I want is editable screen.

What do I need to do?

Tnx in advance!

I've created a custom screen where most fields are amount. But upon execution, the requirement is 0,00 will appear on the screen but blank space is displayed.

I've tried this one:

in PBO.

module status_100.

loop at itab.

module show_zero.

endloop.

in program

module show_zero output.

if itab-fname = 0.

loop at screen.

if screen-fname 'ITAB-FNAME'.

screen-input = 0. " If you disable the screen input of Numeric filed it displays zero( I found ths for deciamal values give it a try )

modify screen.

endif.

endloop.

endif.

endmodule.

Zero appeared on the screen but, the field in grayed out, what I want is editable screen.

What do I need to do?

Tnx in advance!

9 REPLIES 9
Read only

Former Member
0 Likes
2,144

??? What are you trying to do? SAP is doing exactly what you asked for, right? You have coded field FNAME as not available for input (0), display only on the screen. Did you think input = 0 puts a zero value into the field? If so, that's NOT how it works.

Read only

0 Likes
2,144

For example,

In tcode VA01, Total Weight and Volume = 0,00 but disabled. What I want is that this two fields will equal to 0,00 at the same time ediatble.

Read only

0 Likes
2,144

Hi,

Actually the requirement itself is confusing, If you want the fields should be editable at 0.00 so you can mension in your if condition with this condition, It will be good if you specify the requirement clearly.

THanks,

Anmol.

Read only

0 Likes
2,144

The scenario is I have a custom program which calls a screen having a table control. In the following fields of table control, most of them are amounts. What I want is that upong execution of the program, zero values (0,00) will automatically appear on the amount field but what it appears is blank.

Read only

0 Likes
2,144

try: change the data type to a numeric field and clear will initialize the value.

Read only

Former Member
0 Likes
2,144

Try to do your field as text and convert text to decimal when trying to update.

Hope it will solve your problem

Read only

Former Member
0 Likes
2,144

HI,

If you want to disable the screen input which is numberic it is for sure tht it will display 0 and disable mode in screen.

If you still want to hide the zero also, define this field as char field and make conversions accordingly.

If you want to enable the screen field put 1 for screen-input and modify screen.

Hope this will give you some idea.

Thanks,

Anmol.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,144

Check my answer here

Read only

Former Member
0 Likes
2,144

Any decimal field displays '0' only if the field is non-editable. if the field is editable, the decimal fields shows blank on the screen.

In my requirement, i made the output field type char and then it displayed the zeroes (editable or non editable)