Friday, 25 September 2015

SAP ABAP: Webservices implemention

This article demonstrates the entire process of creation and consuming of a WebService in SAPABAP.
There are few changes made by SAP in the screens of transactions like SOAMANAGER, that we see in the process of configuring the WebService definition and the transaction LPCONFIG, which is used to create the logical port in the process of consuming the WebService is obsolete.
Now we come across this information message, when we run the transaction LPCONFIG,
So, this article helps out in following the new SAP screens and an alternative process of creating the logical port, rather than using the transaction LPCONFIG.
The entire article is divided into two parts,
  1. Creation of WebService and
  2. Consuming a WebService in ABAP.

PART – 1 :- Creation of WebService in SAP

  1. Create an RFC. (Here I took an example of simple addition logic in the RFC).
  2. Create a WebService from the above RFC.
  3. It opens the following WebService creation wizard; enter the Service Definition name description.
  4. Check the check box Map Name.
  5. Select the security profile, which is the authentication method to be followed while consuming the WebService.
  6. Save
  7. Click on complete. Now your WebService will be created.
  8. Below is the service definition created and remember to activate it immediately.
  9. Now this WebService has to be configured in SOA Management, to publish it.Run the transaction “SOAMANAGER”, which would launch a Web Dynpro ABAP based SOA Management application in your Internet Browser.
  10. Below is the SOA Management window. This screen has been modified by SAP. Now click on the WebService configuration link highlighted in orange color under the Service Administration tab.
  11. Select your webservice and click on apply selection button.
  12. Now the screen will be expanded with the part where the service has to be configured. Click on create under configurations tab.
  13. A pop up will be opened. Enter the following details and click on apply settings,
  14. Now the screen will be extended with the part, where the authentication method has to be selected. Select User ID/Password under transport channel authentication and click on save.
  15. The service definition has been configured.
  16. Under the overview tab, click on “Show/ hide selected binding’s or services WSDL URL”, which would generate the WSDL link. Copy it locally.

PART –2 :- Consuming a WebService in ABAP

  1. First create a consumer proxy as shown,
  2. A consumer proxy creation wizard will be opened, select the Service Consumer.
  3. Select the source as External WSDL.
  4. Paste the WSDL URL copied locally in step 16 of part
  5. Save a give some prefix, to your proxy name.
  6. Click on complete.
  7. Service Consumer will be created and remember to activate it immediately.
  8. Now the logical port has to be created. As the transaction LPCONFIG is obsolete, this can be done through the SOAMANAGER. Again run the SOAMANAGER and select the consumer proxy.
  9. The screen will be extended, with a part to create the logical port. Click on create under configuration tab.
  10. It will open a pop up to enter the logical port name and settings as follows. Under the WSDL location, enter the WSDL URL of the WebService to be consumed and the authentication credentials.
  11. The logical port is created.
  12. Now test the service consumer from the SAP GUI by clicking on execute.
  13. Enter the logical port created and execute.
  14. Enter the values and execute.
  15. Result will be displayed as,
  16. Now create a program to consume the WebService in ABAP and execute.
  17. Result

Saturday, 19 September 2015

SAP HANA: Architecture Overview & Row vs Column Datastructure

2.2 Advance Information on SAP HANA Architecture

As explained in the previous topic SAP HANA consists of Index server and XS.
Apart from this SAP HANA also contains Name Server, Preprocessor Server and Statistics Server.
Let’s have a close look into this.


Index Server:
    • Index server is the main SAP HANA database component
    • It contains the actual data stores and the engines for processing the data.
    • The index server processes incoming SQL or MDX statements in the context of authenticated sessions and transactions.
Persistence Layer:
The database persistence layer is responsible for durability and atomicity of transactions. It ensures that the database can be restored to the most recent committed state after a restart and that transactions are either completely executed or completely undone.

Preprocessor Server:
The index server uses the preprocessor server for analyzing text data and extracting the information on which the text search capabilities are based.

Name Server:
The name server owns the information about the topology of SAP HANA system. In a distributed system, the name server knows where the components are running and which data is located on which server.

Statistic Server:
The statistics server collects information about status, performance and resource consumption from the other servers in the system. The statistics server also provides a history of measurement data for further analysis.

Session and Transaction Manager:
The Transaction manager coordinates database transactions, and keeps track of running and closed transactions. When a transaction is committed or rolled back, the transaction manager informs the involved storage engines about this event so they can execute necessary actions.

XS Engine:
XS Engine is an optional component. Using XS Engine clients can connect to SAP HANA database to fetch data via HTTP.


2.3 Row Store Vs Column Store

Overview of Row Data Storage and Column Data Storage:

