This documentation is not maintained. Please refer to doc.castsoftware.com/technologies to find the latest updates.

Summary: This document provides information about the extension providing SAP ABAP analysis support.

Extension ID

com.castsoftware.sap

What's new?

See SAP ABAP Analyzer - 1.0 - Release Notes.

Description

This extension provides support for SAP ABAP. If your application contains SAP ABAP source code and you want to view these object types and their links with other objects, then you should install this extension.

Technical information

When installed, this extension replaces the SAP ABAP Analyzer embedded in CAST Imaging Core:

  • The SAP ABAP Analyzer embedded in AIP Core will continue to exist and will be shipped "out of the box" with CAST Imaging Core,
  • Critical bugs will continue to be fixed in the Mainframe Analyzer embedded in CAST Imaging Core but no new features or functionality will be added.
  • 5 new quality rules will be added in the first release of the "standalone" SAP ABAP Analyzer extension, but otherwise the extension will have the same features and functionality on release as the SAP ABAP Analyzer embedded in CAST Imaging Core.
  • The SAP ABAP Analyzer is compatible with AIP Core ≥ 8.3.43.
  • All future development of the SAP ABAP Analyzer (bug fixes, new features, functionality etc.) will be completed in the SAP ABAP Analyzer extension only.
  • The behaviour is as follows:
    • Nothing is automatic - for both CAST Console and "legacy" CAST deployments, the SAP ABAP Analyzer extension must be manually downloaded and installed in order to use it
    • If the standalone extension is installed, CAST Console will automatically detect that it exists and will use the extension rather than the analyzer embedded in CAST Imaging Core.
    • Once the extension has been installed and used to produce analysis results, it is not possible to reverse this choice by removing the extension and re-analyzing the source code again.

Function Point, Quality and Sizing support

This extension provides the following support:

Function Points
(transactions)
(tick)A green tick indicates that OMG Function Point counting and Transaction Risk Index are supported.
Quality and Sizing(tick)A green tick indicates that CAST can measure size and that a minimum set of Quality Rules exist.

Compatibility

CAST Imaging Core release

Supported

≥ 8.3.43(tick)

Required third-party software

Please see: SAP ABAP - Required third-party software.

Dependencies with other extensions

None.

Download and installation instructions

The extension is not downloaded and installed automatically.

Prepare and deliver the source code

There are two available methods for collecting source code for the SAP ABAP Analyzer:

  • Use the com.castsoftware.aip.extractor.sap to extract the source code directly from your SAP instance and into a format that can be packaged for delivery to CAST Console.
  • If you are storing your source code in abapGit and you are using the SAP ABAP Analyzer ≥ 1.0.8-funcrel, you can package the source code directly from this source code repository. The following abapGit file storage types are supported and the resulting objects are identical to those generated from a com.castsoftware.aip.extractor.sap extraction:
    • package.devc.xml files (packages)
    • *.abap files (abap objects, programs, classes...)
    • *.tabl.xml files (sap tables)
    • *.view.xml files (sap views)
    • *.ddls.asddls files (sap CDS views)
    • *.tran.xml files (transactions)
    • *.wdya.xml files (web dynpros)
    • *.wdyn.xml files (web dynpros)

Information about discovery

Discovery is a process that is actioned during the delivery process. CAST will attempt to automatically identify "projects" within your application using a set of predefined rules. Discoverers are currently embedded in CAST Imaging Core: SAP ABAP Discoverer. You should read the relevant documentation for each discoverer (provided in the link above) to understand how the source code will be handled.

Source code delivery using CAST Imaging Console

CAST Imaging Console expects either a ZIP/archive file or source code located in a folder configured in CAST Console. You should include in the ZIP/source code folder all extracted SAP/ABAP source code:

CAST highly recommends placing the files in a folder dedicated to SAP/ABAP. If you are using a ZIP/archive file, zip the folders in the "temp" folder - but do not zip the "temp" folder itself, nor create any intermediary folders:

D:\temp
	|-----SAP/ABAP
	|-----OtherTechno1
	|-----OtherTechno2

.SQLTABLESIZE files

