Adding EDI Components to the Mapping
To map data to or from EDI files, the EDI component must be added to the mapping first. The EDI component represents the structure of the EDI message (or messages) on the mapping. Once the EDI component is added to the mapping, you can draw mapping connections to or from it, similar to any other component types supported by MapForce (see Working with Components). When necessary, you may also configure the EDI component to include multiple messages. This would enable you to read data from multiple EDI files (one message per file), as shown in Processing Multiple Input or Output Files Dynamically, or process different message types within the same file.
To add the EDI component to the mapping:
1.On the Insert menu, click EDI.
2.Click the EDI collection, and select the check box next to the message type that you want to include. You can also include multiple messages, by selecting their corresponding check boxes. For example, in the image below, two messages of the HL7 collection are being added to the mapping.
3.Click OK. You are now prompted to supply a sample EDI file.
4.If you want to read data from the EDI component, browse for the sample EDI file; otherwise, click Skip.
The component now appears on the mapping, and it includes the structure of both messages selected previously. If you want to add additional messages, or remove existing ones, click the button that appears next to the first message.
Sample HL7 mapping component which includes two messages
You can now draw mapping connections from this EDI component to a target one, or vice versa. Several MapForce mapping design (.mfd) files that illustrate mapping data to or from various EDI flavours are available in the <Documents>\Altova\MapForce2023\MapForceExamples\ folder: