Skip to Content
avatar image
Former Member

conversion of individual characters to a word

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Sep 05, 2008 at 02:36 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • avatar image
    Former Member
    Sep 07, 2008 at 08:04 AM

    answer differs from the expected output

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 08, 2008 at 02:22 PM

    Please do not duplicate post

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 08, 2008 at 03:02 PM

    Your problem is the double click?

    have you tried an alv list?

    Add comment
    10|10000 characters needed characters exceeded