Version 2.3.1.18
 —  SAP R/3 Gateway Documentation  —

Configuring an SAP R/3 Distribution Model

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.


Reuse of RFC Destination

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.

Top of page

Create Port for IDoc processing

The transaction WE21 creates a port for IDoc processing. Select the port type Transactional RFC.

Start of instruction setTo create a port for IDoc processing

  1. Start a transaction WE21.

    IDoc processing

  2. Assign the created RFC Destination to this IDoc port.

Top of page

Create Logical System

Use the transaction spro to create a logical system.

Start of instruction setTo create a logical system

  1. Start transaction spro.

  2. Select SAP Reference IMG.

  3. Expand the node Define Logical System. Choose Basic Components, Application Link Enabling, Sending and Receiving Systems, Logical Systems as in the screen snapshot below.

    graphics/spro-1.png

  4. Using New Entries, create a new Logical System.

    graphics/spro-2.png

Top of page

Create Outbound Partner Profile

The transaction we20 creates a Partner Profile.

Start of instruction setTo create a partner profile with transaction we20

  1. For Partner Type choose the value Logical System (LS).

  2. For Partner Number, enter the value of your created Logical System. (e.g. SRG).

  3. For Type select the value User (US).

  4. For Agent enter your user ID for the SAP system.

    partner profiles

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.

Start of instruction setTo add an IDoc type "material logistics" for outbound processing

  1. Set Message type to MATCOR.

  2. Set the Receiver port to the IDoc Port you have created.

  3. Use 1 for the Packet size. Currently only one IDoc per transaction is supported.

  4. Set the Output mode to Transfer IDoc immediately.

  5. Set the Basic type of generated IDoc to MATCOR01.

    graphics/we20-2.png

Top of page

Test the Outbound Partner Profile

The transaction bd10 creates an outbound material IDoc.

Start of instruction setTo test the outbound partner profile

  1. Search for and choose a material with the ID.

  2. Enter the Logical system you created.

    graphics/bd10-1.png

  3. The system creates a material IDoc.

    graphics/bd10-2.png

  4. The system creates a communication IDoc.

    graphics/bd10-3.png

  5. 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.

    graphics/Rfc2RpcIdocMsg.png

  6. If the Rfc2Rpc kernel has not been started, restart the delivery with the transaction sm58. Select the line and press F6.

    graphics/sm58.png

Top of page

Change Pointers

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.

Start of instruction set To enable pointer change

  1. Call transaction bd61 to perform a global activation.

  2. With bd50 activate your business message type.

  3. Activate your specific field type with bd52. (This step is optional.)

  4. Call a transaction to change a business object. For example: the transaction mm02 allows you to change material data.

  5. Check the creation of change pointers with transaction se16 and table name BDCP.

  6. Generate IDoc from change pointer running ABAP report RBDMIDOC.

Top of page

Create Inbound Partner Profile

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.

Start of instruction setTo create an inbound partner profile

  1. As with an outbound profile, start the transaction we20 and select the created partner SRG.

  2. Click the Add button to create an inbound parameter.

  3. Set the message type. For example DEBCOR.

    graphics/we20-3.png

  4. Save the changes and go back.

    graphics/we20-4.png

  5. 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

Top of page