SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Posted by Chandrashekhar Mahajan Jun 11, 2013 It was my dream to build at least one android application which will display SAP data on mobile/tablet devices. As I am not very much skilled in developing android application, I was struggling on how to start with this. And then I came across GWPA and started exploring it. I explored it; I liked it and now I'm loving it! It is very simple to create android application consuming OData with the help of Gateway Productivity Accelerator (GWPA) plug in installed on Eclipse IDE. Let’s get into the details, Introduction In this technical blog, I will focus on how we can build simple Android application consuming OData service with the help of SAP NetWeaver Gateway Productivity Accelerator (GWPA). To know more about GWPA, please refer http://scn.sap.com/community/netweaver-gateway/blog/2013/06/03/ gateway-productivity-accelerator-10-launched It can be downloaded from https://tools.hana.ondemand.com/#gateway Prerequisites – We need to follow steps as mentioned below [Reference - https://tools.hana.ondemand.com/#gateway ]
Installation Instructions To start using SAP NetWeaver Gateway Productivity Accelerator (GWPA), proceed as follows: 1. Download and install Java SE6 . 2. Download and install the Eclipse IDE for Java EE Developers from Eclipse . 3. Install the SAP NetWeaver Gateway Productivity Accelerator (GWPA) feature(s). From the Eclipse menu, choose Help > Install New Software... Add the URL https://tools.hana.ondemand.com/juno. Select the feature(s) you want to install and follow the steps of the installation wizard. For information about the individual features, see the documentation. To Develop Android application using GWPA, we need to install Android SDK tools on Eclipse IDE and then install GWPA features. • Toolkit for Android (GWPA)
Generated by Jive on 2014-05-15+02:00 1
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) The Android Toolkit consists of an environment, a pattern and templates, suitable for developing SAP solutions for use in the Android environment. Prerequisite for installation of this feature is to install the Android SDK Tools. Once you install Android SDK tools, it will look as below under Window --> preferences.
After doing all these steps, I faced issue with android application regarding getting error, “R cannot be resolved to a variable” and hence after searching lot on it, I resolved it by installing Android SDK Build-tools and hence your Android SDK Manager image should look as below.
After this step, you can start installing Toolkit for Android (GWPA) as mentioned below. You need to select checkbox for Toolkit for Android (GWPA).
Generated by Jive on 2014-05-15+02:00 2
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Once installed successfully, you can open Windows --> Preferences and check under SAP NetWeaver Gateway.
Generated by Jive on 2014-05-15+02:00 3
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Please note: we do not require separate installation for SAP OData Mobile Client SDK. With all above required steps, you are now ready to develop Android application! Procedure Create new project. Under OData Development, select Starter Application Project.
Generated by Jive on 2014-05-15+02:00 4
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Give appropriate project name, select Build Target and package name and press Next.
Generated by Jive on 2014-05-15+02:00 5
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
We can create 3 types of application using below templates. Here, we will select List/Details Application.
Generated by Jive on 2014-05-15+02:00 6
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Now, we need to select service URL from Remote location. Click on Catalog.
Generated by Jive on 2014-05-15+02:00 7
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Click on Manage Connection if no connection is maintained earlier.
As displayed below, provide required details and click OK.
P.S. - If you do not have access to SAP NetWeaver Gateway system then you can access demo system from SAP at http://scn.sap.com/docs/DOC-31221?rid=/webcontent/uuid/1051f6d9-e87a-2e10-d188-e2786c7878b1 and accordingly configure connections and access OData services. Please refer my blog http://scn.sap.com/ community/developer-center/front-end/blog/2013/05/31/how-to-create-sapui5-application-consuming-gatewayservice-with-the-help-of-sap-nw-gateway-plugin and see section Additional Details for more information.
Generated by Jive on 2014-05-15+02:00 8
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) If the connection is made, you will be able to see services. For this demo, we will select service RMTSAMPLEFLIGHT and click OK.
Provide Activity title, select Activity type and add fields.
Generated by Jive on 2014-05-15+02:00 9
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Add 2nd Activity of type Details.
Generated by Jive on 2014-05-15+02:00 10
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
We selected Flights as List activity and FlightBooking as Details Activity. Our final project structure will look something like below screen.
Generated by Jive on 2014-05-15+02:00 11
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
As displayed below, SAP Gateway system service details will be found under res/raw folder.
Generated by Jive on 2014-05-15+02:00 12
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Also the auto-generated code provides commented code to handle Sybase Unwired Platform (SUP) server mode. This is really nice feature as when we have SUP, we need not to modify much logic.
Generated by Jive on 2014-05-15+02:00 13
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Now we are ready with Android application and want to test it. To test android application, you can use Real device or Android Emulator http://developer.android.com/tools/help/emulator.html We need to manage device using AVD. Please refer http://developer.android.com/tools/devices/index.html An Android Virtual Device (AVD) is an emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android Emulator. As displayed below, AVD can be added.
Generated by Jive on 2014-05-15+02:00 14
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
That’s it!!! Now we are absolutely ready to test our application on emulator. We need to test as mentioned below,
Generated by Jive on 2014-05-15+02:00 15
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Under Console screen, you will be able to see the log of AVD launch etc...
Please note: Android emulator sometime is very slow and hence you need to be patience and can take break for Coffee
.
AVD will launch emulator device as displayed below,
Generated by Jive on 2014-05-15+02:00 16
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Here sometime you need to press F2 or keyboard commands as per your AVD settings. Refer Keyboard commands at http://developer.android.com/tools/help/emulator.html You may see screen as below. Here you can see all your Android based application. In this case, you can see MyFlightAndroidApp. Double click on app icon.
Generated by Jive on 2014-05-15+02:00 17
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
It will launch login screen. Provide credentials that you used while connecting to your gateway SAP system.
Generated by Jive on 2014-05-15+02:00 18
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Under LogCat window, you will see the log of application being executed.
Generated by Jive on 2014-05-15+02:00 19
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) After successful launching, you will see the Flights list view.
Selecting any item will open details screen for FlightBooking as below
Generated by Jive on 2014-05-15+02:00 20
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
You can search for different flight id and it will be displayed accordingly.
Generated by Jive on 2014-05-15+02:00 21
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Note that under LogCat window, all these events will be logged which can be very useful for troubleshooting purpose.
Closing Remarks – With the help of SAP NetWeaver Gateway Productivity Accelerator (GWPA), we can create Android application with very minimum efforts. This step-by-step blog is written to explain how we can, 1. 2. 3. 4. 5.
Install Android SDK tools, GWPA etc. in Eclipse IDE. Configure SAP NetWeaver Gateway system and search for OData services Create simple Android application Configure and Launch Android application on ADV Use Console and LogCat for troubleshoot purpose
Generated by Jive on 2014-05-15+02:00 22
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) GWPA is extremely helpful tool from SAP to leverage OData capability and it will certainly helpful for all developer community who want to develop simple android application based on SAP business suite data in the form of OData. It is generating starter application which we can modify as per our business/organizational requirement 9286 Views Tags: mobility, sap_netweaver_gateway, android, odata, android_app, android_development, gwpa, gateway_productivity_accelerator
José Jaimes in response to Syam Babu on page 23 Apr 4, 2014 3:49 PM Thanks for the information. Do you manage information about the License. I would like to know If I decide to donwload the Add-on from Market Place and I proceed to install it, which are the fees associated? Syam Babu in response to José Jaimes on page 23 Apr 4, 2014 6:32 AM Hi Jose. Can you please look into below link for GW installation and Configuration document. http://scn.sap.com/docs/DOC-16328 Thanks, Syam José Jaimes Apr 3, 2014 4:14 PM Hi Mahajan: Could you give information about the GW instalation? I mean, if I decide to install the GW in my server, will it be necessary to transport it to each enviroment? Haw you information about it? thanks. Chandrashekhar Mahajan in response to Mariela Castro Kohler on page 23 Feb 13, 2014 12:06 PM Hello Mariela,
Glad to hear your comments Regards, Chandra
Generated by Jive on 2014-05-15+02:00 23
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Mariela Castro Kohler Feb 13, 2014 12:02 PM Hallo Chandrashekhar Thank you very much for this Information. I have worked with the Demo but finally I have a clear Picture how this works and I will try to apply it to our own ERP system. Best regards, Mariela jitendra kansal in response to Ankur Jindal on page 24 Feb 5, 2014 6:55 AM Hi Ankur Jindal I am able to run this app but i dont see res folder in the project. My project structure is what i mentioned in my first reply. How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Ankur Jindal in response to jitendra kansal on page 24 Feb 5, 2014 6:43 AM Hi Jitendra, I faced the same problem once in the past when the res folder was not getting generated. I checked on various blogs and found that in the Android SDK Manager, Android SDK platform-tools and build-tools were not updated to the latest version. I updated that and the problem got resolved. Please check in your side if it is updated to latest version or not. Regards, Ankur Jindal jitendra kansalin response to on page 26 Feb 5, 2014 5:53 AM Hi Chandrashekhar Mahajan Carlos RogganChandrashekhar Mahajan
thanks Guys.. i am able to resolve this issue. What i did was, i just uninstalled android toolkit and re installed again and created the whole project from beginning. For me Android Toolkit for Android (GWPA, Developer Edition) version is 1.1.2 ( i guess latest one) and supplied SDK 3.0
Generated by Jive on 2014-05-15+02:00 24
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
i am able to run the app and can see the desired output. Rgrds, Jitendra Carlos Roggan in response to jitendra kansal on page 26 Feb 4, 2014 12:59 PM Hi Jitendra, regarding the compile error, I had such issues from time to time. You can see that the code is trying to access a resource (xml file) which should be located in the raw folder. In the following line, the same is being done with the rmtsampleflightmetadata-resource succesfully. Now, in order to investigate further, please look into the raw-folder and check if the servicedocument file is there. 1) If not, then you probably better repeat the generation (or try to manually download the file and copy into the folder...) 2) If this file is there, then maybe only the import statement is missing? try to import it by pressing Ctrl + O in the Java editor in eclipse 3) If it doesn't help, you can check if the java-representation of the resource in the R class has been properly generated. If yes, then it can be accessed via import-statement. If no, better regenerate the project 4) If you repeat the generation and the servicedocument xml file is still not copied to the folder, then the reason might be that it hasn't been successfully downloaded to the cache. In this case, you have to do a refresh in the Service Catalog View: Open the Service Catalog View, select the connection and press the "Refresh" button.
Generated by Jive on 2014-05-15+02:00 25
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Hope that any of these hints helps to solve the prob;-) Cheers, Carlos in response to jitendra kansal on page 26 Feb 4, 2014 12:23 PM Hi Jitendra, 1) Yes you are correct. It is developed using GWPA with OData Development. 2) I opened my project and can see com.example.proxy under src folder as well as
res folder
I guess there might be some issues with android SDK which might not able to generate required files. Meanwhile, please check your SDK version under Android toolkit as mentioned in below screenshot. http://scn.sap.com/servlet/JiveServlet/downloadImage/38-86931-229336/620-379/android_gw4.jpg Regards, Chandra jitendra kansal Feb 4, 2014 11:22 AM Hi Chandrashekhar Mahajan I need your help. I am just trying this app and got stuck in between. I have few queries, 1. This app has to be develop in OData perspective in Eclipse. Right? 2. I followed each steps creating project, select List/Details Application, selecting respective category from service catalog. Once i finish, i get a different project structure what you showed. e.g. I don't find com.example.proxy under src folder. I dont find res folder as well. And jar files have different naming along with different version.
Generated by Jive on 2014-05-15+02:00 26
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Besides, i am getting one error:
Please share your understanding.
Generated by Jive on 2014-05-15+02:00 27
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Rgrds, Jitendra Ankur Jindal Feb 3, 2014 12:52 PM Hi Chandrashekhar, Thanks for this blog. Its so detailed that i m able to create and run sample flight app. I have a request regarding the app. Can you please explain: * How we can add label to flight list items? It is without any label and its difficult for user to understand the field. * If we want to add more activities after creating the app, how can we do that? Right now, we have created two activities in the app. Regards, Ankur Jindal Praveer Kumar Sen in response to Carlos Roggan on page 28 Jan 25, 2014 6:57 PM Hi Carlos, Can you tell me, how we can search the Port No. I have installed the SAP Netweaver 7.4 in my personal system and i wants to access the same odata service. Below is my system information, SID: PRD Port?? System HostName: PRVSAP. Please help. Thanks & regards. Praveer. Praveer Kumar Sen in response to Carlos Roggan on page 28 Jan 24, 2014 5:42 PM Hi Carlos, Thanks, now it's working.. Regards. Praveer. Carlos Roggan in response to Praveer Kumar Sen on page 29 Jan 24, 2014 10:32 AM
Generated by Jive on 2014-05-15+02:00 28
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Hi Praveer,
this is how the connection dialog looks like, this works for me. Of course, you have to enter your personal credentials. Since this is HTTPS connection, you have import the certificate into your java virtual machine (the java version that is used by your Eclipse.) If you haven't the certificate imported, you get a "SSL handshake error" ( you might have to look into the Error Log in order to see the exact error text) Kind regards, Carlos Praveer Kumar Sen in response to Carlos Roggan on page 30 Jan 23, 2014 3:37 PM Hi Carlos, Actually, i am able to create a new connection under the SAP Netweaver Gateway Connection. It's giving the Network Connection Error, but i am able to connect through the SAP Gui. this is the host name i am providing sapes1.sapdevcenter.com and the server port is 80. Please check, is this information are correct or not.
Generated by Jive on 2014-05-15+02:00 29
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Thanks & regards. Praveer Kumar Sen. Carlos Roggan in response to Praveer Kumar Sen on page 30 Jan 23, 2014 9:06 AM Hi Praveen, the Gateway Demo system exposes Gateway services (based on OData). Such service can be accessed via browser, e.g. you can open this URL in browser: https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/?sap-ds-debug=true Within Eclipse, you can access such service programmatically The Starter Application Wizard generates code which accesses a service programmatiacally. You can enter the above mentioned URL directly in the wizard. In Eclipse, you have to : Click on File-menu, then New -> Project -> OData Development -> Starter App Project Enter some details, as described in this blog Click next select a template click next In the Field "Service URL", you can paste the following URL: https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/?sap-ds-debug=true Then press GO. -> In this moment, your're accessing the Gateway-OData-Service from Eclipse. Does this work for you? This description is slightly different from the procedure described in Chandrashehas Blog, but the result is the same. Kind Regards, Carlos Praveer Kumar Sen in response to Carlos Roggan on page 31 Jan 22, 2014 7:37 PM Hi Carlos, Thanks For reply, Actually i am trying with SAP Netweaver Demo system ( http://scn.sap.com/docs/DOC-31221 I have configure the system in SAP gui, and it's working fine.
Generated by Jive on 2014-05-15+02:00 30
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) But how i can access the oData and Gateway from the Eclipse. Please help. Thanks & regards. Praveer. Carlos Roggan in response to Praveer Kumar Sen on page 33 Jan 22, 2014 2:52 PM Hi Praveer, 1) humm - maybe you should check if the GWPA plugins really have been installed properly. There are several ways to check. E.g. check if the OData perspective is available in Eclipse. Go to Eclipse main menu -> Window -> Open Perspective -> other -> OData
If the entry OData is there, then the wizard should also be there (if GWPA installation didn't fail)
If the entry is not in this dialog, you should check if the installation has really been succesfully done.
Generated by Jive on 2014-05-15+02:00 31
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) You can as well check under the Installation Details at Eclipse main menu -> Help -> about Eclipse -> Installation Details button
If you see ODataModeler and Tools Core for SAP, then you should maybe check to open the wizard via the Service Catalog View: Go to: main menu -> Window -> show view -> other -> SAP NW Gateway -> Service Catalog
after opening the Service Catalog view, you can expand your connection (have you been able to create one?) and select a service and open the context menu on it. There, you have an entry to create a Starter Application Project:
Generated by Jive on 2014-05-15+02:00 32
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Hope this helps;-) Cheers, Carlos Praveer Kumar Sen Jan 22, 2014 7:09 AM Hi Chandrashekhar, I have installed the all are the initial component in eclipse, 1. Eclipse JUNO 4.2 2. Android SDK 3. SAP Netweare Gatway Plugins. But i am not getting the oData Development option to create a new mobile application. Please Help. Thanks & Regards. Praveer. Carlos Roggan in response to Navaneeth Prodhutur on page 35 Jan 20, 2014 10:07 AM Hi Navaneeth, Here are some details about defining and starting with a new Workspace:
Generated by Jive on 2014-05-15+02:00 33
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) In your running Eclipse, tell Eclipse to ask you for the Workspace on every startup of Eclipse. Eclipse main menu -> Window -> Preferences -> General -> Startup and Shutdown Enable the checkbox "Prompt for workspace..."
Then restart Eclipse. On startup, you'll get this dialog:
Here, you can enter a new, empty folder. That's it. After startup, you'll get a fresh, clean Eclipse. Then you can re-generate a Starter Application and the build error (which isn't caused by the Starter Application wizard) shouldn't occur again.
Generated by Jive on 2014-05-15+02:00 34
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
This is the workaround to get around your problem. Prerequisite is of course that there are no restrictions on Operating System level, which would hinder Eclipse from writing files. Hope this helps. Cheers, Carlos Navaneeth Prodhutur Jan 20, 2014 8:12 AM HI Carlons, I followed the steps u have prescribed but i am not getting the result can u explain in detail Thanks in avance Regards Navaneeth Prodhutur Carlos Roggan in response to Navaneeth Prodhutur on page 36 Jan 16, 2014 11:32 AM Hi Navaneeth, I've had such error as well, sometimes in the past I think I did the following: - delete the bin folder from within command line. This would be in order to make sure that the folder gets re-generated and is really empty Furthermore, I would recommend to use a workspace that is located at a different location. E.g. C: \SapWorkSpace It is no problem to use even multiple workspaces. So just shutdown Eclipse and start it with a different workspace. This implies that you start with an empty workspace, since all settings and other created projects are stored in the other workspace. But if desired, you can switch to the previous workspace by using the Eclipse main menu, then File -> "Switch Workspace" -> select the desired workspace. Hope this helps;-) Cheers, Carlos Midhun VP in response to Devraj Singh on page 45 Jan 16, 2014 10:00 AM Devraj, Using SUP we can develop mainly two types of native mobile apps; Offline apps (MBO) and Online apps (Odata). The example given is using Odata consumption in mobile app using GWPA as a development tool. In the case of Odata+SUP, SUP acts as a online data proxy. It is the recommended approach from SAP. In this
Generated by Jive on 2014-05-15+02:00 35
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) case in SUP there will not be any development (ex.MBO development) and SUP is needed here for security, push notifications, SSO etc. Hope that helps you. - Midhun VP Navaneeth Prodhutur Jan 16, 2014 8:38 AM Hi Chandrasekhar. Thank you so much for this blog.i have followed all the steps above but i am getting an error like The project was not built due to "Could not write file: /Users/navneeth.kumar/Desktop/Sap WorkSpace/ SapDemo/bin.". Fix the problem, then try refreshing this project and building it since it may be inconsistent
I Clean the build Then also i am getting the same problem Thanks in advance
Regards Navaneeth Prodhutur Carlos Roggan in response to suman kumar chinnam on page 39 Jan 3, 2014 10:09 AM Hi Suman, I've had such issue, same error message. I checked and indeed, the R class was missing. Reason: the "Android Build Tools" hadn't been installed. Solution: start SDK Manager and expand category "Tools" and select "Android SDK Build-tools" and install. This can be seen in the screenshot above in this blog. Since it is located in a different category, it can be easily overseen. Hope this is helpful. Cheers, Carlos Carlos Roggan Nov 26, 2013 5:27 PM Hi Chandra, this is a good blog and your support to the questions is interesting and helpfule as well! keep goin'...!...;-) Carlos Roggan in response to Syam Babu on page 37 Nov 26, 2013 5:24 PM
Generated by Jive on 2014-05-15+02:00 36
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Hi Syam, could you please check if you have marked the checkbox "contact all updatesites during install..." in the "Install" - wizard? The background is: you're installing the feature "...dt.framework.model". This feature has a dependency to EMF You can install EMF (and all other prerequisites) manually. Or you can let eclipse do it automatically (this is the typical choice) This will install the prerequisites under the hood, while installing GWPA. But only if all the software-sites that you have configured, contain the prerequisites. Cheers, Carlos Syam Babu Nov 25, 2013 9:50 AM Hi Chandra, When i am installing the GWPAM components through below link https://tools.hana.ondemand.com/juno Getting below error like "Cannot complete the install because one or more required items could not be found." Cannot complete the install because one or more required items could not be found. Software being installed: Toolkit for Android (GWPA, Developer Edition) 1.1.1 (com.sap.odata.dt.cons.toolkit.android.feature.feature.group 1.1.1) Missing requirement: OData Model 1.1.1 (com.sap.odata.dt.framework.model 1.1.1) requires 'bundle org.eclipse.emf.validation 1.4.0' but it could not be found Cannot satisfy dependency: From: Framework Wizard Exploration Component 1.1.1 (com.sap.odata.dt.component.exploration 1.1.1) To: bundle com.sap.odata.dt.framework.model 0.0.0 Cannot satisfy dependency: From: Toolkit for Android (GWPA, Developer Edition) 1.1.1 (com.sap.odata.dt.cons.toolkit.android.feature.feature.group 1.1.1) To: com.sap.odata.dt.cons.toolkit.android.templates [1.1.1] Cannot satisfy dependency: From: OData Android Consumption Toolkit Templates 1.1.1 (com.sap.odata.dt.cons.toolkit.android.templates 1.1.1) To: bundle com.sap.odata.dt.component.exploration 0.0.0
Thanks, Syam Chandrashekhar Mahajan in response to Seenu Katha on page 38
Generated by Jive on 2014-05-15+02:00 37
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Nov 18, 2013 11:40 AM Hi Seenu, I do not have much details on SUP related stuff....I did my android app testing on emulator. I am sorry but I do not have answer to your question related to SUP part. Regards, Chandra Seenu Katha Nov 14, 2013 3:24 PM Hi Chandrasekhar. Thank you so much for this blog. This helped me to achieve my first ever android app based on GW. I completed your steps and I was successful. Then I tried to see this app working with SUP 2.2 SP04. Then I uncommented the code from loginactivity.java, supHelper.java and then I completed maintaing the SUP details in rmtsampleflightservice.properties file. I followed the steps from this link. https://help.hana.ondemand.com/gateway_gwpa/frameset.htm?3c3c5a4d9e834eaf927ca3c01807f9ef.html But I am getting syntax errors in supHelper.java and loginactivity.java. It is mainly because of SUP version 2,2 SP04. In this version, there is no sup-json.jar. So auto generated code from GWPA points to liteUserManager.class that is available from sup-json.jar, which is available only SUP 2.1. So do you have the sample code for supHelper.java that can work for SUP2.2? This must use ODPUserManager.class from SUPProxyClient-2.2.jar. Pls either point me to download sup-json.jar file or any sample code of supHelper.java for SUP 2.2. Thanks seenu Neftalí López in response to Chandrashekhar Mahajan on page 39 Aug 23, 2013 6:36 PM Hi Suman. The trouble that you describe is related with the environment. The environment needed for this developments use standard libraries from Android and SAP owner's, and both libraries have access to folder res/raw. If you don't have correctly installed the SAP libraries, the sentences in
Generated by Jive on 2014-05-15+02:00 38
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) the example that try to access resources in this folder can't find the correct libraries and the java runtime try to use the standard libraries. Try again each step from the procedure, I am sure that you omit some step, or you don't do it exactly that the procedure says. I hope this help you. Regards. Chandrashekhar Mahajan in response to suman kumar chinnam on page 39 Aug 23, 2013 2:51 PM Hi, I hope you have downloaded Eclipse IDE fot Java EE as mentioned below. Download and install the Eclipse IDE for Java EE Developers from Eclipse .
Because even I had got similar kind of error but I resolved by installing Eclipse IDE as mentioned above and then following subsequent steps. Regards, Chandra suman kumar chinnam Aug 23, 2013 2:03 PM Hi Chandra, Thanks for posting such a detailed Blog. I have exactly followed steps as you mentioned above and I was able to create project but ended up with errors coming like "R cannot be resolved to a variable". I dont know how to correct this error.I have installed Android(4.2.2) from SDK manager even before GWA toolkit for Android. Can you help me to resolve this. Thanks, Suman Neftalí López in response to Vijay Vegesana on page 40 Aug 17, 2013 12:30 AM Hi Chandra. Great work and very helpful!. Regards. Vijay Vegesana in response to Chandrashekhar Mahajan on page 40
Generated by Jive on 2014-05-15+02:00 39
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Aug 14, 2013 2:07 PM Thanks chandra solved it Vijay Vegesana in response to Syam Babu on page 40 Aug 14, 2013 2:07 PM Thanks Syam solved Vijay Vegesana in response to Vijay Vegesana on page 40 Aug 14, 2013 1:50 PM Thanks chandra for quick reply, i tried that but, mt demo system host name is lvpal259.dmzpal.sap.corp ..how to find port number Vijay Vegesana in response to Syam Babu on page 40 Aug 14, 2013 1:35 PM Hi syam, Thanks for response, i tried all those possibilities before itself , but still not able to connect. Chandrashekhar Mahajan in response to Vijay Vegesana on page 40 Aug 14, 2013 12:50 PM Hi, you can get the host name from SAP logon pad. select the system and right click and then select properties. here application server name is nothing but the host name. Yes the port is generally 80. for the SAP Demo Gateway system the details are, Server Host: sapes1.sapdevcenter.com Server Port: 443 and
User ID and password is provided by ====> SAP DevCenter
Regards, Chandra Syam Babu Aug 14, 2013 12:50 PM Hi Vijay, Can you look into below link, http://scn.sap.com/docs/DOC-40986 Thanks, Syam
Generated by Jive on 2014-05-15+02:00 40
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Vijay Vegesana Aug 14, 2013 12:33 PM Hi Chandra, Now i m able to do so, but still in manage connections, from where i need to find server host and server port in sap. Checked from SM51, SMMS, transactions but still not able to get the exact one. Server host name i got from System->status. though port number will be always 80, i just want to know from where i can see these server port details.please guide me Regards, Vijay Vijay Vegesana Aug 13, 2013 1:41 AM Hi Chandra, thanks for posting the document step by step.it is really good exposure. For me when i am trying to do ..i got struct while creating a new project and the path Starter Application Project is not available. Can you please help me? Regards, Vijay ayo shaba Jul 31, 2013 9:47 PM Great blog and thanks for sharing. Will definitely try this. Aamod Dhople in response to divyesh vasani on page 42 Jul 22, 2013 7:16 PM Divyesh, You need to select "Use HTTPS". Also save your user credentials for connecting to Demo system. You will then be able to see the services. When you finish developing the application and try running it from eclipse as "Web App preview", you will get a popup for connecting to the server and then you should be able to see the data. Hope this helps. Aamod
Generated by Jive on 2014-05-15+02:00 41
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Devraj Singh in response to Chandrashekhar Mahajan on page 43 Jul 19, 2013 8:51 AM Dear ChandraShekhar, I have downloaded SAP gateway demo linux server (both Fedora and Suse based) and trying to configure it. There are below issue with Fedora setup. After installing SAP gateway on fedora, it has created an icon on desktop and when I am starting SAPMC icon. it is asking for details like host name and port along with Optional details like Message server details. But in help document pdf it is clearly shown that there will be a direct NPL shortcut on logon Pad. Q 1 - May I know if I am doing any thing of wrong direction. Q 2 - What I need to provide details in for host name and message server.
For Suse.. It is providing me NPL shortcut in which there are 3 things 1 - Database 2 - DVEBM GS42 on NPLHOst 3 - SCS00 on nplhost Every time when i am starting NPL, database is coming on Green but 2nd and 3rd options were always failing in due to problem in message server. Any idea what should I do to make any of them working so that I can move further. Reagrds Dev divyesh vasani Jul 18, 2013 11:28 AM Hi Chandrashekar, Nice blog. I tried to add connection to Netweaver gateway demo system in Eclipse. Parameters : No HTTPS connection Host name: sapes1.sapdevcenter.com Port:443.
Generated by Jive on 2014-05-15+02:00 42
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Note that I am able to connect to ES1 via SAPGui, so user name is correct one. I am trying hard, can you guide me pls? Divyesh Madhumitha S Jul 5, 2013 9:45 AM Hi Chandrashekar, From your blog ,I could not understand how the dynamic input from the mobile user is passed to the Odata service . I have seen many blogs where the developer reconstructs the Odata service url with the input and filter criteria. My question is how does the eclipse plug-in assists the developer to determine what is the input to be passed to the Odata service ? Chandrashekhar Mahajan in response to Devraj Singh on page 43 Jun 25, 2013 8:26 AM Thanks Devraj Singh in response to Chandrashekhar Mahajan on page 43 Jun 25, 2013 7:05 AM Thank you very much Chandra. You are a champ :-) Syam Babu Jun 23, 2013 2:09 PM Nice Blog Chandrashekhar Mahajan in response to Devraj Singh on page 43 Jun 23, 2013 12:45 PM Use below details, Server Host: sapes1.sapdevcenter.com Server Port: 443 and User ID and password is provided by ====> SAP DevCenter Regards, Chandra Devraj Singh in response to Chandrashekhar Mahajan on page 44 Jun 22, 2013 6:14 AM Thanks Chandrashekhar. One more issue, While configuring SAP backend, I need to provide connection parameter as below.
Generated by Jive on 2014-05-15+02:00 43
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Server Host Port Client User name Password I have gone through this ----> http://scn.sap.com/docs/DOC-40986 and tried Server Host (One by one) ====> erpgw.sapdevcenter.com & lvpal259.dmzpal.sap.corp Port ====> 80 User ID and password is provided by ====> SAP DevCenter But still not able to establish connection. It will be great if you can suggest on the same. Regards Devraj Chandrashekhar Mahajan in response to Devraj Singh on page 45 Jun 21, 2013 12:18 PM Hi Devraj, Q 1 - First I want to understand what is the basic diff with creating an andriod app in SAP SuP & GWPA.
To anwer your question, we can create native android application using both SAP SUP or GWPA. again SUP can be used as an additional layer for device managment and user management. Using GWPA, we can create simple starter applications cosuming OData services. and I believe even with SUP there might be APIs avaialable by which we can create android app cosuming OData services. I hope this might answer your question to some extend. [P.S - with SUP and MBO, we can create offline scenario based android apps]
Regarding Android SDK path under Windows --> Preferences, you need to select path of your Android SDK folder.This could be C:\android\sdk . please find the path where you stored your ADT SDK. [also refer http:// developer.android.com/sdk/installing/installing-adt.html for more details]
Generated by Jive on 2014-05-15+02:00 44
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA) Regards, Chandra Devraj Singh Jun 21, 2013 9:41 AM Hi Chandrashekhar,
I am a beginner in SAP Mobility n App developments.
Q 1 - First I want to understand what is the basic diff with creating an andriod app in SAP SuP & GWPA. I was following this blog very interestingly but below two points stopped my journey ahead. Request you to help me on below issue. As you have mentioned above To Develop Android application using GWPA, we need to install Android SDK tools on Eclipse IDE and then install GWPA features.
As soon as I installed Eclipse and trying to install Andriod SDK in preferences window it was asking for a Path (SDK Location) and was giving error "Could not find folder Tools inside ...." when I followed below path. C:\Downloads\eclipse-jee-juno-SR2-win32\eclipse\plugins \com.android.ide.eclipse.adt.package_22.0.1.v201305230001--685705\com\android\ide\eclipse\adt Then I searched Tools folder using window search and i found it under "C:\Program Files\Oracle\JavaFX 2.1 SDK" so I opted for it.. correct me if i am going wrong.
Regards Devraj Chandrashekhar Mahajan in response to Altaf Asif on page 45 Jun 20, 2013 4:59 PM Thanks Altaf ! Altaf Asif Jun 20, 2013 3:39 PM Great document!!! Altaf Asif Jun 20, 2013 3:39 PM Hello Chandrashekhar,
Generated by Jive on 2014-05-15+02:00 45
SAP NetWeaver Gateway: How to create Android Application consuming OData Service with help of Gateway Productivity Accelerator (GWPA)
Great document!!! thanx alot for sharing your experiences.
Regards, Chandrashekhar Mahajan in response to Paul Aschmann on page 46 Jun 12, 2013 11:49 AM Hi Paul, Thanks a lot for your comments! Yes I agree with you. These types of tools really makes development work easy and we can learn, explore lot many things quickly. We can build demos, PoC's for business so that business can decide to adopt newer technological stuff. and about android emulator, I am planning to install HAXM (Intel Hardware Accelerated Execution Manager) which may boost the speed of emulator ( http://stackoverflow.com/questions/1554099/slow-android-emulator)
This might reduce my coffee breaks Regards, Chandra Paul Aschmann Jun 11, 2013 8:52 PM Hi Chandrashekhar,
Thanks for sharing your positive experience with GWPA and fulfilling your dream of a Mobile SAP app . The types of tools are great as they can really make POC's easier to accomplish at little cost while encouraging the business to adopt innovative solutions. Cheers, Paul
PS. My android emulator also makes me drink too much coffee
Generated by Jive on 2014-05-15+02:00 46