You are on page 1of 43

Custom Code Health Check

March 2016
Table Of Contents
1. SAP Modernization Via Automation 3
2. Custom Code Health Check 8
3. Concluding Thoughts 35

Appendix

A. Customer Case Studies 38

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 2


1. SAP MODERNIZATION VIA
AUTOMATION
“THE BASIC ANSWER IS THAT NOBODY WOULD BE DOING ROUTINE,
REPETITIVE THINGS ANYMORE”
- CHARLES SIMONYI, HEAD OF MICROSOFT APPLICATION SOFTWARE GROUP
Business Context

 Sempra Energy (“SE” or the “Company”) has an extensive SAP platform


that has been highly customized
 Unique business demands in the utilities markets required significant
customization and naturally, TCO has risen over time
 There are important business reasons to modernize the overall ERP
system and management of the customizations
 Ongoing M&A
 Risk of disruptive events (financial year closings, security breaches)
 Business agility and expansion
 New Technologies
 Allocation/optimization of human capital

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 4


Benefits of smartShift
AN AUTOMATED APPROACH PROVIDES TREMENDOUS BUSINESS AND IT BENEFITS

 We typically see an immediate reduction in codebase of 20-30% and


development of a forward looking platform to continue reductions
 Order of magnitude time and cost compression in major upgrades
 Dramatically increased ability to deal with consolidation and
divestitures
 Reduction in unit testing, test cycles, cycle time
 Ability to deal with any mass change effectively
 Immediate and ongoing reduction of technical debt

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 5


The smartShift Advantage
AUTOMATION TO IDENTIFY & REDUCE RISK AND ACCELERATE END STATE OBJECTIVES

Typical Duration of an Enterprise Transformation Project

Manual Approach

0 10 20 30 40 50 60
Time in Weeks
Analysis Code Changes Integration Testing UA Testing

Rapid Predictable Accurate


Uses automation to complete Exact timelines quoted up front and backed Completed with full adherence to
migrations in days, not weeks. by a 100% service level guarantee known vendor and client specifications

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 6


Utilities Credentials

HANA Migration and ECC Upgrade, Ehp Multi-Year Licensing


Optimization + Upgrade and Unicode Ehp 7 Upgrade Agreement
Ehp 7 Upgrade Enablement
~600k LOC Ongoing code
Performance ~2.3mm LOC SAP Upgrade as part of 2,600+ Objects optimization for
Optimization + 12,000+ Objects HANA Migration 6 Week Project developers
8 Week Project
Unicode Enablement 2016 - Current 2016 2015 2013 - 2016

Large SAP Instance


13,000+ objects
remediated
~2.5mm LOC Usage and Consolidation + ECC Upgrade and ECC Upgrade and
Deactivation Analysis Unicode Enablement Unicode Enablement Unicode Enablement
Projects completed in
weeks Code Cleansing and Complex multi-SAP SAP R/3 4.6c upgraded 5 SAP system
removal of unused code system consolidation to ECC 6.0 with Unicode Landscape -SAP R/3
2015; 2016 - Current 4.6c/4.7 to ECC 6.0

2013 - Current 2013 - 2014 2012 - 2013 2012 - 2014

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 7


2. CUSTOM CODE OVERVIEW
A UNIQUE PERSPECTIVE INTO THE HEALTH OF YOUR SYSTEM
Custom Code Insights
DEEPER INSIGHTS INTO THE HEALTH OF YOUR CUSTOM CODE

 Your custom code has a rich and deep history like many of our
clients
 Wear and tear on this system is natural and leads to business
process complications, fire drills, and under performance
 Duplicative and unused custom code is expensive to maintain, but
provides no value to IT or business users
 What if you could reduce your custom code footprint, have it behave
more like standard code, improve real business outcomes, and do it
all in an economic and predictable manner?

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 9


The smartShift Methodology
DEEPER INSIGHTS INTO THE HEALTH OF YOUR CUSTOM CODE

 smartShift’s Custom Code Health Check (“CCHC”) conducts a deep,


