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: 

Reg : blank spaces

Former Member
0 Kudos

hi all ,

the reuqirement is that i need to have blank spaces and that needs to be concatenated into another variable ..so how define a constant if the size is 20 type c and i need to have to twenty blank spaces ...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

try to code like this.

data: lv_c(20) type c value '0'. " i think character takes by default value as '0', if so than dont define character value.

loop at itab.

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input = lv_c

importing

output = lv_c.

concatenate lv_c var1 into var2.

endloop.

6 REPLIES 6

Former Member
0 Kudos

hi,

try to code like this.

data: lv_c(20) type c value '0'. " i think character takes by default value as '0', if so than dont define character value.

loop at itab.

call function 'CONVERSION_EXIT_ALPHA_INPUT'

exporting

input = lv_c

importing

output = lv_c.

concatenate lv_c var1 into var2.

endloop.

0 Kudos

data : abc(20) type c VALUE '0'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = abc

IMPORTING

OUTPUT = abc

.

concatenate abc into var2.

peter_ruiz2
Active Contributor
0 Kudos

hi,

data:

v_count type p,

v_test(20) type c.

v_count = 0.

do 20 times.

v_test+v_count(1) = space.

add 1 to v_count.

enddo.

write v_test.

regards,

Peter

Former Member
0 Kudos

Hi!

DATA: gv_string TYPE string,
      gv_3c(3) TYPE c.

gv_string = 'abcdef'.
CLEAR: gv_3c.
CONCATENATE gv_string  gv_string INTO gv_string
  SEPARATED BY gv_3c.

*The output will be 'abcdef   abcdef'.

Regards

Tamá

Former Member
0 Kudos

hey execute this program.

data: abc(20) ,pqr(03),lmn(45).

pqr = 'pqr'.

abc = ' '.

CONCATENATE pqr abc pqr into lmn RESPECTING BLANKS.

write:/ lmn.

if u still not gettin output let me know.i'll try to help you.

Former Member
0 Kudos

Hello



data: str1(5),
      str2(5),
      str3(20),
      str4(100).
str1 = '11111'.
str2 = '22222'.
str3 = '                    '.
concatenate 'a' str1 str2 into str4 separated by str3.
shift str4 left.
write str4. " '                    11111                    22222'