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

Currency problem

Former Member
0 Likes
2,605

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,978

Hi Uma,

look into TCURR, perhaps there are some FFACT or TFACT with value 100.

Regards, Dieter

13 REPLIES 13
Read only

Former Member
0 Likes
1,979

Hi Uma,

look into TCURR, perhaps there are some FFACT or TFACT with value 100.

Regards, Dieter

Read only

0 Likes
1,978

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.

Read only

0 Likes
1,978

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

Read only

0 Likes
1,978

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.

Read only

Former Member
0 Likes
1,978

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.

Read only

0 Likes
1,978

Hi Veerendranath,

Net prive & net value has same data element type - NETWR

Quantity - KWMENG

Regards,

Umasankar.

Read only

Former Member
0 Likes
1,978

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

Read only

nitesh_jain3
Active Participant
0 Likes
1,978

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

Read only

0 Likes
1,978

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.

Read only

0 Likes
1,978

Check in table T001 HUF currency is there...?

Regards,

ALI

Read only

0 Likes
1,978

Hi,

In T001 table an entry is there with the currency HUF.

Regards,

Umasankar.

Read only

Former Member
0 Likes
1,978

Do you store these values in some table or do you just take the amount, do the conversion and display the net?

Read only

0 Likes
1,978

Hi,

I am just doing the calculation and displaying it in the screen.

Regards,

Umasankar.