This documents gives the details of outbound and inbound processes of Conversion of IDocs from or into e-mails
IDocs can be exchanged via the Internet with any system which has an e-mail address.
Structure of an e-mail
An IDoc e-mail contains the IDocs as an attachment in MIME format (Multipurpose Internet Mail Extensions).
The attachment has the document type R3I and can contain either references to IDocs (IDoc numbers) or IDoc data. The IDoc interface provides two function modules for converting to and from these two formats.
Within the R/3 System, the attachment always contains references to the IDoc data. Outside the R/3 System, the data itself is in the attachment.
A mail, which only carries a set of IDoc numbers as an attachment at first, is generated from the port definition parameters. This e-mail is transferred to the function module SO_OBJECT_SEND, which in turn, determines how the message is to be sent from the Business Workplace.
For that purpose, the Workplace calls the function module EDI_IDOC_R3I_OUTGOING, which returns the IDocs (control record and data records) in R3I format, that is, as a table with the structure SOLI. SAPconnect sends this table to the SAP Internet Mail Gateway, which sends the data via the Internet in MIME format. The gateway uses the program sendmail, which is already available under UNIX but must be installed for use with Windows NT .
Alternatively, SAPconnect can activate the MS Exchange Server or a different gateway, which is then responsible for sending the data via the Internet.
The gateway (for example the SAP Internet Mail Gateway) uses RFC to call the SAPconnect function module SX_OBJECT_RECEIVE, which receives the e-mail in MIME format. The mail is transferred to the Workplace function module SO_DOCUMENT_RECEIVE_API1.
The Workplace calls the function module EDI_IDOC_R3I_INCOMING, which converts the data from R3I format to IDoc format and starts IDoc. However, it is a prerequisite that the mail recipient of the EDI inbound distribution is assigned .
The IDocs are either generated and processed completely or not at all. For this purpose, EDI_IDOC_R3I_INCOMING is called as a separate work process, so that database changes can be reset separately
(rollback) if errors occur during IDoc generation or processing.
As a return value, the Workplace receives a table which contains the IDoc numbers and the name of the inbound folder in which the mail should be stored. This folder is determined from the IDoc administration table .