Find Similar Objects Actions

Find Similar Objects actions are provided with a list of source objects, and search the specified RFC Destination to find a set of candidate similar objects. A source object and a found object are considered to be similar if they have at least one subobject in common.

The similarity of a source object and a found object is identified based upon the following criteria:

  • The number of used objects they have in common.
  • The number of source code lines they have in common. The action retrieves source code for the following object types only: PROG (Program), FUNC (Function), INCL (Include).
  • The number of common characters in their object names.

The action reports on each of these criteria without regarding any as being more important than the others. If you have a particular set of weighting factors that should be applied to the results, the factors may be applied to the action’s Result table using the Execute SQL action.

Before the Find Similar Objects 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
Filter Basis A Boolean parameter which determines whether SAP Basis objects should be excluded when searching for similar objects. The default value for this parameter is ‘true’, which means that SAP Basis objects will not be used in the search algorithm. If this parameter is set to ‘true’ (or not set), source objects that mostly use Basis objects will yield few results.
Filter Common An Integer parameter value ‘N’. Child objects of the original source object with more than N parents will not be used the search algorithm. By default, this parameter is set to 20. If the parameter is set to 0, the filter is not used, and all children of the original source object will be considered by the search algorithm.
Result A Table dataset which lists any similar objects found for each object in the Source table.
RFC Destination An RFC Destination parameter or dataset referring to the SAP system on which to search for similar objects.
Source A Table parameter or dataset specifying the objects for which similar objects are to be found. The table should have a NAME column containing the name of each object, and a TYPE column specifying each object’s type. Object names should be specified using UPPER CASE.
Tree A Table dataset which lists pairs of objects in the tree of results found by the Find Similar Objects 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.
Types to Find A String List parameter containing a list of SAP object types for which similar objects are to be found. If a source object’s type is not in this list, the source object will be ignored.
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 Find Similar Objects action will use the cached tree of links to produce its results. If the property is set to ‘false’, the Find Similar Objects 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 Result dataset has the following columns:

Column Description
TYPE The type of an object from the Source parameter or dataset.
NAME The name of the source object.
FOUND_TYPE The type of a candidate similar object.
FOUND_NAME The name of the candidate similar object.
UW_COUNT A count of the source object’s ‘Uses What’ children. The count is adjusted to filter out Basis objects, common objects, and non-symmetric object types (for example, MODI).
UW_SAME The number of Uses What objects that are common to the source object and the candidate similar object.
NAME_LENGTH The number of characters in the source object name.
FOUND_NAME_LENGTH The number of characters in the candidate similar object name.
NAME_MATCHES The number of characters that are common to the source object name and the candidate similar object name.
NAME_IN1 The number of characters that are unique to the source object name.
NAME_IN2 The number of characters that are unique to the candidate similar object name.
CODE The number of source code lines in the source object identified by the TYPE and NAME columns. This field is left blank if UW_SAME is less than one half of UW_COUNT.
FOUND_CODE The number of code lines in the candidate object identified by the FOUND_NAME and FOUND_TYPE columns. This field is left blank if UW_SAME is less than one half of UW_COUNT.
MATCHES The number of code lines that are common to the source object and the candidate similar object. This field is left blank if UW_SAME is less than one half of UW_COUNT.

IN_1

The number of code lines in the source object that are not in the candidate similar object. This field is left blank if UW_SAME is less than one half of UW_COUNT.
IN_2 The number of code lines in the candidate similar object that are not in the source object. This field is left blank if UW_SAME is less than one half of UW_COUNT.

The Tree dataset has the following columns:

Column Description
TYPE The type of a child object in the tree of results returned by the Find Similar Objects action.
NAME The name of the object.
PARENT_TYPE The type of an object that uses the child object directly.
PARENT_NAME The name of an object that uses the child object directly.
ROW_TYPE The type of each row.
DEPTH The search depth at which the parent object was found.
UPL This column is not used.
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.

Usage Scenario

The Find Similar Objects action should be run as follows:

  1. Run the action using the default values for the Filter Basis and Filter Common parameters.
  2. The search for similar objects may be successful for some of the source objects. Review these results and remove these objects from the Source table.
  3. Set the action’s parameters as follows: Filter Basis = ‘false’, Filter Common = 0, Full Initialization = ‘true’.
  4. Run the action again and review the results for the remaining source objects.

Example:

Find Similar Objects action example.

To examine the details for a Find Similar Objects 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 the Tree and Result tables, the number of unique records in the Source table and the time taken for the action to complete.

The progress of a Find Similar Objects 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 Find Similar Objects 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 --- Find Similar Objects The Find Similar Objects analysis is being performed.
Total items The total number of objects to be analyzed (excluding duplicates).
Items done The number of objects processed so far.
Elapsed time (seconds) The elapsed time for the Find Similar Objects phase.
Total elapsed time hh:mm:ss The time for which the Find Similar Objects action has been running in hours, minutes and seconds.

Press the F5 key periodically to update the display.

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

A Find Similar Objects 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

Object Type Matrix