12-22-2006 4:14 AM
in internal table i a have 10 records, in that for each record only date is changing...so,now the issue is i should extract the record which having the latest date
12-22-2006 4:16 AM
Hi ,
Sort the internal table with descending date and read the first recrod.
e.g.
<b>SORT IT_1 by DATS DESCENDING.
Read table it_1 index 1.</b>
Regards
Arun
Please reward with point if reply is helpful
12-22-2006 4:16 AM
Hi ,
Sort the internal table with descending date and read the first recrod.
e.g.
<b>SORT IT_1 by DATS DESCENDING.
Read table it_1 index 1.</b>
Regards
Arun
Please reward with point if reply is helpful
12-22-2006 4:17 AM
sort the internal table in decending order.
and now read index one for latest record.
12-22-2006 4:17 AM
Hi,
sort the internal table by in descending order. And pick the first record of internal table.
Rgds,
Prakash
12-22-2006 4:25 AM
try this code -
data: begin of itab occurs 0,
name(20),
add(20),
bp like sy-datum,
end of itab.
itab-name = 'aaa'.
itab-add = '123'.
itab-bp = '20061220'.
APPEND ITAB.
CLEAR ITAB.
itab-name = 'bbb'.
itab-add = '123'.
itab-bp = '20061219'.
APPEND ITAB.
CLEAR ITAB.
itab-name = 'aaa'.
itab-add = '123'.
itab-bp = '20061222'.
APPEND ITAB.
clear itab.
sort itab descending by bp.
read table itab index 1.
write: itab.
12-22-2006 4:24 AM
sort itab by date descending.
read table itab index 1.
or sort itab by <fnames> ascending date descending.
<here wa is of line type of itab>
loop at itab into wa.
at new <faname>.
<now wa contains the latest date vale take that value to any variable>
endat
endloop.
regards
shiba dutta