Sei sulla pagina 1di 10

Executing Remote Static Checks in Context of HANA

Migration

NOTE

This topic does not address the common usage of remote static checks in the Code Inspector. It
focuses rather on static checks that are relevant in the context of HANA migration.

Usage Scenario
Let’s imagine that you, as an SAP customer, are faced with the following situation:
Within your system landscape, you have access to an SAP system with SAP NetWeaver Release 7.40, SP8
(or higher).
You also have older systems (7.00, 7.01, 7.02 or 7.31) with their own custom code base. An upgrade of
these systems is not planned so far. However, you would like to execute the latest static checks for your
custom code and thus benefit from recent check variants in the Code Inspector tool. For this type of
scenario, the remote static check might be a best solution for you.

SAP Customer

Source System (SAP NW 7.00) Test System (>= SAP NW 7.40, SP8 )

Code Inspector (SCI)


RFC
A Remote Object

Z* code
Code Information Extract

Download Upload

Local PC Zip File(s)

Figure: Executing remote static checks


The figure above outlines the components involved and the activities required for the execution of static
code inspections based on the current check variants within a test system (AS ABAP 740, SP8 or higher).
The source system (AS ABAP 7.00, 7.01, 7.02, or 7.31) includes the custom code (ABAP programs or other
development objects) to be checked. The corresponding program data is extracted by means of an
extractor utility (ABAP program) from the system and made available, either directly through RFC (A), or
by means of a download to your local machine as a set of zip files (B). For the second use case (B), the
remote custom code is available as a code information extract in the test system with the help of an
upload utility. In the Code Inspector of the test system, the new object set is finally created in the form
of a remote object.
Target Audience
AS ABAP system administrators
ABAP developers

Prerequisites
To perform the download or upload of a code information extract, the display authorization
profile for object S_DEVELOP (activity: 03) in the corresponding SAP systems is required as a
minimum.
You have executed the correction instructions according to SAP NOTE 2011106 (SAP note for
importing the extractor for execution of static checks in remote system).
If you decide to use the RFC option for the data export, the communication using RFC is set up
correctly (RFC destination for the test system and the users for RFC communications are
created).

Developer-Relevant Activities
a. Preparing data export from the source system
b. Downloading data from the source system – Non-RFC option
c. Uploading data into the test system – Non-RFC option
d. Executing checks in the test system
e. Deleting data

Preparing Data Export from the Source System

Procedure
1. To initialize the code extractor in your source system (7.00 - 7.31), execute the ABAP program
RS_ABAP_INIT_ANALYSIS.
Figure: Initializing the code extractor in the source system

2. In the initial screen that appears, leave the predefined entries unchanged and choose the
Execute icon or press F8.
The ABAP program creates several database tables that are required to store the code extract
information.
3. In your source system (7.00 - 7.31), launch the Code Inspector using the transaction SCI.
4. Create a new object set (programs and other development objects) that comprises the custom
code to be checked.
See also: Creating and Processing a Set of Objects
5. Create a new check variant.
See also: Creating and Processing a Check Variant
a. From the list of available checks, select the Export of Program Information check.
b. Enter a value for the call level.
REMEMBER: Using the call level parameter, you specify the procedure call depth of a program.
With the value = 0, for example, you specify that no calls (call method, call function,..) within the
program will be considered by the check.
With the value = 1, you specify that called programs, too, will be considered by the check.

NOTE:
You can derive the appropriate call level value from the maximum level specified by the
individual checks in the test system.
In particular, the check variant PERFORMANCE_DB contains one SQL performance check with
level = 3. Therefore, we recommend value = 3 for the call level when using the
PERFORMANCE_DB check variant. Otherwise, you might be faced with a huge number of
messages after the check run in the test system that inform you that required data is missing.
When using the check variant FUNCTIONAL_DB, we recommend value = 2 for the call level.

NOTE:
As an alternative to downloading to a local file, you can use the Export via RFC option. This
enables you to analyze data that is exported, using RFC, into the system that is specified by use
of an RFC destination.
Figure: Specifying a check variant when using the file download option for data export

