In my last blog Experiences and Wishlist - SAP TechEd 2012 I discussed my overall general learning @SAPTechEd, as I was there attending back to back Hand's on and lecture session that too totally focused on HANA and ABAP or can say ABAP for SAP HANA, this blog is totally focused on my key learning's onABAP for SAP HANA :smile:
If you are new to this topic and just wondering that how ABAP can work on HANA or How ABAP will leverage the power of SAP HANA, I would recommend you referring following blogs
First Experience with ABAP for HANA Evo... | SCN
SAP NetWeaver AS ABAP for SAP HANA – The Future of the ABAP Platform - Recording of session TEC106
ABAP has evolved with time though not much, if we compare wrt analytic but it still remain the HEART of Application Development in SAP especially on the transitional side, with SAP HANA year 2012 imposed a question that, will ABAPer time has came to an end, or ABAP will become a secondary stuff for SAP with regards to development, It has already been answered - "A NEW ABAP - Which is SMARTER, LIGHTER, FASTER" - and at the bottom sits SAP HANA powering ABAP silently without any disruption :smile: . Actually SAP is offering "Accelerated ABAP Applications which leverage the Best Features in SAP HANA" = "ABAP for SAP HANA: Building Business Applications Optimized for In-Memory" = "SAP NetWeaver AS ABAP for SAP HANA – The Future of the ABAP Platform" - all the name leads to one basic topic "ABAP FOR SAP HANA"....!!
HANA can be leveraged with ABAP as:
SAP HANA Application Accelerator:
User documentation -> SAP note 1694697
Secondary database connections -> SAP note 1517236
Installation of the replication service -> http://service.sap.com/~sapidb/011000358700000604912011
To Primary Persistence
HANA SQL as an advantageous functionality with ABAP Database Connectivity (ADBC)
ADBC is an API for the Native SQL interface of the AS ABAP that is based on ABAP Objects or Object-based ABAP API for programming relational database access, with ADBC can be used for following functions:
General steps for creating ADBC:
ADBC - Tools : Please check in SE24 or SE80 for more details:
CL_SQL_CONNECTION
GET_CONNECTION | Opens a Connection to a Database |
CLOSE | Closes an Open Database Connection |
COMMIT | Commit the Running Database Transaction |
CREATE_STATEMENT | Creates a Statement Object for this Database Connection |
GET_CON_NAME | Returns the Connection Name Entered in the DBCON |
GET_DBMS | Returns the Type of the Database System |
GET_METADATA | Creates a Metadata Object for This Connection |
IS_CLOSED | Checks Whether the Connection is Closed |
PREPARE_STATEMENT | Creates a Prepared Statement Obect |
ROLLBACK | Rollback of the Running Database Transaction |
PING | Checks Whether the Current Database Connection Still Exists |
CL_SQL_PREPARED_STATEMENT / CL_SQL_STATEMENT
EXECUTE_DDL | Execute a DDL Operation (For Example, CREATE TABLE) |
EXECUTE_PROCEDURE | Execute a "Stored Procedure" |
EXECUTE_QUERY | Execute an SQL Query |
EXECUTE_UPDATE | Execute a DML Operation (INSERT, UPDATE, DELETE) |
SET_PARAM | Set an Input/Output Parameter |
SET_PARAM_CLOB | Set an Input/Output Parameter |
SET_PARAM_BLOB | Set an Input/Output Parameter |
SET_PARAM_STRUCT | Set Structure as Input Parameter |
PREPARE | Prepare an SQL Statement |
PREPARED_FREE | Release a Prepared SQL Statement |
PREPARED_QUERY | Execute a Prepared Query |
PREPARED_UPDATE | Execute a Prepared DML Operation |
CREATE_COLUMN_LIST | Generates a Column List for a Given Structure |
CONSTRUCTOR | Constructor |
CLEAR_PARAMETERS | Reset Input Parameters of Statement |
CLOSE | Release a Prepared Statement |
GET_QUOTED_NAME | Encloses a Column Name in Quotation Marks |
CL_SQL_RESULT_SET
CONSTRUCTOR | Constructor |
NEXT | Get Next Record in the Resulting Set |
NEXT_PACKAGE | Read Next Set of Data Records into the Internal Table |
CLEAR_PARAMETERS | Reset Output Parameters of Results |
CLOSE | Close Resulting Set |
SET_PARAM | Set Reference to Output Parameter |
SET_PARAM_STRUCT | Set Structure as Output Parameters |
SET_PARAM_TABLE | Set Internal Table as Output Parameters |
SET_PARAM_CLOB | Set Output Parameters |
SET_PARAM_BLOB | Set Output Parameters |
HANA Full Text Search Capabilities
One major benefit of the column store technique in SAP HANA is fast search access to character based columns. In the past such functionality required to make use of additional infrastructure (like TREX / Enterprise Search) with added complexity (e.g. replication). SAP HANA provides these features out-of-the-box and allows to improve the search for value helps and other application specific search interfaces, and to bring the power of SAP HANA directly to the User Interface (e.g. via free text search fields, etc.) Text search is integrated into HANA SQL via the CONTAINS predicate, which can be used in the WHERE clause (currently consumable only via ADBC from ABAP). It requires the creation of a fulltext index (Outlook) For new TEXT / SHORTTEXT types in ABAP 7.40, the fulltext index will be created implicitly via ABAP DDIC.
Additional features of SAP HANA text search
Pushing down Code to HANA with SQLScript
“Code-2-Data" - What happens then : - Data processing code runs on HANA server or HANA engine using full potential of In-Memory architecture,with that Less data us transferred between HANA and ABAP (Only minimal result set transferred to ABAP) and Same SQL Script or procedures written in HANA can be RE-Used in non-ABAP scenarios, which leads to less codes and more simplification.
SAP HANA artifacts from ABAP - DO’s and DON’T’s
How to optimize existing ABAP code for SAP HANA
Example
Offerings of ABAP 7.40 - Integrated development options across ABAP and HANA Consuming HANA views in ABAP
Overview of SQL Script
What exactly is SQLScript? SQLScript is Procedural extension of SQL.
The set of SQL extensions for the SAP HANA database which allow developers to push data intensive logic into the database is called SQLScript. These extensions are keys to avoiding massive data copies to the application server and to leverage sophisticated parallel execution strategies of the database. SQLScript supports stored procedures, which provides enhanced control flow capabilities and is positioned to be more suitable for pushing complex parts of application logic to the database.It can do some simple requirement for reporting, like join, aggregation, etc.
For data mining and statistic analysis, SQLScript is not suitable for implementing complex algorithms.
With SQL SCRIPT we can move the calculations to the database layer which eliminates the need to transfer large amounts of data from the database to the application layer. As to leverage the power of HANA - Calculations need to be executed in the database layer, with this we can attain fast column operations, query optimization and parallel execution.
SQLScript >> Procedure Logic
Orchestration Logic (Read-Write procedures)
Declarative Logic (Read-Only procedures)
out = CE_COLUMN_TABLE("COLUMN_TABLE", [A, B, C]) |
out = CE_JOIN_VIEW("ATTRIBUTE_VIEW", [A, B, C]) |
out = CE_OLAP_VIEW("ANALYTIC_VIEW", [A, B, C]); |
col_tab= CE_COLUMN_TABLE("COLUMN_TABLE"); out = CE_PROJECTION(col_tab, [A, B, C], ' "B" = ''value'' AND "C" = ''value'' '); |
col_tab= CE_COLUMN_TABLE("COLUMN_TABLE"); out = CE_AGGREGATION( (col_tab, SUM(D), [A, B, C]); |
out = CE_JOIN("COLTAB1","COLTAB2", [KEY1, KEY2], [A, B, Y, D]) |
out = CE_LEFT_OUTER_JOIN("COLTAB1","COLTAB2", [KEY1, KEY2], [A, B, Y, D]) |
proj_tab = CE_COLUMN_TABLE("COLUMN_TABLE"); out = CE_PROJECTION( :proj_tab, ["A", "B", "C", CE_CALC('midstr("D",2,5)', string) ]); |
col_tab1 = CE_COLUMN_TABLE("COLUMN_TABLE1",[A,B,C,D]); col_tab2 = CE_COLUMN_TABLE("COLUMN_TABLE2",[A,B,C,D]); out = CE_UNION_ALL(:col_tab1,:col_tab2); |
Tips, tricks & best practices - (CD 166)
Stepwise Adoption of SAP HANA by the Application Server ABAP source: CD202
What we all actually attain Putting HANA as a Secondary Database (NOW) and as Primary Database (with 7.4)
The Biggest Question - What's there for existing ABAPer - Where do we stand ??
Since from long this question has been asked to me and to many experts, the only answer I know is ABAPers are still there but yes we all will have to acquire some extra knowledge in this changing scenario - for good. ABAPer will have to be more and more flexible WRT HANA modeling and SQL Scripting as they will play an important role in leveraging the power of SAP HANA.
I would recommend to go through ABAP for SAP HANA- An ABAPer's Dilemma! and I believe ABAP developers will need a set of best practices for developing analytic applications in the future: (Taken from tobias.trapp Blog >> Analytical ABAP for HANA Applications: Characteristics, Unique Selling Points and first Programming ...
My Learning's >> Adopt with time and changing scenario - and always be hungry for learning new technology as they are introduced for good :smile:
PS : This was my simple effort to summarize SAP TechEd Sessions CD202, CD162, TEC106, CD166. Recorded Session can be found on http://www.sapvirtualevents.com/teched/home.aspx
For SAP HANA Guides Please refer SAP HANA Platform – SAP Help Portal Page
Happy Learning :smile:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |