There are lot of tables holding values for Financial Dimensions such as DimensionAttributeValue and DimensionAttributeValueCombination but in case if we can't find the values in these above tables then we have another table known as DimensionFinancialTag through which we can get values as well as we can create new dimensions as well.
Here is an example mentioned below :-
DimDetails dimensiondetails;
DimensionAttribute dimAttr;
DimensionAttributeValue dimAttrValue;
DimensionDefault result;
DimensionFinancialTag dimFinTag , dimFinTagval;
RecId dimFinancialCategoryRecid;
DimensionAttributeValueSetStorage valueSetStorage = new
DimensionAttributeValueSetStorage();
try
{
dimAttr = DimensionAttribute::findByName('ABC');
dimFinancialCategoryRecid = dimAttr.financialTagCategory();
while select dimensiondetails where dimensiondetails.UpdateFlag==0
{
select dimFinTag where
dimFinTag.FinancialTagCategory == dimFinancialCategoryRecid &&
dimFinTag.Value == dimensiondetails.AssetCode;
if(!dimFinTag.RecId)
{
dimFinTagval.Value = dimensiondetails.AssetCode;
dimFinTagval.Description = dimensiondetails.AssetDescription;
dimFinTagval.FinancialTagCategory = dimFinancialCategoryRecid;
dimFinTagval.insert();
}
}
}
catch(Exception::Error)
{
ttsAbort;
throw Exception::Error;
}
No comments:
Post a Comment