managing custom code in sap

34
Tony de Thomasis and Alisdair Templeton Managing Custom Code in SAP ® Bonn Boston

Upload: vudieu

Post on 31-Dec-2016

242 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Managing Custom Code in SAP

Tony de Thomasis and Alisdair Templeton

Managing Custom Code in SAP®

Bonn � Boston

Page 2: Managing Custom Code in SAP

Contents at a Glance

1 Custom Code Management and Methodology ...................... 19

2 Custom Code Transparency .................................................... 43

3 Custom Code Control ............................................................. 145

4 Custom Code Optimization ................................................... 193

5 Custom Code Reporting ........................................................ 253

A Further Resources ................................................................... 291

B SAP Solution Manager Navigation Principles ........................ 303

C Upcoming Functionality and Enhancements to Help Manage Custom Code ............................................................ 307

D Calculating Cohesion .............................................................. 313

E A Discussion on Writing Custom Code .................................. 321

F The Authors ............................................................................. 343

Page 3: Managing Custom Code in SAP

7

Contents

Acknowledgments ..................................................................................... 13Introduction .............................................................................................. 15

1 Custom Code Management and Methodology ........................ 19

1.1 Defining Good Code ................................................................... 201.1.1 Accuracy ........................................................................ 201.1.2 Readability ..................................................................... 201.1.3 Testability ....................................................................... 221.1.4 Software Architecture ..................................................... 22

1.2 Types of Custom Code ................................................................ 231.2.1 Enhancement ................................................................. 231.2.2 Modification .................................................................. 231.2.3 Clone ............................................................................. 241.2.4 Customer Development ................................................. 24

1.3 Why Custom Code Management Is Important ............................. 241.3.1 Reduction of Support Costs ............................................ 251.3.2 Ability to Identify Valuable Custom Code ....................... 251.3.3 Avoid Opportunity Costs of Missed Innovation .............. 251.3.4 Avoid Increased Risk and Testing Overhead during

Upgrades ........................................................................ 251.4 SAP Solution Manager Methodology: The Four Phases ................ 26

1.4.1 Custom Code Transparency ............................................ 271.4.2 Custom Code Control ..................................................... 271.4.3 Custom Code Optimization ............................................ 271.4.4 Custom Code Reporting ................................................. 28

1.5 Creating an SAP Solution Manager Business Blueprint ................. 281.5.1 Creating the SAP Solution Manager Business Blueprint

Structure ........................................................................ 281.5.2 Selecting an SAP Solution Manager Project Accelerator ... 311.5.3 Selecting the Process Steps from the Business Process

Repository ...................................................................... 321.5.4 Using the Business Blueprint .......................................... 351.5.5 Using the Roadmap and Accelerator ............................... 37

Page 4: Managing Custom Code in SAP

8

Contents

1.5.6 Extracting the Custom Code Project into Other Formats ... 381.6 Summary .................................................................................... 42

2 Custom Code Transparency ...................................................... 43

2.1 Reverse Business Process Documentation ................................... 442.1.1 Uploading the RBPD Content ......................................... 442.1.2 Performing an Analysis Run in the Solution

Documentation Assistant ............................................... 482.1.3 Checking the Run ........................................................... 532.1.4 Checking the Results of the Analysis Run in SAP

Solution Manager ........................................................... 552.1.5 Creating the SAP Solution Manager Business Blueprint

for the Analysis .............................................................. 572.1.6 Attaching Custom Code from the Analysis Run to the

SAP Solution Manager Business Blueprint ...................... 602.1.7 Enriching the SAP Solution Manager Business Blueprint

with Additional Custom Code Details ............................. 632.1.8 Enhanced Business Process Modeling ............................. 642.1.9 Configuring and Printing Custom Code Documentation ... 66

2.2 Custom Code Lifecycle Management (CCLM) .............................. 692.2.1 CCLM Prerequisites ........................................................ 692.2.2 Uploading the CCLM Content ........................................ 702.2.3 Activating the CCLM Collection Jobs .............................. 742.2.4 Using the CCLM Object List ........................................... 782.2.5 The Overview List .......................................................... 80

2.3 SAP Guided Self-Services ............................................................ 812.3.1 Transport Execution Analysis (TEA) ................................. 822.3.2 TEA Prerequisites ........................................................... 822.3.3 Uploading the TEA Content ............................................ 832.3.4 Checking for Missing Notes and Solution Tools

Updates .......................................................................... 842.3.5 Data Collection and Process Flow—Preparing the

Session ........................................................................... 842.3.6 Data Collection and Process Flow—Performing the

Session ........................................................................... 892.3.7 Data Collection and Process Flow—Preparing the TEA

Report ............................................................................ 93

Page 5: Managing Custom Code in SAP

9

Contents

2.4 Service Summary—Results of Running a TEA Report ................... 1002.4.1 Action Plan .................................................................... 1012.4.2 Custom Code Maintainability ......................................... 1062.4.3 Usage Statistics .............................................................. 1102.4.4 SAP Software Maintenance ............................................ 1122.4.5 Import History ................................................................ 1132.4.6 System Landscape and TMS Settings .............................. 1172.4.7 Transports ...................................................................... 1252.4.8 Testing and Runtime Errors ............................................. 1332.4.9 Transport Landscape Consistency ................................... 137

2.5 Summary .................................................................................... 143

3 Custom Code Control ............................................................... 145

3.1 Testing and Monitoring Overview ............................................... 1463.2 SAP Coverage Analyzer (SCOV) ................................................... 147

3.2.1 SCOV Activation ............................................................ 1483.2.2 Confirmation That SCOV Is Running ............................... 1503.2.3 Using SCOV to Determine Test Coverage ........................ 1523.2.4 Global View for Aggregated Data ................................... 1553.2.5 Global View for Detailed Data ........................................ 156

