Hello,
I need some help with currency conversions. I am working on a workflow process. One of the steps in the workflow is conditional, based on whether the total value is greater that a certain amount. The ranges are maintained in USD, so I need to convert from the document currency to USD.
Here is what I have tried so far.
fromCcyBean=doc.getCurrency();
toCcyBean=IBeanHomeLocator.lookup(session, CurrencyIBeanHomeIfc.sHOME_NAME).findUnique("USD");
convSRFCost=IBeanHomeLocator.lookup(session, CurrencyConversionIBeanHomeIfc.sHOME_NAME).findUnique(fromCcyBean,toCcyBean);
the findUnique method of CurrencyConversionIBeanHomeIfc takes SimpleObjectReferenceIfc as the input
findUnique(SimpleObjectReferenceIfc from, SimpleObjectReferenceIfc to)
so the error I am getting is
reflection error: bsh.ReflectError: Method findUnique( com.sap.odp.common.db.LocalizedObjectReference, com.sap.odp.api.doccommon.masterdata.CurrencyIBeanImpl ) not found in class'com.sap.odp.api.doccommon.masterdata.CurrencyConversionIBeanHomeImpl'
I tried using getObjectReference() but that did not work either.
Can anyone please advise me on how to get the CurrencyConversionBean, so I can get the conversion rates.
Please let me know if I my approach is incorrect.
Thanks,
MP