SAP COMPUTE STRING FORMAT OPTIONS ABAP Statements
Get Example source ABAP code based on a different SAP table
• WIDTH ABAP_STRING_TEMPL
• ALIGN ABAP_STRING_TEMPL
• LEFT ABAP_STRING_TEMPL
• RIGHT ABAP_STRING_TEMPL
• CENTER ABAP_STRING_TEMPL
• PAD ABAP_STRING_TEMPL
• CASE ABAP_STRING_TEMPL
• RAW ABAP_STRING_TEMPL
• UPPER ABAP_STRING_TEMPL
• LOWER ABAP_STRING_TEMPL
• SIGN ABAP_STRING_TEMPL
• LEFTPLUS ABAP_STRING_TEMPL
• LEFTSPACE ABAP_STRING_TEMPL
• RIGHTPLUS ABAP_STRING_TEMPL
• RIGHTSPACE ABAP_STRING_TEMPL
• EXPONENT ABAP_STRING_TEMPL
• DECIMALS ABAP_STRING_TEMPL
• XSD ABAP_STRING_TEMPL
• ZERO ABAP_STRING_TEMPL
• YES ABAP_STRING_TEMPL
• NO ABAP_STRING_TEMPL
• NUMBER ABAP_STRING_TEMPL
• USER ABAP_STRING_TEMPL
• ENVIRONMENT ABAP_STRING_TEMPL
• COUNTRY ABAP_STRING_TEMPL
• STYLE ABAP_STRING_TEMPL
• CURRENCY ABAP_STRING_TEMPL
• ALPHA ABAP_STRING_TEMPL
• DATE ABAP_STRING_TEMPL
• ISO ABAP_STRING_TEMPL
• TIME ABAP_STRING_TEMPL
• TIMESTAMP ABAP_STRING_TEMPL
• SPACE ABAP_STRING_TEMPL
• TIMEZONE ABAP_STRING_TEMPL
ABAP_SYNTAX
$[ALIGN = LEFT$|RIGHT$|CENTER$|(dobj)$|expr$]
$[PAD = c$]
$[CASE = RAW$|UPPER$|LOWER$|(dobj)$|expr$]
$[SIGN = LEFT$|LEFTPLUS$|LEFTSPACE$|RIGHT$|RIGHTPLUS$|RIGHTSPACE$|(dobj)$|expr$]
$[EXPONENT = exp$]
$[DECIMALS = dec$]
$[ZERO = YES$|NO$|(dobj)$|expr$]
$[XSD = YES$|NO$|(dobj)$|expr$]
$[STYLE = SIMPLE$|SIGN_AS_POSTFIX$|SCALE_PRESERVING
$|SCIENTIFIC$|SCIENTIFIC_WITH_LEADING_ZERO
$|SCALE_PRESERVING_SCIENTIFIC$|ENGINEERING
$|(dobj)$|expr$]
$[CURRENCY = cur$]
$[NUMBER = RAW$|USER$|ENVIRONMENT$|(dobj)$|expr$]
$[ALPHA = IN$|OUT$|RAW$|(dobj)$|expr$]
$[DATE = RAW$|ISO$|USER$|ENVIRONMENT$|(dobj)$|expr$]
$[TIME = RAW$|ISO$|USER$|ENVIRONMENT$|(dobj)$|expr$]
$[TIMESTAMP = SPACE$|ISO$|USER$|ENVIRONMENT$|(dobj)$|expr$]
$[TIMEZONE = tz$]
$[COUNTRY = cty$] ...>
ABAP Addition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
What does it do?
These formatting options override the
Actual parameters with fixed values can be specified as follows:
The formatting options that can be specified depend on the data type of the embedded expression. The formatting options
If a formal parameter or a field symbol with a generic data type is specified as an embedded expression, only those formatting options can be specified that are allowed for all possible concrete data types.
Latest notes:
The specifications
NON_V5_HINTS
ABAP_HINT_END
ABAP Addition
What does it do?
This formatting option defines the length of the string represented by the embedded expression as the value of
The option
ABAP_EXAMPLE_VX5
The length of the result of the following string template is 20. It consists of 4 digits, a decimal separator, and 15 trailing blanks.
ABEXA 00121
ABAP_EXAMPLE_END
ABAP_EXAMPLE_ABEXA
ABAP_EXAMPLE_END
ABAP Addition >
What does it do?
This formatting option defines the alignment of the string represented by the embedded expression. It only has an effect if
The values for the alignment are fixed. The following table shows the key words and the associated values from the class
The default setting is
ABAP_EXAMPLE_VX5
The following string template creates the character string shown below it.
ABEXA 00122
ABAP_EXAMPLE_END
ABAP_EXAMPLE_ABEXA
ABAP_EXAMPLE_END
ABAP Addition
What does it do?
This formatting option defines the character used to pad surplus spaces in the result. It only has an effect if
A data object of data type
ABAP_EXAMPLE_VX5
The following string template creates the character string shown below it.
ABEXA 00123
ABAP_EXAMPLE_END
ABAP_EXAMPLE_VX5
See
ABAP_EXAMPLE_END
ABAP Addition
What does it do?
This formatting option defines the case of the string represented by the embedded expression. It can be specified for all data types of the embedded expression.
The values for the case are fixed. The following table shows the key words and the associated values from the class
The default setting is
Latest notes:
The formatting option
NON_V5_HINTS
ABAP_HINT_END
ABAP_EXAMPLE_VX5
The following string template creates the character string shown below it.
ABEXA 00124
ABAP_EXAMPLE_END
ABAP_EXAMPLE_ABEXA
ABAP_EXAMPLE_END
ABAP Addition LEFT$|LEFTPLUS$|LEFTSPACE$|RIGHT$|RIGHTPLUS$|RIGHTSPACE$|(dobj)$|expr ...>
What does it do?
This formatting option defines the format of the +/- sign when the string represented by the embedded expression represents a numeric value. It can be specified only if the embedded expression has a
The values for the format of the plus/minus sign are fixed. The following table shows the key words and the associated values from the class
The default setting is
ABAP_EXAMPLE_VX5
The following string template creates the character string shown below it.
ABEXA 00125
ABAP_EXAMPLE_END
ABAP_EXAMPLE_ABEXA
ABAP_EXAMPLE_END
ABAP Addition
What does it do?
This formatting option defines the exponent as the value of
The option