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 Issue

Former Member
0 Likes
1,245

hi experts,

i have an amoun 100.000 in my table, but when I'm outputting it with a smartform is shows only 1.000. I know it is some currency conversion issue, but how can I fix this problem?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,209

Check the currency formatiing..

Format write statement:

Write <Currency amount> to V_AMT currency <CURKY>

CURKY can be any currency such as : USD,GBP, INR etc..

Try it once

Regards

Shiva

hi experts,

i have an amoun 100.000 in my table, but when I'm outputting it with a smartform is shows only 1.000. I know it is some currency conversion issue, but how can I fix this problem?

9 REPLIES 9
Read only

Former Member
0 Likes
1,209

what is the currency key u have specified?

Read only

0 Likes
1,209

I'm using HUF.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,209

Hello,

Just to let you know, HUF has no Decimal places & hence the issue.

BR,

Suhas

Read only

0 Likes
1,209

Okay, but what's wrong with the displaying? It shows the amount incorrectly.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,209

>

> Okay, but what's wrong with the displaying? It shows the amount incorrectly.

Not exactly !!! It does internal conversion & displays the value

Have you maintained the entry for this amount in the

Global Definitions --> Curr. / Qty. fields

I think if you do so, then you wont face this issue.

Anyways, if you donot want to do this stuff or this doesnot help, create a program line node like this:


DATA: v_currdec TYPE CURRDEC. 

* Get the number decimals in the currency
  CALL FUNCTION 'BAPI_CURRENCY_GETDECIMALS'
    EXPORTING
      currency          = 'HUF'
    IMPORTING
      currency_decimals = v_currdec.

v_factor = 2 - v_currdec.

v_amt1 = v_amt * ( 10 ** v_factor ).

Use V_AMT1 for display.

BR,

Suhas

Edited by: Suhas Saha on Feb 2, 2009 7:59 PM

Read only

0 Likes
1,209

I'm using 4.6 C, so that tab doesn't exist in that version, maybe this is the origin of my problem, that I have to maintain the currency somehow in smartforms.

Read only

Former Member
0 Likes
1,210

Check the currency formatiing..

Format write statement:

Write <Currency amount> to V_AMT currency <CURKY>

CURKY can be any currency such as : USD,GBP, INR etc..

Try it once

Regards

Shiva

Read only

Former Member
0 Likes
1,209

Hi,

Try using the below format for the amount field.

&wa_itab-amount(CZ)&

Regards,

Satish

Read only

Former Member
0 Likes
1,209

Thanks for posting.

I forgot to select the currency in the selection.