Posts

Showing posts from August, 2018

String Processing using ABAP string template

String Processing is one of the core components of any development. More so true when you are working with ABAP. String processing can be painful sometimes especially when you are merging or trying to embed one or more variables. In this post, I wanted to share the usage of String templates to help process strings effortlessly. But first, What is a string template? Simply Put, A string template is enclosed in two "|" (Pipe symbol) characters.  Example:     But there is more, string templates are a powerful tool that does more than just replace string literal. One of the biggest benefits of String templates is the elimination of helper variables. A string template has three components: Literal Text: Represents its exact character string. meaning what you see is what you get. Ex: Embedded Expressions: An embedded expression is defined inside an opening and a closing curly bracket { ... } within string templates and can hold: Data objects  like variables/constants,    Calculati