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 concatenate spaces

Former Member
0 Kudos

Refer to the following command, i want to concatenate spaces as i have tried with the following command, but it does not take spaces in the account and i got the following output.

v_file_dt_c is a variable with some characters.

Output: 1 041203824000000960019728600000000 v_file_dt_c

CONCATENATE '1' '041203824000000' '960019728600000000 ' v_file_dt_c 'USD' INTO v_header.

9 REPLIES 9

laxmanakumar_appana
Active Contributor
0 Kudos

Hi,

Use 'SEPARATED BY SPACE' along with your concatenate command.first add both these values without separated by spaces ('041203824000000' '960019728600000000 ) into a variable and then concatenate all the variables.

or

Use 'SPACE' command , whereever space required in the string

ex:

CONCATENATE '1' '041203824000000' '960019728600000000 ' v_file_dt_c 'USD' INTO v_header SEPARATED BY SPACE.

Regards

Appana

Former Member
0 Kudos

Hi Pankaj,

Try this

Data : c_space type c ' '.

CONCATENATE '1' c_space '041203824000000' c_space '960019728600000000' v_file_dt_c 'USD' INTO v_header.

Simha_
Employee
Employee
0 Kudos

Hi,

Use this..

<b>CONCATENATE '1' '041203824000000' '960019728600000000 ' v_file_dt_c 'USD' INTO v_header separated by spaces.</b>

cheers,

Simha.

Former Member
0 Kudos

Hi Pankaj

Try using this way.

CONCATENATE '041203824000000' '960019728600000000' into v_header.

CONCATENATE '1' v_header v_file_dt_c 'USD' INTO v_header separated by spaces.

Regards

Eswar

Note: Reward if you find the info useful.

Former Member
0 Kudos

1) CONCATENATE '1' SPACE '041203824000000' SPACE '960019728600000000 ' 
SPACE v_file_dt_c SPACE 'USD' INTO v_header.

OR 
2) 1) CONCATENATE '1' '041203824000000'  '960019728600000000 '  
v_file_dt_c  
'USD' INTO v_header SEPETATED BY SPACE.

Cheers,

TM.

Please mark points if helpful.

0 Kudos

The Key is SEPARATED BY SPACE at the end of the CONCATENATE statement.

ibrahim

Former Member
0 Kudos

hi pankaj,

welcome to <b>SDN</b>

check the example code

CONCATENATE TEXT1 TEXT2 INTO G_HEAD

separated by space into Text3

if u write in this way it should work out

if u find it useful plz reward the points left hand side

Regards,

Naveen

Former Member
0 Kudos

I want to concatenate more than one space at the same place.

0 Kudos

Hi Pankaj,

use my code and put more number of times c_space.

While declaring c_space put one space between '' quotes

Regards,

Mukesh Kumar