Overview
The SAP Read Table source plugin is in the Data Sources group on the left panel of the Designer. Use it as the data source of a migration: it reads rows from one SAP table with the function module RFC_READ_TABLE and passes them to the target plugins as migration entries.
When you click Connect, the plugin reads the field list of the table with RFC_READ_TABLE (without data) and the key fields of the table with DDIF_FIELDINFO_GET. Both are standard SAP function modules. The plugin only reads data; it doesn't change anything in SAP.
Purpose: Read data from SAP ERP tables (any systems on NetWeaver)
- Read – query data from a single SAP table
Configuration
Connecting with Password Manager
To configure the plugin:
- In SAP System, select an entry from the Password Manager.
- In Server Type, select one of two server types:
- Application Server
- Message Server
- Enter the Table Name.
- Click Connect to build the table structure.
Password manager entry should have the following keys in its Options:
App Server Host, Client, Language, SAP Router, System Number, System ID
All of those fields can be used from SAP System options template
Connecting with Application Server
To configure the plugin fill the following fields:
- Server Host
- System Number
- SAPRouter - optional
- User
- Password
- Client
- Language
After that:
- Enter the Table Name.
- Click Connect to build the table structure.
Connecting with Message Server
To configure the plugin fill the following fields:
- SID
- Server Host
- Logon Group
- Server Service - optional
- SAPRouter - optional
- User
- Password
- Client
- Language
After that:
- Enter the Table Name.
- Click Connect to build the table structure.
Settings
Table options
Below the connection tabs, you set the options for the table read:
| Field | Description |
|---|---|
| Group Entries | Processes all rows of the table as one migration entry, in a single transaction. Key fields are ignored. VeloXm asks you to confirm this when you analyze the project. |
| Table Name | Name of the SAP table to read. The name is converted to upper case. Press Enter or click Connect to load the table fields. |
| Use Paging | Reads the table in pages instead of in one call. Enter the page size (rows per call) in the box next to the check box. The default is 100000. |
| Check Float fields | During analysis, checks that the values in floating-point columns have a valid number format. If a value has a wrong format, VeloXm asks whether to continue. |
Click Notes to add your own notes to the plugin.
When Use Paging is selected, the value of the ROWCOUNT import field is ignored. VeloXm reminds you of this when you analyze the project.
Connection settings
Expand Settings in the connection parameters to change the SAP connection pool settings:
| Field | Description |
|---|---|
| IDLE_TIMEOUT | Time after which an idle connection is closed. |
| POOL_SIZE | Number of connections kept open in the pool. |
| MAX_POOL_SIZE | Maximum number of connections the plugin can open at the same time. |
How to use
- Add the SAP Read Table source plugin to the canvas.
- Open the Connection Parameters.
- Fill in the SAP connection parameters, user name and password.
- Enter the name of the table that you want to query.
- Click Connect.
- The line under the connection button turns green when the connection to SAP is established.
- Select the export fields you want to read and map them to the target plugins. Click Select All in the Export section to select all fields. You must select at least one export field, otherwise the project analysis stops with the message "Select Export Fields."
- Check the key fields (see Key fields).
Import fields and query editor
There are three import fields:
- OPTIONS (required)
- ROWSKIPS (optional)
- ROWCOUNT (optional)
For additional information, see the documentation of the function module RFC_READ_TABLE.
An import field is used only when it is selected on the Import tab of the Fields section and has a value. Its value can't come from mapping; it is set in the field details.
The OPTIONS field has a built-in query editor. Open the field details and click Editor to open the Query Editor window, then enter the selection condition (the WHERE clause) for the table.
Write the condition in Open SQL syntax without the word WHERE, for example MTART = 'FERT' AND LVORM = ' '. Field names are the technical names of the table fields, and text values are in single quotes in the SAP internal format. The plugin splits the condition into lines of 72 characters, as RFC_READ_TABLE requires.
The ROWSKIPS and ROWCOUNT fields take their value from the Default Value in the field details. If the default value is empty, the parameter isn't used.
Field types
In the SAP Read Table plugin, import parameters are always single fields.
Export parameters (the result of the query) are always a table. The field details show the field Length and the Key check box.
Key fields
The key fields decide how table rows are grouped into migration entries. All rows with the same values in the key fields form one entry, and the target plugins process each entry once.
- After you click Connect, the key fields of the SAP table are marked as keys. A K marker on the field shows that it is a key.
- To change this, open the field details and select or clear Key.
- If no key field is selected, every selected column is used as a key. VeloXm asks you to confirm this when you analyze the project.
- If Group Entries is selected, the key fields are ignored and all rows form one entry.
Run-time behavior
- When you analyze the project, the plugin reads the table and counts the migration entries. If no rows match the selection, VeloXm shows the notification "Data not found in table ... with selected criteria."
- The plugin reads only the export fields you selected. If the fields together are longer than 512 characters (the row limit of
RFC_READ_TABLE), the plugin splits them into several calls and joins the results. Field lengths are calculated from the field offsets in SAP so that column boundaries are correct. - Negative numbers are read correctly.
- The table is read twice: once when you analyze the project, to count the entries, and again when the run starts. All rows are read into memory, grouped by the key fields, and then processed in parallel according to the multithreading setting.
- With Use Paging, the plugin reads pages of the given size, starting at the ROWSKIPS value, until a page returns fewer rows than the page size.
- With Group Entries selected and Check Float fields cleared, the analysis only checks that at least one row matches the selection.
- Values are passed as SAP stores them (internal format): for example, dates as
YYYYMMDDand numbers with leading zeros where the field has them. Trailing spaces are removed. In numeric fields, the minus sign is moved to the front of the value. - When a target plugin reads a table of values from an entry, it receives one row for each distinct combination of the mapped fields.
- If you pause and continue a run, entries that were already processed are skipped.
Error messages
| Message | Cause |
|---|---|
| Table "..." is not available | RFC_READ_TABLE returned TABLE_NOT_AVAILABLE: the table doesn't exist in the SAP system. |
| SAP Connector is not installed. | The SAP .NET Connector isn't installed on the computer. |
| Connect to SAP server. | The plugin isn't connected to SAP when you analyze the project. Click Connect first. |
| Select Export Fields. | No export field is selected. |
Log
The plugin adds two columns to the log:
| Column | Content |
|---|---|
| SAP Table Line | Number of the entry's first row in the result of the table read. |
| Table Key | Values of the key fields, separated by /. |
Simulation mode
The plugin reads the table in the same way in simulation mode, and passes the simulation flag to the target plugins. Log rows of a simulation run aren't saved to the load history.
Prerequisites
- SAP .NET Connector 3.0 (64-bit) installed on the computer.
- An SAP user that can call
RFC_READ_TABLEandDDIF_FIELDINFO_GETby RFC and has display authorization for the table (in a standard system, checked with the authorization objectsS_TABU_DISorS_TABU_NAM).