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 extra spaces from a Quantity field

Former Member
0 Kudos

HI,

Please tell me how to remove extra spaces from quantity field. Suppose we have declared a field as QUAN(13,2) but only 3 places are being used eg: 200.36, then how to remove extra spaces from the field.

Thanks

7 REPLIES 7

Former Member
0 Kudos

Hi Kiran,

What is the output you are getting currently for 200.36.

You can use CONDENSE or REPLACE or OVERLAY accordingly.

Regards,

Balaji

Former Member
0 Kudos

hi Kiran,

Use <b>Condense</b> statement ..

Regards,

Santosh

0 Kudos

Condence is used for only character fields, I cannot move quantity field to character field as per rquirement.

0 Kudos

Hope this code helps you....

REPORT ztest.

data: w_qty type p decimals 3 value '200.3',
      w_char(20) type c.

write:/ w_qty.

w_char = w_qty.

write:/ w_char.
condense w_char.
write:/ w_char.

~thomas

Former Member
0 Kudos

Hello Kiran,

Move the Quantity firld to a character Variable and use COndense.

If useful reward.

Vasanth

shishupalreddy
Active Contributor
0 Kudos

Hi,

Use the folloaing code.

CONDENCE quan no-gaps.

regards,

Former Member
0 Kudos

hi

good

you can use CONDENSE statement to truncate the 0 from the value.

thanks

mrutyun^