cancel
Showing results for 
Search instead for 
Did you mean: 

Reg Quantity field Printing

Former Member
0 Kudos

hi,

how to print the Quantity variable with 2 decimals actually the field is having 3 decimals.

Ex: field1 having value <b>16000.000</b> and field2 value is <b>800.000</b>

in out put i want field1 = <b>16.000,00</b> and field2 = <b>800,00</b>.

same is achieved in script is done by using field1(I12.2), and field2(12.2).

how can we do same thing in Smartform....

Regards

Ashok P

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please see formatting options for Smart Forms. There you will find this:

&field(.<nat.number>)&

Limits output of decimal places to <nat.number>

You should then use: &field1(.2)&

Here is the complete list:

Overview

Formatting Options for Fields

Syntax

Description

&field+<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 character 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)&

Converts a date field to a local date and displays it. The date is then formatted using the edit mask JPDAT.

Since this representation uses Japanese characters, it is only to be used in the Japanese version of the SAP System.

&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 one blank in-between as a separator. Any leading blanks are omitted. This effect corresponds to that

of the ABAP statement CONDENSE.

Former Member
0 Kudos

u can do same in smartform also as u used in sapscript.

Answers (0)