Reading SAP Tables

LiveCompare 2.1 and later releases include an improved algorithm for reading table contents from SAP. In earlier releases of LiveCompare, table contents were read from SAP using four separate methods:

Reading Table Contents

In earlier LiveCompare releases, the normal method for reading table contents involved creating a copy of the table in SAP, reading batches of table rows into SAP’s RFC buffer, and then returning the batches to LiveCompare. Maintaining copies of large tables in SAP used a large amount of SAP memory.

Direct Table Reads

In earlier LiveCompare releases, the Where Used action read a number of SAP directly, by copying the entire table to SAP’s RFC buffer and then returning the entire table to LiveCompare. For large tables, this technique used a large amount of SAP and LiveCompare memory.

Segment Reads

In some cases, the Where Used action used a predefined set of keys to read tables one segment at a time. Since each segment is smaller than the complete table, this technique uses a smaller amount of SAP and LiveCompare memory.

Filtered Table Data

In earlier LiveCompare releases, the Retrieve View and Read SAP Table and Join actions read filtered data from SAP by constructing WHERE clauses based upon the appropriate filter keys.

LiveCompare 2.1 and later releases avoid the memory usage problems of the first two methods by using a single technique to read SAP table data, which does not involve creating copies of tables in SAP. In this technique, a table name and an optional set of SELECT statements are sent to SAP, and the table is read using the following steps:

  1. In the first RFC call, read the first batch of table rows (with optional user SELECT statements). Save the key of the last table row read.
  2. In the next RFC call, read the table again using an additional set of SELECT statements to eliminate the rows that have already been read. Read the next batch of rows from the reduced table, skipping rows with keys less than the saved key. Save the key of the last table row read.
  3. Continue from Step 2 until all the table rows have been read.

A number of configuration settings provide the parameters used by the table reader:

SapTableReaderMaxMemory

The maximum amount of memory in KB that each batch of table rows should consume. The default value is 5000, or approximately 5 MB.

SapTableReaderMaxRows

The maximum number of rows to be retrieved in any table read. The default value is 200,000,000.

SapTableReaderBatchRows

The number of table rows to be read in each batch. The default value is 0, which means that the batch size is calculated from the SapTableReaderMaxMemory value and the number of bytes in each table row.

These settings should not normally need to be changed. However if you have LiveCompare Administrator privileges, they can be modified in the Configuration - Table Contents screen.