‎2008 Oct 15 6:34 PM
Hi All,
I have a situation where I need to select few fields from a std table to my internal table based on certain crtiteria and one of the criteria is if the field indicator is "X" then it should not insert the data in the internal table, can you please tell me how to write this statement. my table name is it_tab abd std table let say xyz and the field name is "OPEN".
so the statement should be:
select * from xyz into tabke it_tab
where name = 'ravi' and
bukrs = c_bukrs and
open ne 'X'.
is the above statement right?
Thanks,
Rajeev Gupta
‎2008 Oct 15 6:38 PM
‎2008 Oct 15 6:37 PM
Hi,
Your stmt is correct. But make sure that the it_tab structure is same as the table structure.
Thanks,
Senthil
‎2008 Oct 15 6:38 PM
‎2008 Oct 15 6:41 PM
Thanks for your replies... I was just cross checking !!!
Thanks,
Rajeev
‎2008 Oct 15 6:46 PM
Hi When I tried to run this statement it gav eme following error:
REPORT/PROGRAM statement missing, or program type is (include). How can make the chnage now.
Thanks,
Rajeev
‎2008 Oct 15 6:49 PM
Go to ->Attributes then change the Program type to executable program and activate it
‎2008 Oct 15 6:51 PM
Thanks for the reply but this is defined as an include program, don't you think it will create some problem !!!!
Thanks,
Rajeev
‎2008 Oct 15 6:53 PM
You cant execute an include program .create a report and use this include
‎2008 Oct 15 6:54 PM
Everything is already created and I just need to make some changes in the program which is basically a include in the main program
‎2008 Oct 15 6:56 PM
‎2008 Oct 15 7:04 PM
‎2008 Oct 15 7:48 PM
Press <ctrl> <shift> <f5> and them run the main program.
Regards
‎2008 Oct 15 6:41 PM
Yes your select must work, just mentioning below again.
SELECT * INTO TABLE IT_TAB
FROM XYZ
WHERE NAME = 'RAVI'
AND BUKRS = C_BUKRS
AND OPEN <> 'X'.
If, you find any discrepancies let us know.