Manage Sorting Orders

In this document the creation of user-defined sorting orders in different programs is described. The sorting order determines the sorting order of the fields and the search capabilities displayed on the panel.

Outcome

A user-defined sorting order will be created. One or several views will have been connected to the sorting order.

Sorting orders are stored in the CSYVIU table. Sorting orders are connected to sorting options, views and selection tables.

Using sorting orders enables you to display only the piece of information that you will need.

Before you start

A view must have been created. See Manage Views.

Follow these steps

When creating a sorting order, you can choose whether you want to start using it in a program or directly in 'Sorting Order. Open' (CRS022).

In some programs, you have the possibility of creating selection tables in 'General Selection Table. Open' (CRS023) and 'Selection Table. Select Fields' (CRS026).

  1. To create a sorting order, open the 'Sorting order. Open' (CRS022/B) panel.

    Another way of launching (CRS022) is to press F4 twice in the 'Sorting order' field of the program in which you are working, such as 'Delivery. Open Toolbox' (MWS410).

  2. If you have started on the (CRS022/B) panel, fill out the 'Program' field and press Enter.

  3. Define a sorting order in the 'Sorting order' field. Press Enter.

  4. Specify values in the 'Description' and 'Name' fields on the (CRS022/E) panel.

  5. In the 'Sorting Option' field on the (CRS022/E) panel, press F4 twice to open the 'Sorting Option. Open' (CRS021/B) panel.

    To create a user-defined sorting order, you must create (or select) sorting options in (CRS021). In addition, select the number of filters in (CRS022) and the views in 'View. Open' (CRS020).

    To create a sorting option, go to step 9.

  6. On the (CRS022/E) panel, fill out the 'Number of filters' field.

    The field indicates the number of key fields that will act as filters in the selected sorting option. The fields are selected starting from the first field and then field by field throughout the key definition.

    Note: A value must be entered in fields that work as filters if the record should be displayed.
  7. In the 'View' field on the E panel, select the desired views for your sorting order by pressing F4 twice. This opens the 'View. Open' (CRS020/B) panel. Select your desired alternatives and then press Enter.

  8. Pressing Enter opens the (CRS022/E) panel and your selected view will be displayed. Continue to the next view field to have several views from which to choose. You may select up to six views for your sorting order.

    If you want to create a view of your own, see Manage Views.

  9. To create a sorting option, click in the 'Sorting Option' field on the (CRS022/E) panel and press F4 twice to open the 'Sorting Option. Open' (CRS021/B) panel.

  10. On the (CRS021/B) panel, define a sorting option in the 'Sorting option' field and then press Enter.

  11. Specify values in the 'Description' and 'Name' fields on the (CRS021/E) panel.

  12. In the 'Key' field, press F4 twice. On the 'Field Group. Display Permitted Fields' (CRS109/B) panel, select the fields that you want as sorting fields.

  13. On the E panel, there could also be 'Descending' fields or 'Aggregation' fields, depending on which file you make sorting options for.

    The 'Descending' field controls whether or not sorting of the field values should be descending.

    The 'Aggregation' field indicates whether to aggregate the records in the list view. The valid alternatives are:

    0 = No. Display detailed.

    1 = Yes. Aggregate if the information in the selected fields matches.

    Note that times and quantities are totaled during aggregation.

  14. In the 'Field' column on the (CRS021/F) panel, define which database fields to use. Press F4 twice and choose among the fields on the 'Field Group. Display Permitted Fields' (CRS109/B) panel. In the 'Value' field, specify which values to test. 'Select/Omit' shows whether these values should be included excluded.

    By limiting the fields and values in this way, the record will be displayed faster than it would have been without a selection.

  15. Raise the status of your recently created sorting option by choosing alternative 20='Activate' on the (CRS021/B) panel. Press F5='Refresh' to display the new status.

  16. On the (CRS021/B) panel, select the sorting option that you created. Press Enter and the (CRS022/E) panel will be redisplayed.

Parameters to set

Program ID/ Panel Field The field indicates …
(CRS022/B) Sorting order …the currently selected sorting order in use. Each sorting order contains a suggested column layout and sorting sequence, plus an optional setup of selections. Press F4='Browse' to browse the available sorting orders. User-defined sorting orders can be defined in addition to the standard sorting orders.
(CRS022/B) Program …the program in which the sorting order is used. See the field help for valid programs.
(CRS022/E) Sorting option …the ID of a unique setup used to sort a file. Sorting options can be used to create user-defined sorting orders. The sorting is controlled by selected sorting fields and by how they are related to each other.
(CRS109/B) Key field …the fields that are used to create search paths for user-defined tables. These fields are also used to create the contents of user-defined files.
(CRS021/E) Descending …whether sorting of the key field should be descending.
(CRS022/E) Number of filters

…the number of key fields in the selected sorting option that should act as filters. The fields are selected starting from the first key field and then field by field throughout the key definition.

A filter is used to make field selections. If the record should be displayed, a value must be entered in the filter.

(CRS022/F) View 1-6 …the view that is in use. Views are user-defined and determine the sorting order and the column layout.

If sorting option is used (SOUS = 2), additional parameters are shown.

Related topics