Show TOC

Sort CriteriaLocate this document in the navigation structure

Use

Before you start reading an internal table, you can tell SAP Smart Forms to sort it. With the sorting, you can divide the table into different sort levels:

This allows you to bundle data records and to display subtitles or subtotals at the beginning or end of a sort level.

Integration

To determine the sorting of your internal table, use the Data tab of the table or loop node. In the Sort Criteria group box you can enter the fields by which to sort the table.

The sequence in which you enter the field names into the table control determines the sort sequence. To change it at a later time, use the black arrows above the control. Use the radio buttons to choose whether to sort the field in ascending or in descending order.

If you want to display data before or after a sort level, mark Event on Sort Begin and/or Event on Sort End. In the navigation tree, an event node appears for which you can create inferior nodes. In these inferior nodes you specify the data you want to display at this event (for example, subtotals).

Caution

Due to technical reasons, SAP Smart Forms cannot recognize whether an internal table was sorted before (for example, before passing it at the form interface). If it was sorted and you want to use the output events, you must still enter the sorting into the table control and, in addition, mark Already Sorted.

Activities
  1. Determine your sort criteria.

  2. Specify the output you want to have with the inferior nodes of the relevant event node. For example, you can do calculations with the data of the sort level and display the result here.