taking your fdm application to the next level with advanced scripting

38
Taking Your FDM Application to the Next Level with Advanced Scripting Level with Advanced Scripting Tony Scalese Edgewater Ranzal www.ranzal.com

Upload: edgewater-ranzal

Post on 22-Jan-2015

11.051 views

Category:

Technology


5 download

DESCRIPTION

Ranzal Practice Director, Tony Scalese conducted this presentation at the recent ODTUG Kaleidoscope conference in Long Beach, California.

TRANSCRIPT

Page 1: Taking Your FDM Application to the Next Level with Advanced Scripting

Taking Your FDM Application to the Next

Level with Advanced ScriptingLevel with Advanced Scripting

Tony Scalese

Edgewater Ranzal

www.ranzal.com

Page 2: Taking Your FDM Application to the Next Level with Advanced Scripting

� One of the Largest Oracle/Hyperion Practices in the U.S.

� Oracle / Hyperion Platinum Partner - Highest Status

About Edgewater Ranzal

15 Years Partner - Highest Status

� Vertical Expertise with High-Profile Clients from Coast to Coast

� Sound Project Methodology Insures Project Success

� “One Stop Shop” for ALL EPM Implementation needs

15 Years700+ clients

1000+ projects

Page 3: Taking Your FDM Application to the Next Level with Advanced Scripting

ConsolidationBusiness

IntelligencePlanning

Our Services

ProjectManagement

InfrastructureData

Services

Page 4: Taking Your FDM Application to the Next Level with Advanced Scripting

Who Is Tony Scalese

� Over 10 years Experience with Data Integration and Financial Planning & Consolidation on the Hyperion suite of products

� Established many innovative FDM design, customization and automation concepts that have evolved into standard and automation concepts that have evolved into standard Industry-wide practices.

� Certified HFM Consultant - System 9 & Fusion 11

� Present at Oracle conferences, Ranzal webcasts and post on Oracle Technology Network (OTN) and blog on www.FDMGuru.com

� B.A. Economics, Allegheny College; MBA Candidate, Babson College

Page 5: Taking Your FDM Application to the Next Level with Advanced Scripting

Agenda

Script Types Import Scripts

Event Scripts

Custom Scripts

Tips & Tricks

Solution Overview & Wrap-up

Common Script Usage

Batch Scripts

Leveraging Workbench

Scheduling Scripts

Smart Replace

Resources

Scripting Challenge

Page 6: Taking Your FDM Application to the Next Level with Advanced Scripting

What is FDM Scripting?

� FDM has a powerful scripting engine that leverages the VBScript programming language to further extend the application’s functionalityfunctionality● Scripts can be used to execute SQL queries

● Scripts can leverage windows objects (Shell) to execute batch command files

� FDM Scripting is as powerful as your programming skills & knowledge of the application architecture

Page 7: Taking Your FDM Application to the Next Level with Advanced Scripting

Script Types

� Import: Execute during the import workflow stage when assigned to the import format used by the location processing data

� Event: Execute during predefined “events” � Event: Execute during predefined “events” within the application. These are similar to Excel workbook macros that execute “OnOpen”

� Custom: All other scripts that are used to perform additional actions/functions in FDM

Page 8: Taking Your FDM Application to the Next Level with Advanced Scripting

Import Scripts

� DataPump – Used with Delimited & Fixed Width Import formats● Execute for the dimension to which they are assigned

in the import format. in the import format.

● Execute for each line in the data file

� Integration – Used with Script Import Formats● Used to provide direct integration to relational sources

● Executes SQL queries to retrieve data from source

● Often Utilizes an ADO connection

● Working example in the Admin Guide

Page 9: Taking Your FDM Application to the Next Level with Advanced Scripting

Import Scripts – Some Facts

� API objects are not available for use in Import Scripts - Data Pump or Integration

� Data Pump scripts are passed the field (strField) defined by the import format – i.e, field x of y - as defined by the import format – i.e, field x of y - as well as the entire record (strRecord)

