06-27-2008 11:14 AM
Hi experts,
I am using 3 screens.One main screen and 2 subscreen.
In 1st subscreen 2 ip fields r there.if that input match with value from db then it will fetch dat and will store in internal table itab.
my sql stmt. is as follows
SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID IN SPFLI-CARRID.
but it is showing that
The IN operator with "SPFLI-CARRID" is followed neither by an internal table nor by a value list.
with regards
ansuman
06-27-2008 11:16 AM
change it to
SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID EQ SPFLI-CARRID.
<removed_by_moderator>
Edited by: Julius Bussche on Aug 8, 2008 2:45 PM
06-27-2008 11:25 AM
hi,
Though after changing to eq it is not showing syntax error but now datas r nt being fetched
with regards
Ansuman
06-27-2008 11:29 AM
hi
After changing to eq..the values will be fetched....if the screen field u are using is SPFLI-CARRID.
that to the carid u are passing in the screen ...should be existing in the SPFLI table...
So go in SE16 and give the carid u r entering in the screen....if records are thr the same will be fectched by the select query in case the screen field u are using is SPFLI-CARRID.
06-27-2008 11:35 AM
Hi,
Thanks for the above answers.But now as i had told u that datas r nt being fetched so i m confused in naming covention of top include and screen
i had declared as follows.
data carrid like spfli-carrid.
in screen the input field name is carrid.
so plz tell me the select etmt. how to fetch data as based on value given in screen.
with regards
ansuman
06-27-2008 11:46 AM
Try this.
SELECT *
FROM spfli
INTO TABLE itab
WHERE carrid EQ carrid.
Regards,
Siva.
06-27-2008 11:48 AM
Hi,
Thanks for the above answers.But now as i had told u that datas r nt being fetched so i m confused in naming covention of top include and screen
i had declared as follows.
data carrid like spfli-carrid.
in screen the input field name is carrid.
so plz tell me the select etmt. how to fetch data as based on value given in screen.
with regards
ansuman
06-27-2008 11:57 AM
SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID EQ CARRID.
but b4 that just debugg and see wat value is CARRID containing...if its containing a value for which there is entry in SPFLI table...then definitely this select stmt will work...
Edited by: Rudra Prasanna Mohapatra on Jun 27, 2008 12:57 PM
06-27-2008 1:15 PM
Hi Ansu,
Declare.
data : gt_tab type table of spfli.
because screen input field is carrid.
select * from spfli into table gt_tab where carrid = carrid.
Check whether data is comimng to internal tale with the value for CARRID.
Regards,
Madhavi
08-11-2008 6:40 AM
hi,
The select statement would be
select * from spfli into table itab where carrid eq carrid.
regards
padma
06-27-2008 11:20 AM
Hi Ansuman,
as spfli-carrid is a field we need to pass it as a parameter
SELECT *
FROM spfli
INTO TABLE itab
WHERE carrid EQ spfli-carrid.
Best regards,
raam
06-30-2008 6:53 AM
Hi Ansu,
Try this code in case of parameters:
parameters :
p_carrid like spfli-carrid.
data :
itab like standard table of spfli .
data :
fs_itab like line of itab.
select *
from spfli
into table itab
where carrid eq p_carrid.
Try this in case of select-options :
tables :
spfli.
select-options :
s_carrid for spfli-carrid.
data :
itab like standard table of spfli .
data :
fs_itab like line of itab.
select *
from spfli
into table itab
where carrid in s_carrid.
Regards,
Swapna.