Download SAP Table Structures and Table Data Using This Code

  • by Fahim Ahmad, Senior ABAP and Workflow Consultant, Descon Engineering Limited
  • September 14, 2012
Use this code to download an SAP table structure, convert it into data types of the underlying database, and transfer table data with a large number of records. Use Object Linking and Embedding objects to concoct the database, create the table, and transfer data.

This cost-effective utility is used to transfer data from one or many tables in one session. The progress of the transfer of the structure and data is shown in the front end and a log is generated for the completion of each step.

In addition to table data, this utility also transfers the metadata of tables. If there is no table on the database side it creates a table in the database and then starts the transfer of data from SAP tables to the underlying database. This program gets the metadata of tables from the SAP system using a function module. It converts this metadata into proper SQL statements to create a table in the database.

The data is then transported using SQL statements. Object Linking and Embedding (OLE) objects connect and execute the SQL statements. Log entries are generated during the process and can be viewed by browsing the log table in the database. This transported data can be used by BI systems to generate analytical reporting.

For a more complete explanation of how this code is developed, see Fahim Ahmad’s article, "Use This ABAP Program to Download SAP Table Data with the Structure of Tables."

Fahim Ahmad

Fahim Ahmad is a senior ABAP consultant for Descon Engineering Ltd. He has master’s degrees in statistics and computer science from the University of Punjab in Lahore, Pakistan. He has 10 years of experience as a software engineer. Fahim specializes in ABAP enhancements and reports, workflow, RFC programming, interfacing, OLE, and SAP Web services configuration and development.

See more by this author


Comments

No comments have been submitted on this article. 


Please log in to post a comment.

To learn more about subscription access to premium content, click here.