Sorting and Grouping Line-item Reports


The sorting function rearranges the rows of line-item reports according to the contents of one or more selected data columns (which we call the sorting columns). You can rearrange these rows in either alphanumerical (for example, A to Z or 1 to 1000) or reverse alphanumerical order in one of two ways.

The first method makes use of the Sort ascending (A) and Sort descending (B) buttons (Figure 14.3). We demonstrate their use in the next three examples.

Figure 14.3. The Sort ascending (A) and Sort descending (B) buttons.


Example 1: Single-Column Sort of a Line-item Report

Our first example demonstrates a single-column sort on the output of the Cost Center Actual/Plan/Variance (A/P/V) transaction[1] (Figure 14.4). This transaction displays the budget of a department (or cost center) in a line-item format.

[1] We have not used the transaction code in this name because it is very long and clumsy: S_ALR_87013611.

Figure 14.4. The default output of the Cost Center Actual/Plan/Variance transaction, with the rows sorted in order of increasing cost element code.


Each row of the A/P/V report shows the budget for a single cost category or cost element, which is identified in its first column (Figure 14.4). Each row displays the actual and planned costs for a cost element and the difference or variance between them in dollar values and percentages. The report is organized in order of the cost element code, which ranges from 400000 to 799000. This sorting column (the first) is automatically highlighted to distinguish it from the other data columns.

We can sort the contents of this line-item report according to the contents of another column by using the Sort ascending and Sort descending buttons in its application toolbar (A). For an example, we can rearrange the rows in order of their actual costs, with those rows with the highest costs at the top of the report and those with the lowest at the bottom, by following this two-step procedure.

Procedure: Single-Column Sort of a Line-item Report

Step 1.

Click the header of the Actual costs column (Figure 14.4B) to select and highlight it.

Step 2.

Click the Sort descending button.

This procedure reorganized the report so that its rows are organized in order of descending actual costs (Figure 14.5). In addition, it placed a sort-descending icon in the header of the Actual Costs column (A) to indicate that the report is arranged in that order.

Figure 14.5. The customized output of the Cost Center Actual/Plan/Variance transaction, with the rows sorted in order of descending actual costs.


Example 2: Multiple-Column Sort of a Line-item Report

This second example demonstrates a multiple-column sort on the output of the IH08 transaction, which displays data about equipment in a line-item format. The rows in the default version of this report are organized in order of the equipment code, which appears in the first column (Figure 14.6).

Figure 14.6. The default output of the IH08 transaction, with the rows sorted in order of increasing equipment code.


We can rearrange this report so that the rows are organized first in order of increasing equipment code (we will call this the "primary sorting column"), then in order of increasing construction year (we will call this the "secondary sorting column"), by following this next procedure.

Procedure: Multiple-Column Sort of a Line-item Report

Step 1.

Click-and-drag across the headers of the sorting columns (if they are next to one another) to select and highlight them (A).

Note: When you use this method, the first (left) column becomes the primary sorting column, the second becomes the secondary sorting column, and so on. See the next lesson for instructions on rearranging the orders of columns if it is necessary.

or alternatively

Press and hold the Ctrl key on your keyboard, click the headers of the sorting columns to select and highlight them, then release the Ctrl key.

Note: When you use this method, click the primary sorting column first, the secondary sorting column second, and so on.

Step 2.

Click the Sort ascending button (B) in the application toolbar.

This procedure had three effects on the line-item report (Figure 14.7):

  • It clustered all the rows with the same equipment code into groups (A), and sorted the groups in order of increasing code.

    This grouping occurs automatically whenever there are rows with the same data in the sorting columns.

  • It clustered all the rows in each group with the same construction year into subgroups (B), and sorted the subgroups in order of increasing year.

  • It placed icons in the headers of the Equipment and Construction Year columns (C) to indicate that they are sorted.

Figure 14.7. The customized output of the IH08 transaction, with the rows grouped and sorted by model number and construction year.


Example 3: Single-Column Sort of a Hit List

This third example demonstrates the method of sorting the hit lists of search screens.

Search hit lists are usually displayed in a line-item format, and occasionally you will see the Sort ascending and Sort descending buttons somewhere on their screens (see Figure 13.13 on page 163 for an example). When this occurs, you can use the same procedures that were described in the last two examples to rearrange their contents.

When the hit list screen does not display these two buttons, you can still rearrange their contents by simply double-clicking the header of a data column.

For example, the hit list for a search for plant codes is a two-column line-item report (Figure 14.8A). However, it is organized in order of the plant code, and the plant names are randomly organized. When you scroll through the hit list, it is hard to find a plant by its name because of this lack of organization.

Figure 14.8. The hit list for a plant code search, in the default order (A) and reorganized in order of plant name (B).


You can solve this problem by double-clicking the header of the Name column: One double-click reorganizes it in alphabetical order (B), and a second click reorganizes it in reverse alphabetical order (not shown here).

We described the means of reorganizing the line-item reports of output screens and hit lists here. You will also find line-item tables on the screens of some create, display, and change transactions. They can be reorganized in the same manner.

For instance, the initial screen of the ME51N transaction, which creates requisitions for materials and services, contains a line-item table for entering data about those items (see Figure 9.3 on page 106). This table has its own application toolbar, which includes the Sort ascending and Sort descending buttons. You can use them in the same way that you would use them on an output screen.




SAP R. 3 for Everyone. Step-by-Step Instructions, Practical Advice, and Other Tips and Tricks for Working with SAP
SAP R/3 for Everyone: Step-by-Step Instructions, Practical Advice, and Other Tips and Tricks for Working with SAP
ISBN: 0131860852
EAN: 2147483647
Year: 2003
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net