In the component
Material Sorting
the system prints material items in a document in the sequence which you defined for them in Customizing. The system sorts the material items in a document when it prints the assigned form.
Material Sorting
groups material items according to different criteria and enables the customer-specific display of material items on a print form.
You have to define in Customizing the forms for which material sorting is to be carried out. You make
all
the settings for the
Material Sorting
component in Customizing. You do not have to execute any other functions in the system. Depending on your Customizing settings, the system displays the sortings on the assigned forms.
To use the full range of material sorting functions, you have to make settings in the following parts of Customizing:
Sort Variants
Material Sorting: Sales Documents
Material Sorting: Shipping Documents
Material Sorting: Groups
Material Sorting: Invoices
Note
The system uses the material sorting variant to control the sorting of the output data in a print form (for example, an invoice). A material sorting variant can consist of up to six sort fields.
Before you can assign a material sorting variant to a form,
the form concerned must be available in the system
you must create the sort variants in Customizing.
Input help and input verification are available for all these activities.
From the Implementation Guide (IMG), choose:
You can assign a sort variant, which determines the sort sequence in the form, to every form. Each sort variant can have up to six table fields. The description of the individual fields defines the criteria according to which material sorting can be performed in the document. The fields either come from the document item table (for example, VBRP) or from the material master (for example, MARA). The corresponding data must be available in the respective print program. The system performs sorting for main items and appends the relevant subitems to the corresponding main item again once sorting is successfully completed. The system assigns an additional item number to the sorted items and places the sorted items back in the print structure.
The system provides a header element and a totals element for every sort criterion:
The header element contains the name of the criterion and the current feature.
The totals element posts the totals for value and quantity (for each unit of measure) for each sort feature.
When you change groups in the sort criteria, the system prints the totals line and the subordinate header lines at the level on which the change was made. The system also prints the header line for the new value that triggered the change, and the subordinate header lines.
The system has an internal counter at each sorting level that specifies the number of values for each sort criterion. These counters are used in the form to prevent printing lines from being printed if the number of corresponding document items is too low.
You distribute various beverages (beer, wine, soft drinks and so on) and deliver the following purchase order to a customer:
Material |
Quantity (litres) |
Value (dollars) |
---|---|---|
Beer brand A |
10 |
10 |
Beer brand B |
20 |
50 |
Beer brand C |
25 |
40 |
Wine brand D |
50 |
120 |
Wine brand E |
30 |
100 |
Wine brand F |
100 |
200 |
Soft drink brand G |
20 |
15 |
Soft drink brand H |
300 |
200 |
Soft drink brand I |
750 |
800 |
On the invoice, in addition to listing the quantities and values of materials A to I that were delivered, you also want to list the materials according to material groups. Material sorting makes the automatic grouping of the materials according to the material groups Beer, Wine and Soft Drinks possible. You obtain a list of the material groups in which you are interested according to their total quantity and their total value.
Material |
Total Quantity (litres) |
Total Value (dollars) |
---|---|---|
Beer |
55 |
100 |
Wine |
180 |
420 |
Soft Drinks |
1070 |
1015 |