3.3 SAP Coverage Analyzer Lite (SCOV Lite) ...................................... 1583.3.1 Prerequisites .................................................................. 1593.3.2 Extractor Framework Activation ..................................... 1593.3.3 SAP Solution Manager BI Content Activation ................. 1603.3.4 Confirmation That SCOV Lite Is Running ........................ 1623.3.5 Using SCOV Lite to Determine Object Usage .................. 163

3.4 Other Technologies to Track Custom Code Usage ........................ 1643.4.1 SAP Solution Manager IT Performance Reporting ........... 1653.4.2 SAP Solution Manager EarlyWatch Alert Reports ............ 1673.4.3 SAP Global Workload Monitor ....................................... 168

3.5 SAP Continuous Quality Checks .................................................. 1693.5.1 SAP Custom Code Maintainability Check (CCMC) ........... 1703.5.2 SAP Modification Justification Check (MJC) .................... 171

3.6 SAP Enterprise Support Advisory ................................................. 1723.7 Service Summary—Custom Code Results of Running an ESR

Report ........................................................................................ 1733.7.1 What This Section Does ................................................. 174

Page 6: Managing Custom Code in SAP

10

Contents

3.7.2 Protection of Investment and Accelerated Innovation .... 1763.7.3 Business Continuity ........................................................ 1823.7.4 Business Process Improvement ....................................... 1833.7.5 Total Cost of Operations ................................................. 187

3.8 Summary .................................................................................... 191

4 Custom Code Optimization ..................................................... 193

4.1 SAP Custom Code Analysis ......................................................... 1944.1.1 Running CCA ................................................................. 1954.1.2 SAP Clone Finder ......................................................... 1964.1.3 SAP Interface Analysis ................................................... 2044.1.4 SAP Reference Analysis .................................................. 2074.1.5 SAP Modification Overview ........................................... 2084.1.6 Custom Code Remote Compare ..................................... 2114.1.7 Top20 Customer Object Analysis .................................... 2134.1.8 T-Code Similarity ........................................................... 214

4.2 Custom Development Management Cockpit ............................... 2164.3 The CDMC Process ..................................................................... 217

4.3.1 The CDMC Clearing Analysis (CA) ................................... 2184.3.2 Upgrade Change Impact Analysis (UCIA) ........................ 2234.3.3 Change and Transport Analysis (CTA) .............................. 227

4.4 Business Process Change Analyzer ............................................... 2304.4.1 Custom Code Defined in the SAP Solution Manager

Business Blueprint .......................................................... 2314.4.2 Creation of Technical Bill of Materials ............................ 2324.4.3 Perform the BPCA .......................................................... 2334.4.4 Check the BPCA Results ................................................. 2354.4.5 Test Scope Optimization ................................................. 236

4.5 Code Inspector ........................................................................... 2374.5.1 The Check Variant .......................................................... 2384.5.2 The Object Set ............................................................... 2404.5.3 Creating and Running an Inspection ............................... 2414.5.4 Using and Analyzing the Results ..................................... 2434.5.5 Creating Your Own Checks in the Code Inspector ........... 244

4.6 Summary ................................................................................... 251

Page 7: Managing Custom Code in SAP

11

Contents

5 Custom Code Reporting .......................................................... 253

5.1 Initial Steps ................................................................................. 2545.2 Accessing the SAP Delivered Custom Code Dashboards .............. 254

5.2.1 Usage of Custom Code Objects ...................................... 2575.2.2 Severity of Custom Code Objects ................................... 2585.2.3 Quantity of Custom Code Objects ................................ 2595.2.4 Quality of Custom Code Objects .................................... 2605.2.5 Criticality of Custom Code Objects ................................. 261

5.3 The Continuous Improvement Dashboard ................................... 2625.3.1 Using the Graphs ............................................................ 2705.3.2 Creating a Composite Dashboard ................................... 273

5.4 Creating Your Own Custom Code Dashboards ............................. 2745.4.1 Using a BAdI as a Data Source for an Existing SAP

Business Objects Application ........................................... 2755.4.2 Provide Data with GET_CONTENT ................................. 278

5.5 Proofing Your Dashboards for Future Use .................................... 2795.6 CCLM Reports ............................................................................ 280

5.6.1 CCLM SAP Solution Manager BW Reports ...................... 2815.6.2 CCLM Ad Hoc Reports ................................................... 283

5.7 Summary .................................................................................... 286

Appendices ..................................................................................... 289

A Further Resources ................................................................................ 291B SAP Solution Manager Navigation Principles ........................................ 303C Upcoming Functionality and Enhancements to Help Manage Custom

Code .................................................................................................... 307D Calculating Cohesion ............................................................................ 313E A Discussion on Writing Custom Code ................................................. 321F The Authors ......................................................................................... 343

Index ......................................................................................................... 345

Page 8: Managing Custom Code in SAP

15

Introduction

A popular saying is that “you can’t manage what you can’t measure.” Of course, good management requires more than just measurement to be effective, but in the case of something as important to an organization as the software it uses to do business, measurement is a critical first step. If you think about how much time and money goes into developing custom code—be it an enhancement, modifica-tion, or unique functionality—and keeping it current in your SAP landscape, it seems surprising that so few know how much custom code they have, how often this code is used, or how well it is written. Furthermore, when planning a system upgrade, everyone seems to think it is too difficult to test their custom code and nearly impossible to determine the upgrade impact on their sizable investment.

This book highlights why every SAP practitioner should be aware of custom code management with SAP Solution Manager. It digs deeply into the development tools and processes that SAP Solution Manager provides, and demonstrates how these tools can be used together as part of a custom code management strategy.

Those who think SAP Solution Manager is just a collection of unrelated tools will be pleasantly surprised to see how by creating a planning and deployment meth-odology upfront, we can follow a set of best practice custom code management processes supported by SAP Solution Manager tools. We also provide a number of key performance indicators (KPIs) to help you measure and manage your custom code investment.

Who This Book Is For

