View Double Entry Transactions

Ever done an intercompany recharge of costs? The calculation creates the other side of the transaction and you want to see it, but the security set up prohibits you from viewing what you’ve just done. I was confronted with this paradox problem, I had a web form to input intracompany cross charges, but all I could see from the other side of the transaction was #NoAccess. In this example what I endeavour to do is not the transactions, but just to show data that may be in an inaccessible place.

So, I thought that this is a job for Groovy, as I can access the Web Form grid object and put any value I like into the cell, superseding the #NoAccess. Therefore I thought, all I need to do is to use the flexibleDataGridDefinitionBuilder to create a grid to pull the data from Essbase.

Not as simple as that, my first attempt worked ok as Admin, but then as a user with restricted access to the cells, it failed because Groovy honours the privileges of the user executing the calculation script (n.b. Calculation Engine runs with admin privileges, I’ll use this later). So what I tried next was to run the script under a shell admin session using a connection (below).

However, the problem with this was that although I got the data from the flex grid builder, I lost the context of the Web Form so that I couldn’t update the cells on the form.

Then I had a bright idea, as the Calculation Engine runs with Administrator Privileges even if a user invokes it, so could I get Groovy to do a data copy of the data that I couldn’t access to a place where I could access it. And that was the basic solution, but it still turned into a six step process:

  • STEP 1. Get the POV, row & column members & data form the WEB form
  • STEP2. Get the original value to replace after the copy n.b. in order to get the restricted value, it needs to use the Essbase Calc Engine and copy the data into an accessible area. Value needs to be restored afterwards.
  • STEP3. Copy data in Essbase using traditional calc script.
  • STEP4. Get the Copied Value from Essbase using flexibleDataGridDefinitionBuilder (and then Reinstate the original values in Essbase if there are no dynamic calc members on the form).
  • STEP 5. Change the #NoAccess with the values from the Essbase flexibleDataGridDefinitionBuilder
  • STEP 6. Reinstate the original values in Essbase. Can’t do it on the Fly in STEP 4 as dynamic calc members keep updating when copying back to each cell in turn.

In the Web Form set the script to run after load:

And here are the results:

Footnote:

In this example I copied the inaccessible data from LOC_18 to LOC_9, updated the grid and then put the original values back into LOC_9 in Essbase. In the event of the script crashing part way though would mean that you’d have to fix the data back somehow. A better solution would be to use a slice of the model that is unused to transport the data, begBalance could be an ideal candidate.

n.b. I have left some lines of hard coding in comments and println for reference when setting this up.

Leave a Comment