Variant Configuration – SSC Syntax for Classification

Home / Blog / Variant Configuration – SSC Syntax for Classification

Alright, now I’m starting to get the hang of this, and I have to confess, I like it.  If you’ve ever worked with me, you probably recognize that I was kinda old school when it came to the VC, and model creation.  I tended to always the old transactions rather than the cool new tools like PMEVC.  However, the SSC (Solution Sales Configurator if you forgot) has given me a cool new way to do things that really speeds things up.  Now, I’ll have to see if there’s anyway to import back into ECC easily, but for now, I’m just playing in the Eclipse tool.  Today I’m going to talk about the SSC syntax of classification.

If you haven’t checked out the previous posts, they will help you catch up:

Variant Configuration – SSC Stand Alone Installation
Variant Configuration SSC – tricks to installing the local database

Variant Configuration SSC – using the Modeling Environment

Now, here’s what I did to give myself a baseline.  I took an old presentation about advanced mode modeling from the CWG:  Advanced_Mode_Tutorial.pdf.  Hank Meeter wrote this nearly 10 years ago, but when it comes to what you can do with the SSC, it all still applies.  And since I really hadn’t done anything with advanced mode in well, I think I might have played around in a sandbox 9 years ago…  I figured I needed a refresher.  So I pulled up my own system, and I went through did all the exercises.  Now the part that sucks is that I can’t get the IPC on my systems (apparently all the money I pay SAP, and the fact that I’d use it to help them sell the stuff when I consult doesn’t warrant me getting the install files, but I”m not bitter 🙂 ).  So I could write all the rules in ECC, but I couldn’t test any of it.

Next, I did all the same exercises in Eclipse, and what’s really cool is that I could execute it there and see the instantiation, the rules firing, and even a bit of the debug functionality.  So, I’m going to break this into a few posts, and talk about the syntax in Eclipse and how to make it all work.

Now, the first thing you need is a project, so I made myself a new SSC project (see my previous posts if you need help installing).  And since this was a simple one, I got rid of a bunch of folders and just kept:
Classes
Knowledge-Bases.

I created a file under each of these.  Under Classes, I created the file Library.ssc (because the example is about a library and books and bookcases).  Then I created a file under Knowledge-Bases called…  knowledgebases.ssc (original, I know)…

so great.  I have 2 empty files…  what the heck do I do with them.  One of the nice things about the Eclipse is that it has the helper functionality built into it.  so if you press <cntrl>-<space>, you’ll get the list of options.  Still, it’s daunting, so I cheated and used some of the starter projects I got to get me started.  So that’s what I’ll do for you 🙂

Now the building blocks of everything Variant Configuration related is Classification, so it’s the obvious place to start.

Characteristics:

/* here’s a few examples that should get you started */
/*Here’s  numeric cstic with a defined value range */

characteristic AM_THICKNESS {
name “Thickness” numericLength 4 decimalPlaces 2 restrictable unit “cm”
values
0.25, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75, 2.00,
2.25, 2.50, 2.75, 3.00, 3.25, 3.50, 3.75, 4.00,
4.25, 4.50, 4.75, 5.00, 5.25, 5.50, 5.75, 6.00,
6.25, 6.50, 6.75, 7.00, 7.25, 7.50, 7.75, 8.00,
8.50, 9.00, 9.50, 10.00
}
/* here’s your char based */
characteristic AM_MATERIAL {
name “Material” textLength 6 restrictable
values
“CHIP” name “Chipboard”,
“PLY”  name “Plywood”,
“WOOD” name “Solid wood”,
“STEEL” name “Steel”
}
/* a numeric interval */
characteristic AM_WEIGHT {
name “Weight” numericLength 4 restrictable unit “g”
intervals 1-9999
}
/* my first Abstract Data type */
characteristic AM_HOLDS_BOOKS {
name “Holds Books” classType AM_BOOK multiValue
}
/* an aggregating characteristic */
characteristic AM_WIDTH_TOTAL {
name “Total Width” numericLength 6 decimalPlaces 2 unit “cm”
specialFunction aggregating
}

Next up, gotta do something with those characteristics.

Classes:
class AM_SHELF {
name “Shelf”
characteristics
AM_HEIGHT required,
AM_WIDTH required,
AM_DEPTH required,
AM_THICKNESS required,
AM_MATERIAL required,
AM_WEIGHTSUPPORT required,
AM_HOLDS_BOOKS required noinput,
AM_WIDTH_TOTAL noinput,
AM_GEOMETRIC_TYPE invisible,
AM_WEIGHT_TOTAL noinput
}

One of the big things to notice is that you don’t set the characteristic attributes like invisible or required at the cstic level.  You have to define it at the class.

Gotta keep you reading…  and I like to keep some ideas of what to write about next, so I’ll start the next round like materials and bills of materials tomorrow.  Hope you find this interesting.

 

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 *