Programming
Formatting Options in SAPscript (Summary)
Option Description
+n Offset
(n) Symbol Length
(S) Without the Leading Sign
(<) Move Sign to Left
(>) Move Sign to Right
(Z) Without the Leading Zeros
(C) Condense Space
(.n) Number of Decimal Places
(T) Without the Separator for ’Thousands’
(En) Exponent for Floating Numbers
(R) Right-Justified Output
(Ff) Replace Leading Spaces by Character
(I) Suppress Output of Initial Value
(K) Ignore Conversion Routines
- thitima's blog
- Add new comment
- Read more
- 1650 reads
Counter in SAPscript
In SAPscript, sysem has symbol SAPSCRIPT-COUNTER_x (x=0...9) for apply in your program. You can increase or decrease by 1 by option (+) or (-).
Syntax
&SAPSCRIPT-COUNTER_x(+)& Increase by 1
&SAPSCRIPT-COUNTER_x(-)& Decrease by 1
Example
&SAPSCRIPT-COUNTER_1& = 1
&SAPSCRIPT-COUNTER_1(+)& = 2
&SAPSCRIPT-COUNTER_1(-)& = 1
- thitima's blog
- Add new comment
- 2925 reads
Formatting Options in SAPscript: Suppress Output of Initial Value
In SAPscript, you can apply this option when you want to suppress the output when the symbol contian the initial value.
Syntax
&VAR(I)&
Example
&VAR& = 0.00 "&VAR& is CURR
&VAR(I)& =
- thitima's blog
- Add new comment
- 2354 reads
Formatting Options in SAPscript: Replace Leading Spaces by Character
In SAPscript, if you want to replace leading space by a fill character, you can apply this option.
Syntax
&VAR(Ff)&
Example
&VAR& = 500.00
&VAR(F*)& = **500.00
- thitima's blog
- Add new comment
- 1731 reads
Formatting Options in SAPscript: Right-Justified Output
In SAPscript, when you want to define the numeric value to right-justified, you can apply this option.
Syntax
&VAR(R)&
Example
&VAR& = 1111
&VAR(R)& = 1111
- thitima's blog
- Add new comment
- 2211 reads
Formatting Options in SAPscript: Exponent for Floating Numbers
In SAPscript, if you don"t want to specify format an exponent for DATA TYPE FLTP, you can apply this option.
Syntax
&VAR(En)&
Example
&VAR& = +1.23456780000000E+06
&VAR(E2)& = +12345.6780000000E+02
&VAR(E7)& = +0.123456780000000E+07
&VAR(E)& = +1234567.80000000
- thitima's blog
- Add new comment
- 1738 reads
Recent comments
3 years 34 weeks ago
3 years 39 weeks ago
3 years 39 weeks ago
3 years 40 weeks ago
3 years 40 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 43 weeks ago
3 years 43 weeks ago