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

Former Member
0 Likes
335

Hello ,

I am developing rapport in release 6.0.

On the screen I have two parameters _par1 and _par2

I db table I have several entries with values in field1 and field2

field1 field2

1 2

3 4

5 6

If on selection screen I enter value only in _par1 and NOT in _par2 I do not get any

records in i_tab . So I enter "1 "in _par1 and nothing in _par2 and I get nothing i itab

I would expect first row from db_tab .

I tried with OR in where condition with value " 1 "in _par1 and NO values in _par2 , and than

I get ALL entries from db table in i_tab.

My question is how I can get ,for example , first row of db_table in itab

if user do not enter any value in _par2 ?

Thank you

source code .

select * from db_tab

into corresponding fields of table Itab

where field1 eq _par1 and

field2 eq _par2 .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
292

Declare the parameters as select-options and check.


select-options: s_par1 for db-par1,
                         s_par2 for db-par2.

select * from db_tab 
into corresponding fields of table Itab 
where field1 in s_par1 and 
field2 in s_par2 .

Vikranth

PS: Please use a meaningful subject line

1 REPLY 1
Read only

Former Member
0 Likes
293

Declare the parameters as select-options and check.


select-options: s_par1 for db-par1,
                         s_par2 for db-par2.

select * from db_tab 
into corresponding fields of table Itab 
where field1 in s_par1 and 
field2 in s_par2 .

Vikranth

PS: Please use a meaningful subject line