Skip to Content
Author's profile photo Chandrashekhar Mahajan

Making way through Gate, Finding some REST !

I guess you might be puzzled with the title of my blog. Let me help to clear the puzzle. This blog is all about SAP NetWeaver Gateway!

There will be few questions in your mind about this stuff from SAP.

You may have some of below questions in your mind like,

1)   What is SAP NetWeaver Gateway? And what is the importance of it?

2)   How is it different from SAP PI?

3)   What skills are required to learn it?

4)   Learning sources?

This blog is just an attempt to answer above questions from the Research I did so far on this new stuff.

To answer 1st question,

In very simple terms, SAP NW Gateway can be viewed as one of the OData producers.

OData producers are services that expose their data using the OData protocol. You can find other OData producer list at http://www.OData .org/ecosystem

You may ask what OData is then.

Well, OData is Open Data Protocol!

You can refer below definition.

The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today. OData does this by applying and building upon Web technologies such as HTTP, Atom Publishing Protocol (AtomPub) and JSON to provide access to information from a variety of applications, services, and stores.  OData is being used to expose and access information from a variety of sources including, but not limited to, relational databases, file systems, content management systems and traditional Web sites.

OData protocol is used for creating Representational State Transfer (REST)-based [REST] data services, which enable resources, identified using Uniform Resource Identifiers (URIs) and defined in an abstract data model, to be published and edited by web clients within corporate networks and across the Internet using simple Hypertext Transfer Protocol (HTTP) messages.

