2008 Jul 19 12:50 AM
Hi,
I need to write a select query which fetches all the entries of a table for today's date , how do i do it pls..
2008 Jul 19 5:33 AM
Hi,
Write
Select * from <table> into table itab where <date_field> eq SY-DATUM.
Sy-datum is current system date.
Regards,
Sujit
Hi,
I need to write a select query which fetches all the entries of a table for today's date , how do i do it pls..
2008 Jul 19 1:52 AM
Select * from DDIC-Table into...... "whatever" (field, internal table, structur)
where FIELD = sy-datum.....
.... endselect. (if necessary and/or it makes sense)
I prefer "into internal table.... " for more than one record.
regards Jurgen
Edited by: Jürgen Hartwig on Jul 19, 2008 2:53 AM
2008 Jul 19 2:24 AM
example..
you can use in where condition...
select * vbak
into table it_vbak
where audat = sy-datum
2008 Jul 19 4:09 AM
HI,
Take any date field from your TABLE,then in where condition DATE(fieldname) = SY-DATUM.
example :
select MANR WERKS MMSTD from MARC
where MMSTD = sy-datum.
2008 Jul 19 5:26 AM
Hi,
Plz find the Date field of your particular table and in the select query check it with sy-datum.
select * from <table>
into <i_tab>
where <date-field> EQ sy-datum.
Regards
Sumit Agarwal
2008 Jul 19 5:33 AM
Hi,
Write
Select * from <table> into table itab where <date_field> eq SY-DATUM.
Sy-datum is current system date.
Regards,
Sujit
2008 Jul 19 5:45 AM
hi sandeep,
In your select query in the WHERE CLAUSE use sy-datum
Eg,
select *
from <table name>
into <work area>
where < date field > = sy-datum.Best of luck,
Bhumika
2008 Jul 19 6:06 AM
Hi
Types : Begin of ty_mara ,
matnr type mara-matnr,
mbrsh type mara-matnr,
Meins type mara-meins,
End of ty_mara.
Data : It_mara type standard table of ty_mara ,
wa_mara type ty_mara.
Select matnr
mbrsh
meins
from mara
into table it_mara
where ersda eq sy-datum.
It will give the output what u expected.
2008 Jul 19 7:26 AM
Hi Sandeep,
Try this code :
SELECT <field-names to retrieve>
FROM <database table name>
INTO TABLE <internal table name>
WHERE <date field name> eq sy-datum.This will fetch all the records with today's date.
Regards,
Swapna.
2008 Jul 19 7:58 AM
hi check this..
tables:pa0002 .
data: begin of itab occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda.
end of itab .
select pernr
begda
endda
from pa0002
into table itab
where begda = sy-datum.
loop at itab.
write:/ itab-pernr,itab-begda,itab-endda.
endloop.
2008 Jul 19 8:09 AM
Hi,
SELECT <field-names to retrieve>
FROM <database table name>
INTO TABLE <internal table name>
WHERE <date field name> eq sy-datum.
or
SELECT * FROM <database table name>
INTO TABLE <internal table name>
WHERE <date field name> eq sy-datum.
this statement will fetch all the data's from your database table with respect to your date field. use parameter or select option to get the field value...then finally use
loop at <itab>
write: / <itab-field>.
endloop.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |