decimal conversion of Sales Tax in 'SPARE PARTS SALE INVOICE' ( smart form)
I am displaying a the value of the Sales Taxc in 'SPARE PARTS SALE INVOICE'. (in Smart Form)
The field(which holds the Sales Tax value is 'KWERT' -LBBIL_INVOICE-IT_KOND ), with datatype 'CURR', reference table 'KOMK' and reference field 'WAERK'.
In my smart form,i have declared a variable 'SALES_VALUE' of datatype 'KWERT' and reference field 'IT_PRICE-WAERK' (LBBIL_INVOICE-IT_PRICE), where 'WAERK' is the SD document currency.
Now when i display the field 'SALES_VALUE' i get 735.00 , whereas the original value in the field is 73.5
how to correct this and where am i wrong ?
Thankyou for yur time and really appreciate the help.
You are using currency fields that reference a currency code. Most currencies in SAP have two decimal places. Dividing by 100 will work in most cases. Ideally you should get the CURRDEC value in table TCURX for the currency you are working with... then divide by 10 that number of times.
USD, 2 decimals, divide by 10 twice.
There is a function module that will do this for you. Can't think of the name...???