Wednesday, May 21, 2014

Additional libraries needed in PSU510 for running FDMEE Scripts in IDEs

Hi all,

I have received some emails regarding issues when running FDMEE scripts either from Eclipse or Notepad++ after PSU510 was applied.

We have already discussed about how to run FDMEE scripts in different IDES:


Ok, if you try to run your FDMEE script which has the following initialization code:
You will get an error :-(

java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: oracle/core/ojdl/logging/ODLLogger

Let's see it when executing from Notepad++: 
It seems that we need an additional library apart from the two stated in the documentation:
(\EPM_ORACLE_HOME\products\FinancialDataQuality\lib)
  • aif-apis.jar
  • aif-custom.jar

Which is that library? after googling we go it: ojdl.jar
We can search for it in our EPM environment and we will notice there are many libraries with that name.
I just picked up the one located in:

E:\Oracle\Middleware\EPMSystem11R1\common\loggers\ODL\1.0.0\lib

Good, library is added so I run it again...woops...another error!

java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/apache/log4j/Layout

It seems that log4j logger is missing as well. Library can be also found in:
E:\Oracle\Middleware\EPMSystem11R1\common\loggers\Log4j\1.2.14\lib

Finally, after adding the two libraries, it's working again :-)
If you are using Notepad++:
Or if you are Eclipse fan:

So it seems that PSU510 does not include references to loggers so add them and make it work!

Regards



Tuesday, May 13, 2014

A deeper insight into drill-through from Planning & Essbase

Drill-through is a word you should be familiar if you are either FDM or ERPI/FDMEE fan.
I remember trying to explain classic FDM customers differences between drill-through, drill-back, drill-down...all getting crazy with so many drills!

What's drill-through?
FDMEE admin guide defines it as "the navigation from one value in one data source to corresponding data in another source"
Or in other words:
Navigate from my EPM application's data to corresponding source data
The formula would be Data(EPM) > Data(FDMEE) > Data(Source) and the relationship between source data values and target data values is usually N to 1 so multiple source transactions (lines in flat files, rows in tables, line item details in ERP...) aggregate to one target value in our EPM application. But definitions or relationships apart, we basically want to trace our data from source to target or target to source.

Another concept you will be familiar with is landing page. When drilling through from our EPM application, a page will be displayed. That page is the landing page.
When drilling from EPM application to FDMEE we will have the FDMEE landing page opened as new tab in Workspace. From this page we will continue with the drilling to the source system where landing page will be normally opened in another navigator page.

With drill-through functionality FDMEE users can get answer to questions like "Where is this $1000000 coming?" By drilling through we can determine if the root cause are wrong mappings, wrong source data, or any other cause who will let us blame someone else :-)

In this post, I will be focused on drill-through from Planning/Essbase. If you want to know more details about drilling through to source systems I strongly recommend you the following document from Oracle Support.

How does drill-through work?
Firstly, we must say that, although it is recommendable, drill-through from EPM application to FDMEE is optional. We have to specify in the target application options that we want to load drill regions (Setup > Register > Target Application):
When drill regions are enabled, they are loaded into the target application after data is loaded and consolidated. A cell is drillable in the target application if it belongs to the drill regions defined in the application.
What must be clear is the following: you will be only drilling successfully to your FDMEE data if the same intersection was loaded through FDMEE... and you did not clear data in FDMEE!
For example, if you loaded $1000 to Entity1;Account1 intersection, you will not be able to drill-through from Entity1;ParentAccount1 as you did not loaded data for that intersection, even if you see drill-through icon like happens in HFM. Drilling from parents and seein detailed data for all children would be nice but it is not possible yet.

What are drill regions in Planning/Essbase?
We are talking about drill regions but we did not explain what they are, where they are stored, etc.
Drill regions are defined by combination of dimension members. They will say from where we can drill to source. When we define a drill-through URL in Essbase (do not confuse with drill-through concept used by EIS or Essbase Studio), it is stored in the Essbase database file as metadata.
The URL has 4 components:
  • URL Name
  • URL XML
  • List of Drillable Regions
  • Level-0 Boolean Flat
Don't worry about creating drill-through definitions, we are working with FDMEE, so FDMEE will create it for you including drill regions.
If you want to learn more about drill-through and drill regions in HP/Essbase, take a look to the following Essbase Addendum Document.

How are drill regions loaded by FDMEE?
For HFM, a file with extension .DRL will be created and exported. This will happen after data is successfully loaded and consolidated (optional). Drill URL and drill regions will be stored in two HFM database tables (HFMApp_ERPI_URL and HFMApp_ERPI):
For HP/Essbase, FDMEE will load drill regions directly into Essbase with no file being exported.
Technically, FDMEE uses Essbase API although that will be transparent for end user. You will see how FDMEE consumes [HPLService] and [EssbaseService] to create drill regions:

Which dimensions are included in the drill region loaded from FDMEE?
The main difference between Planning and Essbase is that for Essbase, you can select which dimensions are included in the drill region (Setup > Register > Target Application) while Planning includes Entity/Account/Scenario/Year/Period.
Having this flexibility for Essbase lets you define the granularity for the drill region. For example, if we select only the Product dimension, we can drill on a cell that at least does not have a null for year.

