Read Large SAP Table Actions

Read Large SAP Table actions allow tables with millions of rows to be read from SAP while minimizing the risk of timeout errors. The action works by reading the specified table into a temporary file on the SAP system, transferring the file to the LiveCompare server using FTP, then importing the file into a Table dataset in the current workspace. Secure FTP connections are also supported, using FTP over SSL.

Note: If you plan to use the Read Large SAP Table action, please contact Tricentis Technical Support for help in configuring the action correctly.

If there is a firewall on the LiveCompare server, it should be configured to allow transfers via FTP, and traffic from the Tricentis LiveCompare Application Server, RNSERVER.EXE. The location for the temporary file on the SAP system and the FTP connection details should be set in the FTP tab for the specified RFC Destination.

Action Property Description
Columns to Read A String List parameter containing the names of the table columns to read. If this action property is not set, all the table columns will be read.
Default Data A Table parameter or dataset which is copied to the Result dataset if the specified table could not be found.
No FTP

A Boolean parameter which indicates whether the temporary file will be transferred from the SAP server to the LiveCompare server using FTP. Reading a large SAP table may take a long time. The action should be tested by configuring it to read a small table first, until you are certain that the appropriate configuration settings are working as desired.

If this parameter is set to ‘false’ or <blank>, the FTP transfer will be executed

All the parameters set in the RFC Destination’s FTP tab must be accurate. If there is a valid entry in the ‘Directory path on SAP system’ field in the FTP tab, the temporary file will be transferred to the specified path on the LiveCompare server using FTP, and read into the action’s Result dataset. The temporary file will be deleted.

If this parameter is set to ‘true’ the FTP transfer will not be executed

If NoFTP is set to true, each field in the RFC Destination’s FTP tab must have a value. The ‘Directory path on SAP system’ field must be set to a valid path, specifying where the temporary file will be stored on the SAP system. The remaining fields may be set to ‘Not applicable’.

Files stored on the SAP system cannot be read using LiveCompare. The table data is stored in a format designed for processing by a third-party application.

Option

A String parameter or dataset which specifies whether the temporary file is to be deleted from SAP when the action has finished.

If this parameter is empty, the action will read the SAP table, and then remove all temporary files when complete.

If this parameter is set to ‘Keep’, the action will read the SAP table, but not remove the temporary files.

If this parameter is set to ‘DeleteFiles’, the action will delete any temporary files created in SAP, but it will not read the SAP table. This option is used to remove any temporary files created by previous runs of the Read Large SAP table action.

If the NoFTP parameter is set to ‘false’ or <blank>, and you wish to keep the temporary file on the SAP system, set the Option parameter to ‘Keep’. The action will read the SAP table, but not remove any temporary files from the SAP system.

Result A Table dataset in which to store the retrieved SAP table data. This dataset is not populated if the No FTP parameter is set to ‘true’.
Result Table File Map A Table dataset which stores mapping between the SAP tables that have been read by the action and their associated temporary files on the SAP server. This dataset may have more than one entry if the Read Large SAP Table action is used in a loop.
RFC Destination An RFC Destination parameter or dataset referring to the SAP system from which to retrieve the table. The RFC Destination’s FTP tab should be completed, specifying a directory location for the temporary SAP file, and the appropriate FTP connection details.
Rows to Read A Select List parameter specifying which table rows to read. If this action property is not set, all the table rows will be read.
Table Name A String parameter or dataset containing the name of the SAP table to be read. Table names should be specified using UPPER CASE.

The Result Table File Map dataset has the following columns:

Column Description
TABLE The name of an SAP table read by the Read Large SAP Table action.
FILE The name of the temporary file that stores the table data on the SAP server. If the No FTP parameter is set to ‘true’, the file is stored in the root directory of the drive where SAP is installed. Otherwise, the file stored in the location referred to by ‘Directory path on SAP system’ setting in the RFC Destination’s FTP tab.

Notes

Read Large SAP actions support the reading of tables only, not views. The maximum length allowed for any single table field is 8000 characters.

Example:

Read Large SAP Table action example.

To examine the details for a Read Large SAP Table action, double-click the action node, or select ‘View Details’ from the node’s context menu. The Details screen displays the number of records written to the Result dataset, the RFC Destination and SAP table used, and the time taken for the action to complete.

The progress of a Read Large SAP Table action may be monitored by viewing the Details screen while the action is running. The following details are shown:

Item Description
SAP job running -- file size The table is being read into a temporary file on the SAP system. The Count column displays the size of the temporary file in KB.
FTP transferring file The temporary file is being moved to the LiveCompare server via FTP.
SQL importing file The temporary file is being imported into the SQLite workspace database.
Elapsed time (seconds) The time for which the Read Large SAP Table action has been running.
Total elapsed time hh:mm:ss The time for which the Read Large SAP Table action has been running in hours, minutes and seconds.

Press the F5 key periodically to update the display. Note that the statistics are not updated at all while the FTP and SQL import tasks are running.

If a Read Large SAP Table action is interrupted, (for example because its RFC Destination becomes unavailable), choose ‘Continue’ from the action’s context menu to continue running the action.

SAP 640 Kernel Systems and Below on Windows servers

If you are using the SAP 640 kernel release or earlier under Windows, a small change is required to allow line feeds from the table to be written to the SAP temporary file correctly. Under this SAP configuration, line feeds are written using ‘CRLF’, however LiveCompare expects the UNIX format for line feeds to be used, which is ‘LF’.

To allow SAP 640 kernel releases or earlier running under Windows to use the correct line feed when writing temporary files, set the ‘abap/Ntfmode’ profile parameter to the value ‘b’ (binary).