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

Supress zero with space

Former Member
0 Likes
892

hi all,

I have a coulmn in my hierchial list display which will have

whose type is CURR , and its values is 0.00 .

my query is i dont want to dispay 0.00 , and it should be space ... how to do it..

things i have done..

i have moved this value to a varaible type 'char' and then moved space to that new variable but it didnt work.

please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
866

Mayank,

use this code.

loop at itab where <your curr field> = '0.00'.
itab-<your curr field> = ' ' .
modify itab transporting <your curr field>.
endloop.

Amit.

hi all,

I have a coulmn in my hierchial list display which will have

whose type is CURR , and its values is 0.00 .

my query is i dont want to dispay 0.00 , and it should be space ... how to do it..

things i have done..

i have moved this value to a varaible type 'char' and then moved space to that new variable but it didnt work.

please help.

6 REPLIES 6
Read only

Former Member
0 Likes
867

Mayank,

use this code.

loop at itab where <your curr field> = '0.00'.
itab-<your curr field> = ' ' .
modify itab transporting <your curr field>.
endloop.

Amit.

Read only

Former Member
0 Likes
866

Hi Mayank,

Try this way :

Loop at itab.

  IF itab-price = '0.00'.

       Continue.

  Else.

      Write :/ itab-price.

  Endif.

Endloop.

Regards,

Swapna.

Read only

Former Member
0 Likes
866

Hi,

While filling the output internal table take the currency field as CHAR and use the below condition if currency exist(while filling the currency).

if v_curr_val > 0.

write v_curr_val to gt_output-curr_val.

endif.

Append gt_output.

Read only

Former Member
0 Likes
866

Hi,

You Can Replace the filed with Space.

like.

Loop at itab into wa.

if wa-price = '0.00'.

REPLACE wa-price with SPACE into Wa-price.

endif.

Write: wa-price.

Endloop.

Hope it will help you.

Regards,

Sujit

Read only

Former Member
0 Likes
866

use in field catalog STRUCT_FIELDCAT-NO_ZERO = 'X'.

Thanks,

Kinjal

Read only

0 Likes
866

Hi,

loop at itab into wa.

if wa-price = '0.00'.

continue.

endif.

write:/ wa-price.

endloop.

Regards.

Sriram.