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

Remove space

Former Member
0 Likes
641

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
Read only

Former Member
0 Likes
607

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.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
607

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

Read only

Former Member
0 Likes
607

use no-gap extension while writing....

Read only

suresh_datti
Active Contributor
0 Likes
607

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