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

many selection paramters

Former Member
0 Likes
565

hi

I have a selection screen where i have 5 select options. only 2 are obligatory. I need to get data from tables vbrk vbrp kna1 and some more.

my question is how to write the where condition, when joining these tables as the non-obligatory selections May or May not have data ( or 1-2 might have them )

thanks

5 REPLIES 5
Read only

Former Member
0 Likes
544

if the selection parameters are select-options, u dont have to worry about that.

system will automatically take care of it...

sample..

where

vbeln in s_vbeln and

kunnr in s_kunnr.

if s_kunnr is blank..it will select for all kunnr, else, for the specified kunnr s only

Read only

0 Likes
544

thanks for ur quick reply.

so according to u the following code should work ?

SELECT *

FROM vbrk

INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln

INNER JOIN kna1 ON vbrkkunag = kna1kunnr

INTO corresponding fields of TABLE itab

WHERE

vbrkvbeln in p_vbeln and vbrkkunag in p_kunag and vbrpmatnr in p_matnr and vbrpaugru_auft in p_augru and vbrk~fkdat in P_fkdat

i had one more question , one of the select options is date , so i need to get reports genrated within the 2 dates . how do i write it .

thanks again

Read only

0 Likes
544

Simply add that to the SELECT statement WHERE clause.

Just like you have this data field.

and vbrk~fkdat in P_fkdat

Regards,

RIch Heilman

Read only

0 Likes
544

Hi,

I think you should use s_fkdat.

Declare s_fkdat in selection screen like,

SELECT-OPTIONS: S_FKDAT FOR VBRK-FKDAT.

So that you can get data in the date range specified.

Thanks,

Veni.

Read only

0 Likes
544

thank you all for ur quick replies . i have given points for all. closing this thread.