Analyzing File Interfaces
File interface analysis provides a function for identifying server file I/O and front-end file I/O and is only available for ABAP-based Analysis Systems. File interfaces that were implemented as part of an SAP® PI/PO implementation scenario are already covered.
The assessment is performed in two steps:
- Determining the candidates
- Determining the usage
The candidates are determined in a separate step, which must be carried out in each Analysis System in scope before the collector run. The usage is determined during the regular collector run by extracting the usage statistics and identifying the programs/transactions that represent a file interface.
Because only the most recent data record is saved in each case, it is not possible to evaluate the data based on time.
Prerequisites
In order to assess file interfaces, the Interface Scan Collector Add-on must be installed on the respective ABAP-based Analysis System(s). This add-on contains the File Collector Agent that is used to determine candidates.
The user who determines the candidates and the Interface Scan Collector user both require authorizations that are defined in the Interface Scan standard role /SNP/IFS_FILE_COLLECTOR.
Determining Candidates
Candidates are determined based on a source code scan of all ABAP sources (e.g. programs, function modules, ABAP OO methods) within an Analysis System. The source code analysis checks whether server-side (OPEN DATASET) and front-end (GUI upload/download) file I/O operations are implemented in the source code.
How to start determining candidates:
- To determine candidates in the dialog, start transaction /SNP/IFS_FC_ANALYSE.
- To schedule the candidate determination as a batch job, start the program as the job /SNP/VA01_FC_ANALYSIS_START.
During the first execution, an initialization run is performed automatically, which can take several hours. Each subsequent execution only processes deltas, i.e. new and changed objects that have been imported since the previous execution. It is sufficient to redetermine candidates after changes have been made to the source code. We recommend scheduling the candidate determination as a batch job.
The delta determination does not recognize deleted objects. If many deletion processes have taken place, we recommend initializing the candidate list with the transaction /SNP/IFS_FC_DELETE.
Configuring the Analysis of File Interfaces
- Determine the candidates for every relevant Analysis System.
- Only start the collector run once all runs to determine candidates are finished, otherwise, the analysis results are incomplete.
- In the configuration of the Interface Scan Collector (transaction /SNP/IFS_SYS), enable the File Interfaces option for the relevant Analysis Systems.
- File interfaces are represented by the connection type FILE, which must be enabled in the Interface Scan configuration.
- Add the connection type FILE manually if you are using Interface Scan databases that come from an earlier Interface Scan release.
Filtering the Usage Statistics
To restrict the analysis to only relevant programs/transactions, we have introduced the new filter table FILEConnectionFilter. See System Maintenance for further details.
Interface Scan automatically filters the usage statistics so that only the task types Dialog, Background, Update and Update-2 are evaluated. Other task types are considered irrelevant.
Information via File Interfaces
The following information is provided during an analysis of the file interface:
- Staging information on
- repository metadata for all analyzed objects
- all locations in the source code where file I/O statements have been identified, including the type of statement
- Connections of type FILE for all programs/transactions that represent file interfaces, including the new attributes Task Type and File Access Count
- Sender Interface contains the file interface name.
- Connection Subtype describes whether the file interface was executed as an ABAP program or transaction.
- Receiver Interface is empty if the Connection Subtype is T or the task type is <> BTC. It contains the SAP® job name if the task type is = BTC.
- Short descriptions of the relevant file I/O transactions/programs are added to the attribute Description. These descriptions are based on the language used when determining candidates in the Analysis Systems.
General Information
The analysis of file interfaces collects large amounts of data per period. We therefore recommend using the granularity MONTH and limiting the data collection to a few periods, or storing only a few periods in the staging area. In addition, the collector run takes much longer.
It is equally important to adjust the filter table (FILEConnectionFilter) so that Interface Scan only searches for relevant candidates. This also helps to substantially reduce the number of connections of type FILE created in the FillRuntime phase.
Limitations
Connections of type FILE created during a collector run represent programs/transactions that are used in the relevant period and that have been identified as file I/O candidates. This contains one or more direct/indirect items in the source code that represent a file I/O (server and/or front-end).
The usage statistics do not provide detailed information on the following:
- Which of the identified file I/O statements were executed or whether any of them were executed at all.
- The exact path/file name of the file(s) to be manipulated. In the case of literals used as a path within the source code, it is possible that the user chose a different path name at runtime.
If detailed information is required for certain programs, the following options are available:
- Enhancing relevant programs by logging their activities
- Implementing an SAP® standard user exit available for GUI download to log user activities related to front-end file I/O (not available for GUI upload)
- Enabling SAP® Audit Trace to automatically log GUI download activities
The usage logs created by one of the options described above can either be evaluated manually or imported into the Interface Scan database via the Interface Scan Customer API. Importing the logs allows for an integrated analysis within the Interface Scan Client and/or in CrystalBridge.