Connecting SAP Netweaver Gateway Trial to ES Workplace ERP

After following John Moy’s blog series on setting up the Netweaver Gateway trial on Amazon EC2, I thought it would be helpful to share how to connect your shiny new gateway trial to the ES Workplace ERP. Since using the ES Workplace systems a couple years ago for a CRM Mobile app, I have always praised the ES team for putting together a great set of resources for encouraging and enabling a service oriented architecture (SOA). The systems (ECC, CRM and PI) are great for doing testing against and developing POC’s or demo apps. In this case we will be using the ERP instance to connect our Gateway system for data consumption.

In this example we will be initially connecting our systems together and then going through setting up a very basic example of consuming data from the ES Workplace ERP system via the Netweaver Gateway system sitting in the AWS cloud.

Please note that the Prepackaged Netweaver Gateway Trials already have this configured and ready for your username/password.

In order to connect and consume data from the ES Workplace ERP system, you will need an account. You can create one here and it only takes a couple of minutes:
Once you have created your account, I suggest logging in and changing the initial password you received through registration. Its also just a good idea to check you are able to gain access to avoid any issues down the road.
Next up head over to your Netweaver Gateway Trial system and open up SPRO

-> SAP Netweaver

-> Gateway

-> OData Channel

-> Configuration

-> Connection Settings

->SAP Netweaver Gateway to SAP System

-> Manage RFC Destinations

Screen Shot 2012-07-20 at 4.47.32 PM.png
Click on ABAP Connections and select the “New” icon. Screen Shot 2012-07-20 at 8.08.35 PM.png
Name your RFC Destination and make sure that Connection Type is configured to be 3 – ABAP Connection.

Under Technical Settings enter the following values:

Target Host: iwdfvm3989

System Number: 00

Save As: IP Address

Gateway Host: /H/$workp1ace/H/

Gateway Service: 3300

Screen Shot 2012-07-20 at 5.11.42 PM.png
next click the “Logon & Security” Tab and enter your ES Gateway Credentials and save the connection. Screen Shot 2012-07-20 at 5.11.52 PM.png
After saving, select “Manage SAP System Aliases” and enter the details which will create a system alias for the ES Workplace ERP system. Screen Shot 2012-07-20 at 8.29.31 PM.png
SAP System Alias: Any name e.g. ESW

RFC Connection: Should be the name of your RFC connection you specified above

Software Version: Default

Screen Shot 2012-07-20 at 8.31.19 PM.png
Click the connection test button and you should receive a screen looking like this. Screen Shot 2012-07-20 at 5.12.03 PM.png
Once this is done, we are ready to create our webservice.

For our consumption example we will be pulling out a simple list of all users. If you would like to see a complete and detailed guide of CRUD (Create, Read, Update and Delete) operations – I would suggest checking out this document:

Open up SE80 and create your Gateway Data Model. Screen Shot 2012-07-20 at 8.25.27 PM.png
Be sure to specify your System Alias when creating the Model. Screen Shot 2012-07-20 at 8.40.47 PM.png
Per the documentation, search for a BAPI you would like to use. Because we defined the System Alias in the previous step, the BAPIs being displayed are coming from the target system, in this case the ES Workplace machine. Screen Shot 2012-07-20 at 8.51.23 PM.png
Continue through the process by mapping the query operation.Also be sure to set a primary key by highlighting your unique property and clicking the “Key” button. Once done, click “generate”. Screen Shot 2012-07-20 at 9.01.33 PM.png
Next up we will create a consumption model for our data model. Open up SE80 again and attach the gateway data model to consumption model. Screen Shot 2012-07-20 at 9.39.01 PM.png
Now we should be done, you can open up the browser and point to your URL listed in SE80 under the consumption model to see the definition and available collections. Screen Shot 2012-07-20 at 9.40.35 PM.png

This is directly on the AWS machine, but I can also call this from my local machine:


In the event you try to view a collection and receive the error: No System Alias found for Service, open up SPRO and assign a System Alias to the Service.

Screen Shot 2012-07-20 at 9.32.23 PM.png
Here you can see where the ESWORKPLACE alias has been defined. Screen Shot 2012-07-20 at 9.35.36 PM.png
Having additional problems?

Check that the service has been defined in SICF

Screen Shot 2012-07-20 at 9.37.49 PM.png
If you queries are taking a long time to load or your dataset is large, don’t forget to limit it/add parameters to restrict the returned records. This can be done when defining the data model. Screen Shot 2012-07-20 at 9.46.04 PM.png
If your service will display locally on AWS but not from another machine, check that the AWS Security Rules include the port gateway is running on (in my case 8000).
If you try to view the detail of the  you will get an error, this is because I did not map the operation of GetDetail or Read – we only did the Query. Follow the guide to easily add this.

If you have a elastic IP associated with you EC2 instance you should be able to call the REST service from any machine connected to internet. (You could also use your public DNS name, its just not all the short!).

Here are a couple of useful TCodes for working with Gateway:

/IWFND/ERROR_LOG Gateway Error Log
/IWFND/APPS_LOG Gateway Application Log Viewer