holistic analysis of the millions of lines of code in your enterprise SAP
system
 The analysis aims to provide an understanding of:
 How to lower risk, shorten timelines, and reduce costs
 Opportunities to reduce and simplify the overall custom code footprint
 Performance improvements and optimization opportunities
 Identify key concerns, issues, and errors against best coding practices and
standards
 Code cleanliness and auditability opportunities
 Real business examples impacted by improvements in the custom code

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 10


NX7 System Synopsis
THE NX7 SYSTEM IS SIZEABLE AND COMPLEX CONTAINING THOUSANDS OF OBJECTS AND
MILLIONS OF LINES OF CODE

Company: Sempra Energy

System Name: NX7

System Type: ECC

Version: 6.05

Unicode Enabled: No

Total Objects: 14,987

Total Lines of Code: 4,708,568

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 11


NX7 System Issues Discovered

Summary of Issues Discovered Addressing The Issues

UC/Release/RTE,
Coding Standard, 26,074  At least 40% of the identified issues
292,310
HANA, 32,634 are medium to high severity and are
affecting your code performance

Architecture,  There are nearly 26,000 issues


64,455
Maintainability, surrounding an Unicode/Upgrade and
319,545
Security, 8,192 30,000+ identified issues related to a
successful HANA migration
Stability, 195,596  Major system issues may be
Performance,
affecting processing time and overall
160,023 performance
Architecture Coding Standard UC/Release/RTE HANA
Maintainability Performance Stability Security

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 12


Sempra System Benchmarking
# of Issues / LOC % (High + Medium Issues) / Total Issues %
25.0% 50.0% Peer Group,
Sempra,
Sempra, 42.8%
Peer Group, 40.1%
20.0% 17.0% 40.0%
16.5%
15.0% 30.0%
10.0% 20.0%
5.0% 10.0%
0.0% 0.0%
Issues / LOC % High+Medium Issues

(Upgrade + Performance) Issues / Total Issues % % of Objects with Issues / Total Objects
30.0% 80.0% Sempra,
25.0% Sempra, Peer Group, 70.0% 64.4% Peer Group,
19.9% 20.5%
60.0% 53.0%
20.0%
50.0%
15.0% 40.0%
10.0% 30.0%
20.0%
5.0%
10.0%
0.0% 0.0%
Upgrade + Performance + HANA % Objects with Issues
COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 13
NX7 System Commonality
COMMONALITY ANALYSIS COMPARES CUSTOM OBJECTS TO OTHER CUSTOM OBJECTS

Custom Objects Statistical % Commonality Addressing The Issues

1,400
 There are over 1,000+ custom
1,200 1,148 1,152 objects in the system that contain
1,000
986 94%+ similar lines of code to other
859
custom objects
800 688

600 537  There is an opportunity to revisit


many of these custom objects to see
400
252 if they can be consolidated
200

0
100.0% 99%+ 98%+ 97%+ 96%+ 95%+ 94%+

# of Objects

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 14


NX7 System Commonality
SAMPLE COMMONALITY OBJECTS EXAMPLES

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES, INC. ALL RIGHTS RESERVED 15


NX7 System Clone
CLONE ANALYSIS COMPARES CUSTOM OBJECTS TO SAP STANDARD OBJECTS

Custom Objects Statistical % Cloned Addressing The Issues

450
399
417  There are over 400 custom objects in
400 367 the system that contain 80%+ similar
350
309 lines of code to SAP standard
300 objects in
250

200 177  At least 100 custom objects are 100%


150 duplicative of SAP standard objects
100
 There is an opportunity to revisit many
50
of these custom objects to see if they
0
100.0% 95%+ 90%+ 85%+ 80%+ can be consolidated
# of Objects

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 16


DE0 System Clone
SAMPLE CLONE OBJECTS EXAMPLES

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES, INC. ALL RIGHTS RESERVED 17


