2007 May 16 9:04 PM
hello abap gurus,
i need to input a date as a parameter.
and check that ztable1 has entries with this date,
if not display an error message " no entries with this date".
can i get the best way of coding this.
2007 May 16 9:08 PM
Hi,
Try this sample code..
PARAMETERS: P_DATE TYPE SYDATUM.
DATA: T_ZTABLE TYPE STANDARD TABLE OF ZTABLE.
* Start-of-selection.
SELECT * FROM ZTABLE
INTO TABLE T_ZTABLE
WHERE DATE = P_DATE. " Give the correct date field name
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'No entries with this date'.
ENDIF.
Thanks,
Naren
hello abap gurus,
i need to input a date as a parameter.
and check that ztable1 has entries with this date,
if not display an error message " no entries with this date".
can i get the best way of coding this.
2007 May 16 9:07 PM
data i_table like ztable occurs 0 with header line.
Parameters : P_date like sy-datum.
select * from ztable into table i_table where date = p_date.
if sy-subrc ne 0.
message.
endif.
Reward Points if it is helpful
Thanks
Seshu
2007 May 16 9:08 PM
Hi,
data itab like ztable1 occurs 0 with header line.
Parameters : p_date like sy-datum.
select * from ztable1 into table itab where date = p_date.
if sy-subrc ne 0.
message E001(00) with 'No Entries in this Date'.
endif.
Regards
SAB
2007 May 16 9:08 PM
Hi,
Try this sample code..
PARAMETERS: P_DATE TYPE SYDATUM.
DATA: T_ZTABLE TYPE STANDARD TABLE OF ZTABLE.
* Start-of-selection.
SELECT * FROM ZTABLE
INTO TABLE T_ZTABLE
WHERE DATE = P_DATE. " Give the correct date field name
IF SY-SUBRC <> 0.
MESSAGE E208(00) WITH 'No entries with this date'.
ENDIF.
Thanks,
Naren
2007 May 16 9:21 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |