Application Development 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: 

plz help:getting latest status from the seq num

Former Member
0 Kudos

hi to every one,

i want the latest status for corresponding sequential no

table(staus table zstatus)

zstat(status) zseq(seq number)

dan 1

dan 2

dan 3

cann 1

cann 2

i want to fetch latest status ie dan which is having seq no 3.ok

plz help me in this issue.

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

Hi,

select zstat max( zseq )
       into table ...
       from zstatus
       group by zstat.

Rgd

Frédéric

3 REPLIES 3

FredericGirod
Active Contributor
0 Kudos

Hi,

select zstat max( zseq )
       into table ...
       from zstatus
       group by zstat.

Rgd

Frédéric

Former Member
0 Kudos

Hello Rajkumar,

U can try this code.

data: itab like zstatus occurs 0 with header line.

Select * into itab where zstat = 'DAN'.

Sort itab by zseq desending.

read table itab index 1.

I tink this code will solve ur problem.

Regards,

Vasanth

Former Member
0 Kudos

hi to all

iam devolping an alv report i need an urgent help in that plz help me in this issue

plz i want a status and actual date for cooresponding max sequential no which is in some z table. plz help me in this issuue . it is urgent.