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 prevent trimming when concatenating strings.

Former Member
0 Kudos

Hi, this is a question on concatenation.

DATA: TXT_FILENUMBER(3) TYPE C.

...

CONCATENATE 'AREA A FILE PATH ' TXT_FILENUMBER ' IS A REQUIRED FIELD.' INTO MAND_ERR_MSG.

...

The output of this concatenation is (assuming txt_filenumber = '2'):

AREA A FILE <b>PATH2</b> IS A REQUIRED FIELD.

==> The word PATH and 2 are joined together. Why is that so?

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

hi Kian,

you should do:

CONCATENATE ... INTO ... <b>SEPARATED BY SPACE</b>.

ec

Message was edited by:

Eric Cartman

3 REPLIES 3

JozsefSzikszai
Active Contributor
0 Kudos

hi Kian,

you should do:

CONCATENATE ... INTO ... <b>SEPARATED BY SPACE</b>.

ec

Message was edited by:

Eric Cartman

former_member187255
Active Contributor
0 Kudos

Kian,

try this...


 CONCATENATE 'AREA A FILE PATH ' TXT_FILENUMBER ' IS A REQUIRED FIELD.' INTO MAND_ERR_MSG SEPARATED BY SPACE.

Chandra.

Former Member
0 Kudos

Hi,

Put a SPACE key word in between PATH & TXT_FILENUMBER.

Satish