10-07-2008 6:29 AM
Hi,
I have to read a table itab in which if i give some date say 10.08.2008 time 11:00 am i want a record which is just before that record ...say 10.08.2008 time 10.30am record ( ITAB has got 100 records till date ).
Waiting for ur reply. ....
Regards
Srinath
10-07-2008 6:33 AM
Hi,
Try this.
READ TABLE itab <your condition>
index = sy-tabix - 1.
READ TABLE INDEX index.
10-07-2008 6:33 AM
Hi,
Try this.
READ TABLE itab <your condition>
index = sy-tabix - 1.
READ TABLE INDEX index.
10-07-2008 6:34 AM
Hi...
data: tabix like sy-tabix.
loop at itab.
if date = your date.
tabix = sy-tabix.
exit.
endif.
endloop.
tabix = tabix - 1.
read table itab index tabix.
It should work.
Thanks,
Naveen.I
10-07-2008 6:36 AM
Hi Srinath,
Get the record with specified DATE and TIME.
Get its index.
Reduce the index by one.
Get the record with this index.
READ ITAB ... WITH KEY DATE = ' ' TIME = ''.
IF SY-SUBRC = 0.
V_INDEX = SY-TABIX - 1.
READ ITAB ... INDEX V_INDEX.
ENDIF.
Regards,
R.Nagarajan.
-
We can -
10-31-2008 12:30 PM