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: 

Remove space

Former Member
0 Kudos

Hi,

I am using following variables

DATA: a TYPE I.

DATA: b TYPE p DECIMALS 3.

DATA: c TYPE p DECIMALS 3.

And getting the output in the following way in the zebra printer. MM,CM,KG are fixed in zebra template.

400(result of ‘a’ field) MM

100.000(result of ‘b’ field) CM

1.234(result of ‘c’ field) KG

But I need to delete the space between result and mm and I want to display in the following way

400mm

100.000cm

1.234kg

I Am not able to use shift command because all the variables are not character fields. Please tell me the best logic for this. I will give points.

Thanks a lot in advance.

4 REPLIES 4

Former Member
0 Kudos

HI,

use condense keyword.

CONDENSE <field> NO-GAPS.

<b>example:</b>

DATA:abc(20) value 'wel come'.

CONDENSE abc NO-GAPS.

write:/ abc.

rgds,

bharat.

0 Kudos

Hi,

You can try to use SPLIT command to split the string at SPACE ' '.

SPLIT str at ' ' INTO str1 str2.

CONCATENATE STR1 STR2 INTO STR3.

STR1 = STR3.

And then concatenate the strings.

Regards,

Sesh

Former Member
0 Kudos

use no-gap extension while writing....

suresh_datti
Active Contributor
0 Kudos

Move the field content to a char type temp varaible .. remove the space using SHIFT or CONDENSE.. move it back to the original field..

~Suresh