Variant Configuration – Set_Default

Home / Blog / Variant Configuration – Set_Default

If you’ve ever had to use the SET_DEFAULT statement in variant configuration, you grasp just how cryptic the syntax can be.  That’s why I wanted to point out this little trick that you might not yet be aware of.  You can replace the SET_DEFAULT syntax with a nice little operator.  Take a look below to see for yourself.

Example of the old way to set a default:
TABLE TEST( INPUT1 = INPUT1,
OUTPUT1 = $SELF.CHAR ),
$SET_DEFAULT( $SELF, OUTPUT1, $SELF.CHAR)

With this:
TABLE TEST( INPUT1 = INPUT1,
OUTPUT1 ?= $SELF.OUTPUT1 )

It doesn’t have to be used in a table, but can be most anywhere you use the = statement.  So in my opinion, why would you ever use the cryptic SET_DEFAULT statement again =)

 

As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,
Mike

Leave a Reply

Your email address will not be published. Required fields are marked *