Posts

Showing posts from July, 2019

ABAP text field literal vs text string literal

Have you ever had a variable containing text? I am sure you did and regularly do. What is your preferred way to do declare it? If you don't know or use the second option, then this post is for you. There is a minute difference in the way text literal has been defined in options one and two.  First of all the declaration is a literal being passed to a variable, and some of you may ask: what is a literal?     L iterals are defined in the source code of a program by specifying a string representing a value.     Possible literals are numeric literals and character literals. The character literal comprises text       field literals and text string literals. So there are two kinds of text literal, let's see them in detail. Text Field Literals:   - Defined using single inverted commas (').   - Data type is c  with the length of the included characters, including trailing blanks.   - There is no empty text field literal:      This means,