The below query fetches a row from the table having 16 periods from tsl01 - tsl16... but need to eliminate those periods from the internal table which are not selected in the selection screen.
Lets say If the user enters 2 - 7 as period in the selection screen then from the internal table it_faglflext only tsl02 - tsl07 should have value rest should be set to null.
SELECT racct ryear rldnr rbukrs rcntr prctr drcrk
tslvt tsl01 tsl02 tsl03 tsl04 tsl05 tsl06 tsl07 tsl08
tsl09 tsl10 tsl11 tsl12 tsl13 tsl14 tsl15 tsl16
INTO TABLE it_faglflext
WHERE rbukrs IN s_coco
AND racct IN s_glac
AND rcntr IN s_coce
AND prctr IN s_prce
AND rldnr EQ s_ledg
AND ryear EQ s_fisc
AND rrcty EQ 0.