cancel
Showing results for 
Search instead for 
Did you mean: 

Count values

0 Kudos

Hello Experts,

I have a requirement for which I need to count how many values the user has chosen in a multi-value characteristic. Based on that number, I then need to open as many new characteristics.

The list of values for the multi-value characteristic is dynamic, coming from a function and custom table.

Thanks for helping me

Accepted Solutions (1)

Accepted Solutions (1)

Ritz
Active Contributor
0 Kudos

Flint Entrec,

If you have searched the forum you could have come across below thread its same as requirement you explained.please check.

Dependency code to count characteristics values

Also as suggested , in your case as the characteristic value is multi value and there are no fix values a dependency code to count parts will not work , only option i could see is using variant function, please check below link for more details on variant function.

User-Defined Functions - Variant Configuration (LO-VC) - SAP Library

You can create an function and call it in reference characteristic to calculate value of a characteristic.

Hope it will work for you.

Thanks

Ritesh

0 Kudos

Mentioned, previous post proved already to be of no avail, since it's still Not Answered and no explanation about any working solution is provided.

Link to the SAP Library is of no avail, too: in the restrictions section (page bottom), it's clearly written that:

The characteristics in a function that you refer to in a dependency must always be single value –

you can only refer to single-value characteristics in the interface.

Here, I am dealing with a multiple value characteristic, instead.

Any additional help is welcome, thanks.

Ritz
Active Contributor
0 Kudos

Flint Entrec,

If I have been at your place I would have consulted an ABAP resource and explored on option to use function module for fetching characteristic value of another characteristic and do counting.

hope you know the difference , I am not asking you to use function with variant table instead, check in characteristic value maintain tab for value option , you will see option to check value using FM.

Try to explore this option and share your result with forum so that next time when some one else face same can use your thread.

Thanks

Ritesh

Flavio
Active Contributor
0 Kudos

Hi Flint,

Actually, we could anyway try to use a variant function (even if the multiple-value characteristic will not be part of the function interface) and read the values assigned to the multiple-value characteristic by means of the FM CUPR_GET_VALLIST.

Here follows the documentation about it:

I am going to write a short example about it, in case it could be useful.

Thanks and bye,

Flavio

0 Kudos

Thank you for the positive answer.

Yes, an example will be very useful. Please provide us with it at your convenience. Thank you!

Flavio
Active Contributor
0 Kudos

Hi Flint,

I've just posted a document with an example, hope this could help.

Thank you and bye,

Flavio

Answers (0)