Issue
User fails to extract a table from SAP via BOA RFC / SAP RFC / SAP TEXT, receiving the following error:
Error In Download:Refresh - External Process Exception in RFCDownload Class in %Install Path%\Web\UserArea\4f3346ca-235a-46bd-84d8-1d234b873a0c\Processes\DataGarageWeb.dll. Error Message: There was an internal issue when importing data
Typically this error is seen with large tables like BSEG and occurs when the RFC is abruptly ended by the SAP application for consuming too much memory or consuming a large amount of memory for too much time. Extremely large tables that require RFC, such as BSEG, commonly encounter this error.
Workaround
In general, users should reduce the total number of rows and/or the number of columns in their tables.
NOTE: In the specific case of BSEG, we recommend a more complex "batching" solution as described in the attached document.
The total number of rows is reduced via a filter entered into the Where Clause Override setting.
NOTE: This does not work with "SAP RFC".
NOTE: This clause is limited to 70 characters with "BOA RFC".
To add a filter to the Where Clause Override setting:
- Select Collect > Tables in the Navigation pane.
- Click the Vertical View icon for the table.
- Click the Advanced Settings tab.
- Click Edit.
- Enter the filter into the Where Clause Override text field.
NOTE: The format is {column} = {value} or {column} > {value}, etc. The filter will be appended to the WHERE clause used to SELECT data from the source system.
- Click Save.
The number of columns is reduced by completing the following steps in order.
- Turn off the Delete Target Table On Build option on the Target Source record.
- Delete columns from the View Design page on the Vertical View of the Table record.
- Remove those columns from the registered SQL Queries.
- Drop the table from the target SQL database.
- Build the package once more.
To turn off the Delete Target Table On Build option on the Target Source record
- Click Collect in the Navigation pane.
- Select the Target in the Parent pane.
- Click the Vertical View icon for the Target Source in the Child pane.
- Click the Advanced Settings tab.
- Click Edit.
- Uncheck the Delete Target Table On Build checkbox.
- Click Save.
To delete columns from the View Design page:
- Select Collect > Tables in the Navigation pane.
- Click the Vertical View icon for the table.
- Click the General Information tab.
- Click the View Design icon.
- Click the Column Count icon.
- Click the Trashcan icon for the columns you want to delete.
To remove columns from the registered SQL Queries:
- Select Collect > Tables in the Navigation pane.
- Click the Vertical View icon for the table.
- Click the General Information tab.
- Click the View Design icon.
- Click the SQL Command icon.
- Click the Pencil icon for the SQL command.
- Update the SQL command.
- Click Save.
If the download still fails after reducing the rows and columns as far as the business requirements will allow, then you could split it into 2 downloads.
- The first download would retrieve the primary key columns and half of the remaining columns (that are necessary).
- The second download would retrieve the primary key columns and the rest of the columns.
- Finally, a post-rule on the second download would join the 2 partial tables in the target db (on the primary key columns) and insert the result into the full table, which would have all the necessary columns.