Вы находитесь на странице: 1из 54

SAP HANA Migration: A

Developer’s Guide to
Custom Code Remediation
Shari Huval
Boston University
SESSION ID: EXP210

#ASUG
www.asug.com
AGENDA

• Plan to Migrate to HANA


• Preparation
• SAP Transactions
• Guidelines
• SAP Cloud Appliance Library
• Remediation
BOSTON UNIVERSITY
• 33,000 Students
• 10,000 Faculty and
Staff
• 17 Schools and
Colleges
• 250 Fields of Study
• Three Campuses
– Main
– Medical Campus
– Fenway Campus
SAP TIMELINE

2011 SAP Go-Live - ERP, SRM, BW

2013 ERP 6.0 EHP4 to EHP6 Upgrade

2014 – Investigation Technical Refresh/HANA

2016-2017 – Technical Refresh and HANA Migration


TECHNICAL UPGRADE AND HANA MIGRATION
GOALS AND OBJECTIVES
• End of life of current SAP environment equipment
• Reduce risks and costs of support for aging hardware
• Opportunity to migrate to HANA
• Align with SAP’s strategic direction
• HANA will bring immediate performance benefits
• Setting the stage for additional technical innovation
• Improve client satisfaction
• Finance
• Budget
• HR systems
• Reporting
PROJECT SCOPE

• Complete Install of New Hardware


• HANA Code Remediation
• Enhancement Pack for ECC and SRM
• The migration from Oracle to HANA (and ASE)
SAP LANDSCAPE
• Oracle to HANA
• ERP (HR, Payroll, FI)
• SRM
• BW
• Oracle to SAP ASE
• PI
• Nakisa
• Redwood
• GRC
• GW/Fiori
• BI JAVA
• Enterprise Portal
• SolMan
SAP LANDSCAPE – ORACLE TO HANA
Product Release NetWeaver Target Release Target NetWeaver

SAP ERP ERP 6.0 EHP6 SPS-17 7.0 EHP3 SP-18 SAP ERP 6.0 EHP8 SPS-6 7.5 SP-7

SAP SRM SRM 7.0 EHP2 SPS-15 7.0 EHP3 SP-16 SAP SRM 7.0 EHP4 SPS-6 7.5 SP-8

SAP BW BW 7.40 SPS-9 7.40 SP-9 SAP BW 7.5 SPS-7 7.5 SP-7
SAP LANDSCAPE – ORACLE TO SAP ASE
Product Release NetWeaver Target Release Target NetWeaver

SAP BI JAVA EP 7.40 SP-11 7.40 SP-11 SAP P 7.50 SP-7 7.5 SP-7

SAP Enterprise Portal EP 7.40 SP-12 7.40 SP-12 SAP EP 7.50 SP-8 7.5 SP-8

SAP GW/Fiori GW 7.40 SP-11 7.40 SP-11 SAP GW 2.0 SP-12 7.5 SP-8

SAP GRC GRC 10.0 SP-13 7.0 EHP2 SP-12 SAP GRC 10.1 SP-17 7.5 SP-7

SAP PI PI 7.31 SP-8 7.31 SP-8 SAP PI 7.5 SP-7 7.5 SP-7

SAP Nakisa Nakisa 4.1.1 7.40 SP-7 SAP Nakisa 4.1.1 7.4 SP-7

Redwood CPS 8.0 7.01 SP12 BPA 9.0 SP-21 7.5 SP-7

SAP SolMan SM 7.1 SPS-12 70 EHP2 SP-15 SAP SM 7.2 SPS-6 7.4 SP-17
HANA MIGRATION TIMELINE
Group 1 – Sept 2017 Group 2 – Dec 2017

•Oracle to HANA •Oracle to HANA


•BW •ERP
•Oracle to ASE •SRM
•BI JAVA •Oracle to ASE
•GRC •GW
•Nakisa •Enterprise Portal
•Redwood •PI
•SolMan
AGENDA

• Plan to Migrate to HANA


