SAP ABAP for HANA

本文探讨了SAP HANA如何改变ABAP开发,通过三层架构的转变,实现SAP NetWeaver应用服务器与HANA的高效协同。首先,SAP NetWeaver可直接访问HANA进行大数据处理;其次,ABAP可以直接在HANA环境中运行,从7.3版本开始,HANA可作为主要数据库;最后,ABAP for SAP HANA允许在HANA上直接开发应用,7.4版本的NetWeaver提供向下兼容性,确保客户投资保护。开发者可以通过Eclipse集成环境继续使用ABAP开发HANA应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SAP HANA是SAP推出的最先进的内存计算高性能数据库套件,它最大的优点就是极大的提高了性能和速度,你如果使用了HANA,那么可以真正实时地运行业务流程,实时地响应客户需求,最快最好地为自己的客户提供服务。那么我们从开发技术的角度,特别是ABAP开发的角度来看看,现在和以后会有哪些变化呢?
SAP的现有客户已经在早些时候购买并实施了商务套件(Business Suite),这些ERP应用都运行在传统的关系数据库上。对于客户来说,如何在现有的架构之上来使用最先进的技术呢?
SAP的创新升级,都有相应的架构设计,一切都以不对现有的系统和功能造成破坏这一目标,所以我们来看看如何在现有的环境下来使用和引入SAP HANA。

