Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

gettin error while making report

Former Member
0 Likes
498

my select query which is giving error msg is

SELECT * FROM ZSBOOK WHERE CONNID=ZSBOOK-CONNID

INTO TABLE ITAB.

Error msg is as follows::

"INTO" is not a valid comparison operator.

plz help me with the same..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
473

Hi try it like this :

SELECT *

INTO CORRESPONDING FIELDS OF ITAB

FROM ZSBOOK

WHERE connid = ZSBOOK-connid.

3 REPLIES 3
Read only

Former Member
0 Likes
473

HI,

parameters:P_connid like zsbook-connid.

You have to write select query in this way.

SELECT * INTO TABLE ITAB FROM ZSBOOK WHERE CONNID=P_CONNID.

Thanks,CSR.

****Please Reward if helpful

Read only

Former Member
0 Likes
474

Hi try it like this :

SELECT *

INTO CORRESPONDING FIELDS OF ITAB

FROM ZSBOOK

WHERE connid = ZSBOOK-connid.

Read only

Former Member
0 Likes
473

hi,

if u r using itab as of the same structure of zsbook.

like:

data: itab like zsbook occurs 0 with header line.

then use

select * from zsbook

into table itab

where connid = p_connid. "where p_connid is of type zsbook-connid.

if u r using only some fields from zsbook in itab

like:

data:begin of itab occurs 0,

connid like zsbook-connid,

field2 like zsbook-field2,

end of itab.

use

select * from zsbook

into corresponding fields if table itab

where connid = p_connid.

reward if useful.