This book is aimed at SAP practitioners who have an interest in furthering their SAP development knowledge or those who want to exploit the benefits of SAP Solution Manager. The book is written by a couple of no-nonsense SAP Mentors who have worked on some of the biggest SAP implementations in Australia since the early nineties. We have worked with our fair share of “architects” who have avoided SAP Solution Manager, ostensibly considered naming standards to be a substitute for good coding practices, and who regularly asked “what is the transaction for that?”

Page 9: Managing Custom Code in SAP

16

Introduction

The best practices described in this book are not from a PowerPoint presentation or from a demonstration system, but rather from years of hands-on experience with operational SAP landscapes with a staggering number of custom code objects.

What This Book Covers

The information in this book pertains primarily to SAP Solution Manager 7.1 SP6 and SAP NetWeaver 7.02 Basis SP12. Previous versions of SAP Solution Manager will provide similar essential basics and tools, but some of the basic menu paths and transactions may be slightly different. Although the tools may vary slightly, the basic principles of custom development management will remain the same.

The chapters are organized in the same order as the SAP methodology for manag-ing custom code.

E Chapter 1 This chapter provides an introduction to SAP custom code methodology. It starts by discussing the need for custom code and then explains how SAP Solution Manager can be used to manage this need. It then discusses SAP best practices in detail and how these can be managed with appropriate processes, supporting tools, and milestones to orchestrate each phase of your custom code manage-ment initiative. Each phase of the custom code project is then expanded and covered in each subsequent chapter.

E Chapter 2 This chapter discusses the concept of transparency when managing custom code. Here we explain how to measure the magnitude of custom code you have in your landscape. We discuss establishing the Custom Code Lifecycle Management (CCLM) application as a sustainable method of keeping an accurate count of all the custom code you have in your landscape. We then discuss the Reverse Busi-ness Process Documentation (RBPD) tool as a process to map custom code to your Business Processes and Provide an intuitive repository for documentation and test cases to support the management of the custom code library. The chap-ter then finishes up with a detailed instruction of how to generate your own Transport Execution Analysis (TEA) Guided Self-Service (GSS) report, which can help to jump-start an overview of the current management practices for your custom code landscape. We also include a working TEA example at the end of the chapter.

Page 10: Managing Custom Code in SAP

17

Introduction

E Chapter 3 This chapter explains the concept of control when managing custom code. Here we explain how to determine how often your custom code is used. We describe the SAP Coverage Analyzer (SCOV) and the Usage and Procedure Logging (UPL) feature of the newest SAP NetWeaver kernel. The chapter finishes with a defini-tion of two exciting Continuous Quality Check (CQC) services that are included in your SAP Enterprise Support entitlement. The Custom Code Maintainability Check and Maintenance Justification Check reports are extremely useful assets used to understand best practice details about your most frequently used custom code. We finish up with a working example of an SAP Enterprise Support Report (ESR) for those who want to maximize their investment in SAP software.

E Chapter 4 This chapter explains the concept of optimization when managing custom code, including what constitutes good custom code, the concept of repeatable tests, and change impact analysis. We describe some of the most exciting SAP Solution Manager tools and how they can be used to optimize code, safeguard upgrades, and help to perform change impact analysis when changing custom code. The Custom Development Management Cockpit (CDMC) is used to determine the impact of an SAP upgrade on your custom code library. The Business Process Change Analyzer (BPCA) is used to determine the impact on your custom code library of an upcoming change, including the automatic generation of an opti-mized test plan. We finish with two powerful tools that can be used directly in the managed system: the SAP Clone Finder and the Code Inspector. The SAP Clone Finder is used to identify code that you have cloned from SAP standard and comes with impressive comparison capabilities to help revert back to the standard where possible. The Code Inspector provides a quantitative measure of quality of your custom code against predetermined metrics and patterns.

E Chapter 5 This chapter explains the value of accurate reporting to keep on top of managing your custom code. We describe the custom code ad hoc reports using CCLM and then move on to making the metrics more visually stimulating by using SAP Business Objects reporting. Next we look at custom code dashboards and explain the five standard SAP Business Objects applications that ship with SAP Solution Manager. Lastly, we explore the KPI Measurement Platform and associated SUGEN KPI dashboard. Those of you who enjoy a challenge will not be disap-pointed with the instructions for building your own dashboard in the SAP Solu-tion Manager system.

Page 11: Managing Custom Code in SAP

18

Introduction

E Appendix A Still have a thirst for more knowledge? Do you have a hard time remembering transaction codes, ABAP programs, or work center names? This collection of further learning links, transactions, and SAP Notes straight out of the SAP Tech-nical Quality Management (TQM) playbook is for you. We explain Expert-Guided Implementation (EGI) sessions, the SAP Solution Manager Pulse Check, the SAP Best Practice library, and where to find the Meet the Expert replay library.

E Appendix B For the first-time SAP Solution Manager users or for those who want to do more than point and click, the SAP Solution Manager navigation principles provided here help you get the best value out of your custom code management experi-ence.

E Appendix C This appendix provides exciting upcoming features in the custom code manage-ment journey.

E Appendix D To support your custom code management quest, this appendix provides an example implementation of a code inspector check to calculate the cohesion of your ABAP classes.

E Appendix E This appendix explains the themes covered in Chapter 1 in more detail regard-ing the characteristics that make good code.

We hope that you find this book informative and helpful as you venture on your custom code management journey.

Tony de Thomasis and Alisdair Templeton

Page 12: Managing Custom Code in SAP

24

Custom Code Management and Methodology1

1.2.3 Clone

In some circumstances, a customer will clone an SAP program in its entirety into the customer namespace where it is modified to meet the customer needs. Historically, this was done to reduce the number of modifications made in an SAP environment.

