When Executing an ABAP QUERY there can be many fields on Selection Screen
Suppose if we want to hide/show some fields on selection screen at run time , we have to change the program for that
But we cannot change the program generated by the ABAP QUERY as it is a standard program starting with AQZZXXXXXXX, we have the option of copying the program to a Custom Program and get the required functionality ,
But here is a simple way which can be maintained at variant level
Please follow below steps
Goto Your Query Name in SQ01
In menu Goto-->Maintain Variants
Give a Varianr Name and Say Create, Maintain the short Text
Click on the Attributes button
Scroll down and check the Checkbox as shown for those fields to be hidden/shown on Selection screen, Make sure while checking that they are of the same radiobutton group, to check for the radiobutton groups , you can check them by giving the program name of the query startting with AQXXX and screen no as 1000 in SE51
Save the Variant
We get a new icon with + symbol on selection screen application tool bar of that Query
Click on that to Expand/collapse the hidden fields
"