ABAP Keyword Documentation → ABAP - Quick Reference
WRITE TO - Quick reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
WRITE {source|(source_name)} TO destination
[LEFT-JUSTIFIED|CENTERED|RIGHT-JUSTIFIED]
[EXPONENT exp]
[NO-GROUPING]
[NO-SIGN]
[NO-ZERO]
[CURRENCY cur]
[DECIMALS dec]
[ROUND scale]
[UNIT unit]
[ENVIRONMENT TIME FORMAT]
[TIME ZONE tz]
[STYLE stl]
[USING { {NO EDIT MASK}|{EDIT MASK mask} }]
[DD/MM/YY|MM/DD/YY|DD/MM/YYYY|MM/DD/YYYY|DDMMYY|MMDDYY|YYMMDD].
Effect
Formats the content of a data object specified either statically as source
or dynamically in source_name
and writes it to the variable destination
.
Additions
-
LEFT-JUSTIFIED|CENTERED|RIGHT-JUSTIFIED
Determines if the output is left-justified, centered or right-justified within the current output length. -
EXPONENT exp
Determines the exponent for the output of data objects of the data typef
. -
NO-GROUPING
Suppresses the thousands separators in the output of data objects of the data types (b
,s
),i
,int8
, orp
orp
. -
NO-SIGN
Suppresses the sign in the output of data objects of the data typesi
,p
, orf
. -
NO-ZERO
Replaces zeroes with blanks. -
CURRENCY cur
Defines currency-related decimal places for the output of data objects of the data typesi
orp
by using a currency keycur
from the database table TCURX. -
DECIMALS dec
Sets the decimal places displayed in the output of data objects of the data typesi
,p
,f
, or of time stamps, todec
. -
ROUND scale
Multiplies the value of a data object of the data typep
by10**(-scale)
before the output. -
UNIT unit
Cuts off decimal places which have the value 0 and are outside the precision of a measurement unitunit
from the database table T006 when displaying data objects of the data typep
. -
ENVIRONMENT TIME FORMAT
Formats a time output in 12 hour or 24 hour format. -
TIME ZONE tz
Formats a time stamp with reference to a time zonetz
. -
STYLE stl
Formats a decimal floating point number into an output formatstl
. -
USING {{NO EDIT MASK}|{EDIT MASK mask}}
NO EDIT MASK
- Disables the execution of an assigned conversion routine.
EDIT MASK
- Either calls another conversion routinemask
or defines an edit maskmask
. -
DD/MM/YY|MM/DD/YY|DD/MM/YYYY|MM/DD/YYYY|DDMMYY|MMDDYY|YYMMDD
Functions as an edit mask for the output of data objects of the data typed
.