cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with printing the decimal value in smartforms

Former Member
0 Kudos

Hi experts,

Here I am printing the net valve in to smartforms.The problem is, valve i want to print is 4505.600.But it is displaying as 45056.00.It is in OMR currency. This problem occurs only for this currency.i am picking the value from PO.

I have used komv-kwert feild for display. Please give me the solution

Regards,

madhu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Madhu,

I have faced similar problem in my Smartform with currency JPY with no decimal places at all.

To resolve this you have to specify Reference Currency with the Currency type under Global Definitions-->Currency/Quant.Fields. For example take your case :


Fieldname               Reference Field     Data Type
WA_FINAL-KWERT              W_WAERS           C CURR

*Here W_WAERS should contain OMR
*WA_FINAL-KWERT sould contain 45056.00 then your output will look like 4505.600

Thanks & Regards,

Rock.

Former Member
0 Kudos

Thank u rock, its working fine

Former Member
0 Kudos

solved

Former Member
0 Kudos

nice one! next thing would be to mark the thread as answered

Answers (6)

Answers (6)

0 Kudos

How to display currency with correct decimals in SAP Smartforms

How currency code is determined in Smart Forms for a given amount field

Former Member
0 Kudos

Hi,

It seems you do not link your currency amount with currency unit.

Please refer this wiki: http://wiki.sdn.sap.com/wiki/display/ABAP/HowcurrencycodeisdeterminedinSmartFormsforagivenamountfield

Hope it helps.

Thanks,

Former Member
0 Kudos

Hi,

I agree with Florian on this one - it should be output correctly. One thing you could do to (hopefully) confirm this is to add a line of code like...


DATA: L_CHAR_FIELD(30)   TYPE C.
WRITE KOMV-KWERT TO L_CHAR_FIELD CURRENCY 'OMR'.

This should result in a correctly formatted string with the correct number of decimal places.

You could step through this line in debug to confirm how the L_CHAR_FIELD looks with the currency formatting.

Regards, Andy

Former Member
0 Kudos

i suspect your OMR currency is nto defined correctly in your system.

If you have customized it as currency with three decimals and the KOMV structure has OMR in the according currencykeyfield, it should do exactly what you want.

Former Member
0 Kudos

Hi,

Try this

&komv-kwer(15.3R)&

Regards,

Jagadeesh T.

Former Member
0 Kudos

Hi

What value is stored in KOMV table ?

Is it 4505.600 or 45056.00 ?

This value depends on the pricing condition configuration.

Former Member
0 Kudos

it is stored as45056.00, but i want to print 4505.600

Former Member
0 Kudos

Hi

For this particular condition Divide KOMV-Kwert value by 10 and display.

Former Member
0 Kudos

This is happening only for OMR currency, is this OK with That

Former Member
0 Kudos

Hi

ok.. Then Put condition for OMR currency. if currency is OMR then divide that value by 10.

You can safely do that