Uses What Actions

Uses What actions are given a set of source (or ‘starting’) objects, and search the specified RFC Destination to produce a network of ‘uses what’ object links, beginning with the source objects and continuing until a specified search depth has been reached. The results of a Uses What action are stored in a number of Table datasets.

The Uses What action supports the MODI and MODO object types, which correspond to input and output modules in ABAP code.

  • The MODI object type corresponds to PROCESS AFTER INPUT statements in the screen code.
  • The MODO object type corresponds to PROCESS BEFORE OUTPUT statements in the screen code.

Instead of linking directly to their used objects, all screens link to MODI and MODO object types which are then linked to the appropriate functions, structures or other object types.

A Uses What operation for a BSP Page (WAPP) returns the BSP Page’s used components and its associated Class (CLAS), as well as top-level Class objects for the BSP Application (WAPA).

The Uses What action uses any available Usage Procedure Logging (UPL) data to filter out any lower level objects that have not been used. If UPL data is not available, this filtering does not occur.

The Uses What action treats Transaction Codes that use selection screens and Transaction Codes without associated screen numbers as Programs.

Before the Uses What action is run against an RFC Destination, the Create Object Links Cache action should normally be run against the SAP system to create or maintain the RFC Destination’s tree of links database. The Source table for the Create Object Links Cache action should contain used objects obtained from the RFC Destination’s performance history data.

The Uses What action’s Extractor Mode property stores a Boolean parameter which determines the mode in which the action will run. If this parameter is set to ‘true’, the action performs a Uses What analysis in the same way as the LiveCompare Data Extract program. If the parameter is set to ‘false’, the action performs a Uses What analysis in the same way as LiveCompare 3.2.1 and earlier releases. If the Extractor Mode property is not set, ‘false’ is used as the default value.

Extractor Mode = false

If the Extractor Mode property is set to ‘false’, the Uses What action uses the following action properties:

Action Property Description

Business Critical Objects

An optional Table parameter or dataset with NAME and TYPE columns which should be set to contain a set of business critical objects. These objects will be searched for object links along with the objects stored in the Source parameter or dataset.

Depth

An Integer parameter specifying the maximum search depth to use when searching for referenced objects. The default value for this parameter is 5.

Duplicates

A Table dataset which stores used executable objects that are duplicated in the Source parameter or dataset. Each duplicate object is processed only once.

Exceptions

A Table dataset which stores any exceptions generated during the Uses What search.

Expand Dynamic Function Calls If this Boolean parameter is set to ‘true’, dynamic function calls will be expanded before searching for Uses What results. If the parameter is set to ‘false’, dynamic function calls will not be expanded. If this parameter is not set, ‘true’ is used as the default value.

Expand While Custom

If this Boolean parameter is set to ‘true’, the search for referenced objects will continue while custom objects are found, stopping when the first SAP-authored object is encountered. All the custom objects and the first SAP-authored object will be included in the results. If the parameter is set to ‘false’, SAP-authored objects are also included in the search. If this parameter is not set, ‘false’ is used as the default value.

Extractor Mode Reserved for use by Tricentis.

Patterns

A Table parameter or dataset containing Regular Expression patterns that are matched against objects in the Source table. Matching objects from the Source table are searched for Uses What results.

Result

A Table dataset which lists the source objects searched for Uses What results, and the objects that they reference, either directly or indirectly. Only referenced objects that match one of the types stored in the Types to Report parameter are included.

RFC Destination

An RFC Destination parameter or dataset referring to the SAP system from which to obtain Uses What results.

Source

A Table parameter or dataset specifying the starting objects for the Uses What search. The table should have a NAME column containing the name of each object, and a TYPE column specifying each object’s type. Object types should be specified using UPPER CASE.

TCOD PROG Map

A Table parameter or dataset with TCOD and PROG columns which is used to specify programs which have screens that are called by a transaction code. SAP table D020S is used to identify each transaction code’s called screens. SAP table /ICORP/YVPR001 is also used as a source of which programs have screens that are called by a transaction code.