UC/Release/RTE: 26,074 Issues

UC/Release/RTE issues are areas where code can be optimized to ensure compliance
with current and future upgrades

UC/Release/RTE includes issues such as:


 #142 GUI Upload/Download
 #111 OPEN DATASET requires mode and encoding specification
 #105 Use of FORM Parameter without Types
 #123 Use of Obsolete Function Modules

Optimization leads to better results


Impact Legend
Lower Execution Time Better CPU Utilization Better DB Utilization  = High
 = Medium
 = Low
  

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 18


UC/Release/RTE: Before and After Remediation
CODE EXAMPLE – ZAP_VENDOR_UPLOAD_BANK
Pre-smartShift Post-smartShift

CALL FUNCTION 'UPLOAD’ CALL METHOD "$smart: 3/17/16 #142


cl_gui_frontend_services=>file_open_dialog "$smart: 3/17/16 #142
EXPORTING EXPORTING DEFAULT_FILENAME = LV_FILENAME "$smart: 3/17/16 #142
filename = p_file INITIAL_DIRECTORY = LV_PATH "$smart: 3/17/16 #142
filetype = 'DAT' CHANGING FILE_TABLE = LT_FILE_TABLE "$smart: 3/17/16 #142
RC = LV_RC "$smart: 3/17/16 #142
IMPORTING USER_ACTION = LV_USER_ACTION. "$smart: 3/17/16 #142
cancel = gi_input_in CHECK LV_USER_ACTION EQ 0. "$smart: 3/17/16 #142
filesize = gi_input_out CHECK LV_RC GT 0. "$smart: 3/17/16 #142
READ TABLE lt_file_table INDEX 1 INTO lv_file . "$smart: 3/17/16 #142
act_filename = p_file p_file = LV_FILE. "$smart: 3/17/16 #142
TABLES CALL METHOD cl_gui_frontend_services=>gui_upload "$smart: 3/17/16 #142
data_tab = gt_input EXPORTING
FILENAME = LV_FILE "$smart: 3/17/16 #142
EXCEPTIONS FILETYPE = 'ASC' "$smart: 3/17/16 #142
conversion_error = 01 HAS_FIELD_SEPARATOR = 'X' "$smart: 3/17/16 #142
invalid_table_width = 02 DAT_MODE = 'X' "$smart: 3/17/16 #142
CHANGING "$smart: 3/17/16 #142
invalid_type = 03 data_tab = it_input[] "$smart: 3/17/16 #142 #909
no_batch = 04 EXCEPTIONS "$smart: 3/17/16 #142
unknown_error = 05. OTHERS = 1. "$smart: 3/17/16 #142

Issue: Obsolete UPLOAD/DOWNLOAD, WS_UPLOAD/WS_DOWNLOAD FM replacement:


FM’s are obsolete in a Unicode enabled system and from release R/3 4.7 onwards. Usage of these FM’s results in improper data usage in
the new release system. The report reads the input file and Create or Change Vendor in SAP.

Resolution: smartShift detected the use of either WS_UPLOAD and WS_DOWNLOAD statements, or older UPLOAD and DOWNLOAD
functions, none of which are Unicode-compliant. smartShift replaces these obsolete FM's to the appropriate Unicode-compliant functions. This
in turn leads to proper data usage and Unicode compliance.

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 19


HANA: 32,634 Issues

The HANA platform is fundamentally different from traditional RDBMS systems and requires a
significant refactoring of embedded SQL, a time consuming and error prone process when
done manually.

HANA issues include what you must do and what you should do to take full advantage of the
HANA platform:
 #600 SELECT on former cluster/pooled tables without ORDER BY
 #712 SELECT * should be avoided, instead only required fields should be selected if applicable
 #723 Avoid data transfer between database and internal table using loops. Use INTO TABLE and
FROM TABLE additions instead
 #729 SELECT/ENDSELECT as existence check.

