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

multiple selections

Former Member
0 Likes
317

could anyone help me with a sample program for the following reqt?

i have three select options: Customer, telephone no. and address. If i want to choose 3 Customer names, 5 telephone numbers, 9 address. Each of this selection should be considered as 3 separate search data and the search should be performed independently.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
286

Hello Sneha-

Try this sample code and let me know the results because I have some doubts regarding multiple selections.

tables kna1.

types:begin of st_kna1,

kunnr type kunnr,

telf1 type telf1,

stras type STRAS_GP,

end of st_kna1.

data:i_kna1 type table of st_kna1.

select-options:s_kunnr for kna1-kunnr,

s_telf for kna1-telf1,

s_stras for kna1-stras.

select kunnr

telf1

stras from kna1 into table i_kna1

where kunnr in s_kunnr[] or

telf1 in s_telf[] or

stras in s_stras[].

Cheers,

~Srini....

2 REPLIES 2
Read only

andreas_mann3
Active Contributor
0 Likes
286

use:

select * from KNA1

where ( kunnr in s_kunnr )

or ( telf1 in s_telf )

or ( stras in s_stras )...

A.

Read only

Former Member
0 Likes
287

Hello Sneha-

Try this sample code and let me know the results because I have some doubts regarding multiple selections.

tables kna1.

types:begin of st_kna1,

kunnr type kunnr,

telf1 type telf1,

stras type STRAS_GP,

end of st_kna1.

data:i_kna1 type table of st_kna1.

select-options:s_kunnr for kna1-kunnr,

s_telf for kna1-telf1,

s_stras for kna1-stras.

select kunnr

telf1

stras from kna1 into table i_kna1

where kunnr in s_kunnr[] or

telf1 in s_telf[] or

stras in s_stras[].

Cheers,

~Srini....