Hello community,
I create different ways to export SAP table content via ABAP to SQLite databases.
The first way is via a COM library, called SQLite3COM. With this library you can direct execute SQL commands in SQLite databases on the presentation server. On this way you can export the data. The second way is via SQL statements in a text file. You can read this text file with sqlite.exe and create your SQLite database on this way. To use this ways comfortable from ABAP I programmed a class with three public methods:
- GetTable2SQLite - to export the table direct via the COM library to an SQLite database.
- GetTable2File - to export the table indirect via an SQL command file, which can be imported to an SQLite database.
- AltGetTable2File - the same as GetTable2File, but with another method to create the file on the presentation server.
Here the class definition:
Methods GetTable2SQLite Importing TableName Type String WhereClause Type String DbName Type String UseExistingDb Type i OverWriteExistingTable Type i. Methods GetTable2File Importing TableName Type String WhereClause Type String FileName Type String SQLiteSQL Type i OverWriteConfirm Type c.
You must name the table, an optional where clause, the name of the database or file and two flags to control the processing.
You can download the full documented library and the ABAP sources here.
Also you need the SQLite library and program from here.
You can find a video description here: SQLite3COM - YouTube
Enjoy the possibility to export SAP tables into SQLite databases. With this way you can use the content easily on different platforms and in different environments,
Cheers
Stefan