Since last year’s TechEd, I have been getting a lot of question regarding whether SAP will provide a REST adapter for PI. Obviously, my follow-up question is “what will you do with a REST adapter?” I received the following responses:
- We want to integrate with cloud applications, and other web-based applications using REST.
- We have existing web services based on SOAP, and we would like to expose these services as REST for more efficient consumption by mobile devices. If there is a REST adapter, then we can re-use all the existing interfaces and mappings without any re-write.
- We already have PI and now we want to use a REST adapter to develop new mobile-based applications to access our SAP and non-SAP systems and applications.
You can find more information on REST at Wikipedia :
Although SAP does not provide a REST adapter, one of our business partners, Advantco, does. Please see their blog on SDN:
REST adapter for Netweaver SAP PI
I had the opportunity to review and test Advantco’s REST adapter and have the following findings:
- CRUD support:
Since the REST framework is based on HTTP protocol, the operations are based on HTTP methods (GET, PUT, POST and DELETE). We can obtain these HTTP methods in rules for Receiver Determination and also in mapping programs, even though they will not be in the payload. I was able to create a single service, with the 4 operations, to select/insert/update/delete entries in a database table.
HTTP GET: select/query
HTTP POST: create/insert
HTTP PUT: update/change
HTTP DELETE: delete
- Provisioning of REST service:
After configuration, an HTTP URL based on the system and communication channel can be used by consuming applications to send a request to the adapter on PI. I used soapUI as the client program to test the REST services on PI.
- Consumption of REST service:
From PI, I was able to consume a REST service on an external system without any problem testing all operations of CRUD. The receiver REST service is based on OData, which is XML-based. So, I just mapped the message to the XSD of the REST service and sent to the receiver, along with the HTTP method.
- Asynchronous interfaces:
In most situations REST is used in synchronous interfaces, applications can also be asynchronous, as in case of sending an IDoc to an SAP system. The REST adapter can be synchronous and asynchronous.
Because the REST adapter is based on the SAP AFW (adapter framework), all existing tools for channel and message monitoring, etc., are available.
- Accesses to SAP backend applications:
As an experienced PI developer, I found interacting with backend ERP systems to be quite easy using BAPI/RFCs, proxies and IDocs. The processes remain the same, and just use the existing receiver adapters, e.g. RFC, IDoc.
- Missing OData support:
The adapter only supports the provisioning of REST services based on XML and JSON. Per Advantco, provisioning of REST services based on OData will be added in the future.
Advantco’s REST adapter is NetWeaver certified. If you have any interest in this adapter, please contact Advantco per the blog above.
I am not endorsing or recommending this REST adapter. But, due to the absence of one from SAP, and if you have a need for one, this is an option to explore.