Because the clone exists in the customer namespace, it will not receive the latest SAP enhancements or bug fixes as they become available. This makes the cost of supporting a clone high compared with other types of custom code. A comprehensive custom code strategy will aim to remove all clones from your environment. Even worse, customers may develop clones of clones. These second generation clones become difficult to maintain over time.

1.2.4 Customer Development

This is any repository object created in the customer namespace. Because a clone exists in the customer namespace, it can also be classified as a customer develop-ment. Customer developments depend on existing SAP code in different ways, and tools such as Custom Code Analysis become critical in understanding the coupling between customer developments and SAP code.

Additionally, sections of SAP code may be copied into customer programs to provide specific functionality. This caries the same risk as a clone, and alternate methods should be investigated.

1.3 Why Custom Code Management Is Important

Custom code delivers the functionality we need to run our business. At the same time, custom code is the source of much anguish within an organization. Custom code has bugs; it introduces technical debt and is the source of much discussion among those involved with the functionality. The return on investment (ROI) for custom code comes in the form of the functionality the custom code provides. How an organization can leverage its custom code to gain a competitive advantage is a key driver for why custom code must be managed.

Custom code that was once a business differentiator can quickly become a sup-porting function, while other existing, or new, functionality becomes critical to business operations. Having an explicit understanding of your custom code means you can react quickly and meet these changing business demands.

Page 13: Managing Custom Code in SAP

25

Why Custom Code Management Is Important 1.3

In the following sections, we’ll highlight some of the areas in which custom code can in fact become a liability but illustrate the practices that anyone can employ to negate the risks and reap the rewards.

1.3.1 Reduction of Support Costs

As discussed earlier, custom code on its own is a liability to any organization. It must be maintained, upgraded, and enhanced over its lifetime. Over time, unmanaged custom code will require an increase in support activities and possibly additional infrastructure costs for an organization.

Additionally, development activities often don’t update existing documentation or create new documentation when required. This lack of documentation, including information about business function ownership, compounds the support cost of custom code.

1.3.2 Ability to Identify Valuable Custom Code

A substantial percentage of the custom code you have is obsolete or used infre-quently. In fact, around one-third of all custom code we have classified at more than 10 sites in Australia is not being used at all.

By identifying how custom code is being used, we can begin to classify ownership and assign business value to the custom code.

1.3.3 Avoid Opportunity Costs of Missed Innovation

Too many times, inadequate technical skill leads the customer to modify or clone SAP standard code rather than using proper enhancement techniques. This reliance on cloned or modified SAP standard code introduces bad practices into the organi-zation and can prevent the uptake of new system processes and features delivered by innovations contained in SAP enhancement packs and upgrades.

1.3.4 Avoid Increased Risk and Testing Overhead during Upgrades

The traditional SAP upgrade process is regularly slowed down by the time taken to identify and adapt custom code references to standard SAP objects that have evolved. Of course, the testing effort for custom code also takes a considerable

Page 14: Managing Custom Code in SAP

26

Custom Code Management and Methodology1

amount of time (and risk) during the change management or upgrade process. By consistently managing custom code, you can mitigate the risk and effort required during maintenance activities.

Custom code management allows you to identify which business processes are impacted by changes in the custom code and tells you what SAP components your custom code is reliant on, and whether these components have changed as a result of the upgrade or support pack.

1.4 SAP Solution Manager Methodology: The Four Phases

Many organizations fail to achieve the benefits offered from SAP custom code man-agement because they are unsure when or where to start the initiative. Regardless of whether you are in business-as-usual mode with no upcoming deployment projects or in the middle of a large rollout, the best way to start is with a simple plan. SAP Solution Manager offers a custom code business blueprint methodology with sev-eral fixed elements, transactions, and documentation to assist with this initiative.

Custom code in a company’s SAP system can be evaluated using the four phases of the SAP Solution Manager Custom Code Management Blueprint. By following these four phases, you can establish a consistent evaluation process of custom solu-tions across a complex SAP landscape. Each of the four sections will determine the order that we cover things in upcoming chapters. This custom code SAP Solution Manager Blueprint will help to guide you through the following phases of manag-ing SAP custom code:

E Custom code transparency

E Custom code control

E Custom code optimization

E Custom code reporting

We’ll briefly go over each of these phases in the following subsections; they’ll be covered in much more detail in the upcoming chapters.

To visually represent each of the four phases, we have generated a simple roadmap using Transaction RMDEF in SAP Solution Manager. You can check all of the SAP-delivered roadmaps using Transaction RMMAIN as shown in Figure 1.1.

Page 15: Managing Custom Code in SAP

69

Custom Code Lifecycle Management (CCLM) 2.2

2.2 Custom Code Lifecycle Management (CCLM)

The Custom Code Lifecycle Management (CCLM) application in SAP Solution Manager is the central location where customers can manage their collection of custom code all the way from creation to clearing of unused custom code objects across the entire SAP landscape. Once identified, the custom code objects in the landscape can be managed more effectively because you can document ownership, version, data quality, and usage patterns. Unused custom code can then begin to be identified and removed. Where possible, used custom code can then be analyzed and—with the assistance of SAP Clone Finder and Code Inspector (as described in Chapter 4)—be reset back to standard SAP functionality. The CCLM key to saving costs and reducing testing efforts is achieved by identifying the custom objects that are currently in use and performing upgrade tests more efficiently.

Once configured, the CCLM application will provide an automatic refresh of devel-opment classes and software components across several source systems. Over time, you will build ownership, contract, and lifecycle status data into the CCLM reposi-tory, allowing you to run several custom code analysis reports across a complex SAP landscape.

In the following sections, we’ll configure enough functionality to provide instant and automatic custom code transparency across your landscape using the newly developed SAP Solution Manager CCLM application.

2.2.1 CCLM Prerequisites

To derive the best results from the CCLM effort, it is important to observe several prerequisites. Depending on your version of SAP Solution Manager, you may want to install several SAP Notes. Before you get started, make sure to search the SAP Service Marketplace for “CCLM” and determine which notes make sense.

