Hi Michel,
1) I have one doubt, by using loop,we get the distinct value record ? or we have to use delete statement after SORT? Is line_zassortment table use necessary?
How it will store only the first row entry(latest date) and delete the old entries from the below statement ?
loop at zassortment2.
line_zassortment = zassortment2.
at new product.
zassortment3 = line_zassortment.
append zassortment3.
endat.
endloop.
2) Suppose below will be CASE:
Location Product Store date from Store date to
12345 98331 20.10.2012 31. 02. 2014
12345 98331 21.03.2015 31.12.2020
12345 98555 20.10.2012 31.04.2015
12345 98555 20.05.2016 30.12.2020
Then the result will be same
Location Product Store date from Store date to
12345 98331 20.10.2012 31. 02. 2014
12345 98331 21.03.2015 31.12.2020
12345 98555 20.10.2012 31.04.2015
12345 98555 20.05.2016 30.12.2020
As there is no overlapping in the date interval of (2nd row with 1st row) . Similarly (3rd row with 4th row).So the entries will not be deleted.
Is your code possible for this case?
Kindly help for this.
Regards
Priyabrat