XXL table rules (see XXL and XXS tables rules enablementare performance related rules that help detect incorrect or poorly performing SQL queries running on XXL tables. XXL tables can be defined as extremely large tables, containing a large amount of data. The goal is to use table size from production systems because development / integration systems may not feature really large tables and would not help detect real threat on application performance levels.

Note that:

  • The com.castsoftware.aip.extractor.sap will automatically generate the .SQLTABLESIZE file when you extract the SAP/ABAP source code.
  • You will need to manually create this file if you are packaging code directly from an abapGit repository.

You should ensure that you deliver the .SQLTABLESIZE file with your extracted SAP table code.

What analysis results can you expect?

Objects

Main

ABAP Alias

ABAP Badi

ABAP Class

ABAP Class Pool

ABAP Constructor

ABAP Event

ABAP Event Block

ABAP Event Method

ABAP File Level Code

ABAP Form

ABAP Function (*RFC)

ABAP Function Pool

ABAP Include

ABAP Interface

ABAP Interface Pool

ABAP Macro

ABAP Member

ABAP Method

ABAP Module

ABAP Module Pool

ABAP Package

ABAP Program

ABAP Type Pool

ABAP Unresolved Folder (created when objects referenced in the code are not available in the delivery)

ABAP Unresolved Object (created when objects referenced in the code are not available in the delivery)

ABAP User Exit

(*RFC):  When using the com.castsoftware.aip.extractor.sap (v.  8.2.0), the remote attribute is managed at ABAP function level. Please see Can the extractor extract remote function modules? for more details.

SAP objects

ABAP Processing Screen

ABAP Selection Screen

SAP Project

SAP Table

SAP Transaction

SAP View

SAP CDS View

  • Analyzed in the SAP Analyzer embedded in AIP Core 8.3.38 - 8.3.43 and all SAP Analyzer extension releases.
  • In SAP Analyzer extension ≥ 1.0.6-funcrel, only CDS Views starting with /, Y or Z are analyzed. All other CDS Views are ignored.
SAP Tables and SAP Views are only saved in the Analysis schema when they are called from the analysis source code.

BAPI objects

BAPI

BAPI Attribute

BAPI Event

BAPI Key Field

BAPI Method

Web Dynpro for ABAP

Web Dynpro Action

Web Dynpro Application

Web Dynpro Attribute

Web Dynpro Component

Web Dynpro Component Controller

Web Dynpro Event Handler

Web Dynpro Inbound Plugin

Web Dynpro Interface Controller

Web Dynpro Interface View

Web Dynpro Method

Web Dynpro Outbound Plugin

Web Dynpro Supply Function

Web Dynpro View

Web Dynpro Window

Link typeWhen is this type of link created?Example
ACCESS EXECThis link is created when a piece of code calls a method.
CALL METHOD oref->method1...
ACCESS MEMBERThis link is created when an object make an access to a member of another object.
METHOD mymethod.
   WRITE ref->attr
ENDMETHOD.
ACCESS READThis link is created when an object reads a value of another object.
METHOD mymethod.
   X = ref->attr
ENDMETHOD.
ACCESS WRITEThis link is created when an object modifies a value of another object.
METHOD mymethod.
   ref->attr = 10
ENDMETHOD.
BELONGS TOThis link is created when one object belongs to another object.
report abapReport
Function f
Endfunction

(f belongs to abapReport).

CALLThis link is used to describe a function that is called in a code block.
Function f
Perform g
Endfunction

(f calls g)

CALLThis link is created when a SAP transaction calls another SAP transaction.This information is extracted from the SAP system.
CALLThis link is created when a SAP transaction calls the processing screen or the selection screen of an ABAP program.This information is extracted from the SAP system.
CALLThis link is created when an ABAP program calls a SAP transaction.
CALL TRANSACTION SA10 AND SKIP FIRST SCREEN.
...
LEAVE TO TRANSACTION SA10.
CALLThis link is created when an event block of a screen calls an ABAP module.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
CHAIN.
FIELD: SDYN_CONN-CITY, SDYN_CONN-COUNTRY,
SDYN_CONN-CARID, SDYN_CONN-MARK.
MODULE USER_COMMAND.
ENDCHAIN.
CALLThis link is created when an ABAP component calls a screen.This information is extracted from the SAP system.
INCLUDEThis link is used when a file includes another file.
Report abapReport
Include include_name
INHERIT EXTENDThis link is created from a class A to a class B if A inherits B.
CLASS subclass DEFINITION
   INHERITING FROM superclass.
ENDCLASS.
INHERIT OVERRIDEIf a method of a class overrides a method belonging to a parent class, then this link is created between the two methods.
METHODS mymethod REDEFINITION.
INHERIT IMPLEMENTThis link is created from a class to an interface when the class implements this interface.
CLASS myclass DEFINITION.
PUBLIC SECTION.
INTERFACES: interf1, interf2 ... 
ENDCLASS.
INHERIT IMPLEMENTIf a class implements an interface, this link is also created between the method belonging to the class and the corresponding method belonging to the interface.
INTTERFACE status.
METHODS write.
ENDINTERFACE.

CLASS counter DEFINITION.
PUBLIC SECTION.
INTERFACE status.
...
ENDCLASS.

CLASS counter IMPLEMENTATION.
METHOD status~write.
...
ENDMETHOD.
...
ENDCLASS.
RAISEThis link is created when a method activates an event.
RAISE EVENT evt EXPORTING ...
RELY ONThis link is created when a method is a handler for an event.
METHODS handler FOR EVENT evt OF {class|interf}
IMPORTING ... ei ...[sender].
USEThis link is created when a processing screen or a selection screen is used in conjuncton with an ABAP program.This information is extracted from the SAP system.
USEThis link is created when a SAP transaction calls an ABAP program.This information is extracted from the SAP system.
USEThis link is created when an ABAP component calls a screen.This information is extracted from the SAP system.
USEThis link is created when a processing screen or a selection screen is used in conjuncton with an ABAP program.This information is extracted from the SAP system.
USE SELECTThis link is used when a code block contains an SQL request with a select statement (in the case of embedded SQL or native SQL).
Report abapReport
Select col from table
USE UPDATEThis link is used when a code block contains an SQL request with an update statement (in the case of embedded SQL or native SQL).
Report abapReport.
Update table set col=’a’
USE DELETEThis link is used when a code block contains an SQL request with a delete statement (in the case of embedded SQL or native SQL).
Report abapReport
Delete from table
USE INSERTThis link is used when a code block contains an SQL request with an insert (in the case of embedded SQL or native SQL).
Report abapReport
Insert into table values vals

Structural Rules

A global list is also available here: https://technologies.castsoftware.com/rules?sec=t_-15&ref=||.