2008 Aug 21 8:26 AM
i want to extract blank field form the database table :
DATA: BEGIN OF IT_YCSTK OCCURS 0 ,
MATNR LIKE YCSTK-MATNR,
WERKS LIKE YCSTK-WERKS,
CHARG LIKE MSEG-CHARG,
GKAHR LIKE YCSTK-GKAHR,
FLD2 LIKE YCSTK-FLD2,
END OF IT_YCSTK.
SELECT MATNR WERKS CHARG GKAHR
FROM YCSTK
INTO CORRESPONDING FIELDS OF TABLE IT_YCSTK
WHERE FLD2 = SPACE.
BUT SY-SUBRC IS ZERO...y???????
HERE FLD2 IS A DATE TYPE FIELD...
Edited by: Mathew Parera on Aug 21, 2008 9:28 AM
2008 Aug 21 8:29 AM
Hi
Sy-subrc will be zero if your select query enables to retrieve any data with all the conditions satisfied.
Check on debugger i am sure that ITAB must contain some data.
Thanks and Regards
Aditya
Hi
Sy-subrc will be zero if your select query enables to retrieve any data with all the conditions satisfied.
Check on debugger i am sure that ITAB must contain some data.
Thanks and Regards
Aditya
2008 Aug 21 8:29 AM
Hi
Sy-subrc will be zero if your select query enables to retrieve any data with all the conditions satisfied.
Check on debugger i am sure that ITAB must contain some data.
Thanks and Regards
Aditya
2008 Aug 21 8:35 AM
Hi,
SY-SUBRC will be zero, if select query is a success.
If its not fetching values pertaining to FLD2 = SPACE.
Try select..
where FLD2 is null.
Regards,
2008 Aug 21 8:45 AM
hi,
The reason the SY_SUBRC = 0 is that it has fetched the records from the table with the conditions that you have put,because the conditions put have been satisfied and data exists in th etable for the conditions..
Hope this hepls.
Thanks,
Rashmi.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |