Thursday, June 5, 2008

Append and Sort by SiMou Chin

This is how to append
it_techdate-date = dj_rec-dat01.
it_techdate = dj_rec-dat01.
append it_techdate.
clear it_techdate.
This is how to sort
sort it_techdate by date descending.
loop at it_techdate.
itab-djoined = it_techdate-date.
exit.
endloop.
---------------------------------
changes made
DATA: BEGIN OF dj_temp_rec OCCURS 0,
datejoined LIKE p0000-begda,
END OF dj_temp_rec.
append
dj_temp_rec-datejoined = dj_rec-dat01.
dj_temp_rec = dj_rec-dat01.
append dj_temp_rec.
clear dj_temp_rec.
* itab-djoined = dj_rec-dat01.
* EXIT.
Sorting

sort dj_temp_rec by datejoined descending.
loop at dj_temp_rec.
itab-djoined = dj_temp_rec-datejoined.
exit.
endloop.

No comments:

Post a Comment