You are on page 1of 23

Oracle Fusion Financials: Currency Daily rates upload

An Oracle White Paper


October 2014

Loading Currency Rates to Oracle Cloud


ERP system
Oracle Fusion Financials: Currency Daily rates upload

Table of Contents

Introduction 3
1. Manual Load using the Daily Rates Spreadsheet 4
Process steps 4
2. Manual Load using File Based Data Import process 6
Process steps 6
3. Automatic Load using Web services 10
Process Flow Diagram 11
Process steps 11
Appendix 14
Oracle Fusion Financials: Currency Daily rates upload

Introduction

This white paper provides an overview of various options to load currency rates to Oracle Cloud
Enterprise Resource Planning (ERP) system.

In Oracle Cloud ERP system, daily currency conversion rates can be maintained between any
two currencies. Users can enter daily conversion rates for specific combinations of currencies,
date, and conversion rate type. Oracle Cloud ERP system automatically calculates inverse rates.
You can override the inverse rates that are automatically calculated.

In this white paper, three different methods of loading currency rates are covered:
1. Manual Load using the Daily Rates Spreadsheet
2. Manual Load using File Based Data Import process
3. Automatic Load using web services

3
Oracle Fusion Financials: Currency Daily rates upload

1. Manual Load using the Daily Rates Spreadsheet

Prerequisites:

In order to load rates using the Daily Rates Spreadsheet, you need to install Oracle ADF Desktop
Integration (ADFdi) client software. Oracle ADF Desktop Integration is an Excel add-in that
enables desktop integration with Microsoft Excel workbooks. You can download the installation
files from Navigator -> Tools -> Download Desktop Integrator Installer.

Process steps
1. Navigate to the Period Close work area.
2. Click the Manage Currency Rates link.
3. Use the Currency Rates Manager page to create, edit, and review currency rate types,
daily rates, and historical rates.
4. Click the Daily Rates tab. Use the Daily Rates tab to review and enter currency rates.
5. Click the Create in Spreadsheet button. Use the Create Daily Rates spreadsheet to enter
daily rates in a template that you can save and reuse.
6. Click in the From Currency field. Select the GBP - Pound Sterling list item.
7. Click in the To Currency field. Select the USD - US Dollar list item.
8. Click in the Conversion Rate field. Select the Spot list item
9. Click in the From Conversion field. Enter the desired information into the From
Conversion field. Enter a valid value:10/1/2014.
10. Click in the To Conversion Date field. Enter the desired information into the To
Conversion Date field. Enter a valid value:10/5/2014.
11. Click in the Conversion Rate field. Enter the desired information into the Conversion
Rate field. Enter a valid value:1.60.
12. Click the Submit button.

4
Oracle Fusion Financials: Currency Daily rates upload

13. If you need to edit the rates, you can do so from the Daily Rates page or resubmit the
spreadsheet.

14. You can save the template to enter daily rates frequently. You can save the spreadsheet to
either a local drive or a shared network drive.

5
Oracle Fusion Financials: Currency Daily rates upload

2. Manual Load using File Based Data Import process

Oracle File Based Data Import (FBDI) is used when you need to load high volume of daily rates
data to Oracle Cloud ERP system.

For customers still on Release 8: Ensure that you have applied patch 18733048 to load rates
using this method.

Process steps
1. Download FBDI template.

o Sign in to Oracle Enterprise Repository - https://fusionappsoer.oracle.com.

o Enter the following information in the Search fields


Field Value
Search String Import and Calculate Daily Rates Import
Type File Based Data Import
Product family Financials
o Click Search.
o From the Search results region, click on the Details tab on the lower pane.
Here you can see the XLSM template (XLSM Template name:
DailyRatesImportTemplate.xlsm), which includes worksheet and macros

6
Oracle Fusion Financials: Currency Daily rates upload

that assist you in structuring, formatting, and generating your data file.
Download the template using the link provided.

2. Enter the rates data in the FBDI template


