Here we are going to learn about the WRITE statement in ABAP programming. It is used for displaying the the data or field symbols or text symbols in a screen in a correctly formatted manner.We can specify the position on a screen where the data should display using with WRITE. Also we can display as check-box, symbol or icon.
WRITE statement syntax will look like
- WRITE field_variable.
The default length and positioning like left-right align of data fields will be as per the data format ( like character, integer, float etc). Some will be left aligned by default and others will be right aligned. See the alignment details here.
Additions used with this statement are
- AT
- option
- ofmt
- AS CHECKBOX
- AS SYMBOL
- AS ICON
- AS LINE
Sample program and output with WRITE keyword