Optimization leads to better results


Impact Legend
Lower Execution Time Better CPU Utilization Better DB Utilization  = High
 = Medium
 = Low
  

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 20


HANA: Before and After Remediation
CODE EXAMPLE – ZAP_VENDOR_UPLOAD_BANK

Pre-smartShift Post-smartShift

SELECT * SELECT b~lifnr b~bukrs INTO TABLE lt_lfb1 "$smart: 3/17/16 #712 #728
INTO CORRESPONDING FIELDS OF TABLE lt_lfa1
FROM lfa1
FROM lfa1 AS A INNER JOIN lfb1 "$smart: 3/17/16 #728
WHERE stcd2 = gt_vendor_create-stcd2 AS B ON b~lifnr = a~lifnr "$smart: 3/17/16 #110 #728
AND ktokk = gt_vendor_create-ktokk WHERE a~stcd2 = "$smart: 3/17/16 #110 #728
AND pstlz LIKE lc_zip
AND loevm = ' '. wr_vendor_c reate-stcd2 "$smart: 3/17/16 #110 #728
IF sy-subrc = 0. AND a~ktokk = "$smart: 3/17/16 #110 #728
SELECT * wr_vendor_create-ktokk "$smart: 3/17/16 #110 #728
INTO CORRESPONDING FIELDS OF TABLE lt_lfb1
FROM lfb1 AND a~pstlz LIKE lv_lc_zip "$smart: 3/17/16 #728 #909
FOR ALL ENTRIES IN lt_lfa1 AND a~loevm = ' ' AND b~loevm = ' ' "$smart: 3/17/16 #728
WHERE lifnr = lt_lfa1-lifnr AND b~bukrs IN s_bukrs. "$smart: 3/17/16 #728
AND loevm = ' '
AND bukrs IN s_bukrs.
IF sy-subrc = 0.

Issue: Use of SELECT * :


Relational databases typically use Row-Based data storage. However, Column-Based storage is more suitable and preferred for many business
applications. SAP HANA is particularly optimized for Column-Based storage with the following advantages: Faster Data Access, Better
Compression, and Better Parallel Processing.
Resolution
smartShift detected the use of SELECT *. This practice should be avoided and instead, only the desired fields needed should be specified. This
rule automatically determines the required fields needed and transforms the code accordingly. The declaration can also be adjusted to contain
only the fields which are used. The resolution reduces the need for unnecessary memory allocations and improves performance via
Column-based storage advantages maximized on SAP HANA.
In this particular case, the benefit can increase the speed at AP Vendor Create or Change Process.

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 21


Performance: 160,023 Issues

There are a broad array of performance issues that accumulate over time. The
cumulative effects are often significant.

Performance include issues such as:


 #711 Remove data declarations which are not used in the program.
 #717 Use of field symbols instead of explicit work areas or header lines.
 #719 IF / CHECK statement inside SELECT/ENDSELECT refers to a field in the work
area. Use WHERE clause instead.
 #721 CHECK statement inside a loop refers to a field in the work area. Use WHERE
clause instead.
Optimization leads to better results
Impact Legend
Lower Execution Time Better CPU Utilization Better DB Utilization  = High
 = Medium
 = Low
  

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 22


Performance: Before and After Remediation
CODE EXAMPLE – ZAP_VENDOR_UPLOAD_BANK

Pre-smartShift Post-smartShift

LOOP AT bdcerr LOOP AT gt_bdcerr ASSIGNING "$smart: 3/17/16 #110 #717


WHERE msgtyp = 'S' FIELD-SYMBOL(<fs_bdcerr>) "$smart: 3/17/16 #110 #717
AND msgid = 'F2' WHERE msgtyp = 'S'
AND ( msgnr = '175' AND msgid = 'F2'
OR msgnr = '271' ). AND ( msgnr = '175'
gt_report-lifnr = bdcerr-msgv1. OR msgnr = '271' ).
ENDLOOP it_report-lifnr = <fs_bdcerr>-msgv1.
"$smart: 3/17/16 #110 #717
#909
ENDLOOP. "$smart: 3/17/16 #717

