Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

add space in a string

Hi experts,

I have this problem: I split a string in a table, because I need to analyze each word in (I'm programmin a parser) and I want to write the word one by one, but I cannot find a way to write a space between them: the write is in a cycle:

LOOP AT word_table INTO word_wa.
   CONCATENATE word_wa space INTO word_wa SEPARATED BY space.
   WRITE word_wa.
ENDLOOP.

but it seems ignoring my instructions ...

So how can I add a space between the words?

Thanks in advance.

Gabriele

Tags:
Former Member
Former Member replied

Hi Gabriele,

Common problem. Instead of using SPACE, you need to ALT+255

You can use the same statement, don't necessary need the separated by clause:

CONCATENATE word_wa ' ' INTO word_wa.

But when you create the ' ' do not use the space bar. Press ', then press Alt key+pressNumpadkey255 to create the space (you will see it get created), then press ' again. I am betting this will work.

Good luck.

SL

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question