Load Preformatted Balances into a Period
Use these scripts to import mapped data from an uploaded file into an Account Reconciliation environment.
Windows Sample Script
Create a file namedrunPreformattedBalances.ps1
by
copying the following script. Store it in a local
directory.$inputproperties = ConvertFrom-StringData(Get-Content ./input.properties -raw)
$username="$($inputproperties.username)"
$passwordfile="$($inputproperties.passwordfile)"
$serviceURL="$($inputproperties.serviceURL)"
$dataFile="$($inputproperties.dataFile)"
$period="$($inputproperties.period)"
$balanceType="$($inputproperties.balanceType)"
$currencyBucket="$($inputproperties.currencyBucket)"
$elements=$dataFile.split('/')
$dataFileName=$elements[-1]
epmautomate login ${username} ${passwordfile} ${serviceURL}
epmautomate uploadfile ${dataFile}
epmautomate importpremappedbalances ${period} ${dataFileName} ${balanceType} ${currencyBucket}
epmautomate deletefile ${dataFileName}
epmautomate logout
Linux/UNIX Sample Script
Create a file namedrunPreformattedBalances.sh
by
copying the following script. Store it in a local
directory.#!/bin/bash
. ./input.properties
export JAVA_HOME=${javahome}
dataFileName=$(echo "${dataFile}" | rev | cut -d'/' -f1 | rev)
${epmautomatescript} login "${username}" "${passwordfile}" "${serviceURL}"
${epmautomatescript} uploadfile "${dataFile}"
${epmautomatescript} importpremappedbalances "${period}" "${dataFileName}" "${balanceType}" "${currencyBucket}"
${epmautomatescript} deletefile "${dataFileName}"
${epmautomatescript} logout
Sample input.properties File
To run therunPreformattedBalances
scripts, create the
input.properties
file and update it with information for your
environment. Save the file in the directory where
runPreformattedBalances.sh
or
runPreformattedBalances.ps1
is
stored.
Windows
username=exampleAdmin
passwordfile=examplePassword.epw
serviceURL=exampleURL
dataFile=DATA_FILE_NAME.csv
period=PERIOD_NAME
balanceType=BALANCE_TYPE
currencyBucket=CURRENCY_BUCKET
Linux/UNIX
javahome=JAVA_HOME
epmautomatescript=EPM_AUTOMATE_LOCATION
username=exampleAdmin
passwordfile=examplePassword.epw
serviceURL=exampleURL
dataFile=DATA_FILE_NAME.csv
period=PERIOD_NAME
balanceType=BALANCE_TYPE
currencyBucket=CURRENCY_BUCKET
Table 3-23 input.properties Parameters
Parameter | Description |
---|---|
javahome |
JAVA_HOME location. For Linux/UNIX only.
|
epmautomatescript |
Absolute path of EPM Automate
executable (epmautomate.sh ). For Linux/UNIX
only.
|
username |
User name of a Service Administrator. |
password |
Password of the Service Administrator or the name and location of the encrypted password file. |
serviceURL |
URL of the environment that hosts the application into which you want to load preformatted balances. |
dataFile |
A CSV file that contains the preformatted balances (typically created from a General Ledger) that you want to load into the application. This file must already have been uploaded to the environment using the uploadFile command. |
period |
The reconciliation period to which the preformatted balances are to be uploaded. |
balanceType |
The type of preformatted balances contained in the
dataFile .
|
currencyBucket |
The currency bucket for the preformatted balances. |
Running the Script
- Create
runPreformattedBalances.ps1
orrunPreformattedBalances.sh
by copying the script from a preceding section. - For Windows and Linux/UNIX: only
- Create the
input.properties
file and save it in the directory where therunPreformattedBalances
script is located. Contents of this file differs depending on your operating system. See Table 3-23.Make sure that you have write privileges in this directory. For Windows, you may need to start PowerShell using the Run as Administrator option to be able to run the script.
- Launch the script.
- Windows PowerShell: run
runPreformattedBalances.ps1
. - Linux/UNIX: run
./runPreformattedBalances.sh
.
- Windows PowerShell: run
- Create the