ABAP – NO-BREAK space (U+00A0)

SAPThis is just a note that you should be aware of using different kind of space character.
The classical space – you can type it by pressing spacebar – has unicode number U+0020.
The NO-BREAK space character is different – you can type it by pressing ALT+255 – this character will look the same like normal space but in unicode it will have number U+00A0.

You can see the difference in the following piece of code:

DATA:
  lv_message(255) type c.

* Here I use the classical space (by pressing spacebar)
CONCATENATE 'Hello' ' ' 'world' INTO lv_message.
WRITE lv_message.
* Result will be: >>Helloworld<<

* Here I use the NO-BREAK space (by pressing ALT+255)
CONCATENATE 'Hello' ' ' 'world' INTO lv_message.
WRITE lv_message.
* Result will be >>Hello world<<

Leave a Reply