Pay special attention to the following:

1. Verify the security privileges of the CCLM application. The following roles should be granted appropriately:

E SAP_CCLM_ALL – Administrator access

E SAP_CCLM_DIS – Basic display access

2. Make sure that the following items are correctly configured:

Page 16: Managing Custom Code in SAP

70

Custom Code Transparency2

E Working SAP Solution with appropriate logical components and systems

E Working SAP Solution Manager BW configuration as part of the Customizing project for the Analysis and Reports views

E Working EarlyWatch Alerts for the systems—used by the CCLM data collec-tors

After you’ve finished with the prerequisites, you can get started with your CCLM configuration.

2.2.2 Uploading the CCLM Content

The first step in configuring CCLM is to upload the special CCLM library definition in the form of an .xml file. Download the special content from SAP Note 1547234, and unzip it into a library of your choice as shown in Figure 2.33.

Figure 2.33 Download the CCLM Library Definition

Page 17: Managing Custom Code in SAP

71

Custom Code Lifecycle Management (CCLM) 2.2

Once downloaded from the SAP Note, the CCLM content can be uploaded using the CCLM Library Definition content update.

To do this, navigate to Transaction CCLM via the newly created custom code project Z_CUSTCODE. Select the Upload/Download Custom Code Library step beneath the Transparency business process, and then click the green checkmark.

Note

Alternately, you can use the CCLM work center.

Now select the Library Definition from the contextual navigation panel, and click the Upload button. Enter the location of the saved XML file from the SAP Note into the pop-up box, and click the Open button to continue.

After the XML file has been uploaded, the new CCLM library definition will be in place. The time and date of the upload will be reflected in the details of the library.

Next, run the CCLM automatic configuration process to activate the library. The CCLM configuration is performed by running an ABAP report called RAGS_CCLM_AUTO_CONFIG using Transaction SA38.

On the Library Settings tab, use the following defaults:

E Library Key: LANDMARK

This will be the unique identifier for the CCLM database primary key. This can be any customer-specific value. In this example, it’s set to company name LAND-

MARK.

E Library ID: Custom_Code_Library

This value is set in the XML library file; do not change it unless you are also prepared to make updates to the XML file.

E RFC Connection Type: READ

This defines the template for the RFC connection, which will be used to connect the managed system and extract custom code runtime details. This example uses READ, which resolves to the following RFC connection in Transaction SM59: SM_PRDCLNT100_READ.

Uncheck the Testmode (only simulation) checkbox for persistent changes to be made in the Library Settings tab (see Figure 2.34), and then go to the Basic

Configuration tab.

Page 18: Managing Custom Code in SAP

72

Custom Code Transparency2

Figure 2.34 Configuring the Library Settings

In the Basic Configuration tab, check all of the custom code objects you want to manage in the CCLM repository (see Figure 2.35).

Figure 2.35 The Basic Configuration Tab

Page 19: Managing Custom Code in SAP

73

Custom Code Lifecycle Management (CCLM) 2.2

Select the extraction job definitions in the Attribute Extraction Jobs section of the screen. We’ve chosen both weekly and monthly statistics extraction jobs in this example. The scheduling of these jobs will be performed later in the CCLM process.

Check the UPL activated checkbox to take advantage of the usage procedure log-ging (UPL) of the SAP kernel. The SAP kernel is now capable of directly generating usage statistics without having to rely on Transactions ST03N and STAD.

Uncheck the Testmode checkbox for persistent changes to be made. Click the green checkmark icon to execute the report.

After you run this report correctly, an output protocol similar to the screenshot shown in Figure 2.36 should appear, confirming successful completion.

Figure 2.36 Successful Completion of the CCLM Configuration Library

Tips & Tricks

To override the default CCLM settings, you can enter the OK-Code “FREE”, which will invoke the hidden Free Parameter tab for the RAGS_CCLM_AUTO_CONFIG report (see Figure 2.37).

Page 20: Managing Custom Code in SAP

74

Custom Code Transparency2

Figure 2.37 The Hidden Free Parameter Tab

2.2.3 Activating the CCLM Collection Jobs

Upon returning to the CCLM transaction, we’ll set up the SAP landscape for the SAP ERP systems. Depending on the breadth of your SAP landscape, you may need to do the same for the SAP NetWeaver Business Warehouse (BW), SAP Customer Relationship Management (CRM), and any remaining SAP instances.

From the Custom Code Lifecycle Management main screen, select the Settings section, and then select the SAP landscape you want to work with from the Solu-

tion dropdown list. Here, we’ll work with the Landmark Development Systems (see Figure 2.38).

After you have the desired SAP system in sight, select a Lead System for the selected landscape. Normally, the development system in the landscape will be the lead system because this is where all custom code should originate from. Note there should only be one lead system in each SAP system solution.

Next, select a system for Local Objects. Given that many local objects in the devel-opment system will never make it to the production system, you shouldn’t select the development system as the Local Objects system. Instead, select the production system to establish transparency for all local objects created in production systems.

Page 21: Managing Custom Code in SAP

75

Custom Code Lifecycle Management (CCLM) 2.2

Figure 2.38 Selecting the SAP Solution Landscape

You can see the settings for the Landmark Development System ECD in Figure 2.39.

Figure 2.39 Setting Up the Development System

Page 22: Managing Custom Code in SAP

76

Custom Code Transparency2

You can see the settings for the Landmark Production System ECP in Figure 2.40.

Figure 2.40 Setting Up the Production System

After the SAP systems definitions have been completed, we can now enable schedul-ing of the periodic CCLM batch collection jobs in the managed systems. The most important batch job is the SM_CCL: OBJECTS job, which collects the number and type of custom code together with versions from each of the managed systems.

As shown in Figure 2.41, select the SAP system in the top part of the screen and then select the batch jobs in turn from the bottom part of the screen. Click the Schedule Job button to schedule each desired batch job in turn for each of the managed systems. You should end up with five green bubbles in the Status column if all the job scheduling has occurred successfully.

