‎2008 Nov 14 9:30 AM
hi friends,
can any body tell me how this select work in which we can not give any INTO clause
SELECT * FROM COEP WHERE WTGBTR > 0 AND
KSTAR <> ' ' AND OBJNR BETWEEN 'OR000000000000'
AND 'OR999999999999'
AND OBJNR = WAUFNUM ORDER BY OBJNR.
Thanks for answers
‎2008 Nov 14 9:34 AM
Hi ,
Check whether you have a statement like Tables COEP in your code. With this statement a field string of type COEP is created. So the selected record with select statement gets stored in this.
Regards,
Swapna.
‎2008 Nov 14 9:34 AM
‎2008 Nov 14 9:34 AM
Hi,
This will not work.
It will not retrive any data and give sy-subrc 4 or syntax error too.
Regards
Ricky
‎2008 Nov 14 9:34 AM
Hi ,
Check whether you have a statement like Tables COEP in your code. With this statement a field string of type COEP is created. So the selected record with select statement gets stored in this.
Regards,
Swapna.
‎2008 Nov 14 9:47 AM
‎2008 Nov 14 9:54 AM
‎2008 Nov 14 9:46 AM
Hi,
1. BE SURE THAT table COEP exists in DATABASE.
2. If it does exist -> Create a table of type COEP
DATA: tb_coep TYPE STANDARD TABLE OF coep.
2. SELECT *
FROM coep
INTO CORRESPONDING FIELDS OF TABLE tb_coep
WHERE conditions.
Hope this helps,
Alex.
ps: i;m not sure this will work because i see that table COEP does not have a FLAT structure...
‎2008 Nov 14 9:49 AM
SELECT * FROM COEP WHERE WTGBTR > 0 AND
KSTAR ' ' AND OBJNR BETWEEN 'OR000000000000'
AND 'OR999999999999'
AND OBJNR = WAUFNUM ORDER BY OBJNR.
>ENDSELECT. " is necessary or use SELECT SINGLE *
For this Select to run Successfully, there can be 2 conditions:
1) It is a nested select statement.
> Select * from tab1 into itab1 where exists(select * from tab2 where ...).
>"For select in brackets, Use of INTO is forbidden.
2) You have declared a Work Area of type COEP using Tables statement:
> Tables: COEP. " This declares a Work area of type COEP having name COEP
‎2008 Nov 14 9:51 AM
Hi,
This select will work only if you have defined the work are using the tables statment
TABLES COEP
then you wont need a into clause.
However you will need to give a
ENDSELECT as well to make it work.
tables COEP.
SELECT * FROM COEP WHERE WTGBTR > 0 AND
KSTAR ' ' AND OBJNR BETWEEN 'OR000000000000'
AND 'OR999999999999'
AND OBJNR = WAUFNUM ORDER BY OBJNR.
ENDSELECT.
regards,
Advait
‎2008 Nov 14 9:59 AM
This select will not work because into clause in not specified. Into clause should be specified