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: 

Concatenation with space

Former Member
0 Kudos

Hi all,

Need ur kind help in concatenating as below.

L_MATERIAL(18) = LQAMCANO240033. "Material no length varies upto 18 char

L_BATCH = T91.

Output should be LQAMCANO240033&&&&T91

& denotes space

Pls note that there should be space in case the material no is smaller.

Regards,

Karthik

1 ACCEPTED SOLUTION

Former Member
0 Kudos

U can use WRITE statement with offset to get the requiremd result.

WRITE l_material to l_text+0(18).

write l_batch to l_text+18(3).

L_text will have the required result.

3 REPLIES 3

Former Member
0 Kudos

U can use WRITE statement with offset to get the requiremd result.

WRITE l_material to l_text+0(18).

write l_batch to l_text+18(3).

L_text will have the required result.

Former Member
0 Kudos

Hi.

data L_space(4) type c.

data l_output(25) type c.

concatenate L_MATERIAL L_BATCH

into L_output.

separated by l_space.

output l_output.

Former Member
0 Kudos

Hi Karthik,

Try the following statements.

l_out = l_material.

l_out+18(3) = l_batch.

-Anu