|
|||||||
| Sponsored Links |
| SAP FICO Forum End-To-End Process Documents, Financial Accounting, FI, Logistics, LO, Controlling, CO, SAP Certification Exam, SAP Financial Accounting/Controlling Book, FICO Sample Questions, SAP Financial Modules TC, SAP Controlling Reference Book, SAP Financial Modules TC, SAP FI CO Table , Account Posting, Banking, FI Frequently Asked Question, Open and Close Posting Periods, General Ledger, SAP Chart of Account , Account Receivable, Account Payable, Down Payment, Lock Box, Free FI Download, PDF, Asset Accounting, Company/Business Area, Exchange Rate / Currency, Error Message, Profit Accounting, Taxes, Data Entry, FI Reports, Controlling , Report Painter, SAP FICO Role, Archiving, ABAP Customized FI Report & More. |
![]() |
|
|
Thread Tools | Rate Thread |
|
#1
|
||||||
|
||||||
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 |
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Explain The Difference In Currency | welcomewiki | SAP FICO Forum | 0 | |
| Change in Company Code Currency | welcomewiki | SAP FICO Forum | 0 | |
| SRK’s 'Rab' places his film in UK top ten | Sumathi | Film Forum | 0 | |
| Top 10 places to go in 2008 | soniya | General Discussion | 0 | |