• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

riyaz.net

Tech Tips and Tutorials for SAP Professionals and Bloggers

  • Home
  • WordPress
  • Tips & Tricks
  • Internet
  • SAP
    • SAP PI
    • SAP ABAP
  • Personal Finance
  • Health & Fitness
  • Travel & Leisure
You are here: Home / SAP / XI/PI: Settings in R/3 Partner System to Receive IDocs

XI/PI: Settings in R/3 Partner System to Receive IDocs

January 25, 2008 by Riyaz

In the previous posts, we have covered the XI specific aspects of creating your first XI scenario. Now, let us understand what settings are required so that the R/3 partner system is able to receive and post the IDoc data. Let us start by creating the inbound function module.

Create Inbound Function Module – Transaction SE37

In the receiving system, create a function module Z_IDOC_INPUT_ZRZSO_MT using SE37. Below, I have described the logic for the same:

Add Include MBDCONWF. This include contains predefined ALE constants
Loop at EDIDC table

  • Check if the message type is ZRZORDER. Otherwise raise WRONG_FUNCTION_CALLED exception
  • Loop at EDIDD table
    • Append data from the segments to appropriate internal tables
    • For example: append data from ZRZSEG1 segment to the internal table of type ZCUSTOMERS
  • Update the DDic tables from internal tables
  • Depending on the result of the update, fill the IDoc status record (type BDIDOCSTAT) and append it to the corresponding table.
    • Status 53 => Success
    • Status 51 => Error

You can download the sample ABAP code for the above function module here.

Assign Function Module to Logical message – Transaction WE57

  • Create a new entry
  • Specify name of the Function Module as Z_IDOC_INPUT_ZRZSO_MT
  • Also, specify Type as F, Basic IDoc type as ZRZORDER, Message type as ZRZSO_MT and Direction as 2 (Inbound)
  • Save the entry

Define Input method for Inbound Function Module – Transaction BD51

  • Create a new entry
  • Provide Function Module name as Z_IDOC_INPUT_ZRZSO_MT
  • Specify the Input method as 2
  • Save the entry

Create a Process code – Transaction WE42

  • Create a new Process Code ZPCRZ
  • Select Processing with ALE Service
  • Choose Processing type as Processing by function module
  • Save the entry
  • On the next screen, select your function module from the list
  • Save the changes
  • On the next screen, select your function module from the list
  • Save the changes

Define Logical system for the partner – Transaction SALE or BD54

  • Define a Logical system LOGSYS100 using transaction SALE or BD54 to identify the partner business system

Create a Partner profile – Transaction WE20

Partner Profiles - WE20

  • Go to transaction WE20 and create a partner profile corresponding to the logical system created above
  • Add the message type ZRZSO_MT and the previously created process code ZPCRZ in the inbound parameters of the partner profile
  • Save the profile

Send and Receive Data

  • Put the input XML file in the appropriate directory on the file system
  • Monitor the directory. After a few seconds, the file should get marked as read-only
  • Choose monitoring -> Integration Engine monitoring (transaction SXMB_MONI)
  • Choose ‘Monitor for Processed XML Messages’
  • Your message should appear with a checkered flag (processed successfully)
  • Check the IDoc status in target R/3 system using transaction WE02
  • You may also verify the data records in DDic tables using SE16

SAP Transaction WE02

Thus using a small example, we have learned how to integrate different systems so that they can communicate with each other using SAP Exchange Infrastructure. In further posts we shall discuss more XI concepts to give you better understanding of applying your XI knowledge.

Filed Under: SAP Tagged With: SAP ABAP, SAP PI

About Riyaz

Riyaz Sayyad is the founder of Riz Labs. Learn more about him here.

Primary Sidebar

Popular Guides

  • Dropbox Tutorial
  • CDN Setup Guide
  • Blog Design Tips
  • Optimize RSS Feed
  • Create Twitter App
  • Short URLs
  • Password Protect Folders
  • Time Management
  • ALE IDocs Tutorial
  • SAP PI Starter Kit
  • SAP PI Tips
  • Ergonomics

Popular Topics

  • Home
  • WordPress
  • Tips & Tricks
  • Internet
  • SAP
    • SAP PI
    • SAP ABAP
  • Personal Finance
  • Health & Fitness
  • Travel & Leisure

About Riyaz

riyaz.net is a popular technology site with how-to guides, tips and tutorials on personal technology, blogging, social media, web apps, personal finance and SAP.

riyaz.net was launched way back in 2005 by web designer, blogger and SAP Consultant Riyaz Sayyad from Pune, India. Over the years the site has grown into a full featured online community with thousands of visitors daily from around the world. Read more.

Copyright © 2023 · riyaz.net