Get the Legal entities that were not assigned to Financial dimension Values.
DimensionFinancialTag dimensionFinancialTag;
#define.QuickKey('Financial dimension') while select dimensionFinancialTag where dimensionFinancialTag.FinancialTagCategory == DimensionAttribute::findByName( #QuickKey, false).financialTagCategory()
{
Ledger ledgerList;
DimensionAttrValueLedgerOverride dimensionAttrValueLedgerOverrideList;
CompanyInfo companyInfoList;
DimensionAttributeValue dimAttributeValue = DimensionAttributeValue::
findByDimensionAttributeAndEntityInst(
DimensionAttribute::findByName(
#QuickKey).RecId,
dimensionFinancialTag.RecId);
while select DataArea from companyInfoList
join RecId from ledgerList
where ledgerList.PrimaryForLegalEntity == companyInfoList.RecId
notexists join RecId from dimensionAttrValueLedgerOverrideList
where dimensionAttrValueLedgerOverrideList.Ledger == ledgerList.RecId &&
dimensionAttrValueLedgerOverrideList.DimensionAttributeValue ==
dimAttributeValue.RecId
{
line = [companyInfoList.DataArea, dimensionFinancialTag.Value];
val = val +"\n"+ strReplace(con2Str(line),',','|');
}
info(val);
}
Keep daxing!!
No comments:
Post a Comment