Issue:Use of field symbols instead of explicit work areas or header lines.


The field symbol <fs> points directly to the assigned line in memory. Unlike work areas, in which the contents of the line are only available indirectly using the
INTO addition, field symbols allow you to read and change table entries directly, leading to more efficient and optimized code.

Resolution:
smartShift detects and uses the field symbol instead of explicit work areas or header lines. When an internal table is read, there are overheads for copying the
table line to the work area. If field symbols are used instead, this overhead is mitigated. The result is a an improvement in performance, especially if large
or complex internal tables exist. This also allows ease of processing nested internal tables.

In this particular case, there should be an improvement in speed of the process for the AP Vendor Create or Change.

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 23


Maintainability: 319,545 Issues

Maintainability issues result in hidden costs as modifications and bug-fixes can take
longer, which creates a continuous stream of “technical debt”

Maintainability include issues such as:


 #149 Untyped FIELD-SYMBOLS declarations and STRUCTURE addition are obsolete
 #164 DESCRIBE TABLE ... LINE is obsolete and should be replaced with LINES( .... )
 #153 TYPE addition should be used to reference Data Dictionary types
 #139 Specify C as default type in incomplete declarations
 #902 Creating table work areas with the TABLES statement is forbidden in ABAP
Objects.
Optimization leads to better results
Impact Legend
Lower Execution Time Better CPU Utilization Better DB Utilization  = High
 = Medium
 = Low
  

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 24


Maintainability: Before and After Remediation
CODE EXAMPLE – ZAP_VENDOR_UPLOAD_BANK

Pre-smartShift Post-smartShift

DESCRIBE TABLE gt_input LINES gi_total. *$smart (W) 3/17/16 - #164 DESCRIBE TABLE ... LINE is obsolete and is
IF gi_total = 0. *$smart (W) 3/17/16 - #164 replaced with LINES( .... ) (A)
MESSAGE e000
WITH 'Empty customer file'. gv_gi_total = LINES( it_input ). "$smart: 3/17/16 #164 #909
ENDIF. IF gv_gi_total = 0. "$smart: 3/17/16 #909
MESSAGE e000
WITH 'Empty customer file'.
ENDIF.

DESCRIBE TABLE ... LINE is obsolete and should be replaced with LINES( .... )
Obsolete syntax has a detrimental impact on performance.

Resolution:
smartShift detected the use of the DESCRIBE TABLE ... LINE statement, which is obsolete. smartShift replaces DESCRIBE TABLE ... LINES
with LINES (....)

Changes in references and obsolete table counts with improved syntax should improve performance. In this particular case, this
should accelerate the AP Vendor Create or Change Process.

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 25


Stability: 195,596 Issues

Stability issues are latent problems that are likely to manifest themselves as technology
is progressively upgraded.

Stability includes issues such as:


 #112 Obsolete use of RANGES
 #223 Call to BAPI function must have its return value checked.
 #901 Replace USING by CHANGING if the parameter is passed by reference and the
variable is changed.
 #925 Breakpoint that is always active is used solely as a test help and is not allowed
in production programs
Optimization leads to better results
Impact Legend
Lower Execution Time Better CPU Utilization Better DB Utilization  = High
 = Medium
 = Low
  

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 26


Stability: Before and After Remediation
CODE EXAMPLE – ZR_CO_SUMMARIZATION
Pre-smartShift Post-smartShift

RANGES: RG_VARHI FOR CKRCO-VARHIEBG, *$smart (W) 3/17/16 - #112 Use of RANGES is obsolete in ABAP Objects (A)
TYPES RTYPE_RG_VARHI TYPE RANGE OF CKRCO-VARHIEBG. "$smart: 3/17/16 #112
RG_OBJNR FOR KKBC-OBJNR,
DATA RT_RG_VARHI TYPE RTYPE_RG_VARHI. "$smart: 3/17/16 #112
RG_KSTAR FOR KKBC-KSTAR. DATA WR_RG_VARHI TYPE LINE OF RTYPE_RG_VARHI. "$smart: 3/17/16 #112