• Preparation
• SAP Transactions
• Guidelines
• SAP Cloud Appliance Library
• Remediation
CODE REMEDIATION STEP ONE
• Documents
• Best Practice Guide - Considerations for Custom ABAP Code
During a Migration to SAP HANA -
http://scn.sap.com/docs/DOC-46714
• Mandatory Steps to Prepare Your ABAP Code for SAP HANA
https://www.sap.com/documents/2016/06/6443c2b7-757c-
0010-82c7-eda71af511fa.html
• Notes
• 1912445 - ABAP custom code migration for SAP HANA -
recommendations and Code Inspector variants for SAP HANA
migration
• 1935918 - Downport Code Inspector Check Variants for
HANA Migration
• Video
• Tutorial on SWLT – SQL Performance Tuning Worklist
https://www.youtube.com/watch?v=HPS2WGFug-g
• openSAP
• ABAP Development for SAP HANA
https://open.sap.com/courses/a4h1/items/51GHClhHeypCX
VceeO3Lvl
TRANSACTION CODES

Transaction Code Description


ATC ABAP Test Cockpit
SCI SAP Code Inspector
SQLM SQL Monitor
SWLT SQL Performance Tuning Worklist
CODE INSPECTOR
• ABAP Test Cockpit
• Transactions:
• ATC
• SCI
• SE80
• Enhanced code checks
• NetWeaver 7.4 (SP2)
• NetWeaver 7.03/7.31
(SP9)
• NetWeaver 7.02 (SP14)
CHECK VARIANTS

FUNCTIONAL_DB
• Functional Checks for Database Access

FUNCTIONAL_DB_ADDITION
• Additional Functional Checks for Database Access

PERFORMANCE_DB
• Performance Checks for Database Access
TAKE THE TRANSACTIONS FOR A TEST DRIVE

Execute using Check Variants


• Tcode SCI
• Tcode ATC

Tcode SQLM
• Sandbox
• Production

Tcode SWLT
ORIGINAL NUMBERS
• ERP 6.0 EHP6 SPS-15 Custom Objects ECC SRM BW
• Total = 463 Programs 1890 38 247
• Error = 83 Classes 391 70 55
• Warnings = 3
• Information = 377 Function Groups 371 11 8

• SRM 7.0 EHP2 SPS-15 Interfaces 137 3 0


• Total = 6 Enhancement Implementations 106 42 3
• Error = 1 Adobe Forms/Interfaces 65/29 5/3 0
• Warnings = 0
• Information = 5 Web Dynpro Applications 54 0 0

• BW 7.40 SPS-9
• Total = 3
• Error = 0
• Warnings = 0
• Information = 3
AGENDA

• Plan to Migrate to HANA


• Preparation
• SAP Transactions
• Guidelines
• SAP Cloud Appliance Library
• Remediation
CODE INSPECTOR RESULTS

Results
•Sort
•By Object
Set the Deleted
FUNCTIONAL_DB •By Name
SCI / ATC on date to
variant
12/31/9999 •Export to Desktop
•Select Results as
List
•Spreadsheet
CODE REMEDIATION GUIDELINES
Create Project BUWHANA_01 for HANA

Always do a Version compare to Production

Comments
•BUWHANA_01 userid for one liners
•Block *BUWHANA_01 userid start / *BUWHANA_01 userid stop
Transport Description
•Prefix transport short description with “PREHANA:”

Doc Template for Code Remediated


•Item Name
•Type
•Area
•Module
•Item(s) Tested
•Description / Test Step
•Before and After Screenshots
•SCI Results

Testing
•Run through debugger before change
•Run through debugger after change
REMEDIATION RULES

It is clear that every SELECT result must have a SORT, either as Message Code AMB_SINGLE
part of SELECT or after with an explicit SORT command
• SELECT INTO TABLE
If you use SELECT * you can append ORDER BY PRIMARY KEY
• Order by
at the end • SELECT END-SELECT
• UP TO 1 ROWS
SAP suggest you do not always have to make a change • Order by
If no problem exists add the specified pseudo comment
#EC CI_SORTED, #EC CI_NOORDER, #EC WARN_OK Message Code LOOP_EXIT
Bottom line in HANA there is no more implied SORT BY
PRIMARY KEY. Sorting is up to the developer
• Data must be explicitly sorted
before entering LOOP
CODE NOT CAUGHT IN SCI

Copy suspicious
Adobe Form Enhancement
code to test
Interfaces Implementations
program

Code
Execute Code
Initialization and Check Z packages
Inspector
Form Routines
SPS UPGRADE
THE NUMBERS CHANGED

Notes
• 2251947 Ambiguous select single detected in
cl_ci_test_no_order_by
• 2358948 SCI: No pseudo comment for message code
AMB_SINGLE

FUNCTIONAL_DB variant
• Updated to catch additional statements
• Message Code AMB_SINGLE

SPS upgrade ECC


• Statements flagged for Remediation
• Before 463
• After 3420
• 638.66% increase
BEFORE AND AFTER
ERP 6.0 EHP6 SPS-15 ERP 6.0 EHP6 SPS-17
4000
•Total = 463 •Total = 3420
•Error = 83 •Error = 56 3000
•Warnings = 3 •Warnings = 3001
•Information = 377 •Information = 363 2000

SRM 7.0 EHP2 SPS-15 SRM 7.0 EHP2 SPS-15 1000


•Total = 6 •Total = 67 0
•Error = 1 •Error = 1
•Warnings = 0 •Warnings = 0 ECC
•Information = 5 •Information = 66 SRM
BW
BW 7.40 SPS-9 BW 7.40 SPS-9
Before After
•Total = 3 •Total = 19
•Error = 0 •Error = 0
•Warnings = 0 •Warnings = 0
•Information = 3 •Information = 19
WHEN TO REMEDIATE

• Remediating Now
• Pros
• Reduces workload on HANA
• Frees up Dev to address HANA
and EHP issues during
migration
• Concerns
• Confirming changes are correct
• Remediating too far in advance
IF ONLY WE HAD A HANA INSTANCE
AGENDA

• Plan to Migrate to HANA


• Preparation
• SAP Transactions
• Guidelines
• SAP Cloud Appliance Library
• Remediation
CREATING A HANA INSTANCE
• SAP Cloud
Appliance Library
• Opportunity to
work on HANA
ahead of schedule
• Prove code is
being remediated
correctly
• Confidence to
remediate on
current database
ABAP ON HANA
• We used
– SAP NetWeaver AS ABAP and
SAP BW 7.5 SP01 on SAP HANA
SP10 - Developer Edition
• Today’s equivalent
– SAP NetWeaver AS ABAP 7.51
SP02 on HANA – Developer
Edition
• Developer Edition
– No time limit on use
– Minisap License key
• 90 days
• Option to Renew
SAP CLOUD APPLIANCE LIBRARY
• Set up Cloud Service provider account
• AWS, Microsoft Azure, Google
• Access credentials
• Sign into SAP Cloud Appliance Library
• https://cal.sap.com
• Create an Account
• Use the Access credentials from Cloud provider
• Maintain Users
• Create Instance of Solution
• Never leave your instance running for any
extended time
• Always Suspend it once you are done working
in the Instance
• The AWS account incurs charges while the
instance is running
USER INSTRUCTIONS
Administrator sends access point to
Users
• https://cal.sap.com/console/tenant_XXX

In Web browser enter the access URL

From the Connect to the Instance dialog


box, select the connection that you
want to connect to the virtual machine
GENERATING DATA
Create Data for
Flight Data Model in
Oracle and HANA

Tcode Variant
BC_DATA_GEN SAP&BC_MONSTER
COMPARING RESULTS
• Compare ECC Oracle with HANA Instance
– 1,375,943 records on both databases

– Execute same SELECT 5 times in


succession
• Average time on HANA: constant 5 seconds
• Average time on Oracle: 9.6 seconds
– Selected all records for a specific carrier
• Returned less than 100, 000 records
• There was no difference in time (seconds)
SELECT SINGLE
SELECT •Prove HANA returns a random record
•Used all 4 key fields of SBOOK with a range on last
SINGLE field – BOOKID < 300
SELECTING KEY FIELDS
Selecting into a TABLE using ORDER BY

• Sort Results
• Omitting Key Fields
SELECT – ENDSELECT
SELECT – ENDSELECT with ORDER BY

• Omitting Key Fields


• You do NOT have to SELECT a field to use
ORDER BY
COSTS

HANA Instance
• Dec – May
• Highest Use in December and March
Cost Estimates Month Hours Cost
Dec 28 $51.81
• $0.92 per hour when active Jan 2 $32.27
Feb 6 $25.71
• Monthly rate for storage Mar 13 $32.40
Apr 0 $20.60
• $0.05 per GB-month of Magnetic May 0 $20.71
provisioned storage Total 49 $183.50
WHEN TO REMEDIATE
AGENDA

• Plan to Migrate to HANA


