Here as you are passing value to a characterstic thats why you need to attach a $SELF in front of it. I belive it was true for previous version, now a days even if you write like
xyz = 700 if abc = 200 and def = 500.
It will work.
see below link for more details on $SELF,$PARENT,$ROOT
Object Variables - Variant Configuration (LO-VC) - SAP Library
Hope it will help you.
Thanks
Ritesh