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

rajesh reddy

Former Member
0 Likes
683

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 .

4 REPLIES 4
Read only

graghavendra_sharma
Contributor
0 Likes
498

Hi

Do you mean, you want to convert one currency to another?

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
498

Please make sure to give a good subject line when posting a thread. Please don't use your name. Try to give a short description of your question.

Regards,

Rich Heilman

Read only

Clemenss
Active Contributor
0 Likes
498

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>]

Read only

Former Member
0 Likes
498

thanks