These functions used to read the individual ledger dimension combinatio values.
private void Krishh_getDimensionValues(LedgerDimensionAccount _dimensionRecid)
{
DimensionAttributeLevelValueAllView dimAttrView;
DimensionAttribute dimAttr;
while select DisplayValue from dimAttrView
where dimAttrView.ValueCombinationRecId == _dimensionRecid
join BackingEntityType from dimAttr
where dimAttr.RecId == dimAttrView.DimensionAttribute
{
switch (dimAttr.BackingEntityType)
{
case tableNum(DimAttributeMainAccount):
info(strFmt(“Main Account: %1″, dimAttrView.DisplayValue));
break;
case tableNum(DimAttributeOMBusinessUnit):
info(strFmt(“Business Unit: %1″, dimAttrView.DisplayValue));
break;
case tableNum(DimAttributeCustTable):
info(strFmt(“Customer: %1″, dimAttrView.DisplayValue));
break;
case tableNum(DimAttributeOMDepartment):
info(strFmt(“Department: %1″, dimAttrView.DisplayValue));
break;
case tableNum(DimAttributeHcmWorker):
info(strFmt(“Worker: %1″, dimAttrView.DisplayValue));
break;
}
}
}
private DimensionValue krishh_getDimensionValueByName (LedgerDimensionAccount _dimensionRecid, Name _name)
{
DimensionAttributeLevelValueAllView dimAttrView;
DimensionAttribute dimAttr;
Select DisplayValue from dimAttrView
where dimAttrView.ValueCombinationRecId == _dimensionRecid
join BackingEntityType from dimAttr
where dimAttr.RecId == dimAttrView.DimensionAttribute
&& dimattr.Name==_name;
return dimAttrView.DisplayValue;
}
No comments:
Post a Comment
Thanks for visiting my blog,
I will reply for your comment within 48 hours.
Thanks,
krishna.