Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400...

14
Hans-Jürgen Hennrich March 2013 How to adapt Add-ons for SoH Last update: November 2013

Transcript of Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400...

Page 1: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

Hans-Jürgen HennrichMarch 2013

How to adapt Add-ons for SoH

Last update: November 2013

Page 2: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 2

Update November 2013

In the meantime there is a best practice guide available from the ABAP development team. That new guide describes in more detail, what was published so far in this document. Therefore please take the following slides as a short summary of the new guide and use the new one for your projects.

http://scn.sap.com/docs/DOC-46714

Best Practice Guide - Considerations for Custom ABAP Code During a Migration to SAP HANA

When planning a migration to SAP HANA, certain considerations related to existing custom ABAP code are required. This includes mandatory items related to a database platform change in general, and some additional recommendations specific to SAP HANA. This document contains an overview of the available tools and services which can ease a transition of custom ABAP code, and provides guidance how to use them in the context of a migration project. The focus of the document is primarily on ABAP coding in combination with standard database access via Open SQL.

Page 3: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

Mandatory Steps

Page 4: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 4

Pool/Cluster (PC) Tables

Most PC tables of NW and Suite were migrated to transparent tables for SoH

Recommendation: Don‘t use own PC tables in the future

References to tables formerly defined as pool or cluster tableOwn PC tables using a table pool/cluster of NetWeaver or Suite (e.g. ATAB) lead to syntax errors during deployment of the Add-on

Select statements on tables formerly defined as pool or cluster tableSELECT statements on pool and cluster tables do return results implicitly sorted by primary key. After de-pooling/de-clustering tables for HANA the results are no longer automatically sorted. This is no problem as long the coding does not rely on sorted results and also no problem if the results are explicitly sorted by adding ORDER BY PRIMARY KEY.

ABAP Test Cockpit provides a check to find those select statements

Page 5: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 5

Pool/Cluster (PC) Tables

Order-by Code Check

Page 6: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 6

Column Store vs. Row Store

The HANA Database consists of a row storage and a column storage

The default storage is the column storeAll existing tables are automatically created in the column store during deployment of an Add-on (using transaction SAINT) into an ECC System running on HANAUsing transaction SE13 (tab strip DB specific attributes), you can check which store is used in case of HANAExample:

Page 7: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 7

Column Store vs. Row Store

Recommendation: Use column store for all existing and new tables of your add-on

The row store should only be used in very exceptional cases. Reasons why a table should be in row store:

Very huge OLTP load on the table (huge rate of single updates / inserts / deletes)

Page 8: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 8

New OpenSQL Compiler

New OpenSQL compiler is active as of NW7.4 SP2New compiler identifies syntactically wrong coding (errors) which were ignored before. Ignoring these errors in existing coding leads to unintended application behavior. Each errors in existing coding will either result in build errors or runtime errors. For background information see SAP note 1832139 - OpenSQL runtime environment

The risk of having errors in your code is very lowFor the whole ERP around 10 corrections had to be made

Page 9: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

Optional Steps

Page 10: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 10

Optimize your Code

HA400 – Programming on SAP HANAProvides information how to leverage the power of HANA for your applications/codingThe course is currently based on NW 7.31– the concepts how to improve coding for HANA are the same in NW 7.40– but the development tools are significantly improved in NW 7.40

Page 11: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 11

Optimize your Code

Reasons why to optimize your code?With HANA, SQL statements can be processed extremly fast– the bottleneck is no longer the database, but the transfer of the results to the application server– therefore new programming paradigms are needed: move calculations into the database

OLTP applications typically use select single– Select single on HANA (column store) can be up to two times slower compared to a traditional

database– Avoid select single in loops and nested selects; especially avoid select * single

Page 12: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 12

Detect optimization potential on SAP HANAPerformance Tools and Guidelines

New tools for “Guided Optimization” (ABAP 7.4 SP2)• Improved ABAP profiler and new SQL monitor for

runtime analysis (transaction SQLM)

• New performance checks in ABAP code inspector / test cockpit (transaction SCI / ATC)

• “Worklist tool” combining results from code checks and runtime analysis (transaction SWLT)

Adapted Performance Guidelines• Existing golden rules remain valid as general

recommendations• There are some shifts of priorities (e.g. index

definition (lower) and avoidance of nested selects (higher))

• Available in SCN

Considerations for custom ABAP code during migration to SAP HANA Best Practices and Recommendations http://scn.sap.com/docs/DOC-46714

Page 13: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

Contact information: [email protected]

Page 14: Hans-Jürgen Hennrich March 2013 Last update: November 2013 - SAP … · 2019. 11. 12. · HA400 –Programming on SAP HANA yProvides information how to leverage the power of HANA

© 2012 SAP AG. All rights reserved. 14

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the United States and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Systems Incorporated in the United States and other countries.

Oracle and Java are registered trademarks of Oracle and its affiliates.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems Inc.

HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc.

IOS is a registered trademark of Cisco Systems Inc.

RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registered trademarks of Research in Motion Limited.

© 2013 SAP AG. All rights reserved.

Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc.

INTERMEC is a registered trademark of Intermec Technologies Corporation.

Wi-Fi is a registered trademark of Wi-Fi Alliance.

Bluetooth is a registered trademark of Bluetooth SIG Inc.

Motorola is a registered trademark of Motorola Trademark Holdings LLC.

Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company.

Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company.

Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior written permission of SAP AG.