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: 

to suppress zeros in quantity field

Former Member
0 Kudos

hi experts,

              when i populate an internal table to alv,intial value for quantity field is '0.00' i want to suppress zeros in program itself not in alv.

thanks in advance,

vinodh.

1 ACCEPTED SOLUTION

former_member188827
Active Contributor
0 Kudos

set no_zero in feildcatalog = 'X' for quantity field.

fieldcat-no_zero = 'X'.

Regards

10 REPLIES 10

former_member188827
Active Contributor
0 Kudos

set no_zero in feildcatalog = 'X' for quantity field.

fieldcat-no_zero = 'X'.

Regards

0 Kudos

hi,

   i want to do this in program itself becoz,some value in table having '0.00' and ' ',but i want to get that ' ' value.

0 Kudos

no_zero addition will display only blank field in output in case value is '0.00'. Can you please share the data type of your quantity field?

Regards

0 Kudos

hi,

its predefined type with type dec.

0 Kudos

Have you tried using no_zero while building fieldcatalog?

Regards

0 Kudos

hi,

   yes i have tried but i am having some value as 0.00 its also getting deleted in alv but i want value as ' '.

0 Kudos

Please share your code.

Regards

0 Kudos

Hi Vinodh,

You cannot do this unless your column type is a CHAR.

You need to have another internal table with the quantity field replaced by a Char field and display it in ALV.

Regards,

Bharat

Former Member
0 Kudos

Hello,

You need to declare a variable of type c and then clear before use it in the ALV output table.

Thanks,

pmelo

Former Member
0 Kudos

hi,

  thank you soo much ,issue is solved.i have declare the type as char.