on 2012 Jul 09 11:29 AM
Hi Experts,
I am replicating the routines from ECC to CRM through JAVA coding. I just came accross a routine which makes a call to FM 'CONVERT_TO_LOCAL_CURRENCY'. After searching from SAPSTANDARDEXITS, I got an API in JAVA as ConvertTo where some parameters are apssed.
I would really be happy if you guide me to code this FM in JAVA. The FM signature is :
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = sy-datum
foreign_amount = xkomv-kwert
foreign_currency = tkomk-waerk
local_currency = ls_tvko-waers
IMPORTING
LOCAL_AMOUNT = ld_kwert
EXCEPTIONS
NO_RATE_FOUND = 1
OVERFLOW = 2
NO_FACTORS_FOUND = 3
NO_SPREAD_FOUND = 4
DERIVED_2_TIMES = 5
OTHERS = 6
.
However in JAVA I could not proceed with writing the method call or using API convertTo (provided in CashDiscount.java in SAP standard exits). Is this API to be used or is there another API for currency conversion to local currency. Any helps would be highly appreciated.
Regards,
Mayank
Request clarification before answering.
Hey Mayank,
See if you can make use of the Interface ICurrencyConversionResult which comes in the package com.sap.spe.conversion;
This has two methods
public ICurrencyValue getValue();
@return currency value which is the result of currency conversion
public IExchangeRate getExchangeRate();
@return the local exchange rate which was used for currency conversion
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.