cancel
Showing results for 
Search instead for 
Did you mean: 

sort function for multiple value assignments

former_member602203
Participant
0 Kudos

Hi EHS Guru's

is there a basic setting, customizing, env. parameter, userexit or something else to control the sort function (ascending or descending) for multiple value assignments within the value assignments in CG02??? I would like to switch off these feature...

christoph_bergemann
Active Contributor
0 Kudos

Dear Holger

can you please explain little bit on the "business reason"? This feaurre (you are talking about) is only for "display" purposes and it can be really helpful in CG02; there is no other functionaliyt related to it (e.g. you do not ! a resort of data in the data base by using this display option

It is part of a "ALV" like screen; and "ALV" options are only "display" options

C.B:

Accepted Solutions (1)

Accepted Solutions (1)

former_member3035
Participant
0 Kudos

@Holger Hartung Hello,

You need to separate the UOM from your character - If your UoM is automatically picked - In your case it is % when you press Enter - Then it will autom bring the lower value in first and higher value at the second position as so on..

So - To accomplish your requirements - Separate the UoM from your Character - Then it will allow you to enter and save your values in any order.

Thanks

Answers (7)

Answers (7)

christoph_bergemann
Active Contributor
0 Kudos

Dear Holger

now we know your problem/question etc. Up to now your explanation was not "straight forward"

We need now to discuss "deep". let us check the "characteristic" topic

1.) a characteristic is part of a EHS class (class 100)

2.) a characteristic can have a number of "definitions". Most common is:

a.) phrase based

b.) table driven

c.) value with UOM (with or with out negative values; with or without interval)

One as well "common" characteristic is the "free text" one.;

based on your picture: this is now what i would assume

1.) you have a characteristic having an assigned uOm (%)

2.) you have defined the characteristic have "multiple" values; the value "20%" is one value and 30%" the other; and the characteristic is not "interval based"; for interval: you could just enter like "20 - 30"

Honestly: nether tried to maintain like 30 - 20 (so the other way around): but i believe: as long as you have an "assigned" UOM Sap will always sort ...; if you change the characteristic to "free text" and just enter the text (YOU MUST ENTER THE FULL TEXT AS WRITTEN NOW): e.g. "30 %", "20 %" I would assume SAP will not sort (as a free text is a free text) but then you loose some other nice features; but the threads i found indicate even problems if you have a "CHar" based characteristic; so SAP is always sorting (refer to the threads below)

I am not aware of a "work around" if we have a "UOM" related characteristic; nether investigated here.

C.B.

PS: e.g. https://sap4tech.net/sap-classification-characteristic/

PPS: seems to be a "related" thread (not sure): https://answers.sap.com/questions/6809823/prevent-characteristic-being-sorted.html

https://answers.sap.com/questions/9001543/sort-rule-on-characteristic-value.html

https://answers.sap.com/questions/6665801/automatic-sorting-of-characteristics-values.html

https://answers.sap.com/questions/7775032/sorting-of-characteristics-values.html

One quite good document is this: https://www.consolut.com/fileadmin/user_upload/SAP_PrintDoku/en/CACLCHR/CACLCHR.PDF

Of interst could be chapter "Creating a User-Defined Data Type"

former_member602203
Participant
0 Kudos

Sorry Satya,

my last answer/comment was not correct. Here the problem in pictures:

first I enter two values, but after pressing ENTER it will be sorted automatically. I would like to have values in same way like insert.

satya11719
Active Contributor
0 Kudos

Hello Holger ,

Uffff ... After too many discussions you posted a query correctly, It is simple as that if the UOM present with the value it will do the sort, Or else it will not. In customized char's you can do the sorting, But in SAP standard it cannot be done.

Please post the query with pictures , cause your explanation in words bit deviating from the topic.

Thanks

Satya

satya11719
Active Contributor
0 Kudos

Hello Holger,

Are you talking about Value assignment instance or Characteristics or Value assignment tab?

