Getting the correct QTY_REQUESTED from PS_IN_DEMAND in query after a change of the Sales Order line
The original quantity on the demand line is never adjusted, which can cause inconsistent results in query.
When a Sales Oder is entered for QTY 25, PS_IN_DEMAND shows 25.
If the QTY is adjusted to 20 at the Sales Order line level, PS_IN_DEMAND still shows 25 (but when picking the system does know it only needs 20).
If the Sales Order line is split into 2 schedules of 10 each, the first demand line will still show 25 and the second demand line will show 10, so when you summarize or use query for planning purposes, the numbers do not match the actual QTY requested.