Relational databases typically use row-based data storage. However Column-based storage is more suitable for many business applications. SAP HANA supports both row-based and column-based storage, and is particularly optimized for column-based storage.

As shown in the figure below, a database table is conceptually a two-dimensional structure composed of cells arranged in rows and columns.

Because computer memory is structured linearly, there are two options for the sequences of cell values stored in contiguous memory locations:

Row Storage – It stores table records in a sequence of rows.
Column Storage – It stores table records in a sequence of columns i.e. the entries of a column is stored in contiguous memory locations.


Traditional databases store data simply in rows. The HANA in-memory database stores data in both rows and columns. It is this combination of both storage approaches that produces the speed, flexibility and performance of the HANA database.

Advantages of column-based tables:
Faster Data Access:
Only affected columns have to be read during the selection process of a query. Any of the columns can serve as an index.

Better Compression:
Columnar data storage allows highly efficient compression because the majority of the columns contain only few distinct values (compared to number of rows).

Better parallel Processing:
In a column store, data is already vertically partitioned. This means that operations on different columns can easily be processed in parallel. If multiple columns need to be searched or aggregated, each of these operations can be assigned to a different processor core.

Advantages and disadvantages of row-based tables:
Row based tables have advantages in the following circumstances:
    • The application needs to only process a single record at one time (many selects and/or updates of single records).
    • The application typically needs to access a complete record (or row).
    • Neither aggregations nor fast searching are required.
    • The table has a small number of rows (e. g. configuration tables, system tables).
Row based tables have disadvantages in case of analytic applications where aggregation are used and faster search & processing are required. In row based tables all data in a row has to be read even though the requirement may be there to access data from a few columns.

Which type of tables should be preferred – Row-based or Column-based?
In case of analytic applications, where aggregations are used and faster search & processing are required, row-based storage are not good. In row based tables all data stored in a row has to be read even though the requirement may be there to access data from a few columns. Hence, these queries on huge amounts of data would take lots of times.

In columnar tables, this information is stored physically next to each other, that significantly increases the speed of certain data queries.

The following example shows the difference between the usage of column and row storage, and positions them relative to row and column queries. Column storage is most useful for OLAP queries (queries using any SQL aggregate functions). Because, these queries get just a few attributes from every data entry. But for traditional OLTP queries (queries not using any SQL aggregate functions), it is more advantageous to store all attributes side-by-side in row tables. HANA combines the benefits of both row- and column-storage tables.


Conclusion:
To enable fast on-the-fly aggregations, ad-hoc reporting, and to benefit from compression mechanisms it is recommended that transaction data is stored in a column-based table.

The SAP HANA data-base allows joining row-based tables with column-based tables. However, it is more efficient to join tables that are located in the same row or column store. For example, master data that is frequently joined with transaction data should also be stored in column-based tables.

SAP HANA Basic Overview

1.1 SAP HANA Overview

SAP HANA, short for “High-Performance Analytic Appliance” is an in-memory, column-oriented, relational database management system developed by SAP.
    • Data now resides in main-memory (RAM) and no longer on a hard disk.
    • It is a combination of hardware and software made to process massive real time data using In-Memory computing.
    • It combines row-based, column-based database technology.
    • It’s best suited for performing real-time analytics on massive data, and developing & deploying real-time applications.

An in-memory database means all the data is stored in the memory (RAM). No time wasted in loading the data from hard-disk to RAM or storing the data in hard-disk. Everything is stored inside memory for all the time, which gives quick access ability to the CPUs while processing data.

The speed advantages offered by this RAM storage system are further accelerated by the use of multi-core CPUs, and multiple CPUs per board, and multiple boards per server appliance.



SAP HANA is equipped with Multiengine Query Processing Environment which supports relational as well as graphical and text data within the same system. It provides features that support significant processing speed, handle huge data sizes and text mining capabilities.

Can we just increase the memory of the traditional database (like Oracle) to 1 TB and get similar performance?
NO. You might have performance gains due to more memory available for your current Oracle/Microsoft/Teradata database, but HANA is not just a database with bigger RAM. It is a combination of a lot of hardware and software technologies. The way data is stored and processed by the In-Memory data base is the true differentiator. Having that data available in RAM is just the icing on the cake.
Operating System Supported By SAP HANA:
Earlier SUSE Linux Enterprise Server x86-64 (SLES) 11 SP1 was the only Operating System supported by SAP HANA.
From SPS08, Red Hat Enterprise Linux is also supported.

SAP HANA is developed in C++ language.

Why SAP HANA is fast?
All data is in RAM. What happens when power goes down?
SAP HANA is an in-memory database which means all the data resides in RAM. But there is also a disc memory just for backup purpose.

In-memory computing is safe: The SAP HANA database holds the bulk of its data in memory for maximum performance, but still uses persistent storage to provide a fallback in case of failure.

