We can't use the field directly in your LET Expression as stated below .
Let vCurrentOP = '=max(CP)'
you need to use the PEEK to get the value in field CP
something like this
LOAD MAX(CP) as T_CP
GROUP BY CP_PRIMARY_KEY;
LET vCurrentOP= Peek('T_CP',0,'TEMP');
DROP TABLE TEMP;
Later you can have the above variable in wherever you need in the script.
if(Right([FYOP],2)*1 > ('$(vCurrentOP)'), 'F', 'P') as Future
Hope this Helps.