2007 Jun 20 3:25 PM
hi all,
my issue:
i have an alv report which has almost 10 paramters based on which the internal table will be populated. the two parameters are mandatory .. 4 are select options and 4 are radiobuttons. i think this will lead to a lot of select queries.
i was wondering if there is any way we can minimize the no. of select query.
also would like to know if ranges table can work in such a scenario.
9 fields are from table pLAF and two are from MARA and MKAL respectively
please advice.
thanks in advance
Srinivas
hi all,
my issue:
i have an alv report which has almost 10 paramters based on which the internal table will be populated. the two parameters are mandatory .. 4 are select options and 4 are radiobuttons. i think this will lead to a lot of select queries.
i was wondering if there is any way we can minimize the no. of select query.
also would like to know if ranges table can work in such a scenario.
9 fields are from table pLAF and two are from MARA and MKAL respectively
please advice.
thanks in advance
Srinivas
2007 Jun 20 3:34 PM
Keep the all the selection-screen ,do the join condition PLAF,MARA,MKAL and keep the where condition here (here you can keep all where condition with selection-screen fields ).
first try to logic and automatically you get idea how to proceed with reusability.
2007 Jun 20 3:34 PM
Hi,
For select-options,You dont have to check whether that field is initial or not.So For 4 select-options, u can use one select query.2 parameter field is also mandatory so you dont have to check those 2 field is intial or not.U got to put 4 if condition for 4 radio buttons.
Eg:
If rd_1 = 'X'.
select field1 field1 from <table1> into table where field1 = p_param1
and field2 = p_param2
and field3 in s_selop1
and field4 in s_selop2
and field5 in s_selop3
and field6 in s_selop4.
elseif rd_2 = 'X'.
select field1 field1 from <table2> into table where field1 = p_param1
and field2 = p_param2
and field3 in s_selop1
and field4 in s_selop2
and field5 in s_selop3
and field6 in s_selop4.
elseif rd_3 = 'X'.
select field1 field1 from <table3> into table where field1 = p_param1
and field2 = p_param2
and field3 in s_selop1
and field4 in s_selop2
and field5 in s_selop3
and field6 in s_selop4.
elseif rd_4 = 'X'.
select field1 field1 from <table4> into table where field1 = p_param1
and field2 = p_param2
and field3 in s_selop1
and field4 in s_selop2
and field5 in s_selop3
and field6 in s_selop4.
endif.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |