Supported by
Supported by Inetum

Formating variables when concatenating strings using <i>pipes</i>

images/thumbnail.jpg - Thumbnail

Pipes are the new trend when it comes to manipulating strings:

str = |Hi { sy-uname }, | &
      |today's date is { sy-datum }.|.

Besides looking cool, it’s way more practical than using the dreaded CONCATENATE.

But I only recently found out that you can directly apply formatting to the variables:

str = |Olá { sy-uname CASE = LOWER }, | &
      |a data de hoje é { sy-datum DATE = USER }.|.

Press F1 over CASE or DATE to learn all the possibilities:

embeded_expressions_format_options

Thank you Sérgio Fraga for the tip.

Thank you Pierre Andrews for the photo.

Greetings from Abapinho.