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: 

How to remove zero from being displayed in screen via dialog programming?

former_member230666
Participant
0 Kudos

Hi Experts,

Would like to seek for your advice. If the variable equals to zero it should not show anything in the table column in screen '0200'. I've tried to modify the table as below before passing it to be displayed in the screen. Somehow it still shows zero in the screen '0200'. Please help me. Thanks.

TYPES: BEGIN OF ty_receive,

               qty(13) TYPE n.

             END OF ty_receive.

DATA: lt_receive TYPE STANDARD TABLE OF ty_receive,

          wa_receive LIKE LINE OF lt_receive.

LOOP at lt_receive INTO wa_receive.

     IF wa_receive-qty = 0.

              WRITE wa_receive-qty TO wa_receive-qty NO-ZERO.

     ENDIF.

      MODIFY lt_receive FROM wa_receive.

ENDLOOP..

Regards,

Por Shen

6 REPLIES 6

Former Member
0 Kudos

Hi

based on your condition why dont you make field wa_receive-qty = '  '. So there will be no value stored.

0 Kudos

Hi,

I've tried this way too. However it still shows zero in table column at screen '0200'. Please help.

jeroen_verbrugge2
Active Participant
0 Kudos

Hi,

What do you mean by table? I assume you're using a table control?

Did you generate this? If you did, did you use the variables lt_receive and wa_receive for table and workarea in the generation wizard?

Wizard:

This piece of code shows below screen:

TYPES: BEGIN OF ty_receive,
                qty(13) TYPE n,
              END OF ty_receive.

DATA: lt_receive TYPE STANDARD TABLE OF ty_receive,
           wa_receive LIKE LINE OF lt_receive,
           ok_code type sy-ucomm.

wa_receive-qty = 12.
append wa_receive to lt_receive.
wa_receive-qty = 0.
append wa_receive to lt_receive.
wa_receive-qty = 12.
append wa_receive to lt_receive.

call screen 1979.

Rgds,

Jeroen

0 Kudos

Hi,

I create the table control manually using screen painter without using the table control wizard. The screen shot in your reply is exactly what I'm looking for. Is it possible to do show the screen shot output without using table control wizard? I've tried to play around with my coding and nothing seems to work from myside. Please advice me. Thanks.

0 Kudos

Hi,

Try to use the wizard, it's very easy! Speaks for itself.

Also without using the wizard you should get this working.

The reason that it shows differently is because of the way the field is defined on the screen and not how the field is defined in the table. Check the screenfield definition, is it defined as WA_RECEIVE-QTY? If you double click and check the attributes, does it show NUMC as format? Or did you use something else on the screen definition?

Kind Regards,

Jeroen

Former Member
0 Kudos

Hi,

i think there are three possibilities

1)use NUMC OR C instead of N

2)

Before displaying the filed in table convert field in to character,character accept blanks,you have to do this in PBO event

3)check screen field data type in screen painter where value is displayed.

if helpful please give reward point.

Warm Regards!!!

Jenish Tailor