Wrong delivery address when MRP creates planned purchase order

Hi,

How can we setup the system to be able to have “correct delivery address” generated by MRP in case we do have a sales order where one line is for On hand inventory and the other line is for a direct delivery?

Actually MRP firms up one planned order with the same delivery address which is the customer address and it not right .

Thanks

MRP cannot plan auto-direct deliveries you need to have this as a purchasing decision through the sales order process. Not sure how you are firming up a single purchase order with lines including stock - my guess is you have manually created the relation and chosen to ship both lines direct which means MRP correctly ignores the requirement.