Skip to main content

Posts

Showing posts from May, 2012
Just needed to save some code I have been working on in my blog. This code is used for basically deconstructing ledger dimensions and default dimensions to be able to merge / overwrite dimension attribute values in the ledger dimension. My scenario is that during the processing of a ledger allocation, I have an "original" transaction that is being allocated. My destination transaction (the transaction that allocates the original transaction to a new ledger dimension) will inherit all the ledger dimensions of the original transaction BUT will have some of it's dimension attribute values overwritten, by a default dimension set up on the ledger allocation rule destination. Basically I deconstruct the ledger dimension of the original transaction and put all the found dimensions into a map. I the deconstruct the default dimension of the ledger allocation rule destination, and find the matching entries in my map, to replace them. When my "merged" map is comp