Wednesday, August 24, 2016

HANA to Netweaver Gateway - connectivity steps

Home


Step-by-Step Procedure 

1.1 Install the SAP HANA DBSL kernel files on the SAP NetWeaver Gateway
1.2 Install the SAP HANA client on the SAP NetWeaver Gateway application server
1.3 Maintain DBCON Table in Gateway System
1.4 Create Model Class
1.5 Configure a service
1.6 Implement a BAdI Class for DB determination
1.7 Register a Service and test it.


1. Business Scenario

SAP HANA Database is a high performance in-memory database offered by SAP.
By combining SAP NetWeaver Gateway and SAP HANA, you can expose the information from a
HANA database as OData Services. Integration between SAP NetWeaver Gateway and SAP HANA
provides a way for business users to see HANA data on any device or platform through SAP
NetWeaver Gateway

2. Background Information.

In this How To Guide, we will show you how to expose SAP HANA data with OData Service via SAP
NetWeaver Gateway. As of SP04 of SAP NetWeaver Gateway, only read scenarios are supported.
SAP HANA is specified as a secondary Database of NetWeaver Gateway and all of the requests will
go through SAP NetWeaver Gateway.
You can use the following information models as an OData service from the SAP HANA DB:

 --  Attribute views
 --  Analytic views
 --  Calculation views

Please be aware that SAP is also planning to release the XS Engine as a part of HANA technology.
The XS Engine allows users to expose HANA data as Odata services natively without SAP
NetWeaver Gateway.

3. Prerequisites

The following pre-requisites are required to support this scenario:
 Access to SAP HANA 1.0 or higher system
 Access to any type of View in the HANA system.
 Access to SAP NetWeaver Gateway 2.0 SP04 or higher system.
 7.20 Kernel patch level 110 or higher is used for the NetWeaver Gateway
 IW_BEP is installed on the Gateway Hub System
 IW_HDB is installed on the Gateway Hub System

Note: It is technically possible to have a distributed deployment of IW_FND (Hub) and IW_BEP
with IW_HDB. This means that the Business Suite system with IW_BEP and IW_HDB component
can also be used to connect to the HANA DB. The prerequisite for IW_HDB installation will be the
SAP NetWeaver Release 7.02 with SP9 level.

Note: To simplify the deployment, this document will use the Gateway Server with IW_BEP and
IW_HDB.

You can download the installation file of IW_HDB component from SAP service marketplace.
http://service.sap.com/swdc. Please be sure that you need to down load the file from
“Installations and Upgrades” menu not from “Support Packages and Patches” area.
The following SAP Note has to be applied to the Gateway Server if you are using SP 00 of ”IW_HDB 1.0” .

 Note 1730866 - ODC / IWHDB - Problem with type conversion
 Note 1732474 - OData Channel - Usage of DECFLOAT16 and DECFLOAT34 fields
 Note 1712966 - ODC / IWHDB - Database connection not closed in runtime

For more information on HANA connectivity from an ABAP system, please refer to the following

SAP Note: Note 1597627 - SAP HANA connection


4. Step-by-Step Procedure

The following steps will guide you through configuring the connectivity between SAP NetWeaver
Gateway and SAP HANA. Connectivity settings between the ABAP system and a HANA system are

followed by Gateway specific development settings.

4.1 Install the SAP HANA DBSL kernel files on the SAP NetWeaver Gateway application server.

A system administrator first needs to configure the connectivity between NetWeaver Gateway as a
ABAP system and HANA as a secondary database.

1. Put HANA DBSL kernel files on the SAP NetWeaver Gateway application server
The DBSL for SAP HANA database (lib_dbsl_PL.SAR) is available on SAP Service Marketplace
under the following path

Additional components

 SAP Kernel
 SAP KERNEL 64-BIT UNICODE
 SAP KERNEL 7.20 64-BIT UNICODE (or)
 SAP KERNEL 7.20 EXT 64-BIT UC
 <operating system>
 SAP In-Memory Database
 Extract the file with SAPCAR and put the files on the kernel directory.

e.g. <Drive>:\usr\sap\<SID>\SYS\exe\uc\NTAMD64 in case of windows

4.2 Install the SAP HANA client on the SAP NetWeaver Gateway application server.