*$smart (W) 3/17/16 - #112 Use of RANGES is obsolete in ABAP Objects (A)
TYPES RTYPE_RG_OBJNR TYPE RANGE OF KKBC-OBJNR. "$smart: 3/17/16 #112
DATA RT_RG_OBJNR TYPE RTYPE_RG_OBJNR. "$smart: 3/17/16 #112
DATA WR_RG_OBJNR TYPE LINE OF RTYPE_RG_OBJNR. "$smart: 3/17/16 #112

*$smart (W) 3/17/16 - #112 Use of RANGES is obsolete in ABAP Objects (A)
TYPES RTYPE_RG_KSTAR TYPE RANGE OF KKBC-KSTAR. "$smart: 3/17/16 #112
DATA RT_RG_KSTAR TYPE RTYPE_RG_KSTAR. "$smart: 3/17/16 #112
DATA WR_RG_KSTAR TYPE LINE OF RTYPE_RG_KSTAR. "$smart: 3/17/16 #112

Issue: Obsolete use of RANGES.


Use of RANGES should not be used as it is obsolete.

Resolution:
smartShift detected the use of the RANGES statement and declared RANGES tables, which is obsolete. smartShift will replace RANGES with
code patterned on other internal table conversions. In future releases, this would result in a syntax error which has now been corrected –
preventative measures. In this particular case, this would allow the Hierarchy Read and Hierarchy Code Range Report to be in syntax
compliance for all future releases of SAP

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 27


Architecture: 64,455 Issues

Architecture issues are areas where code can be aligned with known SAP best structural
practices

Architecture includes issues such as:


 #110 Obsolete internal table declaration(OCCURS)
 #216 TABLES parameters of forms and function modules are obsolete.
 #927 Embedded SQL should not be used.

Optimization leads to better results


Impact Legend
Lower Execution Time Better CPU Utilization Better DB Utilization  = High
 = Medium
 = Low
  

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 28


Architecture: Before and After Remediation
CODE EXAMPLE – ZAP_VENDOR_UPLOAD_BANK

Pre-smartShift Post-smartShift

DATA: DATA:
gt_vendor_create LIKE TABLE OF gs_vendor it_vendor_create LIKE TABLE OF "$smart: 3/17/16 #110 #909
WITH HEADER LINE. s_vendor "$smart: 3/17/16 #110 #909
DATA: . "$smart: 3/17/16 #110
gt_vendor_change LIKE TABLE OF gs_vendor DATA: wr_vendor_create LIKE s_vendor. "$smart: 3/17/16 #110
WITH HEADER LINE. DATA:
it_vendor_change LIKE TABLE OF "$smart: 3/17/16 #110 #909
s_vendor "$smart: 3/17/16 #110 #909
. "$smart: 3/17/16 #110
DATA: wr_vendor_change LIKE s_vendor. "$smart: 3/17/16 #110

Issue: Obsolete internal table declaration (OCCURS) :


OCCURS is obsolete and is no longer valid in OO ABAP. It defines an internal table with memory allocated to store a specified number of rows
of the internal table in the main memory. It also provides you with a header line by default. Such default memory allocations have an impact
on performance.
Resolution
smartShift detected the use of OCCURS, OCCURS 0, OCCURS X TIMES in TYPE, DATA and other declarative statements to define internal
tables, which are obsolete. You can declare only tables without header lines. smartTool replaces the OCCURS additional with the STANDARD
TABLE OF addition. The resolution reduces the need for unnecessary memory allocations and thus can improve performance.
In this particular case, AP Vendor Create or Change process report can be processed faster by absorbing less memory allocations.

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 29


Security: 8,192 Issues

