Adding N-Level Elements to Considation Fails
Posted: Thu Sep 06, 2012 7:03 pm
Hello,
I have a file that has the following 2 columns of data: MSO Code, Contract Code
I am trying to create the following 2 hierarchies within a dim using TI.
All MSO (consolidation)
MSO Code (consolidation)
MSO Code-Contract Code (the n-level)
All by Party (consolidation)
Contract code (consolidation)
MSO Code-Contract code (the n-level)
I am unable to add the n-level elements (the concatenation of the 2 codes) to the second level (MSO Code and Contract Code)of both hierarchies.
PROLOG (Works)
dimRef='Affiliate Code';
sAllByParty = 'All by Party';
sAllMSOs = 'All MSOs';
sTotalExclOtherMSO = 'Total Excl Other MSOs';
# Dimension ElementInsert. Function Adds an element to a dimension
DimensionElementInsert(dimRef,'',sAllByParty,'c');
# Dimension ElementInsert. Function Adds an element to a dimension
DimensionElementInsert(dimRef,'',sAllMSOs,'c');
# Function adds a component (child) to a consolidated element.
DimensionElementComponentAdd (dimRef, sAllMSOs, sTotalExclOtherMSO, 1);
META DATA( works)
Meta data tab:
1) adds the MSO Id to the Total Excl Other MSOs parent
2) add the Contract Id to the All by Party parent
3) adds the Concatenation of MSO Id and Contract Id as an n-level element.
sMsoCode = TRIM (vMSO_Code);
sCPCode = TRIM(vCP_ALTID);
sMsoCPCode = sMsoCode | '-' | sCPCode;
IF (sMsoCode @= '');
ITEMSKIP;
ENDIF;
#^^ Add Alt ID to 'All by Party' Hierarchy
#^^ Add the Contract Party Code to the 'All by Party' consolidation
DimensionElementComponentAdd(dimRef, sAllByParty, sCPCode,1);
#^^ Add MSO Id to 'All MSOs' Hierarchy
#^^ Add the MSO Code to the 'Total Excl Other MSOs' consolidation
DimensionElementComponentAdd(dimRef, sTotalExclOtherMSO, sMsoCode,1);
#^^ Add the MSO Code and CP Code as N-level elements
DimensionElementInsert(dimRef,'',sMsoCPCode ,'n');
DATA tab (does not Work)
The data tab is supposed to add the n-level elements (sMsoCPCode) to the parent elements (sMsoCode and sCPCode) created in the META DATA tab.
sMsoCode = TRIM (vMSO_Code);
sCPCode = TRIM(vCP_ALTID);
sMsoCPCode = sMsoCode | '-' | sCPCode;
#^^ Add N-level child elements to the 2 Hierarchies
#^^ Add the Concatenation of MSO Code and Contract Party to the MSO Code hierarchy
DimensionElementComponentAdd (dimRef, sMSOCode, sMsoCPCode, 1);
#^^ Add N-level child to 'All MSOs' hierarchy's MSO Code Consolidated Element
#^^ Add the Concatenation of MSO Code and Contract Party to
DimensionElementComponentAdd (dimRef, sCPCode, sMsoCPCode, 1);
Thanks,
Walt
I have a file that has the following 2 columns of data: MSO Code, Contract Code
I am trying to create the following 2 hierarchies within a dim using TI.
All MSO (consolidation)
MSO Code (consolidation)
MSO Code-Contract Code (the n-level)
All by Party (consolidation)
Contract code (consolidation)
MSO Code-Contract code (the n-level)
I am unable to add the n-level elements (the concatenation of the 2 codes) to the second level (MSO Code and Contract Code)of both hierarchies.
PROLOG (Works)
dimRef='Affiliate Code';
sAllByParty = 'All by Party';
sAllMSOs = 'All MSOs';
sTotalExclOtherMSO = 'Total Excl Other MSOs';
# Dimension ElementInsert. Function Adds an element to a dimension
DimensionElementInsert(dimRef,'',sAllByParty,'c');
# Dimension ElementInsert. Function Adds an element to a dimension
DimensionElementInsert(dimRef,'',sAllMSOs,'c');
# Function adds a component (child) to a consolidated element.
DimensionElementComponentAdd (dimRef, sAllMSOs, sTotalExclOtherMSO, 1);
META DATA( works)
Meta data tab:
1) adds the MSO Id to the Total Excl Other MSOs parent
2) add the Contract Id to the All by Party parent
3) adds the Concatenation of MSO Id and Contract Id as an n-level element.
sMsoCode = TRIM (vMSO_Code);
sCPCode = TRIM(vCP_ALTID);
sMsoCPCode = sMsoCode | '-' | sCPCode;
IF (sMsoCode @= '');
ITEMSKIP;
ENDIF;
#^^ Add Alt ID to 'All by Party' Hierarchy
#^^ Add the Contract Party Code to the 'All by Party' consolidation
DimensionElementComponentAdd(dimRef, sAllByParty, sCPCode,1);
#^^ Add MSO Id to 'All MSOs' Hierarchy
#^^ Add the MSO Code to the 'Total Excl Other MSOs' consolidation
DimensionElementComponentAdd(dimRef, sTotalExclOtherMSO, sMsoCode,1);
#^^ Add the MSO Code and CP Code as N-level elements
DimensionElementInsert(dimRef,'',sMsoCPCode ,'n');
DATA tab (does not Work)
The data tab is supposed to add the n-level elements (sMsoCPCode) to the parent elements (sMsoCode and sCPCode) created in the META DATA tab.
sMsoCode = TRIM (vMSO_Code);
sCPCode = TRIM(vCP_ALTID);
sMsoCPCode = sMsoCode | '-' | sCPCode;
#^^ Add N-level child elements to the 2 Hierarchies
#^^ Add the Concatenation of MSO Code and Contract Party to the MSO Code hierarchy
DimensionElementComponentAdd (dimRef, sMSOCode, sMsoCPCode, 1);
#^^ Add N-level child to 'All MSOs' hierarchy's MSO Code Consolidated Element
#^^ Add the Concatenation of MSO Code and Contract Party to
DimensionElementComponentAdd (dimRef, sCPCode, sMsoCPCode, 1);
Thanks,
Walt