Home / Posts tagged "dependency"

Variant Configuration – Using a Parameter ID in a Dependency

Another fun tidbit I learned from my friends at Elogic.  Have you ever needed the model to change based on who is running it???  I know it sounds unusual, but I ran into this scenario.  We had a group that was constantly updating the bill of materials, however the business had begun a round of testing.  They needed to have the BOM locked down, but we didn’t want to have the modeler’s doing weird things just to test the new things they created.  For this, we used a Parameter ID in a dependency to handle this issue.

So, we created a copy of the BOM that was consistent.  This would provide the business with a bill of materials that wasn’t constantly adding new materials that would change the MRP results, or costing amounts, or introduce new errors.  Then, in our test environment, we added both BOM’s and used a parameter ID to determine who would see each bill of material.

Now for the new part, using a PFUNCTION, we called an ABAP function that would check for a specified user parameter.

* Read the user setting for this parameter
parameter_id    = l_parid
parameter_value = l_parva
rc              = l_rc.

l_parid is the paremeter ID to look for, and l_parva is the value returned from that parameter.  Using this function, you can define the cstics you want to use.  then you can assign this PFUNCTION exactly like any selection condition.

While I admit, it won’t be common, you never can tell when this could come in handy.  If you need more code around the PFUNCTION, just ask, but it’s pretty easy stuff.

Happy configuring…
As always, if there is anything we can help you with, please press the contact us button above, and let us know what we can do for you.