0% found this document useful (0 votes)
287 views

IDoc document-OpenText

The document discusses configuring EDI using IDocs in SAP. It describes setting up inbound function modules, linking them to IDoc types and message types, creating process codes, configuring partner profiles, and mapping IDoc fields. Key steps include defining the inbound function module, linking it to basic IDoc types and message types, creating a process code and assigning the function module, configuring a partner profile with the process code, and mapping IDoc fields to intermediate and target fields.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
287 views

IDoc document-OpenText

The document discusses configuring EDI using IDocs in SAP. It describes setting up inbound function modules, linking them to IDoc types and message types, creating process codes, configuring partner profiles, and mapping IDoc fields. Key steps include defining the inbound function module, linking it to basic IDoc types and message types, creating a process code and assigning the function module, configuring a partner profile with the process code, and mapping IDoc fields to intermediate and target fields.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

EDI configuration

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.

Configuring general settings


The inbound function module / OTX/PF01_UTIL_IDOC_INPUT creates DP documents
from incoming IDocs and sends them to the DP process.

Defining settings for the inbound function module


In this step, you choose the input type for the IDocs.
To define settings for the inbound function module:
1. Run the BD51 transaction.
2. In the Characteristics of Inbound Function Modules view, click New Entries.
3.Define the inbound function module, using the following parameters:
Function module (inbound)
Enter OTX/PF01_UTIL_IDOC_INPUT.
Input type
Enter 0 (for Mass processing).
Dialog allowed
If you want to process IDocs in dialog mode, select this check box. With
baseline implementation, the check box is cleared.
4. Click Save

Linking the inbound function module to IDoc type and message


type
In this step, you establish the link between the inbound function module, the basic
IDoc type, and the message type.
To link the inbound function module to IDoc type and message type:
1. Run the WE57 transaction.
2. In the IDoc: Assignment of FM to Log. Message and IDoc Type view, click
Change .
3. Click New Entries.
4. Configure the assignment using the following parameters:

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.

Creating a new process code


In this step, you create a new process code and assign the inbound function module
to this process code.
The process code is a logical name for the processing function module. The process
code is used to uniquely determine a function module that processes the received
IDoc data and converts an IDoc to an SAP document.
To create a new process code:
1. Run the WE42 transaction.
2. In the Inbound process code view, click Change .
3. Click New Entries.
4. Define the new process code using the following parameters:

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

Configuring the partner profile


When data is exchanged between partners, it is important that sender and receiver
define the exact syntax and semantics of the data to be exchanged beforehand. The
partner profile defines the type of data and communication paths of that data
exchange.
In this step, you assign the new process code to the IDoc partner profile. You must
specify partner and partner type. You must also specify whether you define a profile
for inbound or outbound data exchange. You can use an existing partner profile. The
partner type must be Logical system (LS).
To configure the partner profile:
1. Run the WE20 transaction.
2. Select the partner profile under Partner Profiles > Partner Type LS.
3. Below the Inbound parmtrs. panel, click Add .
4. Configure the inbound parameters.

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.

Configuring the VIM field mapping


In this step, you map Intermediate fields to VIM fields.
To configure the VIM field mapping:
1. Run the /n/OPT/VIM_MAPV transaction.
Alternatively, run the /n/OPT/SPRO transaction and navigate to the menu path
Vendor Invoice Management > Document Processing Configuration >
General Configuration > Incoming Document Processing > Maintain
Mapping ID.
2. If you want to configure the complete mapping using a function module,
double-click a line to open the Mapping Setup Details screen.

Here the Mapping ID is IDOC


3. Configure the Mapping ID using the following parameter:
Ext Field Mapping FM
If simple one-to-one mapping does not suffice, enter a custom function
module to perform the mapping. The function module must be compatible
with the interface /OPT/DO_MAPPING. However, do not use /OPT/
DO_MAPPING itself because this will cause recursive calls.
4. In the Mapping Setup Overview screen, select a Mapping ID and double-click
Field Mapping in the Dialog Structure.

5. Configure the field mapping, using the following parameters:


External Field Name
Intermediate field name (case-sensitive), which is supplied by the external
system.
Field Type
Select field level Header or Item.
Document Field Name
Enter the Index field name (VIM field).
The header level SAP fields come from the structure /OPT/VIM_1RHEAD. The
item level SAP fields come from the structure /OPT/VIM_1RITEM_DATA.
Function name
If you need to convert the format of the data coming from the external
system, enter a conversion function module for a particular field. Any
function module that you enter here, whether SAP standard or a custom
one, should be compatible with the interface of the function module
CONVERSION_EXIT_ALPHA_INPUT.
If the values are exported in the standard format, no conversion modules
are necessary. Standard formats are the following:
• For date fields:
YYYYMMDD
• For amount fields:
Period (.) as decimal separator
• For unit of measure:
SAP internal format (for example ST for piece)
• For currency:
ISO format
Ignore Chars
Enter characters that are deleted in an extra step before the mapping
continues. This is useful to easily implement simple normalization of
external values. For example, apostrophes or dashes can be removed this
way.
The field can contain up to 6 characters.
Condense
To remove blank characters in the input string, enter X in this field.
6. Save your settings.
To configure automated field enhancement:

1. In the Mapping Setup Overview screen, select a Mapping ID and double-click


Automated Field Enhancement in the Dialog Structure.
2. Configure the field enhancement using the following parameters:
Counter
To specify a call order of the field enhancement, enter a number up to 4
digits.
Field Type
Select field level Header or Item.
Document Field Name
Enter the Index field name (VIM field).
Field Processing Type
Select the field processing type from the list.
Field Value
If selected in Field Processing Type, enter a fixed value or a system
variable.
Enhanced Field Function Module
If selected in Field Processing Type, enter the function module to
implement the enhanced field function.
Satellite
If the exit function module must be executed on a satellite system, select this
check box. The check box is only available on the central instance in a
multiple backend system.
3. Save your settings.

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.

You might also like