� Temporary variables can be used during the import process and accessed by other import scripts – RES.pVarTempx

� You cannot execute Import scripts from the script editor

Page 10: Taking Your FDM Application to the Next Level with Advanced Scripting

Import Scripts – The #1 Pitfall

� Pre/Cross Dimensional Mapping - if source account is X, Y or Z then Entity is A● While there are times this can be necessary, robust event

scripting can often address the need for this logic

� Why is this approach flawed?� Why is this approach flawed?● Limited visibility to the true source value for a given

dimension● Mapping “logic” is likely no longer an end user function;

scripts are only visible to administrators● Any time the logic changes, the data file must be re-

imported● ERPi does not currently support modifications to the source

member that was extracted from the G/L

Page 11: Taking Your FDM Application to the Next Level with Advanced Scripting

Example Integration ScriptPackage

� Create connection to source

� Connection strings vary based on source

DB typeDB type

� Run query to get source records

� SQL Select query

� Append query result to FDM worktable

Page 12: Taking Your FDM Application to the Next Level with Advanced Scripting

Event Scripts – Some Facts

� Only execute when the Event actually has code

� Application passes certain arguments to the event script when triggeredevent script when triggered

� “Action” event scripts often execute multiple subprocesses and/or other event scripts

� You cannot add “new” Event scripts

� You cannot execute Event scripts from the script editor

Page 13: Taking Your FDM Application to the Next Level with Advanced Scripting

Event Scripts

Event Script Executed

StartUp During Log In and Logout of the application

ShutDown Does not execute in 11.1.2.0

StatusMessage When using the API function mStatusMessage

SystemLocked When the system is Locked

POVChanged When the point-of-view is changed

SecurityChanged When security is changed

ImportMap (Bef & Aft) During the Import of a mapping .TRx file

CopyMap (Bef & Aft) During the Copy of map from one location to another

ClearData (Bef & Aft) When data is cleared for a given point-of-view

FileImport (Bef & Aft) When a flat file is imported; does not apply to adaptor & script based import formats

Page 14: Taking Your FDM Application to the Next Level with Advanced Scripting

Event Scripts

Event Script Executed

Validate (Bef & Aft) During Validate workflow step

ExportToDat (Bef & Aft) During Export step when a data file is created

Load (Bef & Aft) During Export step when data file export is loaded

to target systemto target system

Consolidate (Bef & Aft) During a target system is consolidation

Check (Bef & Aft) When Check workflow step

Calculate (Bef & Aft) When Calculate is executed; Process Logic/Maps

ProcLogicGrp (Bef & Aft) When Logic groups applied; during Import &

Process Logic/Maps

ProcMap (Bef & Aft) When Maps are applied; during Import & Process

Logic/Maps; only executes for locations with

Wildcard maps

Page 15: Taking Your FDM Application to the Next Level with Advanced Scripting

Event Scripts

Event Script Executed

ArchiveItemAction During archive of import & export files

ControlsAction During Certification (un)Review & (un)Submit

ImportAction When Import workflow step is run

MemoItemAction When Memos are added, updated or deleted

MultiloadAction During Multi-Load and Journal processing

BatchAction During batch execution

BatchAutoMapCorrect During a batch process that utilizes the autocorrect

mapping feature

Page 16: Taking Your FDM Application to the Next Level with Advanced Scripting

Custom Scripts – Some Facts

Page 17: Taking Your FDM Application to the Next Level with Advanced Scripting

Custom Scripts

� 3 types of Custom scripts

● General: All other actions in FDM; example –

Batch loader script

● Plug-In: No longer used

● Web: Used to create tasks flows that allow end

users to execute scripts without requiring access

to script editor

Page 18: Taking Your FDM Application to the Next Level with Advanced Scripting

Running SQL from Scripts

� Select Queries – Used to retrieve data from a

table

● Set rs = DW.DataAccess.farsKeySet(strSQL)

� DML Queries – Used to Update/Insert/Delete

data

● blnResult =

