Configure Financials Automatically

To all you EPM administrators out there, here’s one job you can automate, the monthly Configuration of the open periods on the Scenario dimension and setting of the “OEP_” substitution variables. One less thing to do each month end…. Save a bit of time.

Basically I’ve got two scripts, the first to set the variables, and the latter to set the member properties on the scenario dimension, and between the two they cover doing this Configure Financials.

This blog isn’t intended to be an instruction in Groovy Scripting, more something to lift, copy, modify and use.

Below are the manual steps to do every month:

I run the two Groovy Scripts from a Windows .Cmd script. Never tried it from a pipeline/Job, but it what it would require is to populate the input parameters:

/* RTPS: {Month_End_Period} {Month_End_Year} {gRTPs_Budget_Year}*/

Alternatively the date could be set from Groovy getting the system date. When I encounter a need to do this then I’ll update the blog later. Here is the .cmd file:

Note that the business rules are run with system variables passed as parameters: Month_End_Period=%MonthEndMth% Month_End_Year=%MonthEndYr%

.

iEPM_System_Set_Plan_Period_Substitution_Variables_groovy

This is the script to update the variables, given the repetitive nature of all the variables to update, I’ve used a template with the generic code in. The first section is all about extracting the date from the inputs and then working out the relative Months, Quarters and Years and storing in Groovy variables for use in setting the EPM Sub Vars.

In a preceding .cmd script I extract the date from the system for the parameters as this is used by other batch processes within this system, but there is no reason why this can’t be modified to take the system date in Groovy.

TEMPLATE: iEPMt_Library_groovy

This template has generic calls for many types of function, the only one used in this instance is setSubstitutionVariables. I left the other functions in as they are there in my production environment. They are:
– runBusinessRule(String connectionName, String ruleName, Map runTimePrompts)
– generateRoleAssignmentReport(String connectionName, filename)
– moveUsersToGroup(String connectionName, String GroupName, List userList)
– setSubstitutionVariables(String connectionName, String Application, List subVarCollect)
– getAllSubstitutionVariables(String connectionName, String Application)
– getSubstitutionVariable(String connectionName, String Application, String subVarName)
– getPlanTypeSubstitutionVariable(String connectionName, String Application, String Plan, String subVarName)
– runDataLoadRule(String connectionName, String ruleName, String startPeriod, String endPeriod, String importMode, String exportMode, String fileName = ”)
– copyFile(sourceFileName, targetFileName, sUser, pwdFile, connectionName, sourceURL)

iEPM_Set_Open_Period

The final step is to set the open periods as it would appear in the Scenario dimension. This could have been combined with the previous script, but as I implemented them at two different times, I wanted to keep some degree of segregation.

Leave a Comment