Contents:

SAPEX allows you to extract SAP objects to a defined path within the SAP server.  

Using this local approach, you can download all the SAP objects within the SAP server and later execute Kiuwan Local Analyzer.


Overall procedure

The procedure to fully integrate the Kiuwan Solutions into your SAP system takes two main steps:

  1. To install some Kiuwan utilities into your SAP system that will be used during the operation

    1. Visit Manual Installation of SAP Extractor for further instructions.
  2. Run the adequate procedures depending on your operative needs

    1. Create and analyze application Baselines

    2. Run automatically Kiuwan analyses on Deliveries (Transport Orders)

This section explains how to perform Baseline analyses.

To perform analyses on Deliveries (transport orders) go to Local use - Resolved Deliveries


Modeling ABAP code in the Kiuwan Solutions

Before describing the extraction and operative mechanisms, you should think of how to model the  ABAP code into Kiuwan.

Kiuwan always works with the concept of application.

In Kiuwan terms, an application is the analysis unit, i.e. a set of source code files that has some functional meaning to you and needs to be analyzed as a whole.

Once you define a Kiuwan application, you specify the source root directory, i.e. the directory that contains the source code files of that application. Kiuwan will analyze those source code files as a unit, providing comprehensive results.

Furthermore, you can always govern your applications by organizing them by portfolios that define the real dimensions that are important for you and your organization.

There are as many ways to model that relationship as Kiuwan's users and organizations. Nevertheless, we suggest an approach that has been proven very useful and adequate in Kiuwan implantations on SAP systems.

This approach consists on modeling a SAP package as a Kiuwan application.

In this way, there is a direct relationship between SAP functional units and Kiuwan applications.



In this documentation you will find procedures to execute baseline and deliveries analyses, but please remember that explained procedures are based on mapping SAP Package to Kiuwan Application.

If this assumption is not applicable to your case, please contact us.

Extract ABAP source code

SAPEX allows you to extract SAP objects to a defined path within the SAP server.  

The extraction mechanism will download SAP objects related to the SAP package they belong.

It will create a directory for every package where all the pertaining objects will be placed. As you will see below, you can define exactly which objects to extract.

As before mentioned, the approach is to model an SAP package as a Kiuwan application.

As there will be a directory for every downloaded package, you can model application names with the same names as the packages, and configure every app’s source directory to the package directory.


IMPORTANT: the ABAP Code Extractor does not delete the previous content of an extraction directory. You need to delete it before a new extraction.

 

After the extraction finishes, you will have to run Kiuwan (in this step Kiuwan is not automatically invoked). 

 SAPEX presents the following sections:

  • Objects to download

    • This section allows to filter the objects to download (Programs, Function modules, Classes and Web Dynpros)

  • Additional downloads

    • This option allows to select to download also the screens and assocaietd texts 

  • Export options 

    • Physical path where the extractor will download requested objects (if the directory does not exists the extractor will create it)

  1. Run the program ZKW_SAPEX_CODE (using transaction SA38):



  2. Objects to Export
    1. When extracting code associated with a change request/task:
      • Fill the Change request(s) parameter.
      • If the code for the child tasks should be included, enable Add subrequests?
    2. When extracting code associated with one or more package(s):
      • Fill the Package(s) parameter (it could be used for filtering when selecting by change request).
    3. ProgramsFunction modulesClasses and Web Dynpros checks
      • Allows to include/exclude the matching code elements
      • Ranges may be used to filter by name the elements to export (leave empty for no filter).
    4. Language 
      • Is used to gather description text for the target element in the chosen language (but it does not alter the exported code).
    5. If Only custom objects is chosen:
      • Only items with names starting with 'Y' or 'Z' will be exported.
      • This pattern could be changed to a custom namespace (like '/MyOrg/') if needed.

      • Take care when deactivating the Only custom objects checkbox: A too-wide number of objects could be selected, in particular SAP code unrelated to the custom software
  3. Additional downloads:
    1. choose exporting dynpro flow logic (Screens) or text-pools (Texts)
  4. Export to..:
    1. select a SAP system directory (Server directory) or a Local directory.
    2. The Simulation checkbox allows you to test the export before storing files, to ensure that the selected elements are the intended ones.
  5. Now click Execute or press F8 to execute the program.
  6. The exported items are displayed as follows:

  • Type is the kind of source code item exported: 
    • CLAS for class, INTF for interface, FUGR for function group, FUNC for function module, INCL for include file, WDYN for WebDynpro component, WDYC for WebDynpro controller, WDYW for WebDynrpo window, WDYV for WebDynrpo view, etc. 
    • _STA and _ERR are reserved for extraction statistics and errors, respectively. 
  • Path is the file pathname, relative to the export directory chosen. 
  • Name is the item name. 
  • Message is either the description for the exported item, or error message.


Extract ABAP metadata

The Kiuwan analysis is also based on SAP metadata, not only on the source code.

KAPEX allows you to export the selected information (metadata) from the SAP system, creating .txt files in the selected directory.

If SAP metadata is available, that information will be used by Kiuwan, thus providing more accurate results.

  1. Run the program ZKW_SAPEX_METADATA (using transaction SA38): 



  2. The metadata is exported
The exported metadata is global and could be reused in multiple analyses.

If the full metadata extraction takes too much time, you may perform multiple exports with different parts enabled.
Previously exported files are not removed; they are overwritten when regenerated.

Run analysis

You can execute the Kiuwan Local Analyzer from within the SAP server.

  1. Deploy the Kiuwan Local Analyzer in the SAP system
  2. Provide analysis parameters
  3. Click Export code to export the code
  4. Click Analyze or press F8 to launch the analysis
  5. Run the program ZKW_ANALYSIS (using transaction SA38):