You must periodically check the status of the extraction jobs. Typically, they will be represented as red bubbles on the CCLM Settings screen. To debug any failed batch jobs, click the Job Name hyperlink in error to be transferred across to Transaction SM37 in the managed system.

From Transaction SM37 in the managed system, normal analysis rules apply to determine and repair any errors. The most common form of error is lack of security authorization in the target system or a failed extractor.

Page 23: Managing Custom Code in SAP

77

Custom Code Lifecycle Management (CCLM) 2.2

Figure 2.41 Setting Up the Batch Jobs One at a Time

To debug an extractor problem, click on the Extractor Framework link in the CCLM navigation bar, and search for extractors using the *cust* filter (custom code filter) in the Name field (see Figure 2.42).

Figure 2.42 Checking for Errors in the Extractor Framework

Page 24: Managing Custom Code in SAP

78

Custom Code Transparency2

2.2.4 Using the CCLM Object List

After the batch jobs have been running for some time (usually overnight), the CCLM repository becomes populated. Click the Objects button in the CCLM navigation panel to see an entire list built up from the regular extractor runs (Figure 2.43).

From here, we can begin to classify the custom code according to local criteria and begin to assign owners to each of the custom code objects.

Figure 2.43 The CCLM Object List

The output list is designed for the selection and processing of several custom code items at once. The use of the filter is quite valuable here, and we’ve found work-ing with groups of 400 or fewer objects at once to be the best from a performance perspective.

In Figure 2.44, we have selected multiple objects using a filter and performed mass changes by assigning object ownership for several items at once.

Page 25: Managing Custom Code in SAP

79

Custom Code Lifecycle Management (CCLM) 2.2

Figure 2.44 Assigning Ownership to Objects

Generally speaking, the original developer is the creator and not the owner of the custom code. The developer is normally working on an implementation project. The main purpose of this step is to identify the real owner of the custom code element—that is, the responsible person from the business area who will keep the requirements and specification for the custom code current and accurate. Once we have established an owner, we can then move onto creating a contract as a reference point of agreed terms and conditions for keeping the custom code in good condition.

The main purpose for a contract is to maintain transparency about activities to be performed for custom code objects and assigned responsibilities.

Note

In many companies, there is often a separation between development and support responsibilities spanning more than one outsourced organization. A contract is normally drawn up for an organization to perform specific tasks related to the custom code objects.

To create a contract, select the custom code from the object list, and then click the Create Contract button (see Figure 2.45).

Page 26: Managing Custom Code in SAP

80

Custom Code Transparency2

Figure 2.45 Assigning a Maintenance Contract

2.2.5 The Overview List

After the batch jobs have been running for some time and there is some content in the CCLM database, click on the Overview button in the navigation panel to see a dynamically changing overview outlining the total number of custom code elements. You will also notice any alerts and problems with the extraction process.

In Figure 2.46, there are 81 potential custom code duplicates and a total of 11,406 custom code objects across the extended SAP landscape. The status lights on the Overview page indicate the worst-case status; that is, a single error will trigger a red light for the entire solution.

Note

Custom code duplicates are objects that have identical names across two different lead systems. This normally occurs when the same custom code is created once in the SAP NetWeaver BW development system and once in the SAP ERP development system. The CCLM application has no functionality to determine whether the duplicate has the same function or not.

Page 27: Managing Custom Code in SAP

81

SAP Guided Self-Services 2.3

Figure 2.46 The CCLM Overview Screen

Note

CCLM reports and dashboards will be explained in Chapter 5 with other custom code reports and managed scorecards.

2.3 SAP Guided Self-Services

SAP Enterprise Support customers can take advantage of “do it yourself” Guided Self-Services (GSS) using SAP Solution Manager. With GSS, SAP offers customers proven procedures to analyze and optimize their systems based on the experience of a multitude of service deliveries to thousands of SAP systems. GSS are delivered via SAP Solution Manager and are available on demand for SAP Enterprise Support customers.

Tips & Tricks

Check SAP Note 1609155 for GSS preparation information.

There are over a dozen GSS reports that you can run for various requirements. The TEA report will be the most commonly used GSS report for those interested in custom code management.

Page 28: Managing Custom Code in SAP

345

0SM_SSM, 16020 most-used custom code objects, 214/SDF/CMO_T*, 84

A

ABAP, 22dump, 135object, 238stack, 105

ABAP Development Workbench, 241ABAP report

/SDF/SHOW_UPL, 163ABAP Test Cockpit (ATC), 307ABAP Unit framework, 154ABAP Workbench, 307

object, 216Accuracy, 20Accurate usage metrics, 158Action plan, 99Add fields, 204Additional evaluation, 201Ad hoc inspection, 241Ad hoc object list, 307Aggregated code coverage, 155Analysis project, 48Analysis run, 50App

Criticality of Custom Code Objects, 261Quality of Custom Code Objects, 260Quantity of Custom Code Objects, 259Severity of Custom Code Objects, 258Usage of Custom Code Objects, 257

Application Lifecycle Management (ALM), 291

Assign Objects from Analysis menu option, 60Assign responsibilities, 79ATC Result Browser view, 307Authorization object, 233Avoid SAP source code modifications, 171

B

BAdI, 206, 275filter value, 278

Balanced Scorecard, 253, 262Best practice document, 296BI custom code content, 160Blueprint content, 32Branch coverage, 147, 156Buffer, 200Bundling changes, 129Business Process Change Analyzer (BPCA),

230check results, 235generate analysis, 233in-depth analysis report, 235

Business process models, 44Business Process Repository (BPR), 44BW cube, 270BW Query, 254

C

CCLM, 43, 146, 158ad hoc report, 283app, 256collection job, 74Content, 70integration, 311landscape, 159object list, 78prerequisite, 69

