cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax to add interval

Former Member
0 Kudos

Hi I want to add interval for a characteristics. I was searching on SAP help an found that the interval entered as below

LENGTH IN ( 5 - 10)

when I am giving this syntax replacing Length with my characteristics its giving error "E28024 Syntax error in simple action/procedure"

1. Please advise what is the syntax for updating interval

2. Any link/Book that refers to the VC syntax?

Regards

CR

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Karlheinz,

thanks, but MIC does not take 2 reference characteristics. it has to be one characteristic with interval value.

I am still trying to find some solution for this case otherwise will try user exit of sales order.

0 Kudos

Hello Christina,

I have an idea, but I did not test it.

There is the enhancement project CCUX0000 with userexit EXIT_SAPLCUKO_001. The documentation says, the purpose of this userexit is to perform additional checks when leaving the configurator.

The internal function module CEI0_DDB_SET_VALUE_INTERNAL is able, to set an interval to a characteristic. The Input table of this function module is of type API_VALI. This structure has the following fields to handle intervals:

ATFLV   lower value

ATFLB   upper value

ATCOD  value relation where 3 means the Intervall >= ATFLV and <= ATFLB

                                                2 means the Intervall >= ATFLV and < ATFLB

Maybe you can use the the userexit EXIT_SAPLCUKO_001 to set the Intervall value via the function module CEI0_DDB_SET_VALUE_INTERNAL ...

Former Member
0 Kudos

Below are the screen shots of Characteristics settings and dependency code...

Please please help...

I wrote the code ending with "." and with out . but it did not work for both cases.

Flavio
Active Contributor
0 Kudos

Hi Cristina,

If your goal is to set a value for the LENGTH characteristic, the dependency shall set an exact value for it.

I've just run a simple test in my sandbox system, based on your settings above; here follows the results.

For example, if the characterstic has the following allowed intervals as values

then the dependency (procedure) shall set a value within one of the ranges, for instance:

(the procedure has been allocated in the configuration profile).

The result in the CU50 simulation is then the following:

As far as the syntax LENGTH IN ( 1 - 5 ) is concerned, this is used when the characteristic LENGTH is used to infer other characteristics values.

For instance, let's say we have a characteristic called DUMMY that shall get the value 'A' if the characteristic LENGTH has a value between 1 and 5, then the dependency will look like the following:

$self.DUMMY = 'A' IF $self.LENGTH IN ( 1 - 5 )

Hope this could be of some help. Just let me know if you need any further detail.

Thanks and bye,

Flavio

0 Kudos

Hello Christina,

the main problem with your example is, that the IN operator is a comparison operator. And a procedure needs to have some kind of a statement or operation, not just a comparison.

In addition, the attribute "Interval vals allowed" controls, that a (numeric) characteristic can have an interval as a final result. It is not possible in any dependency to directly set an interval as a final value, except in cases where you derive the interval from a variant table.

May I ask what you're trying to achieve exactly?

Regards, Karlheinz

Former Member
0 Kudos

thanks Flavio and Karlheinz


But my requirement is to set the material specification for MIC (QM) while entering the sales order.


our product is configurable and the specification changes based on Sales order characteristics. for example. if the required length is 50 Meter, we can produce +- 5 % of 50 Meter which is allowable from quality point of view.


I want to setup the dependency to calculate the specification of a particular order for example for 50 Meter, it will be (47.5 -52.5). this characteristics is assigned to MIC in QS22 so on GR from production inspection will get this specification for this order.


Please let me know how can we do it because we can not specify the interval in advance as its based on sales order characteristics values....



regards

CR



Flavio
Active Contributor
0 Kudos

Hi Cristina,

Thank you for clarifying the scenario.

I would say that, in such a case, using two separate characteristics (one for length_minimum and the other for length_maximum) could be a possible solution.

Thanks and bye,

Flavio

Former Member
0 Kudos

Hi Cristina,

You can try this and see if this works.


As Flavio said, create two additional characteristics; Length_Lower_Limit and Length_Upper_Limit, both of NUM data type.


Write a procedure as below;

$SELF.Length_Lower_Limit = Length - Length * 0.05,

$SELF.Length_Upper_Limit = Length + Length * 0.05

With this you will get minimum and maximum limit values.

Later, using variant function see if you can concatenate these two derived values into another characteristic, say Length_Limits, using a Hyphen, so it will be 47.5 - 52.5 (I have not tried this before).

But you will end up creating 4 characteristics.

This is a little tedious, also not sure how appropriate this would be for you.

Thanks & Regards

Adithya

Former Member
0 Kudos

Adithya

I already used a function and did this lower and upper limit calculation in function and send it to my characteristics.

Function is computing value and sending it to characteristics but its not updating, that is the reason i am looking for syntax to update Interval using dependencies instead of function

I am sure there should be a way

Flavio
Active Contributor
0 Kudos

Hi Cristina,

I've found these two OSS notes that may be useful:

2005030 - Not possible to use dependency to infer interval values for characteristic

119708 - QM: No Intervals Can Be Derived in Configuration

Hope this could be of some help.

Thanks and bye,

Flavio

0 Kudos

Hello Christina,

a variant function can never return an interval. The only solution for your Problem is to Setup two characteristics like length_min and length_max and use both characteristics in QM.

Maybe you should go with another solution?

In material master (work scheduling view) you can define the tolerance for over and under production. If you set these two fields to 5% for the material in question, your Problem might already be solved. In Transaction OPK4 you can control if the tolerance is checked at all, and if you receive a warning or an error.

Regards,

Karlheinz

Ritz
Active Contributor
0 Kudos

Cristina Rooka,

Please check your characterstic Length have numeric format.

Also while writing syntex, please take care you do not have double space or any unwanted ;': etc in syntex.

Correct is LENGTH IN (5 - 10).

incorrect  LENGTH IN ( 5 - 10 ) as it space between ( and 5.

Add . for the last line in syntax, add , for new line.

Thanks

Ritesh

ravi_kumar204
Active Participant
0 Kudos

Hi Cristina Rooka,

Refer below link for syntax

Entering Intervals - Variant Configuration (LO-VC) - SAP Library

Regards

RaviKumar

Former Member
0 Kudos

RK I have gone through this content and got error while following it. I dont know if I am missing any thing.

CR

Flavio
Active Contributor
0 Kudos

Hi Cristina,

Would it be possible for you to share the dependency code?

It will very likely help to understand where the syntax error is.

Thanks a lot and bye,

Flavio