Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help in select

Former Member
0 Likes
386

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
368

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

2 REPLIES 2
Read only

Clemenss
Active Contributor
0 Likes
368

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

Read only

Former Member
0 Likes
369

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