Skip to Content

sort function for multiple value assignments

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...

Add a comment
10|10000 characters needed characters exceeded

  • 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


Related questions

8 Answers

  • Best Answer
    Posted on Oct 22, 2019 at 05:55 AM

    @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.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2019 at 07:52 AM

    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.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 18, 2019 at 04:14 AM

    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...

    Add a comment
    10|10000 characters needed characters exceeded

    • 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


  • Posted on Oct 19, 2019 at 10:56 AM

    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") (; further discussion was running regarding some "sort" in "composition" TAB strip (sorry: could not find the thread

    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"


    E.g. check these threads:

    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 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 !

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 20, 2019 at 05:32 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 05:49 PM

    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



    vat.png (18.9 kB)
    char.png (38.1 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 06:09 PM

    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.

    before.png (28.5 kB)
    after.png (29.0 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • 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.



  • Posted on Oct 21, 2019 at 06:22 PM

    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.


    PS: e.g.

    PPS: seems to be a "related" thread (not sure):

    One quite good document is this:

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.