cancel
Showing results for 
Search instead for 
Did you mean: 

Looking up characteristics values in a different class

former_member42743
Active Contributor
0 Kudos

Ok..

I'm trying to grab a constant value for a material to be used in a calculation in variant config.

The following object dependency works:

$SELF.POTENCY_FACTOR_KG = STD_POTENCY_FACTOR

So if I change the 023 batch characteristic STD_POTENCY_FACTOR to 82, the 023 batch characteristic POTENCY_FACTOR_KG is updated to the same value automatically.

But I don't want the STD_POTENCY_FACTOR to be in the 023 batch class as it's not a batch characteristic. I want it as a materal specific value.  Preferrably in the 001 material class.

$SELF.POTENCY_FACTOR_KG = (001)GEN_100.STD_POTENCY_FACTOR     Class type = GEN_100,  Characteristic = STD_POTENCY_FACTOR

I also tried doing this with the 300 class type.

$SELF.POTENCY_FACTOR_KG = (300)GEN_300.STD_POTENCY_FACTOR     Class type = GEN_300,  Characteristic = STD_POTENCY_FACTOR

Is this not possible?

Craig

Accepted Solutions (1)

Accepted Solutions (1)

Ritz
Active Contributor
0 Kudos

Craig S,

First let me clear my understanding, you want to setup a default at material master level for characteristic used in class type 001 and then want to fetch this value and pass on to another characteristic in class 023 for some other calculation?  is it correct?

Why not include both the characteristic in 001 and pass the value with

$SELF.POTENCY_FACTOR_KG = STD_POTENCY_FACTOR,

Another question as the 001 is default from material master and not going to be change why do you want to pass values between 001 & 023 , as the values in 001 is not to be change and you can use same characteristic with values to perform calculation.

Also, if you share on what " other calculation in variant config" you are performing can help in replying what more options you can have.

Thanks

Ritesh

former_member42743
Active Contributor
0 Kudos

There will be a calculation done in the batch class which will utilize a value from another characteristic, (i.e. a value that is tested in a MIC and passed to the batch record).

It's not the exact calulation, (I can't provide that in a public forum), but bascially the same concept as this:

STD_POTENCY - specific to the material, each mtrl has it's own target, this does not change from batch to batch.. it is basically a spec for the material. So it should be kept at a mateial level, 001 makes the most sense to me.  I could default this in as an 023 class characteristic but it means creating one 023 class for each material.  NOT desired!

POTENCY - is unique for the batch, on the 023 batch class, comes from QM module from lab testing of each batch

PCT_DEVIATION  - Calculated.  ((ABS(STD_POTENCY-POTENCY))/STD_POTENCY)*100

Craig

Ritz
Active Contributor
0 Kudos

Craig S,

Thanks for adding these deatils.

My understanding here is if you want to pass value to a characterstic in class 023, that characterstic should be present in 023, as this calculations are performed at 023 level.

Instead of creating a new class you can combine STD_POTENCY & POTENCY in same class, and STD_POTENCY will have defailts values from material classification. It will save your effort on passing values from 001 to 023 between 2 characterstic.

Thanks

Ritesh

former_member42743
Active Contributor
0 Kudos

How will STD_POTENCY get a default value from material classification if it's in 023 ?

Craig

Ritz
Active Contributor
0 Kudos

Craig S,

As it will be in class of type 001 as well as in class of type 023 both places. As characterstic is same it will carry the value.

Thanks

Ritesh

former_member42743
Active Contributor
0 Kudos

No.. you can't set a default for an 023 characteristic except by ticking on an indicator in the class, (023).  Then you'd have to create a different class for every material.  That's what i want to avoid.

Craig

former_member42743
Active Contributor
0 Kudos

I also tried to put the STD_POTENCY in both the 023 and 001 class.  Then defined the 001 value.  When a new batch was created, the value in the 001 class was not shown in the 023 characteristic.  At least that's how I interpreted what you were suggesting.

Craig

Ritz
Active Contributor
0 Kudos

Craig S,


Seems I forgot to ask one question before suggesting this to you.Thats is, have you activated discret mill functions in yoru landscape.


Check settings in  OMJJ  if it permits you to maintain this settings for you.

You can find more deatils in

Copying Rules for Characteristic Values - SAP Mill Products - SAP Library

May be it will help you.

Thanks

Ritesh

Ritz
Active Contributor
0 Kudos

Craig S wrote:

No.. you can't set a default for an 023 characteristic except by ticking on an indicator in the class, (023).  Then you'd have to create a different class for every material.  That's what i want to avoid.

Sorry I didnt underatnd this one? which tick in 023 prevent you to use more then one characterstic in class 023.?

former_member42743
Active Contributor
0 Kudos