CCLM Library Definition content update, 71CCLM SAP NetWeaver BW Reports, 281CCMC

output, 170CDMC, 158, 217

Analysis phase, 220Clearing Analysis, 218Collect phase, 220

Index

Page 29: Managing Custom Code in SAP

346

Index

CDMC (Cont.)Display phase, 222initiate, 217namespace, 217prerequisites, 216update mode, 222

Change and Transport Analysis (CTA), 227Ad Hoc Functions phase, 227Display Results phase, 229landscape, 228

Change categories, 128Change management indicator, 104Change option log, 121, 124Change Request Management, 119ChaRM, 185Check Variant tree, 246Class hierarchy, 247Clearing Analysis

landscape, 218Client strategy, 120Clone, 24, 25, 213Code base alignment, 257Code City metric, 310Code coverage, 146, 155Code Inspector, 69, 193, 237, 309

build custom check, 244category, 245check variant, 238new test, 246object set, 240results, 243standard reports, 244tools, 308

Code Inspector (SCI), 307Code quality, 312Coherence, 250Cohesion, 244

calculation, 247Cohesiveness, 240Competitive advantage, 24Configuration project, 64Consistency check, 149Constructor, 246

code, 248Contextual navigation panel, 305

Continuous Improvement Dashboard, 262Continuous Quality Check (CQC), 169, 180Contract, 79Coverage Analyzer, 310Create document, 248Critical business process, 262Custom code

adapt after upgrade, 223add entries, 63amount used, 255app, 255attach, 60categorize, 36control, 26, 145critical object, 261extractor, 159footprint, 177, 254footprint graph, 270KPI reporting, 172list, 35maintainability, 106management, 26obsolete, 25optimization, 26print documentation, 66quantity, 260remote compare, 211reporting, 26transparency, 26unused, 257usage statistics, 255

Custom Code Analysis (CCA), 194Custom code business blueprint methodology,

26Custom code count, 98Custom code duplicates, 80Custom Code Landscape Management, 43Custom code library, 71, 82Custom Code Lifecycle Management (CCLM),

69, 260, 261Custom code object

assign owner, 78total, 80

Custom code optimization, 193Custom code remote analysis, 212

Page 30: Managing Custom Code in SAP

347

Index

Custom development, 254Custom Development Management Cockpit

(CDMC), 216Customer Center of Expertise (Customer CoE),

188Customer development, 24Customer object, 108, 178Customizable dashboard framework, 254

D

Dashboard, 36, 309build new, 274

Dashboard App Registration Tool, 275Data Dictionary objects, 233Data provider, 277Data source, 254Debug extractor problem, 77Details display, 156Development backlog, 137Display Analysis Report link, 57Documentation, 25

E

EarlyWatch Alert Reports, 51eCATT, 62, 154Emergency change, 185Engineering Services, 31Enhanced Business Blueprinting (EBB), 64Enhancement Framework, 23Enhancement pack, 216, 230

upgrade, 226Enterprise Support KPI, 266Enterprise Support Report (ESR), 172ESRV, 31

Roadmap, 37Exception, 308Extensible framework, 240Extraction job, 76Extractor Framework, 268

F

Failed change, 186Filter, 78, 277Filter comparison, 202Flow editor, 65Free Parameter tab, 73Functionality check, 243Function module

/SDF_UPL_GET_USAGE, 163

G

GET_CONTENT, 278Good code, 20GUID, 88, 95Guided Self-Services (GSS), 43, 81

H

HP QuickTest Professional, 64HTML-based application, 280HTML Report, 167

I

Implementation/Upgrade work center, 28, 217

Import error, 131Import history, 113Import queue entries, 139Innovation, 25Inspection, 241

output, 250Interface, 204IT Performance Reporting (ITPR), 165

J

JobRSCVR_BUILD_GLOBAL_VIEW, 149RSCVR_DELETE_COVTAB, 149

Page 31: Managing Custom Code in SAP

348

Index

Job (Cont.)RSCVR_FILL_REMOTE, 149RSCVR_INIT, 148RSCVR_INIT_START, 148RSCVR_TRIGGER_COLLECT, 148

Job log, 53

K

Knowledge Warehouse (KW), 30KPI, 104, 105, 170, 253, 262

framework, 268

L

Lead system, 74Library ID, 71Library key, 71Local object, 74Logical component, 49

active, 50Loosely coupled, 22

M

Maintenance activity, 26Method source code, 157Microsoft Project, 38Microsoft Word, 67

create document, 98Missing notes, 84Modifications, 23, 107, 108Modified object, 106, 178My Dashboard, 255

N

Naming standard, 238Navigation bar, 305New class, 246Notation template, 244Not in Analysis subtab, 55

O

Object Collector, 240Object Oriented (OO), 22Object set, 240Optimize Test Scope button, 236Ownership, 25

P

Patching, 216Persistency, 199Persistent changes, 73Piece list, 203Proactive monitoring, 165Procedure coverage, 146, 156Procedure level coverage, 153Processing block, 156Project governance, 170

Q

Quality assurance procedure, 120Quality assurance system, 134Quality Gate Management, 119Quiet time, 52

R

Readability, 20Recommended actions, 101, 102, 103Reduce maintenance costs, 262Release cycle, 127Remote check, 179Repeatable testing object, 64Report

RAGS_CCLM_AUTO_CONFIG, 71RSVCDI00, 202/SDF/CMO_COLLECT_DATA_NEW, 85

Reporting, 158Reporting KPI, 266Reports, 36Repository Browser, 307

Page 32: Managing Custom Code in SAP

349

Index

Repository object, 21, 240Retrofit tool, 130Reuse results, 199Reverse Business Engineering, 53Reverse Business Process Documentation

(RPBD), 43, 231content, 44

RFC connection, 51, 84, 95, 149, 163RFC connection type, 71Roadmap, 37