On each application server, install the DB client software for SAP HANA. Download the client
software from SAP Service Marketplace as described in Note 1603671.
If you have multiple application servers, you need to install the HANA client individually.
Unix

The installation must be performed under the user <root>.
hdbinst -a client -p /usr/sap/<SID>/hdbclient -s <SID>

Windows

Log on to your Windows application server as the SAP administrator (<SID>adm).
hdbinst -a client -p <lw>:\usr\sap\<SID>\hdbclient

4.3 Maintain DBCON Table in Gateway System

1. Log on NetWeaver Gateway System with SAP GUI.
2. Go to transaction DBCO.
3. Go into Change mode by click the Display/Change icon
4. Click on” New Entries”
5. Fill in the connection detail of SAP HANA Database.
Please enter <hostname>:<port number> to the “Conn. Info” field.
6. Click on Save button.
Now you are ready to connect to HANA as a secondary database.


4.4 Create Model Class
...
1. Go to transaction SE80 . ABAP Development Workbench
2. Change the object type drop down to be Class / Interface:
3. Enter in the class name
4. Click the Display icon
5. Since the object does not yet exist you will be asked if you want to create it
6. Click the Yes button.
7. Enter a description and click Save.
8. Save your newly created class as a Local Object.
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 7
9. You should now see the following:
10. Double click on the class you just created, this will open the class editor.
11. Switch to edit mode by clicking on the Display<->Change icon.
12. In the class editor switch to the Properties tab.
13. Click the Superclass button.
14. Enter in the HANA Connectivity Metadata Class -/IWHDB/CL_HAI_RT_ABS_MODEL
This is a subclass of ordinary Odata Channel Metadata Class /IWBEP/CL_MGW_ABS_MODEL.
15. Save your class.
16. Open the Methods > Inherited Methods node of your Class in the Class browser.

17. Right click on the GET_HDB_ARTIFACTS method and in the context menu select Redefine.
18. The method editor for the redefined method will open up
19. Enter in the following code to specify the Analytics View of HANA.

20. Save and Activate your class.

4.5 Configure a service

1. Start transaction SPRO
2. Click on SAP Reference IMG
3. Follow the path SAP NetWeaver->Gateway Service Enablement->Backend Odata Channel-
>Service Development for Backend Odata Channel
4. Start the Maintain Object Models activity.
5. Enter the Technical Model Name and a version number.
6. Press the Create button.
7. Enter the name of the metadata class and give it some meaningful description.
8. Save the changes and back out to the IMG tree structure.
9. Now run the Maintain Service activity.
10. Enter Technical Service Name and a version number.
11. Press Create
12. On the following screen, enter the default Runtime Data Provider class for HANA Connectivity
/IWHDB/CL_HAI_RT_DATA and a meaningful description.
13. You must now save your configuration otherwise you will get an error message on the
following pop-up screen.
14. Since we have already created a Technical Model to wrap our metadata class, we need to
press the Assign Model button, NOT the Create Model button.
15. On the following pop-up, enter the name of the Technical Model we created above
(Z_HANA_VIEW_TM1), the version number and press the save button.
Now press Sa ve , a nd your c omple te d c onfigura tion should look lik e this

4.6 Implement a BAdI Class for DB determination

To determine the HANA database, we need to implement a BADI.
This BADI can also be used to determine the backend ABAP system.

1. Go to transaction SE19 – BAdI Builder
1. The Enhancement Spot to determine HANA DB is /IWBEP/ES_DESTIN_FINDER.
Enter that into the Enhancement Spot input field shown below.
2. Click Create Impl. button.
3. In the popup window Create Enhancement Implementation enter the details as shown below
and Click the Create button
4. Enter the short text and Click Enter.
5. In the Create Composite Enhancement Implementation popup window enter a description
and click the Enter button twice.

6. The Create BAdI Implementation popup window will now be displayed. Enter in the details as
shown below. And click the Enter button.
7. You will be presented with the following. Double Click on Implementation Class.
8. Double click on the implementation Class.
9. Go into Change mode by click the Display/Change button.
10. Double click on the method /IWBEP/IF_DESTIN_FINDER_BADI~GET_DB_CONNECTION.
11. Add the follow code between the METHOD and ENDMETHOD lines.
*always connect to HANA DB CT1
RV_DB_CONNECTION = 'CT1' .
In this case, we will only connect to a single HANA Database and there is no branch in the code.
You also can add any logic and it will be necessary when you have multiple HANA databases
connecting from a SAP NetWeaver Gateway System.
12. Save and activate your changes.
4.7 Register a Service and test it
1. Go to transaction /IWFND/MAINT_SERVICE.
2. Press add service button.

