Quantity based Lead times in Master Scheduling


I strive to achieve requirement date of Planned purchase orders calculated based on lead times according to quantity in Trade Agreements during master scheduling.I set up all master planning parameters related trade agreement but i could NOT succeed in this.What master scheduling did is not considering quantity based on lead times ,just taking into consideration first record in trade agreements.

Thanks in advance,


It’s quite interesting but never tried. Just wanted to share something that comes in my mind.

are you sure whether it’s taking from the first line of your trade agreement? check your Default order setting> purchase lead time is set to 0 and see whether your generated planned order took the Lead time from the agreement.

Hey Keskin, please ignore my previous message.

I’ve checked it and it seems working well. could you post a screen shot of your prices setup and let me know what is the planned order quantity that is being generated.

Also, please drag the Lead time field onto the grid while posting a screen shot, so that I can see the Lead time of all the lines

Hello Santosh,

Thank your for your reply,

I’ve attached the pictures,Hope they will be clear enough.
TradeAgreement.pdf (286 KB)

Do you have a default vendor set on the item card? I ask because if you do it does not matter if you tell Planning to look at the trade agreements, it ignores that setting if the default vendor is set.

Hello Adam,

I dont use default vendor on the item.Nothing left for the setup related with this issue.I’ve been eagerly trying to solve this .

Actually I doubt whether Master Scheduling covers quantity based lead times in trade agreements?

Thank for any help,



Yes I’m sure now ,Ax does NOT cover quantity based lead times in master scheduling when I check the codes.

In RecTrans table ,There is a findPriceDiscTable method.I changed the order by clause as follow;

That workes fine, meaning that master scheduling calculates lead times of planned purchase orders according to quantity based on delivery times in trade agreements.

case ReqSearchTradeMethod::ShortestDlvTime:

select firstonly priceDiscTable
index hint ItemDimIdx
order by QuantityAmount desc,DeliveryTime desc
where priceDiscTable.Relation == PriceType::PricePurch &&
priceDiscTable.ItemCode == TableGroupAll::Table &&
priceDiscTable.ItemRelation == _itemId &&
priceDiscTable.AccountCode == TableGroupAll::Table &&
priceDiscTable.UnitId == unitID &&
priceDiscTable.InventDimId == inventDimId &&
priceDiscTable.QuantityAmount <= qty &&
(_transDate >= priceDiscTable.FromDate || ! priceDiscTable.FromDate) &&
(_transDate <= priceDiscTable.ToDate || ! priceDiscTable.ToDate)
join TableId from vendTable where
vendTable.AccountNum == priceDiscTable.AccountRelation &&
vendTable.Currency == priceDiscTable.Currency;

Best Regards