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: 

conversion of individual characters to a word

Former Member
0 Kudos

experts,

how can i convert individual characters to a word.

once i execute the following code , list gets generated.

when i select any one line on the list all the characters

combinedly should be selected and not individual characters

get highlighted.

sample ex is as follows :

REPORT ZSTRINGTABLE.

types : begin of ty,

word type char9,

end of ty.

data itab type standard table of ty initial size 0.

DATA : L TYPE I,M TYPE I,N TYPE I,P TYPE I.

data : w type char50,A TYPE CHAR9..

w = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'.

L = STRLEN( W ).

M = L DIV 9.

N = L MOD 9.

IF L <> 0.

P = M + 1.

ENDIF.

DO P TIMES.

A = W+0(9).

APPEND A TO ITAB.

CLEAR A.

W = W+9.

ENDDO.

LOOP AT ITAB INTO A.

WRITE 😕 A.

ENDLOOP.

thanks in advance.

3 REPLIES 3

Former Member
0 Kudos

declare a variable of type string.

Its working



REPORT ZSTRINGTABLE.

types : begin of ty,
word type char9,
end of ty.

data itab type standard table of ty initial size 0.
DATA : L TYPE I,M TYPE I,N TYPE I,P TYPE I.
data : w type char50,A TYPE CHAR9..

w = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'.

L = STRLEN( W ).

M = L DIV 9.
N = L MOD 9.

IF L NE 0.
P = M + 1.
ENDIF.

DO P TIMES.
A = W+0(9).
APPEND A TO ITAB.
CLEAR A.
W = W+9.
ENDDO.

LOOP AT ITAB INTO A.
WRITE 😕 A.
ENDLOOP.

0 Kudos

hi kpn,

will not work.

thanks in advance.

JanStallkamp
Employee
Employee
0 Kudos

Hi.

Please don't create duplicate postings of one thread. This one will be locked.

Best regards,

Jan Stallkamp