3. Enter system alias and you will see a list of all Gateway services available from the Gateway
Hub system
4. Click on the Service you’ve configured
5. A pop-up box now asks you to enter the package for this service. Enter the package you have
been using. In this case, $tmp is shown as the example for local objects.
6. Press Enter.
7. Successful creation of the service is confirmed on the lower left status bar.
8. Click the Back arrow on the top toolbar.
9. Click the Search button and search for HANA_VIEW1, you should find the service defined.
10. Click on the service
11. Make sure the ODATA Row is highlighted and has an alias defined.
12. Click the Call Browser button. This will launch a browser for the service
13. The Service Document for the HANA_VIEW1 should be displayed in the browser.
You can see the View name is used as the name of collection.
Change the URL in the browser to access to the HANA View by adding the view name after
the ending „/
http://host:port/sap/opu/odata/sap/HANA_VIEW1/AN_EFASHION?$format=xml
You can use a several options like $top,$skiptoken,$select,$filter,&$orderby etc here.
14. Add $metadata to the URL for the Service Document to display the Service Metadata
Document.
http:// host:port /sap/opu/odata/sap/HANA_VIEW1/$metadata
The metadata information is automatically retrieved from the HANA database.


5. Contraints:

 It is not possible to apply an SAP HANA analytical privileges concept within the
SAP NetWeaver Gateway integration since the ADBC (ABAP Database Connectivity)
interface uses only one defined database user in DBCON table.
For the workaround, a new authorization object /IWHDB/HAI HANA is available. You can
specify Catalog Name and HANA Artifact Name there.
This authorization object is checked in CHECK_AUTHORITY method of runtime class
/IWHDB/CL_HAI_RT_DATA.
Customers also have the possibility to enhance these methods by redefinition in the
inherited classes.
 Filtering with $filter option for measures (known as key figures in SAP BW) is currently NOT
supported.
 Input parameters for calculation and analytical views are NOT supported.
 Reference definitions for measure and unit/currency are NOT supported.


Tuesday, August 23, 2016

HANA (High performance analytics appliance)

Home


SAP HANA is an in-memory database and application platform, column-oriented,compressed and relational database management system developed and marketed by SAP
primary function as database server is to store and retrieve data as requested by the applications. In addition,
it performs advanced analytics (predictive analytics, spatial data processing, text analytics, text search,
streaming analytics, graph data processing) and  includes ETL capabilities and an application server.

HANA started with

  HANA 1.0 ---->   SPS 03 --> In Nov 2011
           ---->    SPS 04 -->  April 2012
           ---->   SPS 05 -->  Dec   2012
           ---->   SPS 06 -->  June  2013
           ---->   SPS 07 -->  Dec   2013
           ---->   SPS 08 -->  May   2014
           ---->   SPS 09 -->  Nov   2014
           ---->   SPS 10 -->  June  2015
           ---->   SPS 11 -->  Nov   2015
           ---->   SPS 12 -->  May   2016


SAP HANA is supported on below platforms:

VMware    --> vSphere
IBM       --> PowerVM
Hitachi   --> LPAR
Huawei    --> Fushion Sphere
RedHatRHEL--> KVM Hypervisor
SUSE Linux--> Enterprise Hypervisor


SAP is providing two editions of HANA:

1) SAP HANA Platform edition

   1.1) HANA Database
   1.2) HANA Studio
   1.3) HANA Client
 
Optional components

     AFL ( Application functional libraries)
     IC  ( Information Composer)
     SDA (Smart data access)

2) SAP HANA Enterprise edition

   2.1) ETL (Extract Transform Load)

   -SAP Data Services (BODS)
   -SAP Landscape Replication server.



Features of SAP HANA:

The main features of SAP HANA are given below −

SAP HANA is a combination of software and hardware innovation to process huge amount of real time data.

Based on multi core architecture in distributed system environment.

Based on row and column type of data-storage in database.

