Variant Configuration – SSC find_or_create to instantiate automatically

Home / Blog / Variant Configuration – SSC find_or_create to instantiate automatically

As you’ve probably noticed, I’ve been spending a lot of time with the SSC and trying to create my first major model.  Needless to say, I keep learning new tricks, so I don’t want to lose them.  Today I want to talk about using the find_or_create statement to perform automatic instantiation for a material or a class.

find_or_create ((300) CLASS_NAME,
CHAR1 = 1;
CHAR2 = ’48’ )

find_or_create ((material)(300)(nr=material_number) )

You can see that there are 2 distinct approaches.  The first is instantiating a class, the second a material.  Let’s start with the class, just like in any constraint based syntax, the find_or_create statement requires a class type (normally, 300), followed by the class name.  Now, to keep things fun, you can add the with statement, and it will pass values automatically to the instance.  Often, you will use an ADT (abstract data type) to signify who the parent is (notice CHAR_PARENT) listed above.  You can pass as many or as few values as needed.

The second version is the easiest…  combining the (material) and (nr=material_number), and bingo… you’ve instantiated a material (with no classification).

Now, if you’re familiar with the advanced mode modeling, the find_or_create statement appears to replace the has_part statement (at least I couldn’t make that syntax work in the SCC editor).

Now, here’s a tip with some power.

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

Leave a Reply

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