2007 Feb 26 9:48 AM
Hi ,
i need to select only one row from table eipa where the date(bedat) is the latest.
is anyone know how can i do this?
thanks,
dana.
2007 Feb 26 9:52 AM
SELECT SINGLE * FROM eipa
INTO TABLE i_eipa.
if sy-subrc = 0.
SORT i_eipa descending by bedat.
READ i_eipa INTO wa_eipa INDEX 1.
ENDIF.Hope this solves ur query.
SELECT SINGLE * FROM eipa
INTO wa_eipa
ORDER BY bedat.Reward if this helsp.
Hi ,
i need to select only one row from table eipa where the date(bedat) is the latest.
is anyone know how can i do this?
thanks,
dana.
2007 Feb 26 9:51 AM
In the select query add the addition BYPASSING BUFFER which guarantees that the data you read is the most up to date
2007 Feb 26 9:52 AM
SELECT SINGLE * FROM eipa
INTO TABLE i_eipa.
if sy-subrc = 0.
SORT i_eipa descending by bedat.
READ i_eipa INTO wa_eipa INDEX 1.
ENDIF.Hope this solves ur query.
SELECT SINGLE * FROM eipa
INTO wa_eipa
ORDER BY bedat.Reward if this helsp.
2007 Feb 26 9:52 AM
Hi ,
u can try as follows.
select max( bedat ) from eipa into v_bedat where (your condtions).
select * from eipa where bedat = v_bedat.
Regards,
Sumit
2007 Feb 26 9:52 AM
Hello,
Check this:
Try using the below
Select * from eipa
up to 1 rows
where ....
order by object bedat descending.
Vasanth
2007 Feb 26 9:52 AM
Hi,
You can sort the internal table and then read the first row.
select * from eipa into table itab.
sort itab descending by bedat.
read table itab into wa_itab index 1.
regards,
Beejal
**reward if this helps
2007 Feb 26 9:54 AM
Hi
You can use select single or select upto 1 rows for your requirement.
Regards,
kumar
2007 Feb 26 9:54 AM
hi,
chk this.
1. select all the records to an internal table.
2. sort by date.
3. read the internal table, the latest bedat will be in top.
Regards
Anver
2007 Feb 26 9:59 AM
Dana,
CLEAR EIPA.
SELECT MAX( bedat ) FROM EIPA INTO eipa-bedat
WHERE ........your conditions.
if not eipa-bedat is initial.
select * from eipa where bedat = eipa-bedat.
endif.
pls. reward if useful
2007 Feb 26 10:01 AM
hi dana,
try this:
TABLES: EIPA.
*
SELECT * FROM EIPA order by bedat descending.
write: eipa-infnr.
exit.
ENDSELECT.
regards, dieter
2007 Feb 26 12:31 PM
thank you very much,for all your replies.
you helped me solve the problem,
thank you very much.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |