Showing posts with label Financial Dimension from Ledger Dimension. Show all posts
Showing posts with label Financial Dimension from Ledger Dimension. Show all posts

Sunday, 12 April 2015

Financial Dimensiont from Ledgerdimension

public static void FinancialDimensionfromLedgerDimension(Args _args)
{
    DimensionAttributeValueGroupCombination dimAttrValueGroupCombo;
    DimensionAttributeLevelValue    dimAttrLevelValue;
    DimensionAttributevalue              dimAttrValue;
    DimensionAttribute                  dimAttr;

    select RecId from dimAttrValueGroupCombo
        where dimAttrValueGroupCombo.DimensionAttributeValueCombination == 568939223
            join displayValue from dimAttrLevelValue
        where dimAttrLevelValue.DimensionAttributeValueGroup == dimAttrValueGroupCombo.DimensionAttributeValueGroup
            join RecId from dimAttrValue
        where dimAttrValue.RecId == dimAttrLevelValue.DimensionAttributeValue
            join Name from dimAttr
        where dimAttrValue.DimensionAttribute == dimAttr.RecId && dimAttr.Name == "MainAccount";
                Info(strfmt("Value of Dimension %1 is %2", dimAttr.Name,  dimAttrLevelValue.displayValue));
 

//costcenter

select RecId from dimAttrValueGroupCombo
        where dimAttrValueGroupCombo.DimensionAttributeValueCombination == 568939223
            join displayValue from dimAttrLevelValue
        where dimAttrLevelValue.DimensionAttributeValueGroup == dimAttrValueGroupCombo.DimensionAttributeValueGroup
            join RecId from dimAttrValue
        where dimAttrValue.RecId == dimAttrLevelValue.DimensionAttributeValue
            join Name from dimAttr
        where dimAttrValue.DimensionAttribute == dimAttr.RecId && dimAttr.Name == "Cost Center";
                Info(strfmt("Value of Dimension %1 is %2", dimAttr.Name,  dimAttrLevelValue.displayValue));


//Department
    select RecId from dimAttrValueGroupCombo
        where dimAttrValueGroupCombo.DimensionAttributeValueCombination == 568939223
            join displayValue from dimAttrLevelValue
        where dimAttrLevelValue.DimensionAttributeValueGroup == dimAttrValueGroupCombo.DimensionAttributeValueGroup
            join RecId from dimAttrValue
        where dimAttrValue.RecId == dimAttrLevelValue.DimensionAttributeValue
            join Name from dimAttr
        where dimAttrValue.DimensionAttribute == dimAttr.RecId && dimAttr.Name == "Department";
                Info(strfmt("Value of Dimension %1 is %2", dimAttr.Name,  dimAttrLevelValue.displayValue));

 
 


}