How are drill regions generated by FDMEE?
I consider this part the most important because is what will let us know how FDMEE works.

  • If your source system is EBS or PSFT and you have defined metadata rules for them, drill regions are created based on the metadata rule
  • For all other source like flat files, drill regions are created based on the target members defined in the data load mappings
  • For Year, Period, and Scenario, FDMEE uses audit information to create drill regions
I know this can generate some controversy so let's analyze each of the three points above.
  • If you have metadata rules, drill regions will be only created for dimension members loaded from your metadata rules. If you need to create additional drill regions you would have to create them via FDMEE script.
  • For the other two points I will show you an example you will understand all details.
Understanding how drill regions are created when no Metadata rules exist
I have successfully loaded my data to Planning/Essbase through FDMEE:

No what?
I navigate to my HP form and check data has been loaded:
I see my data but no cells are drillable! so gold fish + data in the form + no drillable cells = weird.
Did I check process details in FDMEE?
Ok, I can see that there was an error creating drill regions in Essbase. Let's ask your best friend in FDMEE: the process log (with log level set to 5 of course)
The log shows an error in [REGION DEFINITION] so I will analyze the region definition :-)
It seems that there is an account A00090000 which is not familiar to me. I know accounts included in the drill region will come from my data load mapping definition so I should have a look to it:
Rule 30_Group.090 is not correct. Account A00090000 does not exist in Planning/Essbase Cube. However the account was included in the region definition as it is explicitly defined in the data load mapping tables. That made drill region creation failed.
In this support document you will find details about solving your issues with drill regions in Essbase.
I can remove that mapping rule as I don't need it for audit purposes. So after removing the mapping and loading data again...I still see the error!
I then go for plan B, let's have a look to Audit table AIF_APPL_LOAD_AUDIT:
I can see that there are some entries for old executions which failed due to my issue. Probably they have some data related in TDATASEG, so if I remove these entries, that residual data will be removed as well.
Done, now reload again and...
Drill regions created!
I can now navigate to my form and drill to FDMEE to see details:
And my landing page is displayed in Workspace as expected: 

 What can I conclude?
  • Drill regions will be created for dimension members even if you are not loading data to them. If they are explicitly defined as target values in the mappings, then they will be included in the drill region definition (as you can see in the process log shown above)
  • Drill regions will include only dimension members which are defined as explicit target vales (no wildcards) in any kind of mapping type (Explicit of course, In, Between, and Like) For example,  if you have a LIKE mapping rule defined as A100 > HP*, it will not include account HPA100 in the drill region. On the other hand if you have an IN mapping rule defined as "1000,2000,3000" > ACC123 theb ACC123 will be included innthe drill region regardless data is loaded to that account or not.
  • Therefore you must be careful when using wildcards in your mappings like * to *
  • Review your audit tables. It can also happen that you create a mapping for a non-existing target period in your Period Mappings, making this FDMEE fail when creating the drill  regions. For example, if you create a period mapping for "March" but the valid one is "Mar", the audit table will have an entry for the wrong period after data is processed. Fixing the typo will not help, you have to remove wrong entries from audit tables.

Classic FDM Vs. FDMEE
In classic FDM, drill regions were created for all intersections with POV members being loaded:
Having explicit, in, between, or like mappings using wildcards did not impact.
Let's say that we load one file with one data row for specific account:
We can see data loaded in Planning and the drillable cell:
If we enter data manually in the other 3 cells:
VoilĂ ! you can also drill from these cells...can does not mean you will be able to successfully do it as you did not loaded data from FDM to these 3 intersections!
You will be only successfully drilling to intersections loaded through FDM:

As far as I know, the way drill regions are generated may be changed in 11.1.2.4 so they are created based dimension members where data is loaded. Therefore the creation process will be looking more to target values after conversion rather than mapping definitions. In any case, this is something I cannot confirm 100%.

And finally, a bit more about Drill-through ... 

Where can I see drill-through definitions in Essbase?
You can use EAS Console to see drill-through definitions (right click on cube > Edit > Drill through definitions):

Woops, you will not see drill-through definitions created by FDMEE. Why? there is bug in Essbase related to displaying definitions having special character like ":" in the URL name. You can check drill-through definitions exist using MAXL command:
By default the URL name of the drill-through definition created by FDMEE is Year:Scenario

Drill-through from ASO Plan Type
Starting with the 11.1.2.3 release, Planning customers having a full use Essbase license can now have plan types which use aggregate storage databases:
When working with ASO plan types in Planning, you will not be able to drill-through from Forms due to product limitation:
It is only possible to drill-through from Smart View/Financial Reporting using the Essbase Provider:
BTW, if you want to load data to an ASO plan type you will have to do it by registering the Essbase cube and not by loading to the plan type as you normally do when loading to Planning.

I'm sure these two functionality will be introduced in future releases.

Drilling through from where?
We can drill-through from Planning/HFM forms, Smart View, and Financial Reports.
If you want to drill from SV or FR bear in mind that it will only work if the data source is HFM, HP or Essbase. So if you try to open a Financial Report in Smart View you will not see any option to drill.

I noticed the post is bit long. Sorry for that :-)

Enjoy!