Hi,
Please try the below logic.
Call your sub screen dynamically. Your code must be as below.
PBO
" fill a variable dynamically with screen number like below,
case ok_code.
when "Fcode of tab1".
tabstrip-activetab = "Fcode of tab1"
X = "Subscreen number".
when "Fcode of tab2".
tabstrip-activetab = "Fcode of tab2"
X = "Subscreen number".
when others.
tabstrip-activetab = "Fcode of tab1"
X = "Subscreen number".
end case.
" Now write the code below .
call subscreen "Sub screen name" including sy-repid 'Put a variable here say "X"'
All these logic mentioned above should be in the same order and only in PBO.
Hope this will sort your issue. Do let us know.