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.

CONVERT

CLEAR A.

LOOP AT ITAB INTO A.

WRITE 😕 A.

ENDLOOP.

thanks in advance.

6 REPLIES 6

former_member226999
Contributor
0 Kudos

Hi Ramesh,

Your code is perfect. All you need to do is this.

You can achieve this by clicking to the Customize local layout button (last button on the toolbar).

Then select the options menu.

Select the Cursor Tab

Unselect the Cursor in list check box (at the bottom).

Sample screen layout

http://help.sap.com/saphelp_nw04/helpdata/en/73/69eb5855bb11d189680000e829fbbd/frameset.htm

Hope this helps.

Franc

0 Kudos

hi franc,

my aim is not limited to list level , after converting

individual characters to a word i have to send it to

DB in the form of a word only.

so can we convert individual characters to a word.

thanks in advance.

0 Kudos

Hi Ramesh,

Now I am confused.

Say if you have string text

STR1 = 'ABCDEFG'.

you said "after converting

individual characters to a word i have to send it to

DB in the form of a word only."

So,do you want to store this as

A B C D E F G - individual character as word?

Please clarify.

Franc

Former Member
0 Kudos

answer differs from the expected output

Former Member
0 Kudos

Please do not duplicate post

Former Member
0 Kudos

Your problem is the double click?

have you tried an alv list?