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

amount conversion

Former Member
0 Likes
1,099

Hi experts,

my problem is am getting the amount as 123,456,000. but i want it to be 1234560.00. is there any function module for this.

Regards,

Sunita.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,070

Hi experts,

i have all the above but its not working..123,456,000. i wnat to keep the decimal point for the last 2 zero's .like 1234560.00.

Regards,

Sunita

8 REPLIES 8
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,070

Check your profile settings in SU01 txn and change the currency format accordingly

Read only

former_member222860
Active Contributor
0 Likes
1,070

From tcode: SU3 -> Defualts tab

u can change decimal notation

Read only

Former Member
0 Likes
1,070

jus go to SYSTEM->USERPROFILE->OWNDATA->DEFAULTS TAB.

here check for the decimal notation and chg it according to ur req.

Read only

Former Member
0 Likes
1,070

hi,

Declare a varible with CHAR and write to this variable.

REPLACE ',' in v_char with ' ' .

CONDENSE v_char1. to remove the gaps.

data: v_char1 type string.

v_char2 = ' 1,000.00'.

replace ',' in v_char2 with ' ' .

CONDENSE v_char2.

write:/ v_char2.

regards,

Lokesh

Read only

Former Member
0 Likes
1,070

Hi,

You can try using function modules:

CONVERT_TO_LOCAL_CURRENCY

CONVERT_TO_FOREIGN_CURRENCY

Hope it helps

Regards

Mansi

Read only

Former Member
0 Likes
1,070

Hi Sunita,

For the same requirement I am using below Function module and working fine.

CALL FUNCTION 'HRGPBS_HER_FORMAT_AMOUNT'
      EXPORTING
        P_AMOUNT           = G_MAXBT
        P_CURRENCY         = G_WAERS
        P_REQUIRED_FORMAT  = '99999999.99'
      IMPORTING
        P_ERROR            = L_ERROR_DURING_FORMAT
        P_ERROR_AMOUNT     = L_ERROR_AMOUNT
        P_ERROR_CURRENCY   = L_ERROR_CURRENCY
        P_ERROR_OVERFLOW   = L_ERROR_OVERFLOW
      CHANGING
        P_FORMATTED_AMOUNT = G_RWBTR.

    IF L_ERROR_DURING_FORMAT NE 0.
      IF L_ERROR_DURING_FORMAT = 1.
        MESSAGE E002 WITH 'Error during currency format conversion'.
      ELSE.
        MESSAGE E002 WITH 'Error during currency format conversion'.
      ENDIF.
    ENDIF.

Regards

Read only

Former Member
0 Likes
1,071

Hi experts,

i have all the above but its not working..123,456,000. i wnat to keep the decimal point for the last 2 zero's .like 1234560.00.

Regards,

Sunita

Read only

0 Likes
1,070

Use the function module what I mentioned in my previous message. Sure It will work.