cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Script Currency COnversion

0 Kudos

Hi ,

While Printing Invoice(FB03) in SAP Script, I am using Japanese Currency (JPY) and the amount is 11,120 but in SAP script I see the amount is coming as 1,11.20

I think its because of exchange rate defined in customization for Japanese currency (JPY). But we cant change the exchange rates and I want the amount to be printed as 11,120 instead of 1,11.20.

I guess we need to convert the currency from JPY to USD in SAP Script editor and not in the Program.However , I am not sure.

Please help. Thanx in advance.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

you can use this FM: CONVERT_TO_FOREIGN_CURRENCY

you have to write the fm code in your driver prgram

and get the correct value and then pass this value to sap script.

Code syntax:

FORM get_amount TABLES it_intab STRUCTURE itcsy

it_outtab STRUCTURE itcsy.

here you have to call fm CONVERT_TO_FOREIGN_CURRENCY.

get the correct value in one variable and then add that variable to it_outtab as follows:

READ TABLE it_outtab INDEX 1.

IF sy-subrc EQ 0.

it_outtab-value = (your variable name in which your getting the correct amt).

MODIFY it_outtab INDEX sy-tabix TRANSPORTING value.

ENDIF.

endform.

And in your SAp Script call this subroutine as follows :

PERFORM get_amount IN (Write the name of your driver program)

CHANGING &V_AMOUNT((your variable name in which your getting the correct amt).)&

ENDPERFORM.

AND THEN PRINT THAT VARIABLE.....

Former Member
0 Kudos

Hi all, i have same problem as well

If we move the currency amount to output_parameter-value (ITCSY), when it passed back to SAP Script, the value ###,###,###0.00 is not possible.

let's say BSEG-WRBTR value is 1400.00, i need to convert this to CHAR so that I can passed it to SAP script, how can I get I pass it to SAP scriot then 1,400.00

i tried &amount(K)& it is not working..

SuhaSaha
Advisor
Advisor
0 Kudos

>

> Hi ,

> While Printing Invoice(FB03) in SAP Script, I am using Japanese Currency (JPY) and the amount is 11,120 but in SAP script I see the amount is coming as 1,11.20

> I think its because of exchange rate defined in customization for Japanese currency (JPY). But we cant change the exchange rates and I want the amount to be printed as 11,120 instead of 1,11.20.

> I guess we need to convert the currency from JPY to USD in SAP Script editor and not in the Program.However , I am not sure.

> Please help. Thanx in advance.

Hello Manish,

This is not due to any exch. rate its because JPY has got no decimals. So you are getting this issue.

You can try this:

&V_AMOUNT(K)&

Is the value coming in your variable 11,120 or 1,11.20 ?

BR,

Suhas

Former Member
0 Kudos

Hi,

try this function molule

CONVERT_TO_FOREIGN_CURRENCY

It converts from local to foreign currency..

Hopt it will useful to u in future also...

Regards

Kiran

Former Member
0 Kudos

Hi,

Try this.

The formatting for certain field types depends on the country settings.

These field types include, for example, date fields and number fields that include either a decimal point or the u2018thousandsu2019 separator character.

To choose a formatting option other than the one specified in the user master record, use the SET COUNTRY control command.

The country-dependent formatting options are stored in the T005X table.

/: SET COUNTRY 'CAN'

/: SET COUNTRY &country_key&

Thanks.

Former Member
0 Kudos

Use this FM BAPI_CURRENCY_CONV_TO_INTERNAL

use this fm in an subroutine and call this fm in the subroutine.

кu03B1ятu03B9к

Edited by: kartik tarla on Feb 8, 2009 1:38 PM