Transfer data packets with ReadTable
This sample shows how to use the data packaging mechanism of the ReadTable class.
About
Table extractions have a limit of table rows that can be extracted at once (between 100,000 and 1,000,000 depending on the system). To avoid this limitation, the ReadTable class offers a packaging mechanism to extract a huge number of table rows.
Note
The SAP standard function module RFC_READ_TABLE is not suited for mass data extraction.
Set Up Data Packaging
Follow the steps below to set up data packaging:
- Set the ReadTable property
PackageSize
to a value greater than 0 to enable packaging. - Set the ReadTable property
RaiseIncomingPackageEvent
to true to raise an eventIncomingPackage
when a new data packet is processed. - Implement the
IncomingPackage
event to process each data packet. The packet is provided as a Datatable object.
Output:
Processing data package with 10000 rows
Processing data package with 10000 rows
Processing data package with 10000 rows
Processing data package with 10000 rows
Processing data package with 10000 rows
Processing data package with 10000 rows
Processing data package with 10000 rows
Processing data package with 798 rows
Press enter to exit
Last update: January 2, 2024