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

Problem with Currency Field

Former Member
0 Likes
1,551

Hi Champs,

I have got one requirement to add the amount field and respective currency field similar to Net Value & Document Currency in ADD Data Tab of Sales Order transaction (VA01 and VA02).

So I have appended structure to VBAK Table with two fields.

And I need to compare the two fields (Net Value & ZAmtField).

What was the problem I was facing is when I have entered the value in Z field say 9 with Currency field as USD, in background it is saved as 0.09 which is not equal to 9 and if we give it as KRW it is taking as 9.00 which in display it is showing as 900 which will not be equal to 9.

But this is happening for first time only. If I enter the values differently for the same currency then from the next time it is taking that correctly like 9 as 9.00 in USD and 0.09 which was 9 in KRW format.

By checking in different scenario's I think the present value was taking for previous currency which was assigned thats why it is coming only for the first time & from the next time it is working fine.

Please reply to this thread on an high priorith, I was under high pressure to solve this case.

Thanks & Regards,

Ravi Kanth Yechuri.

Hi Champs,

I have got one requirement to add the amount field and respective currency field similar to Net Value & Document Currency in ADD Data Tab of Sales Order transaction (VA01 and VA02).

So I have appended structure to VBAK Table with two fields.

And I need to compare the two fields (Net Value & ZAmtField).

What was the problem I was facing is when I have entered the value in Z field say 9 with Currency field as USD, in background it is saved as 0.09 which is not equal to 9 and if we give it as KRW it is taking as 9.00 which in display it is showing as 900 which will not be equal to 9.

But this is happening for first time only. If I enter the values differently for the same currency then from the next time it is taking that correctly like 9 as 9.00 in USD and 0.09 which was 9 in KRW format.

By checking in different scenario's I think the present value was taking for previous currency which was assigned thats why it is coming only for the first time & from the next time it is working fine.

Please reply to this thread on an high priorith, I was under high pressure to solve this case.

Thanks & Regards,

Ravi Kanth Yechuri.

3 REPLIES 3
Read only

Former Member
0 Likes
1,058

when u added the amount field what referance table & referance field you have given ?

in SE11 in that table, click on currency/quantity field tab.

Table for reference field

Definition

A reference table is specified for fields containing currency amounts (date type CURR) or quantities (data type QUAN). This must be a field ( reference field) with the currency key format (data type CUKY) or format for quantity units (data type UNIT). The assignment of the field to the reference field does not take place until runtime and is carried out by a program.

Example

If a field with currency amounts is filled, the associated currency from the assigned reference field is determined, that is, the value entered at this time in the reference field determines the currency used.

Read only

Former Member
0 Likes
1,058

hi before calling the variables please clear the variables..and use later....

like ... clear: v_test.

regards,

venkat.

Read only

0 Likes
1,058

Hi,

Thanks for your responce to my query.

I already kept the reference field when I have appended the structure. I thought of the same & it will solve my problem initially but it could not.

Please help me on this.

Thanks & Regards,

Ravi Kanth Yechuri