Hi Andre,
I am writing the below code to getting the Dimension Focus description in Actuals vs budget report.
select generalJournalAccountEntry
where generalJournalAccountEntry.LedgerAccount == this.DimensionFocus;//"2221100-00000021-00000101-00000027";
//Fetch the Value combination record
dimensionAttributeValueCombination = DimensionAttributeValueCombination::find(generalJournalAccountEntry.LedgerDimension);
// Get dimension storage
dimensionStorage = DimensionStorage::findById(generalJournalAccountEntry.LedgerDimension);
if (dimensionStorage == null)
{
throw error("@SYS83964");
}
// Get hierarchy count
hierarchyCount = dimensionStorage.hierarchyCount();
//Loop through hierarchies to get individual segments
for(hierarchyIndex = 1; hierarchyIndex <= hierarchyCount; hierarchyIndex++)
{
//Get segment count for hierarchy
segmentCount = dimensionStorage.segmentCountForHierarchy(hierarchyIndex);
//Loop through segments and display required values
for (segmentIndex = 1; segmentIndex <= segmentCount; segmentIndex++)
{
// Get segment
segment = dimensionStorage.getSegmentForHierarchy(hierarchyIndex, segmentIndex);
// Get the segment information
if (segment.parmDimensionAttributeValueId() != 0)
{
// Get segment name
segmentName = DimensionAttribute::find(DimensionAttributeValue::find(segment.parmDimensionAttributeValueId()).DimensionAttribute).Name;
//Get segment value (id of the dimension)
segmentValue = segment.parmDisplayValue();
//Get segment value name (Description for dimension)
if(segmentName == 'MainAccount')
{
MainAccountDescription = segment.getName();
}
if(segmentName == 'BusinessUnit')
{
BusinessUnitDescription = segment.getName();
}
if(segmentName == 'Zone')
{
ZoneDescription = segment.getName();
}
if(segmentName == 'Department')
{
DepartmentDescription = segment.getName();
}
this.SG_Name = MainAccountDescription + ' -' + BusinessUnitDescription + ' -' + ZoneDescription + ' -' + DepartmentDescription;
}
}
}
But relation between the general journal account entry and budget tmp balance are not working.
Can you guide me is any other way to get the dimension focus description in report.
In Report first record of dimension focus is
2221100-00000021-00000101-00000027
i want to display like this.
Raw Materials - RIL-1-West-Purchase