DW.DataManipulation.fExecuteDML(strSQL)

Page 19: Taking Your FDM Application to the Next Level with Advanced Scripting

Scripting Objects

� File System Object● Set FSO =

CreateObject(“Scripting.FileSystemObject)

● Set objFile = FSO.CreateTextFile(PathToFile, ● Set objFile = FSO.CreateTextFile(PathToFile, OverwriteExisting, blnUnicode)

� Windows Shell Object● Set wShell =

WScript.CreateObject("WScript.Shell")

● lngResult = WShell.Run(strCommand, WindowStyle, blnWaitOnReturn)

Page 20: Taking Your FDM Application to the Next Level with Advanced Scripting

Batch Loader

� From the Workbench, Tools � Batch

Processing

� Set the Batch Processing options and click � Set the Batch Processing options and click

Create Script

Page 21: Taking Your FDM Application to the Next Level with Advanced Scripting

Batch Loader Script

� Process Level – Tells FDM which workflow steps to perform; see enmBatchProcessLevels

� Delimiter – File name delimiter use in the

Package

� Delimiter – File name delimiter use in the batch file name. ● Example: 1~Location~Category~Period~rr.txt

� Map Auto Correct – Controls if FDM should automap missing members to a default/suspense member; True/False

Page 22: Taking Your FDM Application to the Next Level with Advanced Scripting

Object Browser

� Object Browser contains a list of all of the API functions that are available to be used in FDM scriptsin FDM scripts

� Object Browser is only available in WorkBench

� Many objects provide a description of the return or required arguments

Page 23: Taking Your FDM Application to the Next Level with Advanced Scripting

Accelerators

� Accelerators are prewritten snippets of code that perform common scripting operationsincluding:● Get detailed POV information (location metadata)● Get detailed POV information (location metadata)

● Create and loop through a recordset

● Work with text files using FSO

● Send email

� Accelerators provide 70-80% of the code, you will often need to update/refine

Page 24: Taking Your FDM Application to the Next Level with Advanced Scripting

Using Accelerators

� Select the section of the script where you need the accelerator code

� Double click the accelerator and the code is inserted

� Refine as needed – you will need to review the code

Page 25: Taking Your FDM Application to the Next Level with Advanced Scripting

Adaptor Specific Objects

� Import the Type Library of the

Adaptor

� Right click the object browser � Right click the object browser

and select Add Type Library

� Browse to the adaptor folder

and import the

AdaptorName.tlb file

Page 26: Taking Your FDM Application to the Next Level with Advanced Scripting

Scheduling Scripts

� FDM Task Manager – FDM component that

allows custom scripts to be scheduled on

specific intervals; seconds, days of the week,

specific day(s) each monthspecific day(s) each month

� FDM Shell Object – Used to execute custom

scripts from a windows batch file; batch file

can be scheduled within Windows Scheduled

Tasks or any enterprise scheduling software

Page 27: Taking Your FDM Application to the Next Level with Advanced Scripting

Task Manager

� Select application &

script to execute

� Specify Login � Specify Login

credentials – non

expiring recommended

� Specify Time interval to

execute

Page 28: Taking Your FDM Application to the Next Level with Advanced Scripting

FDM Shell

� Shell object is in the SharedComponents of

the installation directory

� Double click the UPSShell executable� Double click the UPSShell executable

� Open Notepad and paste

● Default syntax is provided

● Consists of 2 parts – Path to FDM Shell & Call to

script

Page 29: Taking Your FDM Application to the Next Level with Advanced Scripting

FDM Shell Syntax

� C:\Oracle\MIDDLE~1\EPMSYS~1\products\FINANC~1\SHARED~1\upsShell.exe

� CustomScriptEx=AppName~UserID~PW~DOMAIN~LoadBalancerName~LogDirectory~ScriptNaIN~LoadBalancerName~LogDirectory~ScriptName~LanguageCode(Default=1033)~EncodeUnicode(Default=0)

� C:\Oracle\MIDDLE~1\EPMSYS~1\products\FINANC~1\SHARED~1\upsShell.exe CustomScriptEx=App1~admin~password~~localhost~C:\Temp~BatchLoad~1033~0

Page 30: Taking Your FDM Application to the Next Level with Advanced Scripting

Taking a Detour – HFM Architecture

� HFM subcubes are the intersection of the Accounts, ICP, Custom1-4 & Period for the Year, Entity, Scenario and Value dimensions

� When loading in replace mode, the entire subcube is cleared for each unique Year, Entity subcube is cleared for each unique Year, Entity Scenario that is contained in the data

� This is the default HFM behavior – loading through FDM or directly in HFM through load tasks

� Data is “orphaned” in HFM if an entity is loaded and then in subsequent loads is not part of the data set – meaning potentially inaccurate financial results

Page 31: Taking Your FDM Application to the Next Level with Advanced Scripting

Preliminary Load

● Preliminary

load includes a

errant G/L

posting that posting that

misclassifies

data into the

‘Rhode Island’

entity

Page 32: Taking Your FDM Application to the Next Level with Advanced Scripting

Reload

● G/L posting is corrected and previous entry is re-classed from Rhode Island to MassachusettsRhode Island to Massachusetts

● Data is not cleared from Rhode Island since no data exists in the G/L file for R.I.

● HFM is wrong!

Page 33: Taking Your FDM Application to the Next Level with Advanced Scripting

How Can FDM Help?

● Smart Replace is a Ranzal custom developed FDM solution that addresses this common data quality issue caused by the default clear behavior of HFM

A list of the unique entities that have been loaded to ● A list of the unique entities that have been loaded to HFM is maintained

● The data that is currently being loaded to HFM is compared against the list of historically loaded data

● If any “orphaned” entities are found, a data clearing record for that entity is added to the data set being loaded

Page 34: Taking Your FDM Application to the Next Level with Advanced Scripting

Reload with Smart Replace

● G/L posting is corrected and previous entry is re-classed from Rhode Island to Rhode Island to Massachusetts

● Data is cleared from Rhode Island by the custom Smart Replace functionality

● HFM is correct!

Page 35: Taking Your FDM Application to the Next Level with Advanced Scripting

What To Learn More?

� FDM Adaptor Actions

� FDM API Guide● http://www.oracle.com/technology/documentation/epm.html

� Oracle Technology Network (OTN)Oracle Technology Network (OTN)● http://forums.oracle.com/forums/forum.jspa?forumID=409&s

tart=0

� Ranzal & Associates● http://www.ranzal.com

� W3 Schools● http://www.w3schools.com

� Google

Page 36: Taking Your FDM Application to the Next Level with Advanced Scripting

Scripting Challenge

� Tell me a problem you are facing in your FDM application that you believe or know custom scripting will address● Entries can be dropped at the Ranzal booth or ● Entries can be dropped at the Ranzal booth or

email me ([email protected]) before the end of the conference

� I will select 1 challenge and create a script that addresses the issue

� I will schedule a 1 hr web session to demo the solution

Page 37: Taking Your FDM Application to the Next Level with Advanced Scripting

Questions

Tony [email protected]

Page 38: Taking Your FDM Application to the Next Level with Advanced Scripting

Other Ranzal Presentations

Calculation Manager: The New and Improved Application to Create Hyperion Planning Business Rules – Monday, 11:15 am, Room 102C

Security and Auditing in HFM – Tuesday, 4:30pm, 101B

Best Practices for Using DRM with EPMA – Wednesday, 8:30am, 103A

Getting Started with Calc Manager for HFM – Wednesday, 8:30am, 101B

Advanced Topics in Calc Manager for HFM – Wednesday, 9:45am, 101B

Maximizing the Value of an EPM Investment with ERPi, FDM & EPMA – Wednesday, 11:15am, 101B

Taking your FDM application to the next level with Advanced Scripting – Friday, 8:30am, 101B

IFRS reporting within Hyperion Financial Management – Thursday, 10:30am, 101B