So table name should be pass from UI in filter & use describe table to get table fields name.
Use field symbol for lt_table so that it can adopt all table type & make lv_condition dynamically using concatenate passing where clause key in filter.
Select * from ( table_name ) into table lt_table where ( lv_condition ).