Hello Pavani,
I would suggest you to again use offset.May I know the exact requirement to give the best possible suggestion.
Lets say if you want to check the first four and three characters for the same variable.
Please follow below approach.
case variable+0(3).
when 'CST'.
---
lv_flag = 'X'.
endcase.
if lv_flag NE 'X'.
case variable+0(4).
when 'ABCD'.
endcase.
else .
clear lv_flag.
endif.
Thanks