I have an issue with loading of alternate hierarchy in my dimension. There is no code written to load the alternate hierarchy in the metadata tab but it seems to be loading in the dimension.
Code: Select all
#****Begin: Generated Statements***
#****End: Generated Statements****
#===================================================================
# Ignore first row - Avoids Parent and Child being the same member
#===================================================================
if( vACCT @= sTopElement % vACCT @='');
itemSkip;
endif;
if( vCF_CODE1 @= '');
itemSkip;
endif;
# ====================================================================================================
# Modify weighting to allow proper rollups
# ====================================================================================================
#Check for a non rollup operator
#x = SCAN('~' ,vCons);
#if (x <> 0);
# weight=0;
#else;
# x = SCAN('-' ,vCons);
# if (x <> 0);
# weight=-1;
# else;
weight=1;
# endif;
#endif;
DimensionElementInsert(sdim,'','CASH FLOW ACCOUNTS','c');
DimensionElementInsert(sdim,'','Unmapped CASH FLOW ACCOUNTS','c');
DimensionElementComponentAdd(sDim, 'CASH FLOW ACCOUNTS', 'Unmapped CASH FLOW ACCOUNTS', weight);
# DimensionElementInsert(sdim,'','Invalid Account','c');
# DimensionElementComponentAdd(sDim, 'ACCOUNT', 'Invalid Account', weight);
#DimensionElementInsert(sdim,'','ACCOUNT_Alternate','c');
# ====================================================================================================
# Add elements to dimension
# ====================================================================================================
if (DIMIX(sdim, vCF_CODE1) =0);
DimensionElementInsert(sdim,'',vCF_CODE1,'n');
endif;
if (vCF_CODE1 @<> 'CASH FLOW ACCOUNTS');
DimensionElementComponentAdd(sDim, 'CASH FLOW ACCOUNTS', vCF_CODE1, weight);
endif;
if (DIMIX(sdim, vCF_CODE2) =0);
DimensionElementInsert(sdim,'',vCF_CODE2,'n');
endif;
if (vCF_CODE2 @<> vCF_CODE1);
DimensionElementComponentAdd(sDim, vCF_CODE1, vCF_CODE2, weight);
endif;
if (DIMIX(sdim, vCF_CODE3) =0 );
DimensionElementInsert(sdim,'',vCF_CODE3,'n');
endif;
if (vCF_CODE3 @<> vCF_CODE2);
DimensionElementComponentAdd(sDim, vCF_CODE2, vCF_CODE3, weight);
endif;
if (DIMIX(sdim, vCF_CODE4) =0);
DimensionElementInsert(sdim,'',vCF_CODE4,'n');
endif;
if (vCF_CODE4 @<> vCF_CODE3);
DimensionElementComponentAdd(sDim, vCF_CODE3, vCF_CODE4, weight);
endif;
if (DIMIX(sdim, vACCT) =0);
DimensionElementInsert(sdim,'',vACCT,'n');
endif;
if ((vACCT @<> vCF_CODE4) & (vCF_CODE4 @<> ''));
DimensionElementComponentAdd(sDim, vCF_CODE4, vACCT, weight);
else;
if ((vACCT @<> vCF_CODE3) & (vCF_CODE3 @<> ''));
DimensionElementComponentAdd(sDim, vCF_CODE3, vACCT, weight);
else;
if ((vACCT @<> vCF_CODE2) & (vCF_CODE2 @<> ''));
DimensionElementComponentAdd(sDim, vCF_CODE2, vACCT, weight);
else;
if ((vACCT @<> vCF_CODE1) & (vCF_CODE1 @<> ''));
DimensionElementComponentAdd(sDim, vCF_CODE1, vACCT, weight);
else;
DimensionElementComponentAdd(sDim, 'CASH FLOW ACCOUNTS', vACCT, weight);
endif;
endif;
endif;
endif;
#For Process Logging
countRecords = countRecords + 1;