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
- 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
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.
Hi Riyaz,
Could u post a blog on ccBPMs and Performance Monitioring.
Thank u
Naga
I will soon be posting blog articles on ccBPM and Performance Monitoring in continuation to the XI starter KIT series. Do expect more and more XI content soon on riyaz.net Blog. If you are not interested in other non-sap articles you can choose the relevant SAP category from the right sidebar, or simply go to URL – sapnonstop.com.
Regards,
Riyaz
You can also subscribe to Email updates which will notify you by email whenever new articles are posted on riyaz.net Blog. For this you can use “Dont miss a single post – Get Updates by Email” box on the right hand side-bar on this site.
you step to step very particular,
you can via t-code:bdbg generate inbound and oubound IDOC,
thanks
Thanks! After reading gigs worth of documents on XI containing buzzwords, marketing blabber and vague abstractions these few posts have helped a great deal.
Hi Riyaz,
Can i create ALE between Non-SAP and SAP ?
Thanks
Theoretically yes..I havent tried it myself…EDI can be used for communicating with non-SAP system.
Your blog is so informative keep up the good work!!!!
Hello riyaz
First time i am asking you one qs regarding Inbound IDOC.
I am using the standard IDOC FLCUSTOMER_CREATEFROMDATA01 with message type FLCUSTOMER_CREATEFROMDATA with process code ED08.I have done every step but getting error NO_RECEIVER_CASE_ASYNC..In business sytem adapter specific Identifier i have given the logical system name but not given the r/3 system id and client as i am trying to post it in Xi server…it is taking automatically by other business service.Please help me..i am strugling from long days.
NO_RECEIVER_CASE_ASYNC: This means no receiver could be found. Check your Receiver Determination. Activate and update cache. Asysnchronous messages can be manually restarted.
Riyaz, really nice website to refer to all XI/PI related scenarios. Keep up the good work !
Pls add contents for BPM, XI-MDM intergration , XI-SNC Integration.
Thanks and Regards
Hi,
We are facing problems while receiving IDOC from XI to SAP as we not sure about XI ALE settings. The IDOC itself is not getting triggered.
Thanks,
Abaper.
In XI system, you need to create an RFC destination (SM59) and a port (IDX1) pointing to the target SAP system. In the target system, create a logical system for XI system (BD54) and create partner profile for the logical system (WE20). IN WE20, add your IDoc type under inbound parameters and configure as described in the above article. You might alos need to add adapter-specific identifier (Logical System name) in the Integration Directory.
Hi Riyaz,
I have read your article and it’s very easy article to start lthe XI. I have a doubt regarding class proxies. Can you explain me step by step procedure to derive the the class proxies(with coding) using ABAP? What will be the different steps? Thanks in advance.
I would really appreciate your response.
Thanks
Kiran
Hi Riyaz,
I require one info urgent.
I am integrating my SAP AFS System to POS system via XI/PI.
I did all require ALE settings…i am sending MATMAS from SAP to PI
Now Does it necessary to put MATMAS as a inbound parameter in PI Partner’s profile?
what i found that MATMAS message type even not existing in PI system ie EDMSG table.
Regards
RJ
Hi RJ, You need to define inbound partner profile in the target SAP system and not in PI.
Hi Riyaz,
I am a beginner in PI.
I read your article it is very informative.
I want to learn SAP PI 7.1
From where may i get the materials?
Thanks in Advance.
Dear Team,
Our development server is refreshed with production server.
After refreshed the client from 160 t0 300 in the development server and we are unable to import idoc in the development server at xi end.
Got the error as follows
/CWM/MBGMCR./CWM/MBGMCR01: Error
+ Error: IDoc type /CWM/MBGMCR01 contains errors (unable to read
segments)
Please suggested us and what kind of activites we need to check.
Best Regards,
IMRAN.
Hi Riyaz,
Thanks for the article which you have given on I docs,which is simpler way to understand by functional guys.
For purchse orders there is process code for change,in the same way is there any process code for sales order change, or is there any use exit to achieve this requirement, i find in standerd functionality but i did not get.
Thanks
Siva.k
Please suggest
Hi Riyaz,
This article is really good and helping me a lot.
Many Thanks