print, 38Role, 216RTCCTOOL, 84Runtime error, 133

S

SAP Accelerated Innovation Enablement, 177SAP ALM, 188SAP Application Lifecycle Management (ALM)

standards, 175SAP_BUSINESS_BLUEPRINT, 67SAP business function, 230SAP Business Function Prediction service, 146SAP BusinessObjects application, 254, 255

copy, 274SAP Clone Finder, 69, 146, 194, 196

options, 203results, 203search, 196

SAP Coverage Analyzer Lite (SCOV Lite), 158SAP Coverage Analyzer (SCOV), 147SAP Coverage Analyzer switch, 150SAP Custom Code Blueprint

export to HTML, 38SAP Custom Code Maintainability Check

(CCMC), 170SAP Custom Code Remote Compare

results, 211SAP delivered services, 170, 172SAP Engagement and Service Delivery, 89

work center, 167, 264SAP Enhancement Framework, 171SAP enhancement packages, 115SAP Enterprise Support, 190

customer, 81

SAP Expert-Guided Implementations (EGI), 293

SAP Global Workload Monitor, 168SAP Guided Self-Services, 43SAP HotNews, 115SAP Interface analysis, 204SAP kernel, 73SAP landscape

modifications, 209SAP Modification Assistant, 23SAP Modification Justification Check (MJC),

171SAP Modification Overview, 208

results, 210SAP NetWeaver Basis release 6.20 SP22, 195SAP NetWeaver Business Client (NWBC), 303SAP NetWeaver BW, 158SAP NetWeaver Gateway, 280, 310SAP NetWeaver Release 7.02, 152SAP Note Assistant, 115SAP object, 207SAP predefined threshold, 256SAP Reference Analysis, 207

results, 208SAP repository object, 258SAP Service Content, 83SAP Service Marketplace, 35SAP Software Download Center, 44SAP Solution Documentation Assistant, 146SAP Solution Manager, 81, 158, 165, 188,

220, 228, 230, 254, 264, 281custom report, 281dashboard, 254forward session to, 88InfoCube, 281methodology, 26project accelerator, 31technologies, 165versions, 82

SAP Solution Manager Administration work center, 159

SAP Solution Manager Business Blueprintanalysis, 57, 58create, 28

SAP Solution Manager Business Process Repository (BPR), 32

SAP Solution Manager BW cube, 268

Page 33: Managing Custom Code in SAP

350

Index

SAP Solution Manager BW performance cube, 51

SAP Solution Manager EarlyWatch Alert Reports (EWA), 167

SAP Solution Manager Enterprise Edition, 110SAP Solution Manager Extractor Framework,

158SAP Solution Manager Pulse Check, 291SAP Solution Tools Plug-In, 84SAP tokenization algorithm, 195SAP tokenization process, 213SAP TopNotes, 115SAP Transport Execution Analysis (TEA), 82SAP transport request, 216SAP upgrade

impact, 216Scorecard Topic, 174SCOV, 147

activate, 149test coverage, 152

SCOV Lite, 158deactivate, 162

Security, 216Self-delivered service, 181Service Preparation Check tool, 84Ship contents, 86Similarity analysis, 198SM_CCL

OBJECTS, 76Software architecture, 22Software Change Management service, 100Solution Documentation Assistant, 53, 158

work center, 45, 48Solution tools update, 84SQL statement, 53SQL table analysis, 44ST14, 88Statement coverage, 147, 157Static code check, 308Statistical check, 243ST-ICO, 31Structure object, 59Style check, 243Subobject level, 106Summary and action plan, 98Support costs, 25

Support pack, 26implementation, 223

Support package, 114, 230Switch Framework, 115System change options, 123System history, 103System monitoring, 165System priorities, 101, 102, 103System size indicator, 104

T

TableCOVRES, 149SMODILOG, 209SMODILOGI, 209SMODISRC, 209SMODISRCI, 209TADIR, 217

T-Code Similarity, 214results, 215

TEA, 170TEA report

HTML version, 98Microsoft Word version, 98results, 100

Technical bill of materials (TBOM), 232view output, 233

Temporal correlation, 241Testability, 22Test cases

establish, 60Test coverage, 152Test-driven development (TDD), 22Testing, 25Test Management work center, 233Time profile, 133TMS settings, 117Tokenization, 194, 203Top 20 Customer Object Analysis, 213

results, 214Total cost of operations, 187Training documentation, 64Transaction

AGS_UPDATE, 83CMOD, 164

Page 34: Managing Custom Code in SAP

351

Index

Transaction (Cont.)CNV_CDMC, 217in use, 112RMDEF, 26RMMAIN, 26, 37RSA1, 160RSRT, 270SA38, 71SAINT, 84SCI, 193, 237SCOV, 149/SDF/CD_CCA, 194, 195SE16, 209SE18, 206SE19, 278SE38, 163SE61, 248SE80, 152SM37, 53SOLAR01, 32, 59, 231, 232SOLAR_PROJECT_ADMIN, 28SPAM, 84ST03, 112ST03n, 168ST03N, 44, 146ST13, 84ST14, 86, 264, 266STAD, 73SU01, 303top 20, 110

Transaction data, 285Transparency, 43Transport Change Analysis, 262Transport landscape consistency, 137Transport logistics process, 82Transport Management tools, 118Transport Organizer, 307

Transport request, 125, 202, 227, 230source system, 130

Transport route, 118Transports, 125Transport sequence violation, 141Transport strategy, 140Trend, 259

indicator, 257

U

UCIAAnalysis phase, 226Display Results phase, 226landscape, 223Project Settings phase, 224

Unnecessary modifications, 262Upgrade, 25, 223Upgrade Change Impact Analysis (UCIA), 223Usage and procedure logging (UPL), 73, 146

output, 164Usage statistics, 55, 110User exits

usage statistics, 164

V

VB macro, 67

W

Wildcard, 198, 211Work area, 306Work center, 303