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 JPY

Former Member
0 Likes
807

hi guys,

I am creating an idoc where i have to send amounts in doc currency and loacal currency.

whenever the doc currency is JPY the amount send is wrong cause if the amount entered in the document is 1000 then its stored as 10.00 in the BSEG table.

i am not sure if this rule applies to any other currencies as well.

is there a FM that i can use to convert the amount to actual figure.

thanx and regards,

Tarun Bahal

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
720

Hi Tarun,

You might be knowing, Yen doesn't contain decimal values. If you pass 1000 yen, it will save it as 10.00. This happens only with japanese currency.

You can use WRITE .... CURRENCY JPY.

This will work fine.

Let me know if you find any problem.

hi guys,

I am creating an idoc where i have to send amounts in doc currency and loacal currency.

whenever the doc currency is JPY the amount send is wrong cause if the amount entered in the document is 1000 then its stored as 10.00 in the BSEG table.

i am not sure if this rule applies to any other currencies as well.

is there a FM that i can use to convert the amount to actual figure.

thanx and regards,

Tarun Bahal

4 REPLIES 4
Read only

Former Member
0 Likes
721

Hi Tarun,

You might be knowing, Yen doesn't contain decimal values. If you pass 1000 yen, it will save it as 10.00. This happens only with japanese currency.

You can use WRITE .... CURRENCY JPY.

This will work fine.

Let me know if you find any problem.

Read only

0 Likes
720

Thanx Ramesh

This solved my issue.

regards.

Read only

Former Member
0 Likes
720

refer currency type

ex BSEG-field refer bseg currency.

Read only

Former Member
0 Likes
720

Hi,

Please use below fm to convert currency.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY_N'

EXPORTING

client = sy-mandt

date = p_ep_bldat "Posting date

foreign_amount = p_ep_hwbas "Amount

foreign_currency = c_eur "JPY

local_currency = currency "To currency

  • RATE = 0

type_of_rate = 'M'

  • READ_TCURR = 'X'

IMPORTING

  • EXCHANGE_RATE =

  • FOREIGN_FACTOR =

local_amount = p_ep_hwbas "After converting value

  • LOCAL_FACTOR =

  • EXCHANGE_RATEX =

  • FIXED_RATE =

  • DERIVED_RATE_TYPE =

EXCEPTIONS

no_rate_found = 1

overflow = 2

no_factors_found = 3

no_spread_found = 4

derived_2_times = 5

OTHERS = 6 .

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

If usefull please reward .

Thanks