• Preparation
• SAP Transactions
• Guidelines
• SAP Cloud Appliance Library
• Remediation
READY TO REMEDIATE
JANUARY-MARCH 2017 CODE REMEDIATION

Tracking Document

Jan 23 – First bulk list assigned to Implementation Partner

Feb 10 – All but 267 Statements assigned

Feb 13 – Peer Review in Process


REMEDIATION IS ONE THING

Remediation Testing
1 DOCUMENT FEEDS INTO ANOTHER

Test Plan
Code
Tracking
Inspector Document
Output Revisit List
WHEN TO MOVE TO PROD
• Delay in hardware provided an
opportunity to move to
production before migrating to
HANA
• Pros
• Lessens complexity for HANA
Migration
• Reduces Risks for HANA Go-Live
• Concerns
• Currently changes are not needed
• Two UAT cycles
CODE REMEDIATION PLAN

Code Inspector Tracking Doc Code Remediation Test Plan Transport List

•SCI / ATC •Code Inspector Output •Dev Team (5) •Where Used •Track Move to QA
•FUNCTIONAL_DB variant •Columns Added •Contractors (4) •250 hours •Track Move to Production
•Set the Deleted on date to •Assigned •Peer Review •Columns •Deleted Transports
12/31/9999 •Status •1030 Hours •Status
•Sort •Revisit Reason •2115 Statements •Description
•By Object •Transport Remediated •Type
•By Name •Peer Reviewer •Name
•Export to Desktop •Reviewer Notes •Detail/Action
•Select Results as List •In Application •Validation
•Spreadsheet •How to Test •Functional Person
•Functional Group •Priority High / Low
•Functional Person •Before After Yes / No
•Obsolete (blank) / Yes
•QA Handoff (blank) / Yes
•Before Screenshot
Complete
•After Screenshots
Complete
REMEDIATION TIMELINE

January-March
June-July 2016 October 2016 November 2016 December 2016 April 2017 May 2017
2017
•Announce •After SPS •Assigned set of •Cloud Appliance •Based on results •Apr 14 - Move •May 11 - Move
decision to upgrade ECC objects for Library is used using HANA remediated remediated
Migrate to Remediation remediation to to test code instance code to QA code to
HANA numbers jump contractor changes on everyone is on •UAT Production
•Read Up on from 463 to •Debating to HANA instance board to
Code 3420 (638.66% remediate all remediate on
Remediation increase) objects now or current DB
•Run Transaction •Dev Team on HANA •Jan 23 – First
Codes in creates •Concerns about bulk list
Sandbox Remediation remediating assigned to
Guidelines correctly while Implementation
on current DB Partner
•Hardware •Feb 10 – All but
Vendor and 267 Statements
Implementation assigned
Partner Selected
METRICS
ECC Initial Numbers ECC Final Numbers ECC Note

•Total = 3420 •Total = 1376 •Total = 3420


•Error = 56 •Error = 14 •SAP Func Grp SVIM =
•Warnings = 3001 •Warnings = 1101 1270
•Information = 363 •Information = 261 •Custom Code = 2150

SRM Initial Numbers SRM Final Numbers

•Total = 67 •Total = 15
•Error = 1 •Error = 0
•Warnings = 0 •Warnings = 0
•Information = 66 •Information = 15 System Transports Objects
BW Initial Numbers BW Final Numbers ECC 271 811
•Total = 19 •Total = 0
•Error = 0 •Error = 0 SRM 11 14
•Warnings = 0 •Warnings = 0
•Information = 19 •Information = 0 BW 7 13
KEY TAKEAWAYS
• Strategic to Remediate Ahead of Migration
• Reduced Risks for HANA Go-Live
• Team Effort
• Organization is Essential
• Peer Review
• Use SAP Cloud Appliance Library to Explore SAP solutions
• Going Forward
– Run Code Inspector against new code
– Periodic Code Inspection of custom packages
FINAL WRAP-UP

QUESTIONS
Thank you for attending my session!
For questions, contact me at:
Shari Huval
SAP Development Manager
lhuval@bu.edu

Don’t forget to fill out the Session Evaluation on the Mobile App!

SAP HANA Migration: A Developer’s Guide to Custom Code


Remediation
Session ID EXP210
Follow Us

Thank you for your time


Follow us on at @ASUG365

Вам также может понравиться