Hi Lars
I looked at the WINDOWS functions, It creates different partitions and do the calculations.
But I need to do subtraction between 2 issue date of the same materials.
Could you plz let me know how to write the below ABAP pseudo code in Native SQL.
***************************************************************
Internal table IT_TAB populated from a Select statement.
Loop at lt_tab into wa.
if sy-index NE 1.
if wa_copy-material EQ wa-material.
lv_diff = wa_copy-issue_date - wa-issue_date .
lv_add = lv_add + lv_diff.
else.
append wa_copy-material and lv_add.
endif.
endif.
wa_copy = wa.
endloop.