Monday, 8 December 2014

SAP Fiori Application using SAP River RDE (Web IDE)

 

 SAP Fiori with SAP Web Integrated Development Environment




SAP Web IDE is a next generation, browser based solution which will help developers to work in collaboration and design highly effective UI’s that will work with other SAP applications. Essentially it is Eclipse inside a browser.

Advantages of Web IDE:
1.       Browser based IDE
2.       Easy wizard based UI
3.       Integrated GIT for easier versioning  
4.       Ideal for asynchronous developments
5.       Uses standards such as Orion, GIT.
6.       Designed to support end to end lifecycle for SAPUI5 applications
7.       Extend existing Fiori application
8.       Create new HTML5/ Fiori applications
9.       Always available to the developer.





SAP Web IDE is a part of SAP HANA Cloud Platform. SAP Web IDE accesses destinations defined in HANA Cloud and connect them using a HANA Cloud Connector.









                                                               

Prerequisites
1.       HANA account
2.       HANA Cloud Connector (when connecting to the on premise systems)




Step-by-Step Procedure
1.       Subscribe to SAP Web IDE
2.       Web IDE basic information
3.       GIT information
4.       Creating destinations in HCP
5.       Create a simple Fiori application

Subscribe to SAP Web IDE


1.       Go to https://account.hanatrial.ondemand.com/ and login to the cockpit.
2.        Go to subscriptions section.








3.       In the HTML5 subscription dashboard, link to the RDE is provided






4.       In the roles section, we can define custom roles that will access application deployed or subscribed I your account. Currently we will not define any roles.
5.       Click on the application URL and it will take you to the Web IDE.



WEB IDE basic








1.       On the top we have options which are similar to the Eclipse.
2.       We can create a blank project or select from the templates or select an existing application and start customizing it!

Below images shows the same.





GIT Information


To use GIT in SAP Web Ide, we need to provide username and mail id of the GIT account. We do that in tools->GIT settings




Main operations that we can use using GIT
1.       Configuring GIT for create, read, update, delete repositories
2.       Clone existing GIT repository
3.       View changed files
4.       Commit changes
5.       Push changes.
We will study GIT in detail in the next document.





Creating Destinations in HANA Cloud Portal


Here, in this example we will use public Gateway service to build a Fiori application. So we don’t have to use HANA Cloud Connector. We will simply use destination functionality of HCP.
Destinations in HCP help us to connect to the remote system.
Sapes1.sapdevcenter.com provides open ODATA services, which we will use in creating destinations.
In the cockpit go to Destinations, provide name and relevant details.



We need to ad few new properties which will make the connection to the desired SAP system which will provide us the ODATA.



Save the destination.
Now we will configure destinations for UI5. The HCP needs to know that we are building applications using UI5.
Create 2 destinations as follows. One for UI5 distribution and another for UI5 test distribution.




So, currently we have 3 destinations.




Restart the Web IDE.




Create a simple Fiori application


Now we will see how simple it is to use the ODATA service and to build a Fiori application. Create a new project and select project from template option.
To get access of the ODATA, we need to register for the services. Once registered, we will get the mail with the logon details. Please follow the procedure as mentioned in



We will name it as Test1 and click next.




Now, we need to pass the ODATA reference. As we have mentioned destination in the HCP we will use service URL as an option. Notice that in the destination section we have given only the domain name of the system which we want to connect. So, we will just give relative URL of the service.
We will use sales order service for our demo. /sap/opu/odata/sap/ZGWSAMPLE_SRV/



When we test the service, we will get the list of the functions inside the ODATA.
Click next to continue.
Then we will customize the template according to our need. Note that the template has limited number of fields; we can add more as per requirement.





Now we have created our first Fiori application, without a single line of code!!!
The following structure is created.






The output will be like:



We can customize this application according to our requirement.


In the next blogs we will see:
1.       GIT functionality
2.       Project structure details
3.       HANA cloud connector (installation and configuration)


That’s all!

Important links






Monday, 24 November 2014

SAPUI5 with Google API's



As a constant process of learning SAPUI5, I have published detailed blog on SCN site regarding the use of Goolge API's. It will use the APIS to create a chart.

This is a series of blog which will be updated regularly with new contents.

Part 1 covers the basic operation of adding the API.

Part 2 will show the excat behaviour and complete code.

I will soon update this blog with new findings in SAPUI5 and related topics of Hana cloud portal.

Cheers

Sunday, 24 August 2014

SAPUI5 with Shell Navigation



Backround

SAPUI5 is a latest User Interface(UI) technology by SAP based on HTML5, which is used to build lightweight client applications. The important factor in the success of SAPUI5 is, it uses and supports open source such as CSS, jQuery, Javascript etc. Unlike WebdynPro's(Java/ABAP) which are server dependent, SAPUI5 runtime is a client side HTML5 rendering library, in which we can create applications for both Desktops and Mobiles. Going forward, SAP will recomend the use of SAPUI5 in all of its UI development.



Installation

We can develop and publish the SAPUI5 applications in Eclipse. Installation aand Configuration on SAPUI5 is very easy. Just follow the steps mentioned in this link.


Prerequisites 

To be able to use this blog, you need to complete the installation steps and have a basic knowledge of Java, HTML, Javascript, and Eclipse.


Development

Step 1

Open Eclipse and create an SAPUI5 application project.





We will create a desktop application, so select ui.commons.

Select create initial view check box and give name to the the view.



When we create a view, along with it the controller file also gets created.

xxxx.controller.js is the controller file
xxx.view.js is the view file.

Also an index.html file is created with the first view. This file is used to initialize the application.

Step 2

Create a destination view (Right click the project folder -> New -> Others -> View)





Give name to the file. Select finish.




Step 3

Now we need to initialize the view inside index.html and add the required libraries.




Step 4

To navigate, we will use Shell control. Shell is an application frame with an navigation capability. We will add shell to the index.html file.


Add the desired view to the shell.




Step 5


We will define a model which will hold values at run time in  index.html



This is all we have to do in order to get everything in place. Important point to note here in this example is, the source view needs to be instantiated in the target view. Always!

Next step is simple. Add UI elements in the view, bind the model to the UI elements and navigate.

For complete solution, please follow the link

index.html  

https://drive.google.com/file/d/0B_is7beaY2bIOV9JMUxiSmFOSnc/edit?usp=sharing

First View

https://drive.google.com/file/d/0B_is7beaY2bIcFQxb1FXdmZfMjA/edit?usp=sharing


Output

Right click index.html and run as web preview.





That's it!! I am sharing the source files of this blog which would help you.

Final Thoughts 

SAPUI5 has tremendous potential looking at the future. So start learning it today!

Keep visiting for latest blogs on SAPUI5.

All the best!