05-17-2006 6:15 PM
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
05-17-2006 6:46 PM
Hi,
What are the field properties for the USDN in vk11/vk12.
Thank you,
Ramu N.
05-17-2006 7:25 PM
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
05-17-2006 8:11 PM
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.