Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member184681
Active Contributor
0 Kudos

Recently I have met a requirement to develop a receiver Business Connector IDoc scenario with SAP PI. As I have never used BC Adapter so far, I tried to find some step-by-step blog, wiki or SAP Help that would give me a helping hand, but – to my surprise – without success. Fortunately, I was lucky enough to be familiar with both: SAP PI and SAP BC, so I developed the scenario myself with some sort of trial and error approach. Now that I have done that, let me share the example configuration details with you, pointing out some key places of the whole scenario. I believe some of you will find it useful one day.

The example scenario will be: IDoc in ERP -> PI -> Business Connector. Additionally, I will not focus on the exact BC development part, as every single scenario has to match some specific requirements there. So I will simply assume that there is a BC service sdnDemo.processIDoc that has been developed to meet the requirement and it will process incoming messages.

The configuration starts in the Business Connector. First thing to do is to create a routing rule in BC for incoming IDoc messages. Here is the routing rule that I have created:

Now my Business Connector is ready to process the incoming IDocs of type DEBMAS, sent by sender system BC to receiver system BP. And it knows that such IDocs should be passed to my sdnDemo.processIDoc service for processing. The only thing to do now is to send the IDocs from PI properly.

Now, coming to PI configuration. I have done my example pretty straight-forward, with no mapping included, only ID configuration, so I only needed four objects: Receiver Determination, Interface Determination, Receiver Agreement and Receiver Communication Channel. First three are done normally, there is nothing specific in this scenario. And the last one is of big importance here. It looks simple, but there is one thing that you need to know to configure it properly.

For my scenario, I used HTTP transport protocol and IDoc XML message protocol and provided some Business Connector username and password for authentication purposes. I have left the default values for persist duration, number of retries and retry interval, but of course you should set them according to your requirements. And now the most crucial thing: the URL:

  • First of all, it should match the transport protocol chosen (HTTP or HTTPS).
  • Then, it should include the Business Connector hostname or IP address, and BC port (most frequently it is 5555 or 8234, but make sure to check what is the number in your case).
  • Then there is this /invoke/ part that tells BC that some service should be executed.
  • Finally, you type the folder path followed by  a slash (“/”) and the BC service name. And I would recommend you to use the standard BC service for incoming IDocs, which is pub.sap.transport.ALE:InboundProcess, so your path would be:
    http(s)://host:port/invoke/pub.sap.transport.ALE/InboundProcess

Why this service, one will ask, since I have told earlier that there is this dedicated sdnDemo.processIDoc service for message processing? The answer is simple: because this is standard BC service for incoming IDocs. Still, thanks to the routing rule created, BC will forward the IDoc to our processIDoc service. So what is the point? It is the standard BC’s monitoring tool that is the addition here:

So only using this standard InboundProcess service you will have your IDoc persisted by BC and visible in the monitoring tool there.

Some additional references for more details on Business Connector Adapter of SAP PI:

http://help.sap.com/saphelp_nw73/helpdata/en/6a/3f93404f673028e10000000a1550b0/frameset.htm

http://www.saptechies.com/faq-xi-bc-adapter/

If you need further details on how to develop SAP BC services, go to the \doc directory in your SAP BC Developer installation path (i.e. C:\sapbc48\Developer\doc). You will find some interesting guides there, including SAP BC Developer Guide, Development Tutorial and a detailed description of Built-in Services.

Labels in this area