Академический Документы
Профессиональный Документы
Культура Документы
You used OB08 to enter the exchange rate ratio (from) and ration (to). There are three type of Exchange rate :1. EURO Euro Dollar 2. M 3. R Standard translation at average rate Exchange rate for currency revaluation
By : Norman Depending upon client's requirement, you can set the control of currency decimals in oy04. In the DB, SAP stores all amount values with 2 decimal places. But when SAP reads it, it interprets it based on the currency associated with the amount field. Try the FM BAPI_CURRENCY_CONV_TO_EXTERNAL. Pass the amount obtained from DB and the currency. This will give you back the actual interpreted value. Which table we can get the number of decimal places for a particular currency type? Eg: USD has 2 decimals JPY has 0 decimals Check the table TCURX. Based on user profile you can get the currency format from USR01. Use This Code: It takes care of decimal notation based on user profile. What ever may be the user profile for decimal notation. FIELD_NUM = 1,233.50 OR FIELD_NUM = 1.233,50 OR FIELD_NUM = 1 233,50 *************************************** SELECT SINGLE DCPFM FROM USR01 INTO VAR_DCPFM WHERE BNAME EQ SY-UNAME. IF VAR_DCPFM EQ 'X'. REPLACE ALL OCCURRENCES OF ',' IN: FIELD_NUM WITH ''. TRANSLATE FIELD_NUM USING ','. ELSEIF VAR_DCPFM EQ ''. REPLACE ALL OCCURRENCES OF '.' IN: FIELD_NUM WITH ''.
TRANSLATE FIELD_NUM USING '.'. TRANSLATE FIELD_NUM USING ',.'. ELSEIF VAR_DCPFM EQ 'Y'. TRANSLATE FIELD_NUM USING ',.'. ENDIF. *************************************** This code will result into : FIELD_NUM = 1233.50