我们知道现代程序的设计思想,采用了分层的设计,最底层是数据库,业务逻辑则运行在程序代码这一层。现在有了HANA,我们需要彻底颠覆传统的程序设计了,有了最好的硬件和系统,我们现在要把大部分的数据计算、业务逻辑交给HANA数据库。如下图所示:
Contents Foreword ...................................................................................... 15 Preface .......................................................................................... 17 Introduction ................................................................................. 19 PART I Basic Principles 1 Overview of SAP HANA ................................................ 29 1.1 Software Components of SAP HANA .............................. 29 1.1.1 SAP HANA Database ......................................... 31 1.1.2 SAP HANA Studio ............................................. 31 1.1.3 SAP HANA Client .............................................. 33 1.1.4 SAP HANA Function Libraries ........................... 34 1.1.5 Software for Data Replication ............................ 34 1.1.6 Software for Direct Data Access ........................ 35 1.1.7 Lifecycle Management Components .................. 36 1.2 Basic Principles of In-Memory Technology ..................... 37 1.2.1 Hardware Innovations ....................................... 37 1.2.2 Software Innovations ......................................... 41 1.3 Architecture of the In-Memory Database ....................... 51 1.4 Application Cases for SAP HANA ................................... 53 1.5 How SAP HANA Affects Application Development ........ 56 1.5.1 New Technical Options ..................................... 56 1.5.2 Code Pushdown ................................................ 57 1.5.3 Database as Whitebox ....................................... 59 1.5.4 Required Qualifications for Developers ............. 61 2 Introducing the Development Environment ................. 63 2.1 Overview of Eclipse ....................................................... 63 2.2 SAP’s Eclipse Strategy .................................................... 66 2.2.1 Unbundling of Eclipse and SAP Software ........... 67 2.2.2 Central Update Site ........................................... 67 2.3 Installing the Development Environment ....................... 69 2.3.1 Installing SAP HANA Studio .............................. 69 8 Contents 2.3.2 Installing the ABAP Development Tools for SAP NetWeaver ................................................. 70 2.4 Getting Started in the Development System ................... 72 2.4.1 Basic Principles of Eclipse .................................. 72 2.4.2 ABAP Development Tools for SAP NetWeaver ... 75 2.4.3 SAP HANA Studio ............................................. 85 3 Database Programming Using SAP NetWeaver AS ABAP ........................................................................ 103 3.1 SAP NetWeaver AS ABAP Architecture .......................... 105 3.1.1 Database Interface ............................................ 107 3.1.2 Role of the Database for the ABAP Application Server ............................................. 109 3.1.3 Data Types ........................................................ 110 3.2 ABAP Database Access .................................................. 116 3.2.1 ABAP Data Dictionary ....................................... 117 3.2.2 Open SQL ......................................................... 122 3.2.3 Database Views in the ABAP Data Dictionary .... 132 3.2.4 Database Access via Native SQL ........................ 133 3.2.5 Secondary Database Connections ...................... 139 3.3 Analyzing Database Accesses Using the SQL Trace ......... 143 3.3.1 Statement Transformations ................................ 143 3.3.2 Secondary Connections ..................................... 150 3.3.3 Native SQL ........................................................ 151 3.3.4 Buffer ................................................................ 152 PART II Introduction to ABAP Programming with SAP HANA 4 View Modeling in SAP HANA Studio ........................... 157 4.1 Attribute Views ............................................................. 160 4.1.1 Basic Principles ................................................. 161 4.1.2 Creating Attribute Views ................................... 164 4.1.3 Calculated Fields ............................................... 172 4.1.4 Hierarchies ........................................................ 174 4.1.5 Attribute Views for Time Values ........................ 176 9 Contents 4.1.6 Runtime Artifacts and SQL Access for Attribute Views ................................................. 179 4.2 Analytic Views ............................................................... 180 4.2.1 Basic Principles ................................................. 181 4.2.2 Creating Analytic Views ..................................... 183 4.2.3 Calculated Key Figures ...................................... 186 4.2.4 Currency Conversion and Unit Conversion ........ 187 4.2.5 Runtime Artifacts and SQL Access for Analytic Views .................................................. 191 4.3 Calculation Views .......................................................... 192 4.3.1 Basic Principles ................................................. 193 4.3.2 Graphical Modeling of Calculation Views .......... 195 4.3.3 Implementing Calculation Views via SQLScript .......................................................... 197 4.3.4 Runtime Artifacts and SQL Access for Calculation Views .............................................. 202 4.4 Accessing Column Views via Microsoft Excel .................. 203 4.5 Using SAP HANA Views in ABAP ................................... 205 4.5.1 Access via Native SQL ....................................... 205 4.5.2 External Views in the ABAP Data Dictionary ...... 207 4.5.3 Options for Accessing External Views ................ 210 4.5.4 Recommendations ............................................ 211 5 Programming Options in SAP HANA ............................ 215 5.1 Overview of SQLScript ................................................... 215 5.1.1 Qualities of SQLScript ....................................... 216 5.1.2 Processing SQLScript ......................................... 222 5.2 Implementing Database Procedures ............................... 223 5.2.1 Basic Principles of Database Procedures ............ 223 5.2.2 Creating Database Procedures ........................... 225 5.2.3 Using Variables .................................................. 237 5.2.4 Calculation Engine Plan Operator ..................... 239 5.2.5 Imperative Enhancements ................................. 250 5.2.6 Accessing System Fields .................................... 252 5.2.7 Error Handling ................................................... 254 5.3 Using Procedures in ABAP ............................................. 255 5.3.1 Access Using Native SQL ................................... 256 10 Contents 5.3.2 Defining Database Procedure Proxies ................ 263 5.3.3 Calling Database Procedure Proxies ................... 265 5.3.4 Adjusting Database Procedure Proxies ............... 267 6 Application Transport ................................................... 269 6.1 Basic Principles of the Transport System ......................... 271 6.1.1 Transport in SAP NetWeaver AS ABAP .............. 271 6.1.2 Transport in SAP HANA ..................................... 276 6.2 Combined ABAP/SAP HANA Transport .......................... 285 6.2.1 HANA Transport Container ................................ 286 6.2.2 Enhanced Transport System ............................... 292 7 Runtime and Error Analysis with SAP HANA ............... 293 7.1 Overview of the Tools Available ..................................... 294 7.2 Error Analysis ................................................................. 296 7.2.1 Unit Tests .......................................................... 296 7.2.2 Dump Analysis .................................................. 299 7.2.3 Tracing in SQLScript .......................................... 301 7.2.4 Debugging SQLScript ........................................ 302 7.3 ABAP Code Analysis ...................................................... 305 7.3.1 Checks and Check Variants ................................ 305 7.3.2 Checks in the Development Infrastructure ......... 309 7.3.3 Global Check Runs in the System ...................... 311 7.4 Runtime Statistics and Traces ......................................... 313 7.4.1 Runtime Statistics .............................................. 314 7.4.2 ABAP Trace and ABAP Profiler ........................... 318 7.4.3 SQL Trace ......................................................... 326 7.4.4 Single Transaction Analysis ............................... 330 7.4.5 Explain Plan ...................................................... 331 7.4.6 SAP HANA Plan Visualizer ................................ 333 7.5 System-Wide SQL Analyses ............................................ 337 7.5.1 DBA Cockpit .................................................... 338 7.5.2 SQL Monitor .................................................... 342 7.6 SQL Performance Optimization ...................................... 346
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值