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: 
hofmann
Active Contributor
0 Kudos

You have SUP running on AWS, now what? The easiest way is to run HWC apps, but what about native apps? SAP provides example apps here on SCN, called SUP101. But how can you run these using your SUP instance?

The SUP101 files you can download (MBO, native, HWC code) are based on the SUP documentation. I will use as the target platform Android, so the SUP guide to follow is the one for the Android scenario. The complete example code for all platforms is available here on SCN.

Using the SUP101 example can be as easy as download, unzip, import, deploy, run. In my case I use a local SUP SDK and a SUP instance on AWS, connected via VPN. Because of this I'm using custom connection profiles for SUP and the sample DB in my SDK. I'm also using my own Eclipse for Android development and did not install ADT into SUP SDK. In case you are using a similar setup, the blog outlines how to adjust the SUP101 example.

Configure MBO

Download and import the MBO project into SUP SDK. The MBO used in the SUP101 example is using the sample DB. The connection parameters of the MBO are defined in the attribute list: Data Source. Normally you do not have to changes these parameters for two simple reasons:

  1. The default name of the data source is My Sample Database. When you are using this data source for the SUP Sample DB connection you are good
  2. When you deploy the MBO you define the server mapping for the connection. Even when your data source to sampledb differs you can just deploy it to get the MBO working.

On the other hand, when you have a custom SUP connection (AWS IP or VPN) it is a good idea to adjust the MBO connection also so you can modify the MBO later. Adjust the connection settings to use your SUP server.

Click o Change Connection Profile and select the data source you created for your SUP instance.

The wizard takes care of the rest, including mapping of the operations.

Do this for both MBOs included in the SUP101 example project. Just a reminder: the SUP server must be online and reachable for this kind of operation:

That’s it. The SUP 101 MBO is now using your SUP server. When you deploy you have to map the local MBO connection to the sampledb connection created on the server:

Native Android app

Download the example SUP101 Android code from SCN. Import the SUP101 example for Android in your Eclipse that you normally use to develop Android apps (read: ADT, AVD already installed, configured and known to work). The online documentation for SUP states that you can install the Android SDK into SUP SDK, but when you are used to use your normal Eclipse installation for Android development you should use that SDK.

Unzip the project and import it into Eclipse. After importing the project this is how your Eclipse should show it:

Adjust the build path of the project:

In the native app you’ll have to adjust the connection parameters:

  • Package: com.sybase.sup.samples.objectapi
  • Class: SUP101SampleActivity.java

Change the SUP connection parameters:

private static String USERNAME = "user";
private static String PASSWORD = "pass";
private static String HOST = "IP of SUP";
private static int PORT = 5001;

Now you can run the app in the simulator.

Detail screen:

Changing the data:

Check that the change is applied on the server. Use SUP SDK to examine the content of the db table customer:

You have now a running SUP101 example project on your SUP AWS instance!

6 Comments
Labels in this area