Transport Analysis If this Boolean parameter is set to ‘true’, the action will be optimized for finding dependent objects. If this parameter is not set, ‘false’ is used as the default value.

Tree

A Table dataset which lists pairs of objects in the tree of results found by the Uses What action. Each pair is a link between two objects: the left side of the pair is an object, the right side of the pair is an object used by the object on the left side of the pair directly.

Types to Report

A String List parameter containing the SAP object types for which to report Uses What results. Only these object types appear in the FOUND_TYPE column of the Result dataset.

UPL Data

A Table parameter or dataset with PROG_NAME, PROC_TYPE, PROC_NAME and COUNT_N columns containing UPL data. This is normally set to the ‘UPL Statistics’ table returned by the Read UPL Data action.

 

If this property is set, the UPL data used to filter out unused objects when finding object links. If this property is not set, or if the UPL data table is empty, no UPL filtering will occur.

Use Cache

If this Boolean parameter is set to ‘true’ and a tree of links has been stored for the RFC Destination by the Create Object Links Cache action, the Uses What action will use the cached tree of links to produce its results. If the property is set to ‘false’, the Uses What action will generate its own tree of links. Typically, this will take much longer, however it does not require the Create Object Links Cache action to be run. If this parameter is not set, ‘false’ is used as the default value.

The Uses What action supports variables in CALL FUNCTION statements, where the name of the function being called is a variable rather than a literal. Each CALL FUNCTION statement is scanned to find the parameters used in the call, and the types of the parameters. The database of SAP functions is used to determine which functions could possibly be called, and these functions are added to the network of object links.

The Patterns table should contain the following columns:

Column Description

TYPE

An object type to be matched against the Source table’s TYPE column.

SapQuery (required)

A pattern matched against SAP object names of the specified TYPE to determine which objects to return to the LiveCompare server. The pattern must contain at least one wildcard character (*), which matches against zero or more characters in the object name.

Like

The SapQuery pattern expressed in the form required by a SQLite LIKE clause.

RegEx (required)

The SapQuery pattern expressed in the form of a Regular Expression. This is used to filter the object names returned to the LiveCompare server.

IorE (optional)

If this column is set to ‘I’, object names which match the pattern are included in the matching set. If this column is set to ‘E’, object names which match the pattern are excluded. Each name is matched against the ‘Exclude’ patterns first, and if a match is found the name is not added to the matching set. Otherwise, the name is matched against the ‘Include’ patterns, and added to the matching set if a match is found. If the IorE column is missing or blank, the default is to include matching object names.

Each row in the Patterns table represents a single pattern. A row from the Source table is considered a ‘match’ if it matches at least one of the patterns.

The Duplicates dataset has the following columns:

Column Description

TYPE

The type of a duplicated object from the Source parameter or dataset.

NAME

The name of the duplicated object.

The Exceptions dataset has the following columns:

Column Description

TYPE

The type of an object searched for Uses What results.

NAME

The name of the object.

LINE

The exception raised.

The following exceptions may be generated:

Exception Description

NOT IN SYSTEM

An object from the Source table was not found in the system referred to by the RFC Destination parameter.

MAX BREADTH EXCEEDED

The maximum number of referenced objects found at a particular search level was exceeded. This value is set internally at 5000. When this exception occurs, no further processing is performed for the current object.

EMPTY HITS

When parsing code in which an object is used, a series of N attempts to find the object failed. At this point, the object is ignored. The value of N is set internally at 100.

PARSE ERRORS

The code parser generated an error in attempting to parse the code in which an object is used.

If an ABEND occurs in SAP while the Uses What action is running, this information is also recorded in the Exceptions dataset.

If the Extractor Mode property is set to ‘false’, the Result dataset has the following columns:

Column Description

TYPE

The type of an object searched for Uses What results.

NAME

The name of the object.

FOUND_TYPE

The type of an object that is used by the searched object directly.

FOUND_NAME

The name of referenced object.

DEPTH