[Reference –  http://www.OData .org/ ]

If this technical definition is too much then in simple terms, OData is used for creating REST based data (Web?) services.

And then you will ask, what is REST?

Representational State Transfer (REST) is kind of architecture/protocol something similar to SOAP protocol but with more advantages over SOAP.

A RESTful web service (also called a RESTful web API) is a web service implemented using HTTP and the principles of REST.

The world of web is now divided between REST and SOAP and nowadays most of the applications are using REST.

Refer to know more on REST vs. SOAP

I hope, by now, you might be familiar with OData, REST terminology and importance of REST over SOAP.

Now coming back to SAP Gateway,

SAP NetWeaver Gateway is a development framework, which is available as an SAP NetWeaver Application Server ABAP (AS ABAP) add-on, which you can install on top of your existing SAP Business Suite or application platform.

SAP NetWeaver Gateway offers development and generation tools to create OData services to a variety of client development tools. Put simply, it establishes a connection between SAP Business Suite data and target clients, platforms, and programming framework.

[Reference – ]

Also note that SAP NetWeaver Gateway only provisions RESTful services.  It cannot be used for consumption of services.

As most of us know that we can create web services on top of RFC which are SOAP based, there was no way to expose SAP data to outside world in the form of RESTful protocol and for that reason, SAP NW GW comes into picture. It simply helps usto expose this data in the form of REST based OData.

This light weight REST based data then can be easily consumed by tablets, mobile devices or web applications.

One question may pop up in your mind is how REST based web services can be light weight compared to SOAP and for that you need to know about JSON !

JSON (JavaScript Object Notation) is a text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is language-independent, with parsers available for many languages.

The JSON format is often used for serializing and transmitting structured data over a network connection. It is used primarily to transmit data between a server and web application, serving as an alternative to XML.

In simple terms, it is an alternative to XML but with few more advantages over XML.

Let’s see the difference between JSON vs. XML at

JSON with REST do have lot more advantages over XML with SOAP. Refer,

With all this information, it is clear that SAP want to leverage the capability of REST based services to outside world for consumption due to advantages of REST based OData.

Data exposed by GW service, is light weight, can be easily consumed by application and devices. One of the important consumers is SAPUI5 based applications. With SAPUI5, we can easily build web application or mobile application on top of GW service.

I hope this answers the second part of first question.

Back to 2nd question, how is it different from SAP PI?

Refer this link

Before going through this document, I thought SAP NetWeaver Gateway as some sort of middleware and thought why SAP did not provided this capability with PI.

If we look back into SOAP based web service generation on top of RFC then it make sense to have this kind of facility in ABAP stack to be able to create REST based service on top of RFC and for this very purpose ABAP developer can use his/her all time favorite SE80 for GW Data Model and GW Consumption Model

Gateway tools in SE80.jpg

As ABAP Developer may know more about which BAPI, RFCs, BOL(in CRM) to be used, what fields to be selected for various REST based operation (GET, POST, DELETE and UPDATE – in HTTP verbose), he/she will be best suitable person to develop GW services.

In future, REST based adaptor may be provided with PI but still it makes more sense to have SAP NW GW to develop GW REST based services.

We may not be surprised to see that GW services again consumed in PI for monitoring, governance purpose. This is something similar to have PI for SOAP based web service despite of the fact that SOAP based Web service can be directly consumed without PI by external applications.

This all stuff makes it very clear that both PI and GW have their own purpose!

Now coming back to third question, what skills are required to learn it?

With all above discussion and knowing the fact that SAP NW GW is on ABAP stack, embedded with SE80, ABAP development skills will be the best suited to learn SAP NW GW.

[P. S. – Eclipse based tools can be used for GW modeling etc. With ABAP on eclipse, this will be again simpler for ABAP developers]

Finally, the last and important question, learning sources?

As we are more familiar with RFC, you can first start with How to Guide at [Content Deleted June 2013]

This shows how one can develop Gateway service on top of RFC.

Some business objects, such as Sales Orders or Purchase Orders, consist of header and line item data. Thus, when creating such business objects, it makes sense to use hierarchical or nested data in the creation request. SAP NetWeaver Gateway can be used to create and expose a service that allows for the creation of these business objects.

In SAP NetWeaver Gateway, the OData  Channel provides deep insert functionality to accommodate the creation of an entity along with its associated entities in one request. The deep insert functionality is provided in ABAP interface /IWBEP/IF_MGW_APPL_SRV_RUNTIME, method CREATE_DEEP_ENTITY.

Refer this link on this scenario,

Finally you may be interested to develop web application based on GW service and how about using SAPUI5 for User interface which will consume GW OData service!

Refer these step-by-step document on it – and


Some of you may get one question whether it is possible to develop REST based services without Gateway? For those, this link will be helpful

Usefull online help,



3.   Gateway Architecture – [Content Deleted Jan 2014]


5.   SAP NetWeaver Gateway – How-To Guides –

6.   SAP NetWeaver Gateway developer tools –


We explored lot and tried to open gates of new world based on Open Data. Now be relaxed and take some REST!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Great work Chandrashekhar !!!

      I am new in SAP NW gateway. I have some doubts. I have developed one SOAP based web services on standard function module. Now I am able to get SAP r/3 data through this webservice but for that I have to connect my system to the same network means first I have to connect the system in VPN then I am able to get the data.

      Now I want to get this SOAP based webservice data through NW Gateway without connecting to VPN. So what is the procedure for that? Do I need SUP also?

      Please help me because I have this problem from a long time and not able to get clear idea.



      Author's profile photo Former Member
      Former Member

      Hi Niket,

      • you dont need SUP
      • if you want to consume services outside of VPN, you have expose your service provider to the internet - your service provider is the SAP Netweaver Gateway, which should be installed on a different machine in that scenario
      • you can not easily expose function modules via the Netweaver Gateway - as far as I know there is no wizard for that (as the SOAP one)
      • I would recommend exposing service via the netweaver gateway only, because: it comes with many features (SEGW, monitoring, test workbench) and is pretty simple after some learning



      Author's profile photo Former Member
      Former Member

      Great Article.

      We managed to have a iOS App developed using SAP Gateway trying to find ways to authenticate with LDAP. Do you know whether there is any plans or already available for Netweavor 7.40 to authenticate against Active Directory? We don't want our Mobile user to remember two password would be great if SAP Gateway can authenticate against AD.

      Currently we are looking at adding SUP which supports this using SAP Portal in the middle for SSO2 cookie. But this is lot of infrastructure and places to fail.

      Author's profile photo Former Member
      Former Member

      Developing a Service in SE80 using  GW Data Model and GW Consumption Model OR Developing a Service using Odata channel approach. Does both mean same approach?

      Author's profile photo Prathik Nagaraj
      Prathik Nagaraj

      Hi Deepika,

                       They are differnt approaches, Developing a service using Odata channel approach is developing a gateway project in SEGW  transaction i.e; Using Netweaver Gateway Service Builder.

      Best Regards,


      Author's profile photo Syam Babu
      Syam Babu

      Good Content Chandra.



      Author's profile photo Virinchy P
      Virinchy P

      Thanks for a very good introduction to ODATA and netweaver gateway.

      Author's profile photo srinivas sana
      srinivas sana

      Excellent blog, very informative

      Author's profile photo Mohammed Kaleemullah
      Mohammed Kaleemullah

      Very Informative Article.

      ThanQ .

      Author's profile photo Antonio Sanz
      Antonio Sanz

      Thanks for sharing.

      Great blog.

      Author's profile photo prakasareddy konda
      prakasareddy konda

      Hi Chandrashekhar Mahajan,

      Good Document.