Application Development 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: 

storing Amount (KONP-KBETR) with 5 decimals

Former Member
0 Kudos

Hi,

We configured currency Key USDN and save all pricing information with 5 decimals.

I can enter Amount with 5 decimals for currency USDN and save in transaction VK11/VK12. and can view the same in

VK13.

My problem is when I looked at the condition records table KONP, I see KONP-KBETR with two decimals(decimal shifted to right). The amount we entered in VK11/VK12 is not saving as I expected. SAP doing some conversion and saves in KONP-KBETR with two decimals. But VK13 will display with 5 decimals ( the original form of the data entry by the user).

I want to read konp-kbetr value in one of my custom programs. I don't have clue to get the original value with decimals.

Appreciate your help

Thanks

Hari

3 REPLIES 3

Former Member
0 Kudos

Hi,

What are the field properties for the USDN in vk11/vk12.

Thank you,

Ramu N.

Former Member
0 Kudos

Hi Hari,

The reason why the amount is not saved with 5 decimals because the KONP-KBETR field has 2 decimals.

If you want the currency with 5 decimals then you need to do manipulation with SHIFT after reading from KONP table.

Hope this help you.

Regards,

Vicky

Former Member
0 Kudos

Hi hari,

It might not sound good but what you can do is:

====================================================

data: p_kbetr like konp-kbetr value '99999999.99'.

data: pack TYPE p DECIMALS 3 value '0.001'.

data: test(11) type c,

test1(11) type c.

move p_kbetr to test.

test1 = test * pack.

write: / test1.

=====================================================

This will work absolutely fine but if the value has two decimals as zero's then they will get truncated when you do the manipulation.

Hope this will help you.

Regards,

Vicky

PS: Award points if helpful.