Hi guys

I have some forecast transactions that I need to adjust if there is coming a Sales Order in the same week as forecast, based on the Sales order qty. and the aggregate sum

There is general 4 conditions for the iteration

**Condition 1**

Sales order in WK02 of 10 pcs

Forecast before adjustment

W01 : 50

W02 : 50

W03 : 50

W04 : 50

Aggregate sum 200

Forecast after adjustment

W01 : 50

W02 : 40 (Forecast)

W02 : 10 (Sales order)

W03 : 50

W04 : 50

Aggregate sum 200

——————————————**Condition 2**

Sales order in WK02 of 60 pcs

Forecast before adjustment

W01 : 50

W02 : 50

W03 : 50

W04 : 50

Aggregate sum 200

Forecast after adjustment

W01 : 50

W02 : 0 (Forecast)

W02 : 60 (Sales order)

W03 : 40 (Forecast)

W04 : 50

Aggregate sum 200

——————————————**Condition 3**

Sales order in WK02 of 110 pcs

Forecast before adjustment

W01 : 50

W02 : 50

W03 : 50

W04 : 50

Aggregate sum 200

Forecast after adjustment

W01 : 50

W02 : 0 (Forecast)

W02 : 110 (Sales order)

W03 : 0 (Forecast)

W04 : 40

Aggregate sum 200

——————————————**Condition 4**

Sales order in WK02 of 50 pcs

Forecast before adjustment

W01 : 50

W02 : 50

W03 : 50

W04 : 50

Aggregate sum 200

Forecast after adjustment

W01 : 50

W02 : 0 (Forecast)

W02 : 50 (Sales order)

W03 : 50

W04 : 50

Aggregate sum 200