HELP : Problem add element to a dimension
Posted: Mon Sep 19, 2016 12:54 pm
Hi,
Firstable, I’m sorry for my english.
So, I’m trying to copy a part of a dimension to an other, but when I use DIMENSIONELEMENTCOMPONENTADD, elements are where I want but the 5 or 6 last elements are also copy in the top level.
This is my code in Prologue (I try to use metadata too)
Source: pDim
https://drive.google.com/open?id=0B5sW_ ... nF6cE5SeUU
Dest : cDimTmp
https://drive.google.com/open?id=0B5sW_ ... 3Z0TTlUTmM
I'm on Architect 10.2.2
Thanks
Firstable, I’m sorry for my english.
So, I’m trying to copy a part of a dimension to an other, but when I use DIMENSIONELEMENTCOMPONENTADD, elements are where I want but the 5 or 6 last elements are also copy in the top level.
This is my code in Prologue (I try to use metadata too)
Code: Select all
DIMENSIONELEMENTINSERT(cDimTmp,'',c_Noeud_Subset,'c');
index = 0;
nbSubset = 0;
nbIndex = DIMSIZ(pDim);
WHILE( index <nbIndex);
index = index + 1;
val = DIMNM(pDim,index);
If (ELISCOMP(pDim, val, c_Noeud_Subset) = 1);
DimensionElementInsert(cDimTmp,'',val,'C');
DIMENSIONELEMENTCOMPONENTADD(cDimTmp,c_Noeud_Subset,val,1);
nbSubset = nbSubset + 1;
EndIf;
END;
index = 0;
WHILE( index <nbIndex);
index = index + 1;
val = DIMNM(pDim,index);
If (ELISANC(pDim, c_Noeud_Subset, val) = 1);
vSubset = 0;
While (vSubset < nbSubset);
vSubset = vSubset + 1;
vNameSubset = DIMNM(cDimTmp,vSubset+1);
If (ELISCOMP(pDim, val, vNameSubset) = 1);
DimensionElementInsert(cDimTmp,'',val,'N');
DIMENSIONELEMENTCOMPONENTADD(cDimTmp,vNameSubset,val,0);
EndIf;
End;
EndIf;
END;
https://drive.google.com/open?id=0B5sW_ ... nF6cE5SeUU
Dest : cDimTmp
https://drive.google.com/open?id=0B5sW_ ... 3Z0TTlUTmM
I'm on Architect 10.2.2
Thanks