Taking Your FDM Application to the Next
Level with Advanced ScriptingLevel with Advanced Scripting
Tony Scalese
Edgewater Ranzal
www.ranzal.com
� 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
ConsolidationBusiness
IntelligencePlanning
Our Services
ProjectManagement
InfrastructureData
Services
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
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
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
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
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
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
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
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
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
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
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
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
Custom Scripts – Some Facts
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
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)
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)
Batch Loader
� From the Workbench, Tools � Batch
Processing
� Set the Batch Processing options and click � Set the Batch Processing options and click
Create Script
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
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
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
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
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
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
Task Manager
� Select application &
script to execute
� Specify Login � Specify Login
credentials – non
expiring recommended
� Specify Time interval to
execute
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
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
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
Preliminary Load
● Preliminary
load includes a
errant G/L
posting that posting that
misclassifies
data into the
‘Rhode Island’
entity
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!
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
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!
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
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
Questions
Tony [email protected]
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