Creating Default Dimension

//Code added by Ahmed Alam on 6th Oct, 2013
//ReasonCode: User can get the specific dimension value on the basis of provided Financial Dimension
public static RecId createDefaultDimension(container defaultDim, container dimValue)
container ledgerDimension;
DimensionDefault DimensionDefault;
int _counter;
DimensionValue _foundValue[];
Name _foundName[];
Struct struct;

struct = new Struct();
for(_counter = 1; _counter <= conLen(defaultDim); _counter++)
_foundValue[_counter] = conPeek(defaultDim, _counter);
_foundName[_counter] = conPeek(dimValue, _counter);
struct.add(_foundName[_counter], _foundValue[_counter]);

ledgerDimension += struct.fields();
ledgerDimension += struct.fieldName(_counter);
ledgerDimension += struct.valueIndex(_counter);

DimensionDefault = Dimensions::getDimensionAttributeValueSetId(ledgerDimension);
return DimensionDefault;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s