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

Former Member
0 Likes
2,900

I had raised this issue in another post, but couldn't resolve it last time..

We have some currencies that require more than 2 currencies.. And in VK11, based on the currency, the kbetr value will get displayed with either 2 decimal places or 3 decimal places... And if I attempt to change the number of decimal places to 3 for USD, it will return an error "Input should be of form _____v__" message..

But on other hand, when I put 3 decimal places for different currency which allows 3 decimal places, no error message is given in VK11/VK12

I am trying to display the same field (actually a kbetr field) on the custom dialog screen...i have defined that field like konp-kbetr (2 decimal places)...But this screen does not allow me to enter more than 2 decimal places (for currency which allows 3 decimals places in VK11) My question is, I need to reproduce the VK11 logic in my custom screen? How and where do I do that.. I have the exact same attribute as the VK11 screen fields..I am trying to system debug the VK11 screen to see how SAP incorporate the Input form logic, but it never executes that code in debug mode..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,216

Have you placed a reference currency field on your custom screen and linked it to the amount field via Currency / Quan Fields tab in screen painter.

Cheers.

I had raised this issue in another post, but couldn't resolve it last time..

We have some currencies that require more than 2 currencies.. And in VK11, based on the currency, the kbetr value will get displayed with either 2 decimal places or 3 decimal places... And if I attempt to change the number of decimal places to 3 for USD, it will return an error "Input should be of form _____v__" message..

But on other hand, when I put 3 decimal places for different currency which allows 3 decimal places, no error message is given in VK11/VK12

I am trying to display the same field (actually a kbetr field) on the custom dialog screen...i have defined that field like konp-kbetr (2 decimal places)...But this screen does not allow me to enter more than 2 decimal places (for currency which allows 3 decimals places in VK11) My question is, I need to reproduce the VK11 logic in my custom screen? How and where do I do that.. I have the exact same attribute as the VK11 screen fields..I am trying to system debug the VK11 screen to see how SAP incorporate the Input form logic, but it never executes that code in debug mode..

6 REPLIES 6
Read only

Former Member
0 Likes
2,217

Have you placed a reference currency field on your custom screen and linked it to the amount field via Currency / Quan Fields tab in screen painter.

Cheers.

Read only

0 Likes
2,216

Thanks guys.. I had already tried all the steps and I was always stumbling into issues.. Anytime I enter a number with more than two decimal places it errors out.. Only today, I observed something strange and that helped me resolve the issue on my own... !!!

I have two fields on my screen KONP-KBETR (with reference to KONP-KONWA) and KONP-KONWA ... When i was doing my KBETR validations, the FIELD KONP-KBETR always came first... Becoz of this when I enter value '1.000', KONP-KBETR converts it to '1.000' (Amount format) becoz at this KONP-KONWA (even though there is value on screen) is empty... And 1.000 amount value is invalid..

But if group FIELD KONWA and KBETR together as the first validation,

KONP-KONWA will gets its value from currency and KBETR value will now be '10.00' (for DEM3 currency conversion factor is 10) and there are no issues..

Thanks

Read only

Former Member
0 Likes
2,216

Check the currency for that country (T005-WAERS) & then check table TCURX which stores number of decimal places for that Currency. I think after getting the number of positions you can put a logic.

Hope this helps.

Thanks,

Bipin

Read only

Former Member
0 Likes
2,216

Hi,

In screen painter, for reference field give as

"RV13A-KONWA", and format as CURR.

Hope this helps you.

Thanks,

Nethaji.

Read only

Clemenss
Active Contributor
0 Likes
2,216

SAP/ABAP expects all currency and measurement values to be connected to a currency or unit field.

The connected currency or unit determines the decimal places and even multipliers for exchange rate calculations.

As far as I know, USD is defined to have two decimal places (representing cents). So it appears logical not to accept 3 decimal places.

On a retail project I learned there is the special currency EUR4 - Euro with 4 decimal places. This is specially designed for retail prices per piece which are used in contracts covering big amounts.

So if you really need USD with more than 2 decimal places, it will be necessary to define a 'new' currency, something like USD3, for this purpose.

Hope this helps,

C.

Read only

Former Member
0 Likes
2,216

Hi ,

I have a similar problem. I'm using the function module CONVERT_TO_FOREIGN_CURRENCY to convert USD to JPY . I maintained a the currency conversion as 1 USD = 120.67000 X 1 JPY. I maintained decimal places for currency code JPY is 3 . Decimal places for USD is 5 .

The function module returns

Import:

Local currency : USD

Foreign currency : JPY

Local amount : 10.00

Export :

Foreign amount : 12,067.00

Its typically adding 2 extra zeroes .

Does anyone have this problem ?

Please post your solutions .

Thanks