The search depth at which the referenced object was found.

The Result table may contain items that have a DEPTH greater than the maximum you specify. This is to be expected. LiveCompare dynamically adjusts its analysis based on the objects it discovers as it traverses the pathways between SAP implementation objects. For some object types it makes sense to go deeper to find the real impact pathways. For others it is acceptable to go no deeper than the depth specified.

The Tree dataset has the following columns:

Column Description

TYPE

The type of an object searched for Uses What results.

NAME

The name of the object.

CHILD_TYPE

The type of an object that is used by the searched object directly.

CHILD_NAME

The name of the referenced object.

ROW_TYPE

The type of each row.

DEPTH

The search depth at which the child object was found.

LINK_TYPE

This column is used in generating the tree of object links.

COMMENT

The Comment column appears in the Tree dataset if the Uses What action’s Transport Analysis parameter is set to ‘true’. Its purpose is to explain links that are in effect two levels deep by identifying the object in between the parent and child objects. The Comment column has the following format:

<OBJECT1 TYPE>_<OBJECT1 NAME> – <LINK_TYPE2>

  • The object in the NAME column uses the object in the LINK_TYPE column to reach OBJECT1.

  • OBJECT1 uses LINK_TYPE2 to reach the object in the CHILD_NAME column.

The ROW_TYPE column may have the following values:

Value Description

X

The row represents a link between two objects.

C

Indicates that the found object is a container.

I

Row type identity. This value is used when resuming the action.

D

Row type depth done. This value is used when resuming the action.

E

The row was added because an executable was in the ‘Source’ data, but not in the Tree dataset.

The Tree dataset produced when the Uses What action is run for a BSP Application (WAPA) may include the WAPV object type in its CHILD_TYPE column. The WAPV object type (which may be interpreted as ‘WAPA view’) is an artificial type used to represent the components of a BSP Application that require testing.

Example (Extractor Mode = false):

 Uses What action example (Extractor Mode = false).

Extractor Mode = true

If the Extractor mode property is set to ‘true’, the Uses What action uses the following action properties:

Action Property Description

Depth

An Integer parameter specifying the maximum search depth to use when searching for referenced objects. This parameter should be set to 2 so that the Uses What action finds programs from their associated function groups, and programs associated with transactions.

Duplicates

A Table dataset which stores used executable objects that are duplicated in the Source parameter or dataset. Each duplicate object is processed only once. The Duplicates table has the columns described in the Extractor Mode = false section.

Exceptions

A Table dataset which stores any exceptions generated during the Uses What search. The Exceptions table has the columns described in the Extractor Mode = false section.

Expand While Custom

If this Boolean parameter is set to ‘true’, the search for referenced objects will continue while custom objects are found, stopping when the first SAP-authored object is encountered. All the custom objects and the first SAP-authored object will be included in the results. If the parameter is set to ‘false’, SAP-authored objects are also included in the search. If this parameter is not set, ‘false’ is used as the default value.

Extractor Mode

Reserved for use by Tricentis.

Patterns

A Table parameter or dataset containing Regular Expression patterns that are matched against objects in the Source table. Matching objects from the Source table are searched for Uses What results. The Patterns table has the columns described in the Extractor Mode = false section.

Result

A Table dataset which contains objects from the Usage Counts dataset and their referenced standard (non-custom) SAP objects. The Patterns table is used to distinguish between custom and SAP objects, and should be set to contain a list of custom object naming patterns.

RFC Destination

An RFC Destination parameter or dataset referring to the SAP system from which to obtain Uses What results.

Source

A Table parameter or dataset specifying the starting objects for the Uses What search. The table should have a NAME column containing the name of each object, and a TYPE column specifying each object’s type. Object types should be specified using UPPER CASE.

TCOD PROG Pairs

A Table dataset which contains rows from the Tree dataset where the TYPE column has the value TCOD and ROW_TYPE column has the value X. If the row’s CHILD_TYPE is another TCOD, the action searches the Tree dataset for a second row which has a NAME equal to the first row’s CHILD _NAME. It then substitutes the found CHILD_NAME and CHILD_TYPE into the first row.