Security issue are areas where customizations have introduced unnecessary risks into
your system as well as potential compliance concerns

Security includes issues such as:


 #804 Detect references to SY-UNAME and SYST-UNAME
 #151 Missing AUTHORITY-CHECK statement
 #806 Detect uses of dynamic variables in ASSIGN and WRITE statements.

Optimization leads to better results


Impact Legend
Increased Security Increased Compliance More Auditable  = High
 = Medium

  
= Low

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 30


Security: Before and After Remediation
CODE EXAMPLE – Z_OQ_COMMENTS_DELETE

Pre-smartShift Post-smartShift

*$smart (I) 3/17/16 - #804 Detected reference to SY-UNAME or SYST-UNAME.


IF sy-uname NE 'JCWONG' AND "#EC *
sy-uname NE 'JSHARTWI' AND
IF sy-uname NE 'JCWONG' AND "#EC *
sy-uname NE 'TP2BXL'.
sy-uname NE 'JSHARTWI' AND
MESSAGE e008.
sy-uname NE 'TP2BXL'.
* You do not have authorization for the required action
MESSAGE e008.
ENDIF.
* You do not have authorization for the required action
ENDIF.

Issue: Detect references to SY-UNAME and SYST-UNAME


Hard Coding the user names is not an SAP recommended best practice. Restricting the code usage to certain user’s is a system security violation. For
example order processing is controlled by a user id, hard coded logic may lead to suboptimal business outcomes and compliance issues.

Resolution: smartShift detected the ABAP variable SY-UNAME and SYST-UNAME where it is used inside a condition (outside of a condition is not
considered). smartShift provides information to the customer for review, and if needed, a resolution can be applied to reduce compliance and
security related issues. In this particular case report is restricted by user name, smartShift can identify such potential breaches of user
authorizations

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 31


NX7 System Hardcoded Literals
SAMPLE HARDCODED LITERALS EXAMPLES

There are over 24,9000+ Hardcoding occurrences identified across 7,500+ custom
objects
smartShift detected the use of hardcode occurrences that can be replaced with the SAP
standard recommended approach

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES, INC. ALL RIGHTS RESERVED 32


Capitalization of SAP smartShift Services

 smartShift’s services are fully capitalizeable through deployment of a


smartShift software license at the end of the service. A software
asset is left behind for future code cleanses
 “Software development costs that add future value are typically
capitalized. Expenditures that do not increase the value of the asset
are expensed.”
 These guidelines are established by the U.S. Financial Accounting
Standards Board (FASB) 86 which provides accounting guidelines
for the capitalization of software and code

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 33


smartShift vs. Alternatives
REDUCED RISK, REDUCED FOOTPRINT, INCREASED SPEED, INCREASED ACCURACY
OPTIONS
2 - Unicode/Upgrade + 3 - Unicode/Upgrade +
1 - Unicode + Ehp Upgrade HANA Basic HANA Premium
Services Included: Unicode Enablement Unicode Enablement Unicode Enablement
Ehp Upgrade Ehp Upgrade Ehp Upgrade
HANA Code Copliance HANA Code Copliance
HANA Performance Optimization HANA Performance Optimization
Code Cleansing Code Cleansing
All Additional Rules

Total Est. Man-Days To Remediate 821 2,218 9,162


Assumed Failure Rate 17.0% 17.0% 17.0%
Total Remediation Est. Man-Days 960 2,595 10,719
# Of Developers Staffed 5 5 5
Offshore/Onshore Ratio 50% 50% 50%
Blended Offshore/Onshore Rate/Developer/Day $375 $375 $375
Project Manager Rate/Day $750 $750 $750
Total Project Timeline Days 192 519 2,144
Development Cost $360,164 $973,166 $4,019,635
PM Cost $144,066 $389,266 $1,607,854
Total Efforts To Do It Yourself $504,230 $1,362,432 $5,627,488

smartShift Timeline (Days) 30 45 60


