‎2007 Dec 16 1:00 PM
hi,
i wont to select data from table for project last version and all the projects have entries for period but all projects end in different date.
i give example:
assume i have table itab with projects
project------Period
1000 -
ET0712 "YEAR AND MONTH
1000 -
ET0711
1000 -
ET0710
2000----
ET0710
2000----
ET0709
what i wont to move to my second table is to take the last version of the project like in project 1000 is ET0712 and in project 2000 ET0710
how i can do that and consider that all project has different time for last version?
Regards
‎2007 Dec 16 3:57 PM
Hi,
you can also do like this
Sort itab by project period descending.
Loop at itab.
on change of project.
move to another internal table.
endon.
endloop.
Regards,
Satish
‎2007 Dec 16 2:09 PM
Hi ricardo,
you can't so it in the select statement because the order of retireved data is not guaranteed. Pull them into internal table with first two fields project and Period. Sort itab. loop at itab. AT END OF PROJECT. Here you have the highest period for a project.
Regards,
Clemens
‎2007 Dec 16 3:57 PM
Hi,
you can also do like this
Sort itab by project period descending.
Loop at itab.
on change of project.
move to another internal table.
endon.
endloop.
Regards,
Satish