Figure: Specifying a check variant when using the RFC option for data export

6. Create a new inspection and assign the object set and the check variant created in the steps
above.
See also: Creating Code Inspections
7. Choose Execute or Execute....to execute the Code Inspector check for your object set and the
check variant selected.

Results

The Code Inspector performs the inspection run, converts the source code of the selected ABAP
programs into an appropriate format, and stores it in several database tables in the source system.
When the Export via RFC option is used, it also transfers the resulting code extract to the remote test
system that you specified for the RFC destination.

Downloading Data from the Source System

NOTE:
This activity is not relevant for you if you use the RFC option for exporting the program
information from the source into the test system.

Prerequisites
The program information has been successfully exported into the database tables for all
programs or other development objects included in the object set.

Procedure

8. In your source system (7.00 - 7.31), execute the ABAP program


RS_ABAP_DOWNLOAD_ANALYSIS.
9. In the initial screen of the download program, enter the data for selection.
NOTE:
Specify the same object set and the call level as before (see also: Preparing the Data Download
from the Source System).
Figure: Running the download program
10. Choose Execute or press F8.
11. Select the download location for the zip file(s) to be generated.

Results

After you have accepted the statement for the disclaimer displayed on the final dialog window, the
download program creates a new subfolder <Analyisis_SystemID_Date_Time> on your local drive. It
contains one or multiple zip files that include the code information extract of all selected programs or
other development objects.

Uploading Data into the Test System


NOTE:
This activity is not relevant for you if you use the RFC option for exporting the program
information from the source into the test system.

You will now upload the code information that is stored on your local drive as a set of zip files into the
test system (7.40).
Prerequisites
The program information for the relevant programs has been successfully downloaded to your
local drive.

Procedure
1. In your target system, execute the ABAP program RS_ABAP_UPLOAD_ANALYSIS.
2. Select all zip files from your download location and choose Open.

Results
The upload program imports the program information into the test system.

Figure: The system informs you when the upload is completed

You can now apply the latest Code Inspector checks to the program code that has originated from the
remote system (7.00- 7.31).

Executing Checks in the Test System

Prerequisites
The code information extract from the remote source system has been successfully exported
(RFC option) or uploaded into your test system.

Procedure
1. In your test system, launch the Code Inspector (transaction SCI).
2. Create a new object set based on the code information extract from the remote source system.
a. On the Object Set screen, click the Object Collectors tab.
b. Use F4 value help for the Object Collector field.
Figure: Selecting the object collector “Remote Objects”

c. In the next screen, click the Select Source Extract button.


d. Select the relevant entry in the list that appears and choose Continue.

Figure: Selecting the RFC extract when using the RFC option

NOTE:
Note that for each individual source system, only a single entry for the RFC extract is created in
the target system. For each subsequent export from the same source system using the RFC
option, the additional program data is accumulated in the existing RFC extract.

Figure: Selecting the remote object entry when using the upload option
e. In the next screen, leave the other filter settings unchanged and choose Execute or press F8 to
create the object set.

Figure: Remote Objects in the Code Inspector tool

f. Use the object collector filter to specify the same object set you selected for export from the
source system. See also: Preparing Data Export from the Source System

Results

Using this object set, you can now assign the check variant of your choice to the inspection and then
execute the Code Inspector checks. See also: ABAP Test Cockpit and Code Inspector in the Context of
HANA Migration
Figure: Executing static checks for remote custom ABAP code based on the check variant
FUNCTIONAL_DB

Deleting Data
Assume that you have completed the analysis of your static checks. Both the extracted code information
in your source system and the imported data in the test system are no longer needed and can now be
deleted.

In the source system (7.00), call the ABAP program RS_ABAP_DELETE_ANALYSIS to delete all
data that you extracted for export or download as code information extract.
In the test system (7.40), call the ABAP program RS_ABAP_DELETE_REMOTE_DATA to delete all
data originating from the remote system.

Potrebbero piacerti anche