At most one Sales Order line per Planning line

I would like to make each Planning worksheet line satisfy at most one Sales Order line. Does anyone know how to do that? Why I want to do this. -------------------------------- Our client requires each Purchase Order or Production Order to be for a single job (I mean a Navision job from Jobs & Resources). If a Planning Line is only linked to one Sales Order Line, then I know how to make sure it does not get grouped with other Planning Lines. But if a Planning Line is linked to two or more Sales Lines, I would need to split it into different Purchase Orders or Production Orders. This entails splitting the quantity (which I know how to do), Reservation Entries, Item Tracking, Order Tracking, and so on. The simplest thing by far would be to ensure that each Planning line is only linked to one Sales Order line, so that there is no need to split anything. Any help is highly appreciated. Thank you, Alastair Farrugia

This is a pretty common business requirement. There are two basica ways of doing this, and it really depends on how your business model works. The first is to create the Production order directly from the planning window from the sales order. The other would require a code change to Planning Routines. THe code is very simple but it will take a while to find the trigger points, but it is not too complex.

Hi David, many thanks for your quick reply. The client will want to use the planning worksheet, so I am trying to change the planning routines (now where have you heard that before? :-), specifically the Inventory Profile Offsetting codeunit. Even knowing that the required change is simple is helpful. I had tried making ChkIncreaseQty exit at once with FALSE, but it doesn’t always work. I am now looking at the InsertSupplyInvProfile and MaintainPlanningLine functions. Alastair

The change above, and a similar one in CreateSupply (to make Navision work as if Serial Numbers are being used) does result in one Sales Order line per Planning Line. But then the order modifiers seem to be ignored. That is, if an item has Minimum Order Qty 100, and there are only sales orders for 20 items, a clean Navision database would have planned a qty of 100. But my modified database is only giving me a total of 20; of course, I want another line for 80 untracked items. I’ll look into this tomorrow. Alastair

Not sure if it helps but my starting point was to Add Sales Order number as a field int he planning worksheet, and then in the Produciton order line.

I solved this with three changes: 1. An EXIT(FALSE) at the beginning of ChkIncreaseQty 2. Another line of code in CreateSupply to treat all items as if they had a Serial No. These two changes result in a separate Planning Line being created for each Sales Order Line. So if there were Sales Lines with qty 3, 5 and 2 of a particular item, we will get planning lines with qty 3, 5 and 2. A final change is then necessary: 3. Suppose a clean Navision database would have planned for 30 units (3, 5 and 2 for the Sales Lines, and another 21 because of the order modifiers). Then we have to insert a line with qty 21. The tricky part is finding out the qty of 30, but after that it’s straightforward. Alastair