I am trying to export a dimension to a .cma file and then re-import to re-create the same dimension and hierarchy. At present we amend directly within TM1 and I would like to secure the process and make it more robust.
I have exported the code but am having some trouble importing it back into TM1. I have searched the forums and web for the past few days to find something will fulfil this aim.
Does anyone have any generic code for exporting and re-importing hierarchical dimensions?
At present I have managed to export the data into Parent, Child format but am struggling to re-import, this is because for top level items I have listed the same element as the parent and child and the re-import was complaining about consolidated items but I have skipped that and no data is being re-imported into my dimension..
My current import code is:
Code: Select all
pDim = 'Test';
vChild = 'Test';
vParent = 'Test';
if (vParent @= vChild);
ITEMSKIP;
else;
if (DIMIX(pDim, vChild) =0);
DimensionElementInsert(pDim, '', vChild, 'N');
DimensionElementComponentAdd(pDim, vParent, vChild, 1.0000);
Endif;
EndIf;
Thanks,
Edd