To prepare your data in a spreadsheet format, use XLS templates:
o The first worksheet in each template provides instructions for using the
template.
o Save a copy of the file. Ensure that macros are enabled (Options->Enable
this content radio button.

o Fill the information as required.

3. Validate data
Template design allows you to perform extensive validations at the preliminary level. It checks
data formats and other mandatory field checks if a rate overlap is present for a particular
combination of From /To Currency code and rate type . Errors are identified and presented in a
separate sheet for the users to review and correct them before revalidating.

7
Oracle Fusion Financials: Currency Daily rates upload

4. Generate Daily rates .zip file


Users can generate daily rates .zip file containing the fully validated and formatted comma-
separated values (.csv) file by just clicking the Generate Daily Rates (B) within the template.

5. Upload file in UCM

UCM refers to Universal Content Management system. It is a single platform for managing
contents across your enterprise.

Use Navigator -> File Import and Export to upload the file in the UCM server. Use the Account
as fin/generalLedger/import when uploading.
Save and close (B)

6. Run Load Interface file for import Process Enterprise Scheduler Service (ESS) job
Navigator -> Tools-> Scheduled processes->Schedule New process (B). This process
further validates the data before uploading to the GL Daily Rates Interface table. If errors

8
Oracle Fusion Financials: Currency Daily rates upload

are found, one can review the error log and correct errors before running the ESS job
again. Once validated, import to populate GL Daily Rates table happens automatically as
a post process.

7. Review the imported rates by navigating to Manage Currency Rates page.

Optionally, the user can verify the imported rates by navigating to Manage Currency
Rates page.

9
Oracle Fusion Financials: Currency Daily rates upload

3. Automatic Load using Web services

If you have a rate subscription source that provides daily rates, then you can use web service to
fully automate the loading of the rates using the File-Based Data Import (as described in
option#2 above). The following external web service FinancialUtilService lets you upload data
files to Oracle Universal Content Management, and launch the processes to import the rates to
Oracle Cloud ERP system.

Step Step Automation Financial Service


Operation
1 Data file upload to the content The step can be automated by invoking web service uploadFileToUcm
management server (UCM) “FinancialUtilService” to upload the file to UCM Server
under “FAFusionImportExport” security group and the
relevant UCM account
2 Load the data into the interface table The step can be automated by invoking web service submitEssJobRequest
“FinancialUtilService” to submit ESS job Load
Interface File for Import

3 Import data from the interface table The step can be automated by invoking Web Service submitEssJobRequest
“FinancialUtilService” to submit ESS the relevant
import job.

4 Monitor the status of the load The step can be automated by invoking the Web service
interface process or import process “FinancialUtilService” and its operation to monitor the getEssJobStatus
status of the web services invoked

5 View the errors during the import and In order to view the errors the end user can invoke the downloadESSJobExecutionDetails
load process and fix them downloadESSJobExecutionDetails operation of the
“FinancialUtilService” web service.

Discovering Automation Service Details

 Launch Oracle Enterprise Repository and login as guest - https://fusionappsoer.oracle.com


 Search for the service that you need. E.g.

Field Value
Search String Financial Utilities Service
Type ADF Service

 Select the “Financial Utility Service” from results section.


 Note following details from the bottom page tabs:
o Documentation Tab – Service Cookbook Information
o Details Tab - Service Path:
http://<host:PortNumber>/finFunShared/FinancialUtilService
The part "http://<host:PortNumber>" is environment specific where
as "/finFunShared/FinancialUtilService" is static for a given service version.

10
Oracle Fusion Financials: Currency Daily rates upload

Process Flow Diagram

Process steps
1. Get rates file from the designated external source
If you have a rate subscription source that provides daily rates, then you can call web service to
collect the file and to feed into Oracle Data Integrator (ODI) or alternatively to a temporary
storage in the UCM that in turn can be fed into ODI for further processing.

2. .Prepare and validate data


You would need to perform data transformation to fit the format of the spreadsheet template.
These data processing steps can be accomplished using the ability extended by Oracle Data
Integrator (ODI).

The .csv data file needs to be provided/transformed in the specific format, in the exact column
sequence as in the .xlsm file and data types as expected. For example, the following .csv file
provides columns as from currency code, to currency code, dates in canonical format, conversion
rate type and the rate.

11
Oracle Fusion Financials: Currency Daily rates upload

3. Call web service (uploadFileToUcm)


Automatically upload the formatted, validated file from ODI into Universal Content
Management (UCM).
4. Call web service (submitESSJobRequest)
Submit the Load Interface file for import Process to load data into GL Daily Rates Interface
Table

5. Call web service (getESSJobStatus)


Verify the status of request submitted in previous step. If the process ended in errors, you may
need to correct them and then resubmit the process

6. Submit process to import rates from Interface table to GL Daily Rates table
happen automatically as a post process to the submit the Load Interface file for
import process indicated in (4) above.

7. Once the Import & Calculate daily rates process gets successfully completed, user
can optionally verify/ review the rates from the currency rate manager page.

12
Oracle Fusion Financials: Currency Daily rates upload

Note: FX Loader Cloud Service is a third party solution that fully automates the
loading of currency rates into the Oracle Financials Cloud. For more information,
see: https://cloud.oracle.com/marketplace/listing/2274101/Care+I.T.+Services/
FXLoader.

Important: Oracle does not endorse any of the partners or their software, solutions,
services, or training listed on the Oracle Cloud MarketPlace site. The
recommendations and opinions expressed on the Oracle Cloud Marketplace are
those of the person or persons posting the review only, and do not represent
Oracle's opinion or position regarding the partner or offering being reviewed.
Oracle disclaims any and all liability arising from your use of Oracle Cloud
Marketplace, including use of partners, software, solutions, services, and training
listed on the site.

13
Oracle Fusion Financials: Currency Daily rates upload

Appendix

 In order to load rates to Oracle Cloud ERP system, the user needs to carry the following
security privileges
Tasks Privilege Duty Role(s)
Creating rate types Define Conversion Rate Type Daily Rates Administration
Duty/General Accounting
Manager
Maintaining daily conversion Maintain Daily Conversion Daily Rates Administration
rates Rate Duty/General Accounting
Manager
Importing rates to Cloud ERP Run Daily Rates Import and Daily Rates Administration
Calculation Program Duty/General Accounting
Manager
Viewing daily conversion View Daily Conversion Rate Daily Rates Administration
rates Duty/General Accounting
Setup Review duty

 Sample Code for launching the daily rates process using a service.
package com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice;

import com.bea.security.providers.xacml.entitlement.parser.Users;

import
com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.types.SubmitES
SJobRequest;
import
com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.types.SubmitES
SJobRequestResponse;
import
com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.types.UploadFil
eToUcm;

14
Oracle Fusion Financials: Currency Daily rates upload

import
com.oracle.xmlns.apps.financials.commonmodules.shared.financialutilservice.types.UploadFil
eToUcmResponse;

import com.sun.xml.ws.api.addressing.AddressingVersion;
import com.sun.xml.ws.api.addressing.WSEndpointReference;
import com.sun.xml.ws.developer.WSBindingProvider;
import com.sun.xml.ws.message.StringHeader;

import java.io.ByteArrayOutputStream;
import java.io.File;

import java.io.FileInputStream;

import java.io.IOException;

import java.net.MalformedURLException;

import java.net.URL;

import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;

15
Oracle Fusion Financials: Currency Daily rates upload

import oracle.webservices.ClientConstants;

import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;
// !THE CHANGES MADE TO THIS FILE WILL BE DESTROYED IF REGENERATED!
// This source file is generated by Oracle tools
// Contents may be subject to change
// For reporting problems, use the following
// Version = Oracle WebServices (11.1.1.0.0, build 130224.1947.04102)

public class FinancialUtilServiceSoapHttpPortClient {


@WebServiceRef
private static FinancialUtilService_Service financialUtilService_Service;

private static final AddressingVersion WS_ADDR_VER = AddressingVersion.W3C;

private final String jksFPath = "client1.jks";


private final String jksPassword = "welcome1";
private final String trustStorePassword = "changeit";
private final String username = "finuser1";
private final String password = "Welcome1";
private String endpointNonSSLURL = "https://efops-rel8st6-cdrm-external-
fin.us.oracle.com/finFunShared/FinancialUtilService?WSDL";
private static final QName servicename = new
QName("http://xmlns.oracle.com/apps/financials/commonModules/shared/
financialUtilService/","FinancialUtilService");
//private SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] { new
SecurityPolicyFeature("policy:oracle/wss11_username_token_with_message_protection_clien
t_policy") };
private SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] { new
SecurityPolicyFeature("policy:oracle/wss_username_token_over_ssl_client_policy") };

16
Oracle Fusion Financials: Currency Daily rates upload

private FinancialUtilService financialUtilService;

public static void main(String[] args) {


FinancialUtilServiceSoapHttpPortClient a = new
FinancialUtilServiceSoapHttpPortClient();

a.invokeServiceWithUsernameTokenMessageProtectionPolicy();
String retStatus = a.invokeUpload();
System.out.println("Return Status :"+retStatus);
long essId = a.invokeSubmitJob(retStatus);
System.out.println("Ess Id:"+essId);

@WebServiceRef
public void invokeServiceWithUsernameTokenMessageProtectionPolicy() {

System.out.println("inside invokeservice");

URL wsdlDoc = null;

try{

wsdlDoc = new
URL("https://efops-rel8st6-cdrm-external-fin.us.oracle.com/finFunShared/
FinancialUtilService?wsdl");

}catch(MalformedURLException e){

17
Oracle Fusion Financials: Currency Daily rates upload

e.printStackTrace();

}
System.out.println("Java Path ::"+ System.getenv("JAVA_HOME"));
String classpath = System.getProperty("java.class.path");
System.out.println(classpath);
String javaHome = System.getenv("JAVA_HOME");
System.out.println("Java Home ::"+javaHome);
int index = javaHome.indexOf("\\bin");
javaHome = javaHome.substring(0,index);
System.out.println(javaHome);
String trustStore = javaHome+ "\\lib\\security\\cacerts";
System.out.println(trustStore);

// String trustStore = "C:\\Program Files (x86)\\Java\\jre1.7.0_71\\lib\\security\\


cacerts";

System.setProperty("javax.net.ssl.trustStore", trustStore);
System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);
financialUtilService_Service = new FinancialUtilService_Service(wsdlDoc,
servicename);
financialUtilService =
financialUtilService_Service.getFinancialUtilServiceSoapHttpPort(securityFeature);
WSBindingProvider wsbp = (WSBindingProvider)financialUtilService;
Map<String, Object> requestContext = wsbp.getRequestContext();
requestContext.put(BindingProvider.USERNAME_PROPERTY, username);
requestContext.put(BindingProvider.PASSWORD_PROPERTY, password);
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,

18
Oracle Fusion Financials: Currency Daily rates upload

endpointNonSSLURL);
requestContext.put(ClientConstants.WSSEC_KEYSTORE_TYPE, "JKS");
requestContext.put(ClientConstants.WSSEC_KEYSTORE_LOCATION, jksFPath);
requestContext.put(ClientConstants.WSSEC_KEYSTORE_PASSWORD,
jksPassword);
System.out.println("Finished invokeservice");

}
public String invokeUpload(){

System.out.println("inside invokeupload");
ObjectFactory objectFactory = new ObjectFactory();
DocumentDetails documentDet = new DocumentDetails();

String fileNameWithPath = "GlDailyRatesInterface.zip"; //C:\\Users\\


skyakkal.ORADEV\\Desktop\\GlSegmentHierInterface.zip";
String fileName = "GlDailyRatesInterface.zip";
String contentType = "zip";
String title = "GL DailyRates Import";
String ucmAccountInfo = "fin$/generalLedger$/import$";
String ucmSecurityGroup = "FAFusionImportExport";

documentDet.setContent(objectFactory.createDocumentDetailsContent(this.getByteArray(file
NameWithPath)));

documentDet.setContentType(objectFactory.createDocumentDetailsContentType(contentType
));

documentDet.setDocumentAccount(objectFactory.createDocumentDetailsDocumentAccount(
ucmAccountInfo));

19
Oracle Fusion Financials: Currency Daily rates upload

documentDet.setDocumentAuthor(objectFactory.createDocumentDetailsDocumentAuthor(use
rname));

documentDet.setDocumentSecurityGroup(objectFactory.createDocumentDetailsDocumentSec
urityGroup(ucmSecurityGroup));

documentDet.setDocumentTitle(objectFactory.createDocumentDetailsDocumentTitle(title));

documentDet.setFileName(objectFactory.createDocumentDetailsFileName(fileName));

UploadFileToUcm uploadFileToUcm = new UploadFileToUcm();

uploadFileToUcm.setDocument(documentDet);
UploadFileToUcmResponse retStatus = null;
try {
retStatus = financialUtilService.uploadFileToUcm(uploadFileToUcm);
System.out.println("File successfully Uploaded.Status is:" + retStatus.getResult());
} catch (Exception e) {
e.printStackTrace();
}
return retStatus.getResult();
}
public byte[] getByteArray(String fileName) {
File file = new File(fileName);
FileInputStream is = null;
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int nRead;
byte[] data = new byte[16384];
try {

20
Oracle Fusion Financials: Currency Daily rates upload

is = new FileInputStream(file);
while ((nRead = is.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, nRead);
}
buffer.flush();
} catch (IOException e) {
System.out.println("In getByteArray:IO Exception");
e.printStackTrace();
}
return buffer.toByteArray();
}

public long invokeSubmitJob(String retStatus)

{
String jobPackageName =
"/oracle/apps/ess/financials/commonModules/shared/common/interfaceLoader";
String jobDefName = "InterfaceLoaderController";
SubmitESSJobRequest submitESSJobRequestParam = new SubmitESSJobRequest();
submitESSJobRequestParam.setJobDefinitionName(jobDefName);
submitESSJobRequestParam.setJobPackageName(jobPackageName);
List<String> paramList = submitESSJobRequestParam.getParamList();
paramList.add("71");
paramList.add("" + retStatus);
paramList.add("N");
paramList.add("N");
SubmitESSJobRequestResponse submitESSJobRequestResponse = null;

21
Oracle Fusion Financials: Currency Daily rates upload

long submittedJobID = 0;

try {
submitESSJobRequestResponse =
financialUtilService.submitESSJobRequest(submitESSJobRequestParam);//jobPackageName,
jobDefName, paramList);
submittedJobID = submitESSJobRequestResponse.getResult();
System.out.println("ESS Job Request ID: " + submittedJobID);
} catch (Exception e) {

e.printStackTrace();
}
return submittedJobID;
}
}

Related references:
 ERP Cloud Integration
 Financial Utility Web Service
 Using External Data Integration Services
 Developing Integration Projects with Oracle Data Integrator

22
Oracle Fusion Financials: Currency Daily rates Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
upload
October 2014 This document is provided for information purposes only, and the contents hereof are subject to change without notice. This
document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in
Author: Anant Iyer
law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any
Technical Review: David Haimes, Mei Siauw, liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This
Anil Desu, Santhosh Yakkali, Kathryn document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our
Wohnoutka prior written permission.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Oracle Corporation
World Headquarters
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and
500 Oracle Parkway
are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are
Redwood Shores, CA 94065
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0114
U.S.A.

Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200

oracle.com

You might also like