Monday, December 30, 2019

Concatenating Literals and Variables

Concatenating Literals and Variables


Old way to concatenate in ABAP:
Keyword CONCATENATE was used to concatenate strings, literals and variables. In this methodology, hardcoded strings were kept in single quotes.
New way to concatenate in ABAP:
Pipe symbol(|) is used along with & is used to concatenate. With this new way, hardcoded strings are to be kept inside || and Constants as well as Variables are kept inside |{ }|. Values to be concatenated are separated by ‘&’.
Sample code for concatenation as below:
concatenation_source
Output:
concatenation_output

No comments:

Post a Comment