What's the feeder for this rule? Need help!
Posted: Thu Oct 14, 2010 7:05 am
I've tried to write a rule with feeders on my cube. But After creating feeders the calculation by hierarchies dont work. Can u help me write feeders for the next rules.
Code: Select all
SKIPCHECK;
['AccountFAInput':'111','MeasureFA':'100','FixedAssetsInput_Months':'10']=S:
DB('InvestProject_Parameters',!Branches,'0121',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'10');
['AccountFAInput':'112','MeasureFA':'100','FixedAssetsInput_Months':'10']=S:
DB('InvestProject_Parameters',!Branches,'0311',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'10');
['AccountFAInput':'113','MeasureFA':'100','FixedAssetsInput_Months':'10']=S:
DB('InvestProject_Parameters',!Branches,'0511',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'10');
['AccountFAInput':'111','MeasureFA':'100','FixedAssetsInput_Months':'80']=S:
DB('InvestProject_Parameters',!Branches,'0121',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'80');
['AccountFAInput':'112','MeasureFA':'100','FixedAssetsInput_Months':'80']=S:
DB('InvestProject_Parameters',!Branches,'0311',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'80');
['AccountFAInput':'113','MeasureFA':'100','FixedAssetsInput_Months':'80']=S:
DB('InvestProject_Parameters',!Branches,'0511',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'80');
['AccountFAInput':'111','MeasureFA':'100','FixedAssetsInput_Months':'170']=N:
DB('InvestProject_Parameters',!Branches,'0121',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'170');
['AccountFAInput':'112','MeasureFA':'100','FixedAssetsInput_Months':'170']=N:
DB('InvestProject_Parameters',!Branches,'0311',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'170');
['AccountFAInput':'113','MeasureFA':'100','FixedAssetsInput_Months':'170']=N:
DB('InvestProject_Parameters',!Branches,'0511',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'170');
['AccountFAInput':'111','MeasureFA':'100','FixedAssetsInput_Months':'205']=S:
DB('InvestProject_Parameters',!Branches,'0121',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'150');
['AccountFAInput':'112','MeasureFA':'100','FixedAssetsInput_Months':'205']=S:
DB('InvestProject_Parameters',!Branches,'0311',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'150');
['AccountFAInput':'113','MeasureFA':'100','FixedAssetsInput_Months':'205']=S:
DB('InvestProject_Parameters',!Branches,'0511',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'150');
['AccountFAInput':'111','MeasureFA':'100','FixedAssetsInput_Months':'210']=S:
DB('InvestProject_Parameters',!Branches,'0121',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'155');
['AccountFAInput':'112','MeasureFA':'100','FixedAssetsInput_Months':'210']=S:
DB('InvestProject_Parameters',!Branches,'0311',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'155');
['AccountFAInput':'113','MeasureFA':'100','FixedAssetsInput_Months':'210']=S:
DB('InvestProject_Parameters',!Branches,'0511',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'155');
['AccountFAInput':'111','MeasureFA':'100',{'311','312','313','321','322','323','331','332','333','341','342','343','411','412','413','421','422','423','431','432','433','441','442','443'}]=N:
DB('InvestProject_Details',!Branches,'0121',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,!FixedAssetsInput_Months,'1000');
['AccountFAInput':'112','MeasureFA':'100',{'311','312','313','321','322','323','331','332','333','341','342','343','411','412','413','421','422','423','431','432','433','441','442','443'}]=N:
DB('InvestProject_Details',!Branches,'0311',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,!FixedAssetsInput_Months,'1000');
['AccountFAInput':'113','MeasureFA':'100',{'311','312','313','321','322','323','331','332','333','341','342','343','411','412','413','421','422','423','431','432','433','441','442','443'}]=N:
DB('InvestProject_Details',!Branches,'0511',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,!FixedAssetsInput_Months,'1000');
['AccountFAInput':'111','MeasureFA':'100','511']=N:
DB('InvestProject_Details',!Branches,'0121',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'500','1000');
['AccountFAInput':'112','MeasureFA':'100','511']=N:
DB('InvestProject_Details',!Branches,'0311',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'500','1000');
['AccountFAInput':'113','MeasureFA':'100','511']=N:
DB('InvestProject_Details',!Branches,'0511',!Version,!Years,!Type_Production,ATTRS('InvestProject_Codes',!InvestProject_Codes,'CodeSection'),!InvestProject_Codes,'500','1000');
['MeasureFA':'100','FixedAssetsInput_Months':'180']=N:['MeasureFA':'100','FixedAssetsInput_Months':'300']
+['MeasureFA':'100','FixedAssetsInput_Months':'400']
+['MeasureFA':'100','FixedAssetsInput_Months':'511'];
['MeasureFA':'100','FixedAssetsInput_Months':'1000']=S:IF((DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','205')@=!Years)&
DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','205')@=SUBST(ATTRS('Years',!Years,'Name'),1,4),
DIMNM('FixedAssetsInput_Months',DIMIX('FixedAssetsInput_Months',DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','210')|' ТГП')),
IF((DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','205')@<>!Years)&
DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','205')@<>SUBST(ATTRS('Years',!Years,'Name'),1,4)&
DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','205')@<>SUBST(ATTRS('Years',!Years,'Name'),6,4),
DIMNM('FixedAssetsInput_Months',DIMIX('FixedAssetsInput_Months',DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','210')|' СГП')),
DIMNM('FixedAssetsInput_Months',DIMIX('FixedAssetsInput_Months',DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','210')|' ССГП')))
);
['MeasureFA':'400',
{'311','312','313','321','322','323','331','332','333','341','342','343','411','412','413','421','422','423','431','432','433','441','442','443','511','512','513','521','522','523','531','532','533','541','542','543'}]
=N:IF(NUMBR(DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','1000'))<=NUMBR(!FixedAssetsInput_Months),
ATTRN('FixedAssetsInput_Months',!FixedAssetsInput_Months,'MonthNum'),0);
['MeasureFA':'401',
{'311','312','313','321','322','323','331','332','333','341','342','343','411','412','413','421','422','423','431','432','433','441','442','443','511','512','513','521','522','523','531','532','533','541','542','543'}]
=N:IF(DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'400',!FixedAssetsInput_Months)<>0,
DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'401',ATTRS('FixedAssetsInput_Months',!FixedAssetsInput_Months, 'Previous'))+1,
DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'401',ATTRS('FixedAssetsInput_Months',!FixedAssetsInput_Months, 'Previous'))+0);
['MeasureFA':'200',
{'311','312','313','321','322','323','331','332','333','341','342','343','411','412','413','421','422','423','431','432','433','441','442','443','511','512','513','521','522','523','531','532','533','541','542','543'}]
=N:IF(DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'401',!FixedAssetsInput_Months)>0
&DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'401',!FixedAssetsInput_Months)<
DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','190'),
ROUNDP(['MeasureFA':'100','180']\['MeasureFA':'100','190'],3),
IF(DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'401',!FixedAssetsInput_Months)
=DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100','190'),
DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'300',ATTRS('FixedAssetsInput_Months',!FixedAssetsInput_Months, 'Previous')),0));
['MeasureFA':'300','FixedAssetsInput_Months':
{'300','310','311','312','313','320','321','322','323','330','331','332','333','340','341','342','343','400','410','411','412','413','420','421','422','423','430','431','432','433','440','441','442','443','5000','510','511','512','513','520','521','522','523','530','531','532','533','540','541','542','543'}]
=N:DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'300',ATTRS('FixedAssetsInput_Months',!FixedAssetsInput_Months,'Previous'))
-DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'200',!FixedAssetsInput_Months)
+DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'100',!FixedAssetsInput_Months);
C:DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'300',ATTRS('FixedAssetsInput_Months',!FixedAssetsInput_Months,'Previous'));
['FixedAssetsInput_Months':'500']=N:['5000'];
FEEDERS;
['MeasureFA':'100','FixedAssetsInput_Months':'300']=>['180'];
['MeasureFA':'100','FixedAssetsInput_Months':'400']=>['180'];
['MeasureFA':'100','FixedAssetsInput_Months':'511']=>['180'];
['MeasureFA':'100']=>DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'300',!FixedAssetsInput_Months);
['MeasureFA':'100']=>DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'200',!FixedAssetsInput_Months);
['MeasureFA':'200']=>DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'300',!FixedAssetsInput_Months);
['MeasureFA':'401']=>DB('FixedAssetsInput',!Branches,!Version,!Years,!Type_Production,!AccountFAInput,!InvestProject_Codes,'200',!FixedAssetsInput_Months);
['MeasureFA':'100']=>['FixedAssetsInput_Months':'300'];
['MeasureFA':'100']=>['FixedAssetsInput_Months':'400'];
['MeasureFA':'100']=>['FixedAssetsInput_Months':'5000'];