You are stating that entering a value "if i understand correctly it will be in characteristic , we cannot do the sort sequence for these entries.

But still it can be achievable with ABAP custom coding , but it will give you night mare in data migrations.

Hope it helps ...vat.pngchar.png

Thanks

Satya

former_member602203
Participant
0 Kudos

Hi EHS experts,

my original question is might easier than experted.

I have two value assignments with sort# 1 and 2. I know, if these sort# is sorted ascending. If I change this sort# the SAP autom sort them new.

My question is, if I enter a value e.g. 22N in sort# 1 and a value like 11N in sort# 2, the SAP autom. set the value 11N from sort# 2 to the first sort# 1 and so one... These is what I would like to change.

christoph_bergemann
Active Contributor
0 Kudos

Dear Holger

we have "default SAP set up" and we have "exits and Badis" in the game and we have huge number of other customizing options. This is a "huge story".

So i try to make it short:

1.) ANY screen which you see if you use "Cg02" (the "Tabs" in one VAT / property) can be "exchanged" by a "customer"specific screen

2.) If you know SAP history: this is what SAP as such has done with some release. In the "old" times the screen for "compositions" and for "spec listing" was different in compairosn of "today" version

3.) we can see some "parallel" discussion (e.g. the "switch" between "horizontal an vertical look and feel") (https://answers.sap.com/questions/640776/ingredients-are-not-sorting-in-composition-section.html; further discussion was running regarding some "sort" in "composition" TAB strip (sorry: could not find the thread https://answers.sap.com/questions/11947005/sap-ehs-specification-workbench-how-to-make-value.html)

4.)If you create a new data record in an "empty" VAT it will get sort seq "1"; if you create the next it will get "2" and so on. Here by default SAP "sorts" that (if you use CG02 and enter the corresponding screen)

Using the many extension options: by potential clever user of "user values" (which are stored in the profile) this "standard" behaviour can be influenced. You have huge number of options to do so (refer above)

If this option is really helpfull.. this depends on your "blueprint" (describing the "exact demand)"

If you will really "add value" for the user: i can not decide; from "Support" perspective: you add "complexity"

C.B.

E.g. check these threads:

https://answers.sap.com/questions/12696498/limited-number-of-assessment-within-vats.html

https://answers.sap.com/questions/12708034/add-material-number-in-cg02-hit-list-display.html

PS: I assume you are referring to the "sort" options in screen. Here we have an "icon list" of "Sort, filter etc." And as explained above: you can do it "different" (using customer specific set up)

E.g. in https://answers.sap.com/questions/12488130/add-tab-at-cg02-with-image.html there was some may be interesting discussion; at list the "icon list" is shown

First Icon; Swith vertical/horizontal display; the the "sort" Icons: This screen (as explained above) can be "easily" exchange by a "comany specific" on (at your own risk!)

Easy does mean: we have exactly om customzing activity which is used to do so; the "But" is: if you exchange the "default" screen: you are 100% responsible for the ABAP code part; but it is possible !

former_member602203
Participant
0 Kudos

HI Satya,

yes, if I enter in descending order, SAP sort autom. ascending after entering (press enter). I thought there is no chance to change...

christoph_bergemann
Active Contributor
0 Kudos

Dear Holger

by "default" SAP creates data records with "Sort" numbers which are shown in the screen; if you use CG02 the display is starting always with "1"; there is only one "but": i believe: you can (as an user) create two (or more) data records with "1"; At least yu can do so in standard EHS import;

This sorting does not have any "further on" function. In the several subscreens you can use "ALV" options to "filter", "hide/shwo columns" etc. Sometimes these ALV options are helpful; But if you have only one data record (e.g. like for color): there is no real use for this "ALV" story

C.B.

satya11719
Active Contributor
0 Kudos

Hello Holger,

It depends on how enter characteristics in the class , if you input them in descending you can see them in descending.

But you cannot separately descend or ascend in CG02 screen.

Thanks

Satya