After a power failure, the database can be restarted like any disk-based database and returns to its last consistent state by replaying the log since the last savepoint.

1.2 Top 10 Reasons Customers Choose SAP HANA

SAP HANA is one of the fastest growing products in SAP’s history and is viewed by the industry as a break through solution for in-memory databases. SAP HANA claims that it accelerates analytics and applications on a single, in-memory platform as well as combining databases, data processing, and application platform capabilities.
SAP HANA is a next-generation business platform which brings together
    • • Business transactions
    • • Advanced analytics
    • • Social media
    • • Mobile experience
    • • Collaborative business
    • • Design connections
SAP HANA

You may be thinking, “So what?” or “How does this help my business?” or “How can SAP HANA help my company make more money?”
In this article, we will find out why customers should choose SAP HANA.

1. Speed:

“The speed SAP HANA enables is sudden and significant, and has the potential to transform entire business models.”
SAP HANA manages massive data volume at high speed. It delivers the “real” real-time enterprise solutions through the most advanced in-memory technology. SAP HANA provides a foundation on which building new generation applications and enabling customers to analyze large quantities of data virtually from any source would be in real time.

SAP HANA
A live analysis by a consumer products company reveals how SAP HANA analyzes current point-of-sale data in real time—empowering this organization to review segmentation, merchandising, inventory management, and forecasting information at the speed of thought.
SAP HANA

2. Real Time:

SAP HANA manages massive data volume at high speed. It delivers the “real” real-time enterprise solutions through the most advanced in-memory technology. SAP HANA provides a foundation on which building new generation applications and enabling customers to analyze large quantities of data virtually from any source would be in real time.

3. Any Data:

SAP HANA helps you to gain insights from structured and unstructured data.

SAP HANA  Structured and Unstructured Data

SAP HANA integrates structured and unstructured data from internal and external sources, and can work on detailed data without aggregations.

4. Any Source:

SAP HANA provides multiple ways to load your data from existing data sources into SAP HANA.
SAP HANA can be integrated into a wide range of enterprise environments, allowing it to handle data from Oracle databases, Microsoft SQL Server, and IBM DB2.

5. Insight – Unlock new insights with predictive, complex analysis:

Before SAP HANA, analytics meant:
  • Preconfigured dashboards based on fixed business requirements.
  • Huge effort and time to create new custom reports.
  • Reactive views and an inability to define future expectations.
With SAP HANA, you can:
SAP HANA
Quickly and easily create views to answer any business question – allowing you to formulate your actions based on deep insights

SAP HANA

Receive quick reactions to newly articulated queries so you can innovate new processes and business models to outpace the competition.

SAP HANA

Enable state-of-the-art, interactive analyses such as simulations and pattern recognition to create measurable, targeted actions.

6. Innovation – The ultimate platform for business innovation:

SAP HANA is an early innovator for in-memory computing. Its configurability, easy integration and revolutionary capabilities make it flexible enough for performing any business requires.

Some examples of this include:

Energy Management
Utility companies use SAP HANA to process and analyze vast amounts of data generated by smart meter technology improving customers’ energy efficiency and driving sustainability initiatives.

Real-time Transit Routing
SAP HANA is helping research firms to calculate optimal driving routes using real-time GPS data transmitted from thousands of taxis.

Software Piracy Detection and Prevention
Tech companies use SAP HANA to analyze large volumes of complex data to gain business insights into software piracy, develop preventive strategies and recover revenue.

7. Simplicity – Fewer layers, simpler landscape, lower cost:

SAP HANA

Reduce or eliminate the data aggregation, indexing, mapping and exchange-transfer-load (ETL) needed in complex data warehouses and marts.

Incorporate prepackaged business logic, in-memory calculations and optimization for multicore 64-bit processors.

Spend less on real-time computing

8. Cloud:

SAP HANA Cloud

Step up to one of the world’s most advanced clouds.
SAP HANA powers SAP’s next- generation enterprise cloud.

Fast:
A single-location stack removes latency – enabling real-time collaboration, processing, and planning.

Scalable:
A highly robust cloud service allows quick deployment of current and next generation applications, scaled to your business needs.

Secure:
We secure your data through the entire cloud solution with independently audited standards of data security and governance.

9. Cost:

SAP HANA reduces your total IT cost so you can increase spending on innovation.

10. Choice:

SAP HANA provides you choice at every layer to work with your preferred partners.
    • Run on the hardware of your choice.
    • Work with the software you prefer.

Collaboration with a number of partners means that SAP can complete the software stacks of our diverse customer base in configurations that make sense for their business.

Plus, a variety of different options means that you won’t be locked in by a single provider.
SAP HANA Cloud