Where Used actions
Where Used actions are given a set of source (or ‘starting’) objects, normally obtained from one or more SAP transports. They search the specified RFC Destination to produce a network of ‘where used’ object links, beginning with the starting objects. The results of a Where Used action are stored in a number of Table datasets.
Before the Where Used 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.
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 referencing objects. The default value for this parameter is 5. |
Duplicates | A Table dataset that stores starting objects that are duplicated in the Source parameter or dataset. Each duplicate object is processed only once. |
Exceptions | A Table dataset that stores any exceptions generated during the Where Used search. |
Filter Basis | A Boolean parameter that determines whether SAP Basis objects should be excluded from the set of source objects and not searched for Where Used results. If this parameter is not set, ‘false’ is used as the default value. |
Filtered | A Table dataset that lists the starting objects that could not be searched for Where Used results because their types are not supported by the Where Used action. |
Objects to Find | A Table parameter or dataset specifying the executable objects to be found. The Where Used action begins with the Source objects and finds which objects use them. The search continues recursively until an object in the Objects to Find set is found. The table should have a NAME column which stores the name of each object, and a TYPE column which stores each object’s type. Object types should be specified using UPPER CASE. |
Result | A Table dataset that contains an expansion of the results in the Tree dataset. The Result dataset contains a list of object pairs. The objects on the left side of each pair are the starting objects from the Source parameter or dataset. The objects on the right side of each pair are the executables that can be found by following the links in the Where Used network, beginning with the starting object on the left side of the pair. |
RFC Destination | An RFC Destination parameter or dataset referring to the SAP system for which to perform a Where Used analysis. |
Source | A Table parameter or dataset specifying the starting objects for the Where Used search. The table should have a NAME column which stores the name of each object, and a TYPE column which stores 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 that lists pairs of objects in the tree of results found by the Where Used 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 that uses the object on the left side of the pair directly. For SC_MON data, the Where Used Tree dataset is limited to the following object types: PROG (Program), TCOD (Transaction). |
Types to Report | A String List parameter containing the SAP object types for which to report Where Used results. Only these object types appear in the FOUND_TYPE column of the Result dataset. |
Update Cache | If this Boolean parameter is set to ‘true’, the cache of object links stored for the RFC Destination is updated to include the source objects provided to the Where Used action. If the property is set to ‘false’, the object links cache for the RFC Destination is not updated. If this parameter is not set, ‘false’ is used as the default value. |
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 Where Used action will use the cached tree of links to produce its results. If the property is set to ‘false’, the Where Used action will generate its own tree of links, and the Update Cache property will be assumed to be ‘false’. 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. |
Write Inputs | If this Boolean parameter is set to ‘true’, the starting objects that have not been filtered are written to the Result and Tree datasets. In the Result dataset, the object names are written to the NAME and FOUND_NAME columns. In the Tree dataset, the object names are written to the NAME and PARENT_NAME columns. In each dataset, the DEPTH column for the starting objects is set to 1. If this parameter is not set, ‘false’ is used as the default value. |
The Where Used 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 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 Where Used 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 referencing 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 EXCEEDED | 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 Where Used action is running, this information is also recorded in the Exceptions dataset.
The Filtered dataset has the following columns:
Column | Description |
---|---|
TYPE | The type of a source object that could not be searched for Where Used results. |
NAME | The name of the source object. |
The Result dataset has the following columns:
Column | Description |
---|---|
TYPE | The type of a starting object from the Source parameter or dataset. |
NAME | The name of the starting object. |
FOUND_TYPE | The type of an object that uses the starting object, either directly or indirectly. Only object types listed in the Types to Report parameter appear in this column. |
FOUND_NAME | The name of the referencing object. |
DEPTH | The search depth at which the object was found. |
The Tree dataset has the following columns:
Column | Description |
---|---|
TYPE | The type of an object searched for Where Used results. |
NAME | The name of the object. |
PARENT_TYPE | The type of an object that uses the searched object directly. |
PARENT_NAME | The name of an object that uses the searched object directly. |
ROW_TYPE | The type of each row. |
DEPTH | The search depth at which the parent object was found. |
LINK_TYPE | This column is used in generating the tree of object links. |
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. |
B | If a Basis object was discarded because the action’s Filter Basis property was set to ‘true’ a row is written to the Tree table with its ROW_TYPE set to B. |
E | The row was added because an executable was in the ‘Source’ data, but not in the Tree dataset. |
Example
To examine the details for a Where Used 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 Where Used action may be monitored by viewing the Details screen while the action is running. The following details are shown:
Item | Description |
---|---|
Phase --- Read/Update SAP Tables | The Where Used action is reading or updating SAP tables. |
Items done | The number of tables read. |
Elapsed time (seconds) | The elapsed time for the Read SAP Tables phase. |
Phase --- Do Where Used | The Where Used analysis is being performed. |
Total items | The total number of objects to be analyzed for Where Used results (excluding filtered objects and duplicates). |
Items done | The number of objects processed so far. |
Elapsed time (seconds) | The elapsed time for the Do Where Used phase. |
Total elapsed time hh:mm:ss | The time for which the Where Used action has been running in hours, minutes and seconds. |
Press the F5 key periodically to update the display.
If a Where Used action is interrupted (for example because its RFC Destination becomes unavailable), choose ‘Continue’ from the action’s context menu to restart it.
A Where Used 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
Where Used analysis code example
How LiveCompare reads SAP tables