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: 
MartinMaruskin
Active Contributor

Last week I blogged about installation of SAP NetWeaver App Server 7.03 SP03 - which can be used (among other things) to develop ABAP objects in Eclipse. Today I took a look at another distribution of SAP NetWeaver which can be used to evaluate another SAP technology – SAP Gateway. By using the Gateway we can expose SAP’s system functionality as REST-based OData (Open Data Protocol) services. So we can share data residing in SAP to external world like other platforms, devices etc to consume it. The Gateway is delivered as add-on to ABAP based NetWeaver system which is available right in this specific distribution. Note that this is on-premise installation which you can put on your machine. Of course there are also cloud based deployments of the Gateway but this is blog is not related to them. Refer to this link to see all the options.

Content:

1. Download of NetWeaver ABAP 7.02 SP11 with Gateway 2.0 SP04

2. Installation of the same

3. OData demo application development

Regarding HW and SW I used – please refer to my installation of SAP NetWeaver App Server 7.03 SP03.


1. Download of NetWeaver ABAP 7.02 SP11 with Gateway 2.0 SP04

To get installation files I had to download it from store.sap.com. I searched for: SAP Gateway. Actually I downloaded the installation files some weeks earlier. Today I could not find it at the store. However I believe files are still somewhere out there. Alternatively you can use SCN space SAP NetWeaver Gateway Developer Center which has a links to the installation media: SAP NetWeaver ABAP Trial with SAP NetWeaver Gateway 2.0 (installer). I’m not going to provide the link in here as it doesn’t work at the moment.

As usual once I found my media on SAP store I clicked on Trial version button. This offered me a registration form that I filled up. After this I received email with link to the installation file. See all the registration process in details at my previous blog. That was the file I downloaded:

ABAP_Trial_7_02_SP11_Win_64_bit_Version_with_Gateway_2_0_SP04.rar


2. Installation of NetWeaver ABAP 7.02 SP11 with Gateway 2.0 SP04

After unpacking the file to installation folder it had size of 3.9GB. Right after this I downloaded and installed JAVA (jre-7u67-windows-x64.exe, download it from java.com) as it is prerequisite to run SAP installation. I started the installation as itself by executing sapinst.exe file:


I got first screen of installation wizard where I choose that I wish to install: Central System.


Of course obligatory log-off and relog-on of my user:


I accepted license – notice I needed to scroll to very down to get the radio button:


I set master password for all the SAP users that are created during the installation:


Then I got obligatory warning about some of installation criteria that were not met on my system. However it is usually the case while installing demo/trial SAP NetWeaver systems that those warnings can be just ignored. Anyway you have a possibility to revise your parameters in order to remove the warnings and re-execute the checks.


As next I reviewed all the settings (I just changed SID of the system being installed from default ID NSP to NWG, to reflect that it is SAP gateway system and also to distinguish from earlier installed NSP) and kicked off installation phases:


Oooopps while processing phase no 16 I got stuck with following error. I looked that one of DLLs belonging to MaxDB was missing:


I located the reported DLL libSQLDBC77.dll and I put it folder where it was into PATH variable: C:\sapdb\NWG\db\pgm


I got through this issue and the installation continued for while with next phases.

Next issue happened in phase no 21. It appeared to be quite strange one. I reviewed log (there is a View Log button) and seems it had something to do with not maintained DB type in system default profile. So I entered into file c:\usr\sap\NWG\SYS\profile\DEFAULT.PFL and added following line in here:


dbms_type = ada


After that the installation continued and successfully finished:


Meanwhile I installed SAP GUI – version witch wasn’t contained in the installation files but I had it from my previous installation. There it was located under folder:  Frontend&tools\SAP_GUI_for_Windows_7.20_Patchlevel_7_SDN_version_20110701_1428.exe


Once I had my GUII entered the system for first time with DDIC user and password as specified in file: README/welcome.html.

Being logged in the system I set password for user BCUSER in transaction SU01. From now on I used that user to login to the system.


3. OData demo application development

Below I created very simple Read (part of CRUD) operation as service in Gateway. As it is really very simple it does nothing else just lists out users that are created in my newly installed Gateway system. Really notice that mu aim was just to try out it is working instead really focus on what The Gateway system can do. Therefore example is very simple.

First I created Gateway Data Model. I did it in TA SE80 -> GW Data Model.

Here I entered my new Data Model and filled up following pop-up:


Followed by next pop-up:


Now I entered into part where I introduced my Query operation. In my case query performs call of BAPI called BAPI_USER_GETLIST. I hit Search icon and entered the BAPI:


For the BAPI I needed to create mappings. I just highlighted the BAPI on left side and selected “Create Mapping” button:


Here I just selected one field that I was interested in: USERNAME.


I changed mapping for selected field into key field of structure: S_COR_ID-VALUE.


Then I just generated the data model:


Next was to create Consumption Model. This is done again in SE80:


I entered description as well:


Now I added GW Data Model into Consumption one:


I searched for my previously created GW Data Model:


Once I had it I tried to see metadata of my service:


Here it is, URL http:// 169.254.80.194:8000/sap/opu/sdata/sap/Z_GW_DM01/$metadata is opened in the web browser:


In order to really run the service and get the data I changed URL to following one:

http://169.254.80.194:8000/sap/opu/sdata/sap/Z_GW_DM01/z_gw_dm_01Collection?sap-client=001&$format=x...


So I got six entries:


In order to validate it I ran separately same BAPI (BAPI_USER_GETLIST) in SAP GUI. I got also six entries:


This concludes development of small SAP Gateway service.

In next part of my blog I name few issues I faced while development.


1. First I needed to customize System Alias. This can be done in transaction SPRO -> SAP NetWeaver -> Gateway -> OData Channel -> Configuration -> Connection Settings -> Manage SAP System Alias):

2. I had also an issue with user BCUSER. The thing was that I could not get activated my Data Model. It was caused by wrong developer key of my user. Correct developer key is 14421119653247674476. I found it by a lot of goggling at forum post. I even created forum post for this issue :smile:

3. Also if service name, URl etc is for some reason not generated you got to do it manually. Transaction /IWFND/MAINT_SERVICE must be used in here.


4. It may happen that Gateway in your system is not activated. You have to activate it in customizing under following path: transaction SPRO -> SAP NetWeaver -> Gateway -> OData Channel -> Configuration -> Connection Settings -> Activate of Deactivate SAP Gateway.

Where to go next:

SAP Gateway -- knowing all essentials and how to build apps in 5 min

Getting Started with SAP NetWeaver Gateway

Gateway Documentation

Learn Gateway at your own pace

Installing and Configuring SAP NetWeaver Gateway 2.0



PS: This blog is cross published on my personal blog site.

8 Comments
Labels in this area