Hi Saul,
Good day to you too .
Assuming you have multiple parameters instead of multiple select options, please follow below steps :
1) Create 5 optional importing parameters.
2) Modify your Select query as,
select rfikrs rmeasure rfundsctr rfund budget_pd_9 tsl01 tsl02 tsl03 tsl04
INTO CORRESPONDING FIELDS OF TABLE it_fmbdt
from fmbdt
where fmbdt~rfikrs = prfikrs
or fmbdt~rmeasure = prmeasur
or fmbdt~rfundsctr = prfundsc
or fmbdt~rfund = prfund
or fmbdt~BUDGET_PD_9 = pbudget.
This query will give a super set of all the results.
3) Loop at it_fmbdt into ls_fmbdt.
*-- Now check the fields individually and apply your summation logic, eg:-
if ls_fmbdt-rfikrs is not initial.
*-- Sum the required fields.
endif.
Endloop.
Please ask in case i missed anything or something is unclear.
BR.