Used extensively in Memory Computing Engine (IMCE) to process and analyze massive amount of real time data.

It reduces cost of ownership, increases application performance, enables new applications to run on real time environment that were not possible before.

It is written in C++, supports and runs on only one Operating System Suse Linux Enterprise Server 11 SP1/2.


Features of In-Memory Database:

The main features of SAP HANA in-memory database are −

SAP HANA is Hybrid In-memory database.

It combines row based, column based and Object Oriented base technology.

It uses parallel processing with multicore CPU Architecture.

Conventional Database reads memory data in 5 milliseconds. SAP HANA In-Memory database reads data in 5 nanoseconds.

It means, memory reads in HANA database are 1 million times faster than a conventional database hard disk memory reads.


Analysts want to see current data immediately in real time and do not want to wait for data until it is loaded to SAP BW system. SAP HANA In-Memory processing allows loading of real time data with use of various data provisioning techniques.

Advantages of In-Memory Database
HANA database takes advantage of in-memory processing to deliver the fastest data-retrieval speeds, which is enticing to companies struggling with high-scale online transactions or timely forecasting and planning.

Disk-based storage is still the enterprise standard and price of RAM has been declining steadily, so memory-intensive architectures will eventually replace slow, mechanical spinning disks and will lower the cost of data storage.

In-Memory Column-based storage provides data compression up to 11 times, thus, reducing the storage space of huge data.

This speed advantages offered by RAM storage system are further enhanced by the use of multi-core CPUs, multiple CPUs per node and multiple nodes per server in a distributed environment.


Need for SAP HANA:

Today, most successful companies respond quickly to market changes and new opportunities. A key to this is the effective and efficient use of data and information by analyst and managers.

HANA overcomes the limitations mentioned below −

Due to increase in “Data Volume”, it is a challenge for the companies to provide access to real time data for analysis and business use.

It involves high maintenance cost for IT companies to store and maintain large data volumes.

Due to unavailability of real time data, analysis and processing results are delayed.

Monday, August 22, 2016

SAP

Home


1)What is SAP
  • SAP - Systems, Applications and Products in Data Processing. SAP is a fourth generation programming language language called ABAP (Advance Business Application Programming). SAP is an ERP (enterprise resource planning) software product capable of integrating multiple business applications, with each application representing a specific business area. These applications update and process transactions in real time mode. It has the ability to be configured to meets the needs of the business.
  • SAP is Modules are divided into 2 parts: Technical and Functional:
  • Technical is categorized into 3 areas:
    • ABAP (Advance Business Application Programming)
    • BASIS (Business Application System Integrated Software)
    • Net Weaver ( Web Application Server, Exchange Infrastructure (XI), Enterprise Portal (EP), Master Data Management (MDM), Business Information Warehouse)
  • Functional is categorized into 3 areas:
    • Logistics
      • Sales and Distribution (SD)
      • Production Planning (PP)
      • Material Management (MM)
      • Warehouse Management (WM)
      • Quality Management (QM)
      • General Logistics (LO)


    • Financial
      • Financial Accounting (FI)
      • Controlling (CO)
      • Enterprise Controlling (EC)
      • Investment Management (IM)
      • Treasury (TR)

    • Human Resources
      • Personnel Administration (PA)
      • Personnel Development (PD)



