Sales Forecast Replacement Rule
If there are matched records between data from spSalesPlan and EDI862 (compare by key column)
note: Period column of records in spSalesPlan table is matched to "YYYYMM" of Delivery Date from record from EDI862.
And the Day"DD"Quantity column is mathed to "DD" of Delivery Date of this record
And date of the record from spSalesPlan table not less than date of batch [coBatchControl where batch type C]
note [YYYYMMDD] = Period[YYYYMM] + column name of Day"DD"Quantity : ex.Period = 201504, Day03Quantity = 20150402
And the matched data do not have "Actual Qty"
then set value of Day"DD"Quantity to zero (0) before replace new Qty from EDI862 to this colomn
if record not pass the rules above, do nothing for this column
How to check "Actual Qty"
the matched record and column have another record with the same data which this record but PlanType is "A