Burak,
Are you trying to set the variant before the table is displayed? If so, you should be passing tab2 to the parameter IS_VARIANT in the method SET_TABLE_FOR_FIRST_DISPLAY.
If you are trying to change the variant after the table is displayed (eg: based on user action), then you need to check if the variant exists using GET_VARIANT and if yes, then use SET_VARIANT and then call REFRESH_TABLE_DISPLAY.
Thanks,
Vikram.M