IDoc document-OpenText
IDoc document-OpenText
The Electronic Data Interchange (EDI) scenario in VIM is based on the standard SAP
document format Intermediate Document (IDoc). IDocs allow different application
systems to be linked through a message-based interface. The following list shows
some examples of how you can benefit from using IDocs:
• Business documents are exchanged in a structured way in order to process them
automatically.
• The various degrees of structural complexity as displayed by different
application systems can be reduced to a structure which is as simple as possible.
Example: The structure of an SAP application document and the structure of the
corresponding EDI message under the UN/EDIFACT standard.
• IDocs allow extensive exception handling before the data is posted to the
application.
To activate the IDoc processing for Business Center Inbound Configuration, you
must assign the corresponding processing function delivered with Business Center
in the Inbound Function Module configuration in the BD51 transaction.
Function module
/OTX/PF01_UTIL_IDOC_INPUT
Function type
Select Function Module.
Basic type
Enter the basic type, for example ORDERS01.
Message type
Enter the message type, for example Orders.
DirectionSelect
Inbound.
Description
Enter a meaningful description.
5. Click Save.
Process code
Enter the process code name.
Description
Enter a meaningful description.
Identification
Enter the inbound function module /OTX/PF01_UTIL_IDOC_INPUT.
Option ALE
Click Processing with ALE service.
Processing type
Click Processing by function module.
5. Click save.
6. Double-click Logical message in the Dialog Structure.
7. Assign the new process code to the logical message using the following
parameters:
Process code
Process code name as defined
Message type
Enter the message type, for example INVOIC.
8. Click Save
Partner No.
ID of the partner profile
Partn. Type
Partner Type: Enter LS for logical system.
Message type
Enter the message type, for example INVOIC.
5. On the Inbound options tab, enter the Process code that you created.
6. Click Save
Configuring the mapping
In an inbound process, when the IDoc hits SAP ERP, a predefined function module
is called to convert an IDoc to an SAP document. Some mapping is required between
the segment fields available in the IDoc and the internal fields that can be used to
create the SAP document.
In the EDI scenario, the following levels of mapping are available:
• The first level of mapping maps the IDoc data to Intermediate fields.
• The second level of mapping maps Intermediate fields to VIM fields (index
fields). The second level of mapping is maintained at the channel level.
Every type of incoming document, for example IDoc, is assigned to a channel.
Based on the mapping ID which is assigned to the channel, each type of
incoming document is mapped differently. The mapping ID determines the set of
mappings from the Intermediate Fields to the VIM fields. For VIM, the channel
for the EDI scenario is IDOC. The Channel IDOC is assigned to the mapping ID
IDOC.
In multiple backend systems, the incoming IDocs are received and preprocessed in
the central system. After that, they are sent to the satellite system for further
processing. The satellite system is determined based on the company code. Each
system in the multiple backend system is identified by a logical system name.
To configure the mapping, you must do the following:
• “Configuring IDoc field mapping”
• “Configuring the VIM field mapping”
• “Creating a Channel ID”
L inking inbound IDoc with document handler, channel, and classification
For the registration of documents, you link the IDoc parameters with the handlerprocess, a channel,
and the classification profile. You also process the relevant fieldmapping of the IDoc segments.
To configure the inbound IDoc registration:
1. Run the /n/OTX/PF00_IMG transaction.
2. Click OpenText Business Center for SAP Solutions > Inbound Configuration> Document
Handler > Registration > Inbound IDoc
3. In the Registration IDoc Details screen, configure the registration, using the following
parameters.
Partner Number, Partner Type, Partner Role, Message Type, Message Code,Message Function,
Test
Channel
Enter the Channel ID used for this registration type.
Module
Handler Enter the Handler ID that represents the processing steps of the service modules for this
document.
Classification
Enter the Classification ID of the incoming document.
Document Type
You can configure a document type that is used to create and archive areadable PDF out of the
IDoc. To create and archive a PDF, you must implement the Pre Exit Registration.
Document Type Attachment
If the IDoc also delivers an attachment (for example embedded in DOCsegments), you can
configure the corresponding ArchiveLink documenttype. To archive an attachment, you must
implement the Pre ExitRegistration. To support different mime types, leave the document
classempty for this ArchiveLink document type in the OAC2 transaction.
Pre Exit Registration
Enter a function that is executed before the document is registered inInbound Configuration. Use
template /OTX/PF01_UTIL_EXIT_REG_BEFORE.You can use this function to configure the
document type that is used tocreate and archive a readable PDF out of the IDoc.
Past Exit Registration
Enter a function that is executed after the document is registered in InboundConfiguration. Use
template /OTX/PF01_UTIL_EXIT_REG_AFTER.
Mapping IDoc fields to target fields
Each IDoc field can be mapped to a target field. The mapping result is stored in the
/OTX/PF01_T_1EXT table, which collects all extracted data intermediately.
The final mapping of the fields to the target business application is done within theData Model
Configuration.
Note: To handle the scenario for the processing of IDOC with an invoice typethat is set to INVO,
CRME, SUBC, SUBD, do the following:
• Change the configuration for the field name BSART:E1EDK01 segment, INVOIC02 object
name)
• Use the document field name VORGANG instead of CREDIT_MEMO
• Use the Function Module value /OTX/PS03_EXIT_IDOC_CR_MEMO
These changes are applicable for the INVOIC message type.
To configure the IDoc mapping:
1. Run the /n/OTX/PF00_IMG transaction
2. Click OpenText Business Center for SAP Solutions > Inbound Configuration> Document
Handler > Registration > Inbound IDoc.
3. In the Registration IDoc Details screen, double-click IDoc Mapping in theDialog Structure. In
the IDoc Mapping Overview screen, double-click an entry.
4. In the IDoc Mapping Details screen, configure the IDoc mapping, using thefollowing
parameters.
Partner Number, Partner Type, Partner Role, Message Type, Message Code,Message Function,
Test
.
ObjectName
Development object name: the IDoc type ORDERS01
Segment Type
Segment type in IDoc type
Field Name
Segment field
IDoc Qualifier
Qualifier of the segment
Qualifier Value
Value of the segment qualifier
Field Type
Select either Header or Item type.
External Field Name
Enter the Intermediate field name.
Field Mapping Type
Select one of the following mapping types from the list:
•Segment Field (from IDoc)
•Constant (fixed value)
•System variable
•Function Module
Value
If you have selected Constant (fixed value), System variable, orFunction Module as the
field mapping type, enter the corresponding value.
If you have selected Function Module, you can use the
/OTX/PF01_UTIL_EXIT_IDOC_MAP function module as a template.
Creating a Channel ID
You maintain mapping IDs for each channel, for example IDOC. The mapping ID is
used to determine if mapping is done through a custom function module or field to
field. Make sure that the channel ID in VIM is identical with the channel ID in the
Business Center Inbound Configuration. This is necessary for a successful
mapping.
To create a channel:
1. In the Channel Setup Overview screen, click New Entries.
In this case the channel ID is IDoc
2. Configure the new channel, using the following parameters:
Channel Type
Select the channel type from the list.
Short Description, Text
Enter the channel description. It is language dependent.
Mapping ID
Enter the Mapping ID.
You maintain mapping IDs for each channel, for example IDOC. The
mapping ID is used to determine whether the mapping is done through a
custom function module or field to field.
Sys Det. ID
If you want to link a System Determination ID to the channel, enter the
System Determination ID. If no System Determination ID is linked here, the
Default Company Code Look up system determination can be used in a
multiple system scenario.
Ignore Mapping Error
Errors might occur during the mapping stage when data from a particular
channel is sent to the SAP ERP system.
Select this check box to determine that these errors are ignored for the channel and that the VIM
workflow is started. Clear the check box to determine that, in case of a mapping error, processing
stops and the VIM workflow is not started.
Process ID
Enter the process ID.
You can maintain process IDs for the channel. The process ID is used to determine which process
handling the incoming document is linked to.
3. Save your settings.