
Optional Supplementary Segments
Use
You define optional supplementary segments in format trees for
incoming files to identify a data record that corresponds directly to the previous record, but which is not mandatory in the file.For instance, a file may contain payments per business partner, and sometimes a note to payee is included with the payment. You represent the payment with a payment segment, and the note to payee with an optional supplementary segment.
Activities
You create a supplementary segment as a normal segment, and assign it a reference ID and the same level as the segment it is to correspond to. Then, in the segment that the supplementary segment corresponds to, you enter the supplementary segment's reference ID on the Opt. Supplem. Segments tab; the system then knows that the two segments belong together.
You also need to enter optional supplementary segments in the assignment rules in the
header data.Example
To illustrate how optional supplementary segments work, refer to the template format tree SAP_EXAMPLE (tree type MCSH). It contains the following segments, with the note to payee being an optional supplementary segment to the payment:
|
Segment |
Reference ID |
Level |
|
Header record |
HEADER |
1 |
|
Business partner |
BUPA |
2 |
|
Payment record |
PAYM |
3 |
|
Note to payee |
VWZW |
3 |
|
Trailer |
TRAILER |
1 |
Assume your incoming file contains the following data records:
HEADER------------------------------------------------
BUSINESS PARTNER------------------------------
PAYMENT 1-------------------------------------------
PAYMENT 2-------------------------------------------
NOTE TO PAYEE------------------------------------
PAYMENT 3-------------------------------------------
Based on the format tree, the DME Engine reads the payments of the business partner and writes them to the converted file. For payment 2, it recognizes that a note to payee is included, and writes it together with the payment record.