‎2006 Dec 03 8:30 AM
we have a require ment that is in reports when we chose indian currency the currency will be displayed in 10,000.00 ,same as when we choseing US currency it should be displayed in US currency ,When we chossing UAE it will be displayed in UAE Currency.
plz explain the logic and do u have any report regarding this plz send me .
‎2006 Dec 03 12:07 PM
‎2006 Dec 03 2:28 PM
‎2006 Dec 03 5:23 PM
Hope I found the answer for you:
Currency-specific Output Formats
To format the output of a number field according to a specific currency, use the CURRENCY option of the WRITE statement:
Syntax
WRITE <f> CURRENCY <c>.
This statement determines the number of decimal places in the output according to the currency <c>. If the contents of <c> exist in table TCURX as currency key CURRKEY, the system sets the number of decimal places according to the entry CURRDEC in TCURX. Otherwise, it uses the default setting of two decimal places. This means that table TCURX must contain only exceptions where the number of decimal places is unequal to 2.
The output format for currencies does not depend on the decimal places of a number that may exist in the program. The system uses only the sequence of digits. This sequence of digits thus represents an amount specified in the smallest unit of the currency in use, for example Cents for US Dollar (USD) or Francs for Belgian Francs (BEF). For processing currency amounts in ABAP programs, SAP therefore recommends that you use data type P without decimal places.
Example
REPORT demo_list_write_currency LINE-SIZE 40.
DATA: num1 TYPE p DECIMALS 4 VALUE '12.3456',
num2 TYPE p DECIMALS 0 VALUE '123456'.
SET COUNTRY 'US'.
WRITE: 'USD', num1 CURRENCY 'USD', num2 CURRENCY 'USD',
/ 'BEF', num1 CURRENCY 'BEF', num2 CURRENCY 'BEF',
/ 'KUD', num1 CURRENCY 'KUD', num2 CURRENCY 'KUD'.
This program defines two packed numbers NUM1 and NUM2, containing the same sequence of digits, but different numbers of decimal places. These numbers appear in the output in several currencies:
This graphic is explained in the accompanying text
For each currency, the output formats of NUM1 and NUM2 are the same, since they refer to the sequence of digits only. The currency US Dollar (USD) appears in the default setting of two decimal places, since the smallest unit is one Cent and a hundredth of a Dollar. For Belgian Francs (BEF), CURRDEC in TCURX is set to 0, since the Belgian Franc has no smaller units. Dinars from Kuwait (KUD) have units of a thousandth and therefore three decimal places (CURRDEC is 3).
[<a href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba1ef35c111d1829f0000e829fbfe/content.htm">The WRITE statement</a>]
‎2007 Jan 02 10:16 AM