Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smartform and QUAN variable

former_member182371
Active Contributor
0 Likes
572

Hi,

i´m working with a smartform. In this smartform i get a subtotal of an amount field.

The question is that the result is OK but the output format is wrong (i get 1,000 instead of 1).

What should i do in order to get the right output format?

Best regards.

3 REPLIES 3
Read only

former_member182670
Contributor
0 Likes
483

You can try formating options:

&field(Z)& to suppress leading zeros

&field(x.y)& to define decimal format

&field(.0)& should work for you

Read only

Former Member
0 Likes
483

Hi C,

you can use a text field to show the amount field with the rigth format, refered to the currency.

WRITE amount_field INTO text_field CURRENCY currency_field.

Regards,

PabloX

Read only

former_member182371
Active Contributor
0 Likes
483

Hi,

first of all thanks fo your help.

The problem was that i hadn´t defined the variable properly.

Here´s how i solved the problem:

in gobal data tab i´ve defined my variable thus

VARIABLE NAME TYPIFICATION REF. TYPE

GS_QTY LIKE GS_IT_GEN_BATCH-DLV_QTY

GS_QUAN_UNIT LIKE GS_IT_GEN_BATCH-SALES_UNIT

and in currency/quantity fields tab i´ve written:

FIELD NAME REFERENCE FIELD DATA TYPE

GS_QTY GS_IT_GEN_BATCH-SALES_UNIT QUAN

Best regards.