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

Select statment

Former Member
0 Likes
654

Hi All..

I have 4 fields in Selection screen.

No one is mandatory.

User wishes to select the details from a table by giving inputs in the selection screen.

I have coded as..

select * from ZTABLE into corresponding fields of table itab

where zreqno = s_reqno-low

or zdate in s_date

or zreqby = s_reqnam-low

or zapprname = s_appnam-low.

System is not able to fetch correct records from Table with given inputs...

What will be the right code..????

1 ACCEPTED SOLUTION
Read only

dani_mn
Active Contributor
0 Likes
574

HI,

try this.

<b>select * from ZTABLE into corresponding fields of table itab
where zreqno in s_reqno
or zdate in s_date
or zreqby in s_reqnam
or zapprname in s_appnam.</b>

Regards,

4 REPLIES 4
Read only

Former Member
0 Likes
574
select * from ZTABLE into corresponding fields of table itab
where zreqno in s_reqno
or zdate in s_date
or zreqby in s_reqnam
or zapprname in s_appnam.

Read only

Former Member
0 Likes
574

put like this

select * from ZTABLE into corresponding fields of table itab
where zreqno in  s_reqno.
or zdate in s_date
or zreqby in s_reqnam.
or zapprname in  s_appnam.

but check the performamce.

Regards

Prabhu

Read only

dani_mn
Active Contributor
0 Likes
575

HI,

try this.

<b>select * from ZTABLE into corresponding fields of table itab
where zreqno in s_reqno
or zdate in s_date
or zreqby in s_reqnam
or zapprname in s_appnam.</b>

Regards,

Read only

former_member184495
Active Contributor
0 Likes
574

hi,

i think in this case,

you better define

*------

initialization.

s_reqno-low = <least value>

s_reqnam-low = <least value>

s_appnam-low = <least value>

*---and now continue with your select statement.

cheers,

Aditya.