26/06/2018
A common question people usually ask when starting out implementing or learning SAP OData and SAP Gateway is, what is the difference between SAP PI and SAP Gateway – (SAP NetWeaver Gateway is now rebranded as SAP Gateway.. so I will continue to call it SAP Gateway)?
If you haven’t yet started to read about the Gateway and OData, then you should start now and if you don’t know what is SAP PI, then its fine fair to say its an SAP product used to integrate SAP and non-SAP systems.
SAP PI stands for Process Integration and has been in the industry for a long time. I am sure you must have heard of ALE and IDOCs which is used to transfer data between systems. PI (originally started out as XI) is a much bigger product than ALE. It is an SAP Technology Framework to solve Integration challenges specifically for data transfer between Applications(A2A) and Systems(B2B).
Since SAP Gateway is also related to transferring SAP Data to external consumers hence on initial thought it could be assumed that PI should be able to cater to all that the Gateway does and more. Hence one might wonder, is investing in an additional Gateway really necessary or can PI do the job. Since companies may have already invested in it so really do we need the Gateway?
I will try to answer this question in 2 ways: A simpler example and then some more details further down.
Scenario:
Imagine you a have headache and you walk up to your local pharmacist or chemist and ask them to recommend a headache pill. The Pharmacist suggests you take an over the counter Aspirin. You agree and tell the Pharmacist that you would want to buy one. The Pharmacists checks their inventory and finds that the stock on Asprin is running low. So she goes inside the warehouse to place a bulk order for a particular brand of Aspirin.
The order however is not dispatched right away. The pharmacy’s software system bundles up all the days orders and dispatches this order to the drug distributor which is responsible for distribution of the drug from the Pharmaceutical company that develops and markets the drug.
The above scenario is a very very simplified version of a very complex system. But lets understand the business scenario here.
In the above example there are two types of transactions that happen.
An end user transaction where in the customer purchased an Asprin over the counter from the Pharmacist.
A system transaction where in the system placed a bulk order to the Distributors system, the Pharma company’s product sales and Distribution network.
If we have to make a broad statement here and keeping all the complexities away for a moment, then for the first transaction case we would use an SAP Gateway, while for the second type of transaction we would use a SAP PI kind of Framework.