Example: Document Split
Assume that you have revaluated a large number of materials. The system has generated a document with hundreds of line items to debit the material accounts and credit the gains and losses on material revaluation account, as follows:
Material Price Adjustment Document

The first pair of items (RUB 10,200) records an increase in the value of material NSR-001; the second pair of items records an increase in the value of material ZTV-883; and so on. Each pair of items is thus related to a particular material. The material number is stored in every line item.
In Customizing, you have specified that material price change documents are to be sorted and split according to material number.
The program sorts all of the line items by material number.
In this case, the original order does not change, since the line items are already in that order anyway.
The program then starts on the split.
It first checks the material number of the first line item, NSR-001, and of the second line item, also NSR-001. So it places them in the same document, as follows:
First Pair

The program checks the third item.
Its material number is different, so the program closes the first subdocument and opens a new subdocument, for ZTV-883.
The program checks the fourth line item.
It has the same material number, so it also goes in the same document:
Second Pair

The program continues in the same way with all other line items until it has processed them all.
Note
Once a subdocument is closed, the program does not add any new items to it. So if in this example the program were to find another line item with the material NSR-001 (if the sort sequence were different), it would not add it to the document created in step 2. It would start a new document instead.
The program passes each subdocument to the main offsetting account determination algorithm for processing.