% Discount to Manual Efforts 84.4% 91.3% 97.2%

COPYRIGHT © 2016 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 34


3. CONCLUDING THOUGHTS
KEY TAKEAWAYS
Key Takeaways

 Sempra has a complex system that can realize immediate and


ongoing benefits through SAP smartShift modernization services
 Unicode Enablement
 Ehp Upgrade
 HANA Upgrade
 Code Cleanup
 Performance improvement potential
 Next steps would be design a customized scope of work to fit
Sempra’s immediate and long-term needs

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 36


APPENDIX
A. CUSTOMER CASE STUDIES
REAL CUSTOMERS, REAL TRANSFORMATIONS
Innovate Using Automation Like Our Clients…

Confidential
COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 39
Case Study: Nestle
HANA Optimization & Scope
Landscape Simplification
• 11 SAP production systems
• Remove split architecture custom code
• 116,334 custom objects in scope
• Enable and optimize for SAP HANA
• Automated dual maintenance over
• Create custom code compliance rules 3 years due to 40,000 SAP transports annually
• Automated dual maintenance
Highlights
• 3 Phase approach for the SAP HANA migration over
Benefits one year
• Reduced project time by over 30% • Custom code compliance rules created in
• Exceeded committed automation targets cooperation with the customer & SAP
• Lowering total cost of ownership • Customer applied a part of the manual code
• Reduced testing effort adjustments
• Used Code Inspector for validation

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 40


Case Study: McKesson
Ehp Analysis, Upgrade, and Scope
Remediation
• System with 8,322 custom main objects
• 6.0 Environment upgraded to ERP 6.06 (Ehp 6) • 392 standard objects with modification
• Ehp, Clone, BDC, and Usage Analysis
• Detection of Ehp changes, SAP clones, BDC, SAP
• Adjustments of standard and custom objects modification and object usage
• Testing support until Go-Live • First remediation on Sandbox and Second
remediation on Development System

Highlights
Benefits
• Project time: 2 weeks for each run
• Better predictability with analysis services
• Fast turn around with on time delivery, to assure tight
• Lowering total cost of ownership project schedule
• High quality reduced testing effort and number of test
• High quality delivery and preventive fixing of potential
cycles
runtime errors
• Early testing with sandbox approach reduces project
time • Analysis results helped in formulating the processes
as part of target testing

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 41


Case Study: Daimler
Upgrade / UNICODE Scope
& Code Optimization, Standardization
• System with 50,818 custom objects
• Release upgrade SAP R/3 4.6c to
ECC 6 & Unicode conversion • 323,698 issues handled out
 18,544 issues were related to release upgrade
• Code optimization and implementation of consistent and Unicode issues.
coding standards
• Detection of SAP clones, BDC, SAP modification
and object usage

Benefits Highlights
• Reduced project time by months. • Project time: 3 weeks
• Higher staffing flexibility due to code • Code Optimization for maintainability, stability,
standardization performance and security
• Lowering total cost of ownership • Automatic remediation of SAP modifications
• Reduced testing effort • Enforcing of customer naming standards

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 42


Case Study: Shell
Upgrade / UNICODE Scope
& Code Optimization, Standardization
• System with 8,026 custom objects
• SAP R/3 4.6c to ECC 6 EhP4
• 425,558 issues handled out
• Unicode Conversion
• Code Optimization and implementation of consistent Highlights
coding standards
• Project timeline: 2 weeks
• Deleted 222.038 lines of obsolete comments

Benefits • Replaced cloned SAP Includes


• Creation of Shell-specific transformation rules to
• Reduced project time by months
standardize custom code
• Minimize dual maintenance period
• Multiple delta-runs picking up parallel development
• Lowering total cost of ownership reduced dual maintenance
• Reduced testing effort • Zero-error conversions

COPYRIGHT © 2015 SMARTSHIFT TECHNOLOGIES. ALL RIGHTS RESERVED 43

You might also like