SAP IDoc
The SAP(IDoc) connector can use either the relevant SAP IDoc definition file exported from the SAP applications or the XML IDoc schemas downloaded from SAP to parse and build SAP (IDoc) files. Using a sample SAP (IDoc) data instance is optional. For information about SAP, see
https://www.sap.com/index.html.
SAP (DMI) with ODBC
The SAP Data Migration Interface (DMI) is a defined interface published by SAP; it defines how import files are to be laid out, so that the DMI can load them into the various SAP modules. The import files are flat files, with multiple structured schemas.
The Connect Premium for SAP ODBC driver and Connect ADO provider are designed to use the appropriate BAPIs and RFCs in a production SAP system. This provides full read/write transactional capabilities through standard open interfaces.
Map Editor supplies SAP DMI layout dictionaries that make mapping any Source into the SAP DMI easy. Look in the Common directory for the Connections folder, then open the SAP folder. Many .djd (dictionary files) are included in the SAP folder for your convenience.
To access a SAP DMI file with ODBC, see
ODBC 3.5.
Using the SAP (IDoc) connector
SAP IDocs are proprietary layout definitions corresponding to common business transactions such as purchase orders, invoices, material master information and more. They are published as XML schemas and are used as templates in Document Schema Designer. SAP IDoc XML metadata schemas are available for download directly from the SAP Interface Repository. For more information, see
https://www.sap.com/index.html.SAP IDoc internal metadata definitions are exported from SAP applications as text files.
SAP Interface Repository and IDocs
SAP XML IDocs are available from the Interface Repository located at ifr.sap.com. The site is organized by Module and SAP release number. Navigate to the appropriate Module and select the relevant release number to scroll through a list of available IDocs. SAP employs a naming convention that relates the IDoc to its business function and its release version. Download links and documentation are accessed from this list.
IDocs are configured and linked to programs designed to process the application events associated with a specific document in an SAP system. Follow the steps below to transfer the downloaded IDoc to your local default installation directory for use with Integration product software.
Transferring an IDoc to Your Local Default Folder
SAP IDocs should be stored in the installation directory in a SAP subdirectory. The path is InstallDir\Common\LegacyMetadata\SAP.
After you download and unzip the IDoc, save it to this directory.
IDoc Schemas
IDocs consist of segments and fields within those segments. Each IDoc must include one control record (Header Record - EDI_DC40). The Header Record contains transmission and processing information. Based on a profile set up in the ALE (Application Linking and Embedding) interface, the control segment informs SAP how to treat an incoming IDoc and what routine to follow to produce the expected result. In the case of outbound IDocs, the control record is generally not needed by the receiving system unless it is also SAP.
Segments that follow the Control Record make up the body of the business document. Six fields, called Data Control Segments, are found at the beginning of each segment. These six fields retain segment identification information and are not defined in the SAP IDoc schema. When you load the Source/target connector, these fields are added to the beginning of the Data Control Segment. The following table gives a description of these fields.
The fields that follow each Data Control Segment hold information that pertains to the specific business transaction.
In Map Editor, each segment of the IDoc is treated as an individual record type. This enables you to exercise complete control of each segment and means that you can decide where, when and how a particular segment is read or written.
"Complete control" also means that you can decide if a record is read or written at all. Many IDocs contain looping or repeatable segments. A looping segment may be hierarchically dependent on preceding segments or distinguished by a qualifier value, a common feature in many EDI (Electronic Data Interchange) formats. The Partner Information segment, for example, might be the vendor, customer, sold-to-party, ship-to-party, or some other partner. An IDoc may configure the Partner Information segment to repeat several times. The partner type qualifier value for Customer is "KU", so if the partner is a Customer, the "KU" value can be used to control the segment looping to write only one iteration.
Mapping IDocs
Schema File Required
You can obtain an SAP IDoc schema file (in W3C XML format) from SAP that contains the structure for your SAP IDoc file connections. If your SAP IDoc file structure is different, you may need to modify the template.
To make changes to an SAP IDoc template file
1. Import the file into Project Explorer as a text artifact.
2. Open the file in Project Explorer using the
Text Editor.
3. Make your changes.
4. Save the file with a different name.
To obtain a template file, contact your sales representative. These template files are standard schemas.
Connector Parts
Connector parts are the fields you configure to connect with a data source or target.
The settings that are available depend on the connector you select.
For a list of all parts for source connectors, see
Specifying Connector, Parts, and Properties.
For a list of all parts for target connectors, see
Specifying Connector, Parts, and Properties.
Property Options
You can set the following source (S) and target (T) properties.
Element Separator
This connector supports the following element separators:
• CR-LF
• STX (0001)
• SOT (0002)
• ETX (0003)
• EOT (0004)
• ENQ (0005)
• ACK (0006)
• BEL (0007)
• BS (0008)
• HT (0009)
• LF (000A)
• VT (000B)
• FF (000C)
• CR (000D)
• SO (000E)
• S1 (000F)
• DLE (0010)
• DC1 (0011)
• DC2 (0012)
• DC3 (0013)
• DC4 (0014)
• NAK (0015)
• SYN (0016)
• ETB (0017)
• CAN (0018)
• EM (0019)
• SUB (001A)
• ESC (001B)
• FS (001C)
• GS (001D)
• RS (001E)
• US (001F)
• SP (0020)
• ! (0021)
• " (0022)
• # (0023)
• $ (0024)
• % (0025)
• & (0026)
• ' (0027)
• ( (0028)
• ) (0029)
• * (002A)
• + (002B)
• , (002C)
• - (002D)
• . (002E)
• / (002F)
• : (003A)
• ; (003B)
• < (003C)
• = (003D)
• > (003E)
• ? (003F)
• @ (0040)
• [ (005B)
• \ (005C)
• ] (005D)
• ^ (005E)
• _ (005F)
• ' (0060)
• { (007B)
• | (007C)
• } (007D)
• ~ (007E)
• DEL (007F)
Supported Data Type
These are the data types of the fields in your target data table:
• boolean
• date
• decimal
• double
• float
• record
• string
• time
If you are writing to a new file, you may use any of these available data types from the list that appears when you click the arrow in the Type cell of a field.
If you are appending data to an existing file, the data type of each field becomes the data type in the file.
Last modified date: 02/01/2024