An Introduction to SAP
SAP was founded in 1972 in Walldorf, Germany. It stands for Systems, Applications and Products in Data Processing. Over the years, it has grown and evolved to become the world premier provider of client/server business solutions for which it is so well known today. The SAP R/3 enterprise application suite for open client/server systems has established new standards for providing business information management solutions.
The main advantage of using SAP as your company ERP system is that SAP have a very high level of integration among its individual applications which guarantee consistency of data throughout the system and the company itself.
In a standard SAP project system, it is divided into three environments,
Development, Quality Assurance and Production. The development system is where most of the implementation work takes place. The quality assurance system is where all the final testing is conducted before moving the transports to the production environment.  The production system is where all the daily business activities occur.  It is also the client that all the end users use to perform their daily job functions.
To all company, the production system should only contains transport that have passed all the tests.
SAP is table drive customization software.  It allows businesses to make rapid changes in their business requirements with a common set of programs.  User-exits are provided for business to add in additional source code.  Tools such as screen variants are provided to let you set fields attributes whether to hide, display and make them mandatory fields
3) What is SAP Landscape?
Landscape is like a server system or like a layout of the servers or some may even call it the architecture of the servers viz. SAP is divided into three different landscape DEV, QAS and PROD.
·         DEV would have multiple clients for ex: 190- Sandbox, 100- Golden, and 180- Unit Test.
·          QAS may again have multiple clients for ex: 300- Integration Test, 700 to 710 Training.
·          PROD may have something like a 200 Production.
These names and numbers are the implementer's discreet on how they want it or they have been using in their previous implementations or how is the client's business scenario. 
Now whatever you do in the Sandbox doesn't affect the other servers or clients. Whenever you think you are satisfied with your configuration and you think you can use it moving forward, you RE-DO it in the golden client (remember, this is a very neat and clean client and you cannot use it for rough usage). As you re-do everything that you had thought was important and usable, you get a transport request pop up upon saving every time. You save it under a transport request and give your description to it. Thus the configuration is transported to the Unit Test client (180 in this example). 
You don't run any transaction or even use the SAP Easy Access screen on the 100 (golden) clients. This is a configuration only client. Now upon a successful transport by the Basis guy, you have all the configuration in the Testing client, just as it is in the Golden client. The configuration remains in sync between these two clients. 
But in the Testing client you can not even access SPRO  (Display IMG) screen. It's a transaction only client where you perform the unit test. Upon a satisfactory unit test, you move the good configuration to the next SERVER (DEV). The incorrect or unsatisfactory configuration is corrected in Golden (may again as well be practiced in the sandbox prior to Golden) and accordingly transported back to 180 (Unit Test) until the unit test affected by that particular config is satisfactory. 
The Golden client remains the 'database' (if you wanna call it that) or you may rather call it the 'ultimate' reference client for all the good, complete and final configuration that is being used in the implementation.
In summary:
Landscape: is the arrangement for the servers
IDES: is purely for education purpose and is NOT INCLUDED in the landscape.
DEVELOPMENT ---> QUALITY ----> PRODUCTION
DEVELOPMENT: is where the the consultants do the customization as per the company's requirement.
QUALITY: is where the core team members and other members test the customization.
PRODUCTION: is where the live data of the company is recorded.
A request will flow from Dev->Qual->Prod and not backwards.
1. Sandbox server: In the initial stages of any implementation project, You are given a sandbox server where you do all the configuration/customization as per the companies business process.
2. Development Server: - Once the BBP gets signed off, the configuration is done is development server and saved in workbench requests, to be transported to Production server.
3. Production Server: This is the last/ most refined client where the user will work after project GO LIVE. Any changes/ new development is done is development client and the request is transported to production.
These three are landscape of any Company. They organized their office in these three way. Developer develop their program in Development server and then transport it to test server. In testing server tester check/test the program and then transport it to Production Server. Later it will deploy to client from production server.
Presentation Server- Where SAP GUI have.
Application Server - Where SAP Installed.
Database Server - Where Database installed.

What is the meaning of "R" in R/3 systems?
R/3 stands for real-time three tier architecture. This is the kind of architecture SAP R/3 system has.
R/3 means three layers are installed in Different system/server and they are connected with each other.
1) Presentation
2) Application
3) Database

Releases:

    SAP R/1, System RF - 1972
    SAP R/2, ran on a Mainframe architecture - 1979

    SAP R/3 Enterprise Edition 1.0 A - July 1992
    SAP R/3 Enterprise Edition 2.0 - 1993
    SAP R/3 Enterprise Edition 3.0 - 1995
    SAP R/3 Enterprise Edition 4.0 B - June 1998
    SAP R/3 Enterprise Edition 4.3
    SAP R/3 Enterprise Edition 4.5 B - March 1999
    SAP R/3 Enterprise Edition 4.6 C - April 2001
    SAP R/3 Enterprise Edition 4.6 F
    SAP R/3 Enterprise Release 4.70 Release Date March- Dec 2003[2]
    SAP R/3 Enterprise Edition 4.7
    SAP R/3 Enterprise Central Component (ECC) 5.0 - 2004
    SAP R/3 Enterprise Central Component (ECC) 6.0 - Oct 2005- Jun2006
    SAP ERP 6.0 - Enhancement Packages (1,2,3,4,5,6,7)