To handle inbound and outbound IDocs, you must define the Distribution Model in your SAP R/3. The following section helps you do this and gives an overview of how to use the transaction in SAPGUI. It will not explain every detail but it does provide a linked list to the necessary SAP transactions. This little workshop will help you to create an outbound "material logistics" IDoc.
The RFC Destination which is defined for Rfc2Rpc kernel is needed to receive outbound IDocs. Remember the definition using SM59. Refer to the section Running Task Rfc2Rpc (SAP calls External) Configuration for more information.
The transaction WE21
creates a port for IDoc processing.
Select the port type Transactional RFC
.
To create a port for IDoc processing
Start a transaction WE21
.
Assign the created RFC Destination to this IDoc port.
Use the transaction spro
to create a logical system.
To create a logical system
Start transaction spro
.
Select
.Expand the node
. Choose , , , as in the screen snapshot below.Using
, create a new Logical System.The transaction we20
creates a Partner Profile.
To create a partner profile with transaction we20
For Partner Type choose the value Logical
System
(LS
).
For Partner Number, enter the value of your
created Logical System. (e.g. SRG
).
For Type select the value User
(US
).
For Agent enter your user ID for the SAP system.
The definition of the partner profile needs information about the IDoc types which are exchanged using this profile. The IDoc types must be defined for inbound and outbound.
To add an IDoc type "material logistics" for outbound processing
Set Message type to MATCOR
.
Set the Receiver port to the IDoc Port you have created.
Use 1 for the Packet size. Currently only one IDoc per transaction is supported.
Set the Output mode to Transfer IDoc
immediately
.
Set the Basic type of generated IDoc to
MATCOR01
.
The transaction bd10
creates an outbound material
IDoc.
To test the outbound partner profile
Search for and choose a material with the ID.
Enter the Logical system you created.
The system creates a material IDoc.
The system creates a communication IDoc.
A prerequisite for this step is the correct configuration of the Rfc2Rpc kernel (see the section Configuring the Rfc2Rpc Kernel). If the Rfc2Rpc kernel has been started, the IDoc will be received. See the section Running Task Rfc2Rpc (SAP calls External) Kernel Environment for details. The System Log shows the delivery process.
If the Rfc2Rpc kernel has
not been started, restart the delivery with the transaction sm58
.
Select the line and press F6.
For outbound IDocs, SAP R/3 provides a method to deliver changed information with mass data to external systems. For example, if logistic material mass data are changed, an IDoc with the changed information is generated and can be delivered immediately. Now it is possible to synchronize different databases. The following workshop explains how to enable the change pointers.
To enable pointer change
Call transaction bd61
to perform a global
activation.
With bd50
activate your business message type.
Activate your specific field type with bd52
. (This step
is optional.)
Call a transaction to change a business object. For example: the
transaction mm02
allows you to change material data.
Check the creation of change pointers with transaction
se16
and table name BDCP
.
Generate IDoc from change pointer running ABAP report
RBDMIDOC
.
To receive IDocs from an external partner, the inbound partner profile must be configured. In addition to the outbound partner profile, the IDoc type must be set for an inbound partner.
To create an inbound partner profile
As with an outbound profile, start the transaction we20
and select the created partner SRG
.
Click the
button to create an inbound parameter.Set the message type. For example DEBCOR
.
Save the changes and go back.
The SAP R/3 application server is now ready to receive IDocs of type
DEBCOR
with additional parameters for EDI_40 control record:
Parameter | Value |
---|---|
MESTYP | DEBCOR |
SNDPRT | LS |
SNDPRN | SRG |