‎2007 Aug 10 1:38 PM
Hello,
I am having a problem in currency value. Following is my scenario,
I have a module pool program whith a table control and a parameter field below it to display total net price. In table control i have a field for net value.
Net price is calculate by multilpying net value by quantity.
If i have 1 item line
If i enter the values in Euro its given the correct output.
Ex :
Qty = 1
net value = 100
Net price = 100.
This is the correct output.
If i enter the values in HUF(Hungarian Forint) it is given wrong output.
Ex :
Qty = 1
net value = 100
Net price = 1.
This is the wrong output.
Can you tell me what is the problem.
Regards,
Umasankar.
‎2007 Aug 10 1:42 PM
Hi Uma,
look into TCURR, perhaps there are some FFACT or TFACT with value 100.
Regards, Dieter
‎2007 Aug 10 1:42 PM
Hi Uma,
look into TCURR, perhaps there are some FFACT or TFACT with value 100.
Regards, Dieter
‎2007 Aug 10 1:47 PM
Hello Dieter,
I am not using any conversion.
In my screen itself user will enter a value in HUF only.
I am displaying the net value by just multypling it.
There is no conversion involed.
Regards,
Umasankar.
‎2007 Aug 10 2:03 PM
Hi,
Instead of multiplying , use the write statement as follows:
data:wf_waers LIKE t001-waers.
WRITE int_with_item-wt_qbshh TO int_final-wt_qbshh1 CURRENCY wf_waers.
This statement will do the conversion by itself according to the currency in variable wf_waers.
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 Aug 10 2:45 PM
Hi,
My input Qty will be HUF only. No need for currency conversion.
The problem is arising only for the currencies that doesn't have decimal values.
For all other currencies it is working fine.
For EURO,USD,INR it is working correctly.
For HUF it is not working.
What will be the solution for this.
Regards,
Umasankar.
‎2007 Aug 10 1:46 PM
Can you give me the, field types please ..? I will try mylevel best to solve your problem.
Tell me the net price type (data element ) and quatity type.
Thanks and regards,
Veerendranth.
‎2007 Aug 10 1:49 PM
Hi Veerendranath,
Net prive & net value has same data element type - NETWR
Quantity - KWMENG
Regards,
Umasankar.
‎2007 Aug 10 1:59 PM
Hi Uma,
Use currency instead of decimals to specify the number of decimal places for currency amount fields. Unlike decimals, on which you specify the number of decimal places, you instead specify a currency code, such as USD (U.S. Dollars), ITL (Italian Lira), or JPY (Japanese Yen). The system then looks up that currency code in table TCURX to determine the number of decimal places that should be used to display the value. If the currency code is not found in TCURX, a default of two decimal places is used.
For Example
1 report ztx1412.
2 tables: ztxlfc3.
3 data: f1 type p decimals 1 value '12345.6'.
4
5 write: / f1,
6 / f1 currency 'USD', 'USD', "US Dollars
7 / f1 currency 'ITL', 'ITL'. "Italian Lira
8
9 skip.
10 select * from ztxlfc3 where gjahr = '1997'
11 and saldv >= 100
12 order by bukrs.
13 on change of ztxlfc3-bukrs.
14 select single * from ztxt001 where bukrs = ztxlfc3-bukrs.
15 endon.
16 write: / ztxlfc3-saldv currency ztxt001-waers, ztxt001-waers.
17 endselect.
Regards,
Ali
‎2007 Aug 10 2:56 PM
Dear Uma,
As suggested by Quadri you need to link a currency field to the field holding the currency value..
If the field in your module pool program is MSEG-NETWR.. Check the field MSEG-NETWR in the dictionary structure of MSEG and the currency field linked to it (probably T001-WAERS)..
The screen should have both the fields MSEG-NETWR and T001-WAERS..
If u r entering Currency value (MSEG-NETWR) in HUF then T001-WAERS should have the value HUF and the decimals in the field MSEG-NETWR will be automatically adjusted..
Hope this solves ur problem..
Cheers
Nitesh
‎2007 Aug 10 3:08 PM
Hi Nitesh,
While designing the screen i have given the reference as the currency of the user. So it should automatically adjust it. And this adjustment is working for all currencies except HUF.
Regards,
Umasankar.
‎2007 Aug 10 3:17 PM
‎2007 Aug 10 3:29 PM
Hi,
In T001 table an entry is there with the currency HUF.
Regards,
Umasankar.
‎2007 Aug 10 3:32 PM
Do you store these values in some table or do you just take the amount, do the conversion and display the net?
‎2007 Aug 10 3:56 PM
Hi,
I am just doing the calculation and displaying it in the screen.
Regards,
Umasankar.