Application Development 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: 

How to display currency values in indian format

Former Member
0 Kudos

hi all,

When I am displaying Currency values as output , those are displaying in U.S. format (ie.1,234,000.00) , But I need to display those in Indian Rupee format (i.e 12,34,000.00).

Plz any one can help me that how to display this

thank you,

regards

Hanuma

16 REPLIES 16

Former Member
0 Kudos

The decimal notation is displayed based on the user porfile of the user who runs the report.

To view the user profile Go to Su01 or

System->User Profile->Own Data-> Defaults tab-> Decimal notation.

You can change this to achieve the desired format.

If you dont want to do this, you can try using SET COUNTRY statement in your report.

0 Kudos

@Aparna.

Same problem iam also facing.

But i dont think we have an option in decimal notation for the above indian format. I can only see the below three formats;

1) 1.234.567,89

2) X 1,234,567.89

3) Y 1 234 567,89

Any other way to do this?

Regards

Karthik D

0 Kudos

Hi karthik ,

u r right ... only that three formats are supported ... u can manipulate them to get the deisred format right ...

Former Member
0 Kudos

>

> hi all,

>

> When I am displaying Currency values as output , those are displaying in U.S. format (ie.1,234,000.00) , But I need to display those in Indian Rupee format (i.e 12,34,000.00).

>

> Plz any one can help me that how to display this

>

>

> thank you,

>

>

> regards

>

> Hanuma

HI..

Initially, try to change the settings of your SAP systems as per Indian standards.

or else just include this stmt as first stmt in ur program.

SET COUNTRY 'IND'

regards,

Padma

Former Member
0 Kudos

dear hnuma kumar ,

if u get the quantity in USD format thn u conver in INR indain format .

Pls do coding in u r program , just ask to u r senior or FC.

and search on SDN .

CONVERSION FACTOR is availbale in SAP s/m

dont change any SAP setting it is effect on other module ,

Regards ,

Nikhil Narkhede

Former Member
0 Kudos

Were you able to resolve this issue?

I have same requirement. Please provide solution if you have.

0 Kudos

Chinmay,

Some one above has already mentioned SET COUNTRY 'IND' . Did you try that ?

BR,

Shankar.

0 Kudos

I have seen that solution, but I think it will be program specific and would be restricted to the program I use it in.

Would it be applicable to standard transactions?

eg. would I be able to see figures in indian formats in PO (ME23N)?

0 Kudos

How about doing it in a user-exit for eg ME_PROCESS_PO_CUST BADI for a PO ?

BR,

Shankar.

0 Kudos

In display time use EDIT mask '--,---.--'.

Thanks 

Former Member
0 Kudos

Hi  Hanuma,

Currencies for countries can be defined in transaction OY01.

Using the addition CURRENCY <curr> for the respective amount will print the amount in the convention that is defined.

Decimal places for currencies are defined by SAP and it is recommended not to change them.

Regards

Vamsi Konanki.

asim_isik
Active Participant
0 Kudos

hi hanuma,

i had in my project same issue and i just did today it works fine. Here is how we doing. Updating currency from center bank into tcurr table. And taking currency from there

KURST = 'M' "for me i dont know which type you need

FCURR = 'USD'

TCURR = 'INR'

"if its the system day you taking currency you can use sy-datum but you need to convert it

CONVERT INVERTED-DATE sy-datum INTO DATE lv_date.

GDATU = lv_date "the day you want to take currency

UKURS is currency what you need take.

indian_value = usd_value * ukurs.

narendar_naidu
Active Participant
0 Kudos

hi,

This is just a try , check whether it works, as u said u r trying to display . if its in a program use

write (ur value) to (some char or some curr vaiable) currency waers (this addition shud be ur reference currency field).

regrds,

karun_prabhu
Active Contributor
0 Kudos

Hello Hanuma Kumar.

     In you ALV field cat data, give reference to a standard table-currency field.

     For instance,

          fcat-CTABNAME = 'MSEG'

          fcat-CFIELDNAME = 'DMBTR'.

Regards.

Sreenith
Explorer
0 Kudos

Hi Hanuma kumar, please try this code.


REPORT ZAMOUNT_CONVERSION.

DATA : RESULT1(20).

PARAMETERS : NUM TYPE P DECIMALS 2.

DATA : num2 type STRING.

DATA col_amt(20) type n,"15

         col_b type i,

         num_1(20) type C,"15

         Length type i.

num_1 = num.

write : 'default format      :',num.

uline.

skip.

IF ( num >= 999999999 ).

       write num_1 using edit mask 'RR__,__,__,__,______' to col_amt.

       CONDENSE col_amt.

       length = STRLEN( col_amt ).

       if length = 16.

         REPLACE first OCCURRENCE OF ',' in col_amt with space.

         write :/'amount indian format:',col_amt.

       else.

       write :/'amount indian format:',col_amt.

       endif.

ELSEIF NUM < 999999999 AND NUM >= 9999999.

       write num_1 using edit mask 'RR__,__,__,______' to col_amt.

       condense col_amt .

       length = STRLEN( COL_AMT ).

       if length = 13.

         REPLACE first OCCURRENCE OF ',' in col_amt with space.

         write :/'amount indian format:',col_amt.

       else.

         write :/'amount indian format:',col_amt.

      endif.

ELSEIF NUM < 9999999  AND NUM >= 99999.

       write num_1 using edit mask 'RR__,__,______' to col_amt.

       condense col_amt .

       length = STRLEN( COL_AMT ).

       write :/'amount indian format:',col_amt.

ELSEIF NUM < 99999.

   data : dumy(10) type c.

   dumy = num .

   CONDENSE dumy.

   length = STRLEN( dumy ).

     if length <= 6.

       write :/'amount indian format:',num.

       else.

       write num_1 using edit mask 'RR__,______' to col_amt.

       write :/'amount indian format:',col_amt.

      endif.

   ENDIF.

   uline.

0 Kudos

Use below code:

DATA : lv_amount(20) TYPE c VALUE '-12345123.89',
       lv_amt1       TYPE string,
       lv_amt2       TYPE string,
       lv_amt        TYPE string,
       lv_len        TYPE i,
       lv_sign.

SPLIT lv_amount AT '.' INTO lv_amt1 lv_amt2.
lv_len = strlen( lv_amt1 ).

IF lv_amt1+0(1) = '+' OR lv_amt1+0(1) = '-'.
  lv_sign = lv_amt1+0(1).
  lv_len = lv_len - 1.
  lv_amt1 = lv_amt1+1(lv_len).
ENDIF.

IF lv_len > 3.
  lv_len = lv_len - 3.
  CONCATENATE ',' lv_amt1+lv_len(3) '.' lv_amt2 INTO lv_amt.

  WHILE lv_len > 2.
    lv_len = lv_len - 2.
    CONCATENATE ',' lv_amt1+lv_len(2) lv_amt INTO lv_amt.
  ENDWHILE.

  IF lv_len = 1.
    lv_len = lv_len - 1.
    CONCATENATE lv_sign lv_amt1+lv_len(1) lv_amt INTO lv_amt.
  ELSE.
    lv_len = lv_len - 2.
    CONCATENATE lv_sign lv_amt1+lv_len(2) lv_amt INTO lv_amt.
  ENDIF.
ELSE.
  lv_amt = lv_amount.
ENDIF.

WRITE lv_amt.

 

Thanks.

Mithun