I have created a TI process to export the data from cube to csv file in Cognos express.
After we deploy the TI from cognos express to TM1 10.2.2, my code doesn't work. Can you please let me know your thoughts on this.
The below mentioned code is not working.
Code: Select all
cCubeName = 'Sales' ;
cViewName = ' View ' | NumberToString( ROUND( RAND() * 100000 ) ) ;
cSubName = 'Subset ' | NumberToString( ROUND( RAND() * 100000 ) ) ;
iContinue = 1 ;
iDimCount = 1 ;
WHILE ( iContinue = 1 ) ;
sDimName = TABDIM ( cCubeName , iDimCount ) ;
IF ( sDimName @<> '' ) ;
IF ( sDimName @= 'ABCD' ) ;
IF ( SubsetExists ( sDimName, cSubName ) = 1 ) ;
SubsetDeleteAllElements ( sDimName , cSubName ) ;
ELSE ;
SubsetcreatebyMDX (cSubName , '{TM1FILTERBYLEVEL( {TM1DRILLDOWNMEMBER( {[ABCD].['| pABCD |']}, ALL, RECURSIVE )}, 0)}' ) ;
ENDIF;
ViewSubsetAssign ( cCubeName , cViewName , sDimName , cSubName ) ;
ENDIF ;
IF ( sDimName @= 'XYZ' ) ;
IF ( SubsetExists ( sDimName, cSubName ) = 1 ) ;
SubsetDeleteAllElements ( sDimName , cSubName ) ;
ELSE ;
SubsetcreatebyMDX ( cSubName , '{TM1FILTERBYLEVEL( {TM1SUBSETALL( [XYZ )}, 0)}' ) ;
ENDIF;
ViewSubsetAssign ( cCubeName , cViewName , sDimName , cSubName ) ;
ENDIF ;
IF ( SubsetExists ( sDimName, cSubName ) = 1 ) ;
SubsetDeleteAllElements( sDimName , cSubName ) ;
ELSE ;
SubsetCreate( sDimName , cSubName ) ;
ENDIF;
ViewSubsetAssign( cCubeName , cViewName , sDimName , cSubName ) ;
ELSE ;
# must have gone through all the dims
iContinue = 0 ;
ENDIF ;
iDimCount = iDimCount + 1 ;
END ;