Sunday, 4 October 2015

SAP BPM Analytics


Better insight into daily business operation


SAP BPM analytics helps user to view processes and tasks in a graphical format which helps to understand the patterns very easily and we can manage them using API’s. Detailed statistical level information about a process/tasks makes user to take important decisions and concentrate on the process/task which are causing overheads and thereby  improve the performance of the system.

Basic advantage of BPM analytics are:
1.       Out of the box Dashboard (http://<hostname>:<port>/bpmanalytics)
2.       Analyze the process and task statistics in the graphical charts.
3.       View processes and tasks based on the various timeframe filters.
4.       View the number of processes and tasks in error state, tasks without owner and escalated tasks.
5.       Data export functionality to analyze data in details.
6.       Direct navigation to NWA from dashboard
7.       API access to processes and tasks


SAP BPM Analytics Dashboard
In this dashboard we can see which process is triggered the most, which process went into error mode etc.  All statistical information about the process can be seen in this dashboard.






We can see the details about a particular process and also when we click on a particular process, we can navigate to NWA to perform actions to this process.



To look at more elaborated details, we can navigate to the process tab and filter down the contents fro example time frame filter.



At the task level we can see all the tasks which are in progress, completed or failed. For how long the task was active, the duration for particular task, the open time for a task etc.




BPM Analytics Public API


These API’s helps obtain the analytical information about the processes, tasks and events.
Few important classes:
ProcessStatusStatistics
ProcessDurationStatistics
TaskStatusStatistics
TaskDurationStatistics
AnalyticsManager 

We also can create an custom SAPUI5 application and import all the BPM Analytical information via web service and also apply our own filter criteria.





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!

Saturday, 28 January 2012

INDIA AND ITS CHALLENGES IN THE NEXT DECADE

It is said that no other democracy has ever achieved levels of sustained economic growth comparable to India's over the last two decades.And the reason for this growth lies in the fact that India has the highest number of working age population.Having said that we as Indians cannot say that we are the world's best in any field.We are lagging somewhere,and the answer WHY is still unknown!!

The reason for the lack of progress in India is not the paucity of resources,but the lack of management talent and professionalism.Being professional in our field helps us to utilise the resources to the best of our need.

The biggest challenge that India is facing is the population.With increase in population we have to produce more and more resources.And being such a dynamic and huge nation it becomes very difficult to manage the needs of the people in the remote corner of the country.

The second challenge in front of us is lack of awareness for education.I feel that education should not be a option.It should be compulsory for each and everyone.Education acts as a catalyst in progress of any country and its success.In India we have a education system where merit does not matter much.Instead reservation is the main criteria for selection.I believe that reservations in education till school time is desirable.But reservation in Higher studies should be only on merit.Ironically today people are using backwardness as an instrument for progress instead of hard work and intelligence.I think we are the only nation in the world where people fight to be called as backwards.!!!

Having said that,I believe we have the potential to become the worlds leader in Manufacturing,Production,IT and Telecommunication.And I say we have  potential,because the youth in India is now thinking global.He has changed his traditional mindset of getting job and work under a organisation.Today he thinks of setting up his own company and be a leader himself.This mindset leads to a tendency of facing the challenges rather than ignoring it. 

I'm not expert in  economics nor am I eligible to speak on future of India.This article is about what i feel and what i read and what i experience.My sole intention is to make youth aware of what he should do.Instead of wasting time in fearing about the future,he should welcome it with honesty and smartness.Even if two people get inspired by this work then my job here is done.

"Pursue excellence,Aim high and dream big.Be open to new ideas and be young at heart"
-N R Narayana Murty

Thursday, 26 January 2012

Easy way for XML parsing using JAVA

HI,
In this article we will go through a very common scenario to parse the XML file and make the data persistent.

Making the data persistent means storing the data into the database,by means of any coding language such as java.Various tools such as Apache xerces,dom4j,neopull etc..are availbale to parse the XML file.
But it is very important to to understand the basic concept of parsing first and  once when you get the basic idea, you can jump for bigger step..parsing using frameworks..

We will start with the basic stuff

Why XML is  popular??

And the answer is very obvious,and straight froward.It is very simple and convenient.
It is simple in the sense it is highly structured and anyone with little knowledge of HTML can read and understand the contents of the XML file.And convenient because the XML data can be manipulated according to our need.

Why Parsing is necessary??

XML is just a carrier of the data from one platform to another.We need some sort of technique through which we can extract the XML data and make that data visible to our application.This is called PARSING.


Which Parser to use and when??

Selecting the perfect parser for our need is the first step that we all should consider.Among the most popular parser DOM and SAX are used.Both are used for a diffrent purpose.

DOM(Document Object Model): As the name suggest this is the dynamic approach of parsing.It defines the objects and method interface through which you can parse the XML document.In simple words if you have lot of memory available for running the code the you can choose this approach because DOM treats the XML file as whole.It will parse your whole document atonce.

SAX(Simple API for XML):It is a event based model.It treats the XML file piece by piece.So if you have limited memory the you can select this option.It is faster than DOM and in most of the cases SAX is preffered over DOM.

Enough for the introduction now we will move onto the code part.

First of all we will define a XML file:

employee.xml

<company>
     <employee>
            <fname>nikhil</fname>
            <lname>joshi</lname>
            <id>1000</id>
    </employee>

</company>




You need to import following packages:

/*
import java.io.File;
import org.w3c.dom.Document;
import org.w3c.dom.*;

import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;

*/

private void parseXml(){
//get the Document factory

  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

try {

//get an instance of document builder

   DocumentBuilder db = dbf.newDocumentBuilder();

//parse using builder to get DOM representation of the XML file

   dom = db.parse("employee.xml");

//get the root element

  Element docEle = dom.getDocumentElement();

// get the node list.here we have to give tag name
//employee in our case.

NodeList n = docEle.getElementsByTagName("employee");

   for(int i = 0 ;  i < n.getLength(); i++) {

                    Node empnode =  n.item(s);
                   if(emp.getNodeType() == Node.ELEMENT_NODE)
                            {
                  
                    Element empele = (Element) empnode;

                     //get first tag

                    NodeList fnamelist  =  empele.getElementsByTagName("fname");
                    Element firstNameElement = (Element)fnamelist.item(0);
                    NodeList textfirstList = firstNameElement.getChildNodes();
 System.out.println("First Name : " ((Node)textfirstlist.item(0)).getNodeValue().trim());             


                   //get second tag

                   NodeList lnamelist = empele.getElementsByTagName("lname");
                   Element lastNameElement = (Element)lnamelist.item(0);
                  NodeList textlastList = lastNameElement.getChildNodes();
 System.out.println("Last Name : " ((Node)textlastList.item(0)).getNodeValue().trim());

                  
                     //get second tag

                  NodeList idlist = empele.getElementsByTagName("id");
                   Element idElement = (Element)idlist.item(0);
                   NodeList textidList = idElement.getChildNodes();
 System.out.println("ID : " ((Node)textidList.item(0)).getNodeValue().trim());

                    }//end of if block
}//end of for block

  }//end of try
catch (SAXParseException err) {
        err.printStackTrace();
       }
catch(SAXException e){
e.printStackTrace();
}
catch (Throwable t) {
        t.printStackTrace ();
        }
}


Hope this will help you.All the Best.