Archive for Mayıs 14th, 2013

How to display only one attribute value from LedgerDimension

In this post, I will explain how to display only one attribute value from LedgerDimension. I will use CostCenter attribute for my example. As you know LedgerDimension table are DimensionAttributeValueCombination , DimensionAttributeValueGroupCombination and DimensionAttributeLevelValue . This tables holds the related data. Instead of this tables I wil use only DimensionAttributeLevelValueAllView view. This view is very simple and useful.
I have a LedgerDimension’s RecId end i want to display only CostCenter value. I will join DimensionAttributeValue to DimensionAttributeLevelValueAllView and give the ranges.

Here is the method displays costCenter values.


// FD: Display CostCenter Value from LedgerDimension
display num dispFinancialDisplayValue()
{
    DimensionAttributeValue             dimAttrValue;
    DimensionAttributeLevelValueAllView dimAttrLevelValueAllView;
    ;

    select firstonly dimAttrLevelValueAllView
    where dimAttrLevelValueAllView.ValueCombinationRecId == this.LedgerDimension
    join dimAttrValue
        where dimAttrValue.RecId == dimAttrLevelValueAllView.AttributeValueRecId
        &&    dimAttrValue.DimensionAttribute   == 5637144851;
        // CostCenter RecId. Must be parametric.

    return dimAttrLevelValueAllView.DisplayValue;
}

I wrote this method to a table that have LedgerDimension field.

Until next time.

How to display only one attribute value from DefaultDimension

In this post, I will explain how to display only one attribute value from DefaultDimension. I will use CostCenter attribute for my example. As you know DefaultDimension tables are DimensionAttributeValueSet and DimensionAttributeValueSetItem . This tables holds the related data. I wil use only DimensionAttributeValueSetItem table.
I have a DafaultDimension’s RecId end i want to display only CostCenter value. I will join DimensionAttributeValue to DimensionAttributeValueSetItem and give the ranges.

Here is the method displays costCenter values.


// FD: Display CostCenter Value from DefaultDimension
display num dispDefaultDisplayValue()
{
    DimensionAttributeValue            dimAttrValue;
    DimensionAttributeValueSetItem dimAttrValueSetItem;
    ;

    select firstonly dimAttrValueSetItem
    where dimAttrValueSetItem.DimensionAttributeValueSet == this.DimensionDefault
    join dimAttrValue
        where dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue
        &&    dimAttrValue.DimensionAttribute   == 5637144851;
        // CostCenter RecId. Must be parametric.

    return dimAttrValueSetItem.DisplayValue;

}

I wrote this method to a table that have DimensionDefault field.

Until next time.

Türkiye'nin en doğru, dolu dolu ve hatasız anlatımları ile teknik yazılarına, makalelerine, video'larına, seminerlerine, forum sayfasına ve sektörün önde gelenlerine ulaşabileceğiniz teknik topluluğu, MSHOWTO