static void PSV_UpdateOpDivDimension_Items(Args _args)
{
InventTable inventTable;
DimensionAttributeValueSetStorage dimStorage;
DimensionAttribute dimAttrOpDiv;
DimensionAttributeValue dimAttributeValue;
changeCompany('DAT')
{
while select forUpdate inventTable
{
ttsBegin;
dimStorage = DimensionAttributeValueSetStorage::find(inventTable.DefaultDimension);
dimAttrOpDiv = DimensionAttribute::findByName("Operating_Division");
InventTable inventTable;
DimensionAttributeValueSetStorage dimStorage;
DimensionAttribute dimAttrOpDiv;
DimensionAttributeValue dimAttributeValue;
changeCompany('DAT')
{
while select forUpdate inventTable
{
ttsBegin;
dimStorage = DimensionAttributeValueSetStorage::find(inventTable.DefaultDimension);
dimAttrOpDiv = DimensionAttribute::findByName("Operating_Division");
dimAttributeValue = DimensionAttributeValue::findByDimensionAttributeAndValue(dimAttrOpDiv, 'NewValue', true, true);
dimStorage.addItem(dimAttributeValue);
inventTable.DefaultDimension = dimStorage.save();
inventTable.doUpdate();
ttsCommit;
inventTable.DefaultDimension = dimStorage.save();
inventTable.doUpdate();
ttsCommit;
}
}
}
//This code updates the items financial dimensions to new values.
}
}
//This code updates the items financial dimensions to new values.
No comments:
Post a Comment