SAP IDoc

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Data Sources and Targets > EDI >

SAP IDoc

SAP IDoc (intermediate documents) documents are used to exchange business data between SAP and non-SAP applications. The documents are a form of intermediate data storage which can be exchanged between different systems.

 

An IDoc is structured as follows:

 

Control Record: contains control information about the IDoc: sender, receiver, message type, and IDoc type. The control record format is similar for all IDoc types.
Data Segment: contains the actual data of the segment as well as other metadata: header, segment no. and type as well as the fields containing the data.
Status Records: contain info on the current status of the document, i.e. the currently processed stages, and the stages that still need to be processed. The status format is identical for all types of IDoc.

 

The version number in the port definition defines the systems you are communicating with. The major differences between the versions are the various name lengths used in the various elements and the use of extensions. SAP R3 version 4.X supports long names (as well as extensions) while the previous versions do not.

 

Port Version 1: Releases 2.1 and 2.2.

Port Version 2: Releases 3.0, 3.1 and R/2 systems.

Port Version 3: Release 4.x (default value)

 

MapForce treats IDoc components as fixed-length files of length 30 char for Message type, 30 for IDoc type, and 27 for segment fields.

 

For an example which illustrates mapping data from SAP IDoc to XML, see <Documents>\Altova\MapForce2019\MapForceExamples\IDoc_Order.mfd.

 

 

To add an SAP IDoc document as mapping component:

1.Select the menu option Insert | EDI. This opens the Browse EDI collections dialog box.
2.Click the SAP IDoc entry in the list box.
3.Click Browse and select the IDoc parser report (also known as "IDoc definition file").

The IDoc parser report is created from the SAP system using the transaction WE60 ("Documentation for IDoc types"). Note that the file must be exported from SAP in uncompressed format. For information on how to invoke transaction WE60 and generate the parser report, refer to the SAP IDoc documentation. The MapForce Examples folder includes a sample parser report file (see <Documents>\Altova\MapForce2019\MapForceExamples\ORDERS01-Parseridoc.txt).

dlg_sapidoc_browse

4.Click OK. MapForce prompts you to optionally select a sample EDI file.

dlg_edi_browse_instance

5.If you would like to map data from an IDoc file, click Browse and select the IDoc (*.idoc) file that supplies the data. A sample IDoc file is available in the MapForce Examples folder (see <Documents>\Altova\MapForce2019\MapForceExamples\ORDERS.idoc). Otherwise, click Skip.
6.The Component Settings dialog box is displayed. This enables you to review the settings of the IDoc component before adding it to the mapping. You can change these settings at any time later if required (see Changing the Component Settings).

dlg_connection_settings_sap_idoc

7.Click OK to close the Component Settings dialog box and add the IDoc component to the mapping area.

© 2019 Altova GmbH