For example, if the rows were the following (TYPE, NAME, CHILD_TYPE, CHILD_NAME):

TCOD, TCODA, TCOD, TCODB

TCOD, TCODB, PROG, PROG1

… after the substitution, the rows would be:

TCOD, TCODA, PROG, PROG1

TCOD, TCODB, PROG, PROG1

Transport Analysis If this Boolean parameter is set to ‘true’, the action will be optimized for finding dependent objects. If this parameter is not set, ‘false’ is used as the default value.

Tree

A Table dataset which contains a subset of the objects Tree dataset. The action populates this dataset by following the links in Tree dataset, starting with objects in the Usage Counts dataset. Any custom object found are stored in the Result dataset. The Tree table has the columns described in the Extractor Mode = false section.

Usage Counts

A Table parameter or dataset with TYPE, NAME and COUNT columns containing performance history data. This is normally set to the ‘Application Statistics’ table returned by the Get Performance History Data or Read Performance History Data action.

If the Usage Counts table is missing or empty, the action performs a Uses What search for all the objects in the Source table. If the Usage Counts table is populated, the action performs a Uses What search for the objects in the Usage Counts table.

Use Cache

If this Boolean parameter is set to ‘true’ and a tree of links has been stored for the RFC Destination by the Create Object Links Cache action, the Uses What action will use the cached tree of links to produce its results. If the property is set to ‘false’, the Uses What action will generate its own tree of links. Typically, this will take much longer, however it does not require the Create Object Links Cache action to be run. If this parameter is not set, ‘false’ is used as the default value.

If only the TCOD PROG Pairs output is required (and not the Result or Tree outputs), the Patterns and Usage Counts inputs are not required.

If the Extractor Mode property is set to ‘true’, the Result dataset has the following columns:

Column Description

TYPE

The type of an object from the Usage Counts dataset.

NAME

The name of the object.

FOUND_TYPE

The type of a standard (non-custom) SAP object that is used by the Usage Count object, either directly or indirectly.

FOUND_NAME

The name of referenced object.

Example (Extractor Mode = true):

Uses What action example (Extractor Mode = true).

File-based Datasets

To improve the performance of the Uses What action, the Result and Exceptions tables are stored as file-based datasets on the LiveCompare server. As they are not stored in SQLite, these datasets may not be referenced directly by SQL statements such as the following:

INSERT INTO Result SELECT * FROM Source1

You can use the Convert Data action to convert a file-based Table dataset into a normal Table dataset stored in SQLite. Set the action’s InTable property to the file-based Table dataset and create a new Table dataset for the action’s OutTable property.

To examine the details for a Uses What action, double-click the action node, or select ‘View Details’ from the node’s context menu. The Details screen displays a summary of the number of records in each of the result tables, as well as some additional diagnostic information. The time taken for the action to complete is also shown.

The progress of a Uses What action may be monitored by viewing the Details screen while the action is running. The following details are shown:

Item Description

Phase --- Read SAP Tables

The Uses What action is reading SAP tables.

Items done

The number of tables read.

Elapsed time (seconds)

The elapsed time for the Read SAP Tables phase.

Phase --- Do Uses What

The Uses What analysis is being performed.

Total items

The total number of objects to be analyzed for Uses What results (excluding exceptions).

Items done

The number of objects processed so far.

Elapsed time (seconds)

The elapsed time for the Do Uses What phase.

Total elapsed time hh:mm:ss

The time for which the Uses What action has been running in hours, minutes and seconds.

Press the F5 key periodically to update the display.

If a Uses What action is interrupted (for example because its RFC Destination becomes unavailable) choose ‘Continue’ from the action’s context menu to restart it.

A Uses What action may not be run for an RFC Destination while a Create Object Links Cache action is running against the same RFC Destination in another workflow.

Create Object Links Cache Actions

Maintaining SAP Where Used Indices

Object Type Matrix