Remove Leading Zero ABAP SAP

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Remove leading zero

Wednesday, October 18, 2017 3:49 PM

if your value is in say wa_tab-KBETR then write &wa_tab-kbetr(ZC.2)&..


which will remove leading Zeros(Z), Spaces(C) and (.2) will show only 2 decimal points..

From <https://archive.sap.com/discussions/thread/3383467>

https://help.sap.com/viewer/e0ef07e1f76b4370b1baa502eace5ece/7.31.20/en-US/4e50b68d95e14dd2e10000000a42189b.html

https://help.sap.com/viewer/e0ef07e1f76b4370b1baa502eace5ece/7.31.20/en-US/4e5b58374ad64f49e10000000a42189e.html

Syntax Meaning
&feld+<offset> & Skips offsets (<offset>) in the field value (character fields only). If the offset is greater than the length of the value,
nothing is displayed.
&field( (<length> )& Sets the output length to <length>.
&field(*)& If the field is defined by a Data Dictionary type, Smart Forms sets the output length to the value specified there.
&field(S)& Suppresses the sign
&field(<)& Displays the sign to the left of the number
&field(.<nat.number>)& Limits output of decimal places to <nat.number>
&field(E<nat.number>)& Displays the field value with the fixed exponent <nat.number>. The mantissa is adapted to this exponent by shifting
the decimal point and inserting zeros.
&field(T)& Suppresses thousand indicators when displaying fields of types DEC, CURR, INT, and QUAN.
&field(Z)& Suppresses leading zeros in numbers
&field(I)& Suppresses display of initial values
&field(K)& Deactivates a conversion routine specified in the Data Dictionary.
&field(R)& Right-justified display. Use this option only when specifying an output length as well.
&field(F<filler> )& Replaces left-justified blanks in the value by the fill character <filler>.
&field(L)& Use the L option to convert a date field to a local date and to print it in the appropriate format. The date is then
formatted using the edit mask JPDAT.
Since this representation uses Japanese characters, use it in the Japanese version of the SAP system only.
&field(C)& The system takes the field value as a sequence of words separated by blanks. Option C shifts these words to the
left and leaves only one blank inbetween as separator. Any leading blanks are suppressed. This effect corresponds
to that of the ABAP statement CONDENSE.

From <https://help.sap.com/viewer/e0ef07e1f76b4370b1baa502eace5ece/7.31.20/en-US/4e5b58374ad64f49e10000000a42189e.html>

Smartforms Page 1

You might also like