Nope.. this won't help anyway even if we had it.

We aren't copying values from configuration/BOM's/other batches, etc..

Craig

former_member42743
Active Contributor
0 Kudos

In the batch class, (023) transaction CL02, you can enter a value and mark it as a default.  When you create a batch, this value then is copied into the batch for the characteristic as a default value.  The problem is you can't override it with a value in the materail master classification.  So you need a different class created for each different value you'd need.

Craig

Ritz
Active Contributor
0 Kudos

Its not in CL02   , its in CT04 , in create or change characterstic we can set default at characterstic level, and it can be change later.

Thanks

Ritesh

former_member42743
Active Contributor
0 Kudos

yeah.. that doesn't work because I'd have to create a new characteristic any time any material has a different potency.

And yes.. check in CL02 again. You can make a value for a characteristic default in by putting the value in the class, (not in the characteristic), and clicking on the "default" indicator.  This is mostly used in 023 batch class where certain "typical" values for a material can be defaulted in.

I included a screen shot below of the CL02 transaction.  once in CL02, select the characteristic and then the "Overwrite values" button at the bottom of the screen.  This takes you to what is very similar to the change characteristic screen, (even says that!!).  But it is at the class level.  So you can use one characteristic but set a default value at the class level.  So the characteristic can be used in many classes, all with different default values if you want.

When the batch is created, this value is automatically defaulted in.

In additon, if a range is specified in the class, (i.e. a spec), that can be modified on a material by material basis in the materials classification view as well.  Unfortunately, SAP has not provided the "default" indicator in the material classification view.  So no defautls can be sepcified at the material level.  Only the class level.

Craig

Ritz
Active Contributor
0 Kudos

Thanks for details Craig S, I got confuse between setting default at characterstic level and maintaining a exclusion at Class level.

Coming back to your issue, it seems we can copy and pass values from higher level to lower level like 300 --> 023 , but not though lower to higher 001 -- > 023.

Thanks

Ritesh

former_member42743
Active Contributor
0 Kudos

So you think if I put a 300 class on the material I can maintatin it there?

Craig

former_member42743
Active Contributor
0 Kudos

I have repeated tried to find a way to reference a 300 class characteristic from the 023 batch class dependecny editor but have had no luck.

Craig

Ritz
Active Contributor
0 Kudos

Craig S,

I tried to replicate your model and have same result like you , value is not passing from 300 to 023.

It seems it only works when we have obejct like sales order configuration , purchase order or Vehicle created and configuration values get copied using setup we can do using OMJJ.

If you know the potency value for every material , what do you think about using a procedure to setup this value , like read material for batch and setup XXXX for characterstic STD_POTENCY, attach this procedure at class 023 , hope it will work. But again a new referance characterstic refering to material needs to be setup.

Here BMATNR is referance characterstic refering to MARA-MATNR, BATCH11, 12 , 13 are materials having potency value 10, 20 & 30, depends upon material POT1 value is setup by procedure. I used below syntax and it work fine.

000010 $SELF.POT1 = 10 If $SELF.BMATNR = 'BATCH11',

000020 $SELF.POT1 = 20 If $SELF.BMATNR = 'BATCH12',

000030 $SELF.POT1 = 30 If $SELF.BMATNR = 'BATCH13'

Thoughts?

Thanks

Ritesh

former_member42743
Active Contributor
0 Kudos

That's an interesting way to go and for some purposes I think it would work great.

For us, we simply create too many materials to do that. We need a way to have local end users create the materials and enter all these "master data" items.

One way to do what you are suggesting however would be to add an append structure to the MARA table and add a field call "POTENCY".  Then create reference characteristic to that field.  It could could then be used in the calculation.

We have decided to try the FM route again.  A generic FM will be created to lookup the value of the characteristic passed to it it in the 001 material class and pass the value back to the variant config code where we'll use it in the calculation.

I'll let  you know if tha works out.

Craig

Ritz
Active Contributor
0 Kudos

Craig S,

I understand when you see maintainance associated with dependencies synax modification evry time a new material is setup.

I also agree with variant function you mention will work fine as it will do nothing but read the value from classification and pass on to batch characterstic to do further calculation,

Another possibility is to use variant tables with procedures , with addition of new number user only need to populate variant table with new material number & potency value, change in characterstic name or further changes can be done easily done changing or creating new procedures, compare to changing FM.

Thanks

Ritesh

former_member42743
Active Contributor
0 Kudos

That was something else I was thinking about trying too.  I might still go back and look at that.

Thanks for all your help!!!! 

Craig

Ritz
Active Contributor
0 Kudos

You are welcome, let me know if you need further inputs.

Thanks

Ritesh

Answers (0)