‎2009 Jan 21 7:13 AM
Hi,
In Export invoice we are entering currency in USD.When we enter the value it accepts 3 decimal places.But it is stored as 2 decimal places in table.
Eg.2.059 USD in invoice screen
but in table 20.59 USD.
What is the problem?where we can rectify this error?
‎2009 Jan 21 7:20 AM
Hi,
As it is a sap standard process screen. u check when u are saving the data in to the table i.e put a deberging by passing a command /H in the system command u will be in deberger mode press on save botton and their check the process of updating the values in to the table. First of all see the structure or work area using by the sap for the amount.
Regards,
Naresh
‎2009 Jan 21 7:20 AM
Hi,
Check the data type of the field in the table, to which you pass this value. It may be of 2 decimal palces adn hence it would accept only 2 decimals...
Best Regards,
Ram.
‎2009 Jan 21 7:22 AM
‎2009 Jan 21 7:24 AM
hi,
if in the table it is data type CURR,then defenitely it will store as 2 decimal places.it is accepting in the standard screen because the field will be customized like that(the currency key it will be referring may contain three decimal places or it may be type p with 3 decimals)..if the field is standard u cannot do anything..otherwise if it is z u can change the decimal fields..for standard table u can try appending one structure with field containing three decimal places and update this from the standard using user exit/badi
Edited by: soniya baboo on Jan 21, 2009 8:25 AM
‎2009 Jan 21 7:28 AM
‎2009 Jan 21 7:34 AM
Hi...
u dont have to worry about it.If in the table if u select 1 record and select 'display button,u can see the amount in the correct decimal places....The table store the correct amopunt only.also if u r fetching the records from table,then also the correct value will come
‎2009 Jan 21 7:31 AM
It will be stored with two decimal places. No issues with that. when you display this on your report, you have to specify the currency as USD and your issue will be resolved.
write: v_amount to v_amount currency 'USD'.I am quoting from the help of the write statement below.
This addition defines currency-dependent decimal places for the output of data objects of data types i or p. For all other data types, except for f, the addition is ignored. For cur, a three-digit, character-type field is expected that contains a currency key from the column CURRKEY of the database table TCURX in uppercase letters. The system determines the number of decimal places from the column CURRDEC of the respective row in the database table TCURX. If the content of cur is not found in TCURX, two decimal places are used. The following applies for numeric data types:
In the case of data types of type i, a decimal separator is inserted at the position determined by cur and the thousands separators are moved accordingly.
In the case of data objects of type p, the decimal places defined in the definition of the data type are ignored completely. Irrespective of the actual value and without rounding actions, the decimal separators and the thousand separators are inserted at the positions in the numbers determined by cur.
In the case of data objects of type f, the addition CURRENCY has the same effect as the addition DECIMALS (see below). Here, the number of decimal places is determined by cur.
If the addition CURRENCY with length specification * or ** is used after AT, it is used first and the output length is determined from the result.
Note
The addition CURRENCY is appropriate for the display of data objects of type i or p without decimal places, whose contents are currency amounts in the smallest unit of the currency.
Example
The output of the WRITE statement is "123456,78".
DATA int TYPE i VALUE 12345678.
WRITE int NO-GROUPING CURRENCY 'EUR'.
‎2009 Jan 21 7:50 AM
Hello,
When the data is displayed on the screen for currency field which have a reference of a currency key field, the conversion takea place according to the currency key.
If you take for example Japanese Yen, which do not have decimals are stored in the database table ( KONV )with 2 decimals places , but while displaying on the screen the decimals are gone. So 100.00 in db is actually 10000 JPY on the screen.
This is standard behavior.
And yes when you want to output the value on the list or alv, you use the currency addition or give a reference field name for currency in the fieldcatalog respsectively.
regards,
Advait
‎2009 Jan 21 8:17 AM
Hi,
all the currecies will be present int he table tcurx if the currecies you mentioned is present in that
table you have to divide by 100 .
Thanks & Regards,
Sateesh.
‎2009 Jan 21 9:34 AM
Hi.
Please check your currency configuration and change method that's it.
Hope it help.
Sayan.