15 Temmuz 2015 Çarşamba

AXAPTA - Flexible joins with InventDim Table using InventDimExistsJoin macro

There is a macro to create flexible joins with InventDim table with easy:

InventDimParm       dimParm;
InventDim           dimValues,dimJoin;
;
...
//Fill fields to use join where condition
 dimvalues.wMSLocationId = inventdim.wMSLocationId;
    if (inventdim.InventSiteId)
        dimvalues.InventSiteId = inventdim.InventSiteId;
    if (inventdim.configId)
        dimvalues.configId = inventdim.configId;
 //Set
InventDimParm with fields
    dimparm.initFromInventDim(dimValues);

    while select lclInventSum
        where lclInventSum.ItemId == itemId && leftQty > 0
              #InventDimExistsJoin(lclInventSum.InventDimId,dimJoin,dimValues,dimParm)


First parameter was related InventDimId field for join tables, second is InventDim tables local alias, values go with third parameter. The last one is parameter table. There ara different usages of that table.

Hiç yorum yok:

Yorum Gönder