Export HANA Database Table Data using SAP HANA Studio
ABAP developers working on SAP HANA databases can export data in HANA database tables easily using Export task on SAP HANA Studio. This SAP tutorial shows the steps to follow in SAP HANA Studio export wizard in order to export table data from SAP HANA database into a .csv file stored in client's local file directory.
Here is the steps for SAP programmers to export table data from SAP HANA database table into text file in csv format into users computer.
Launch SAP HANA Studio and switch to SAP HANA Development perspective to connect to target SAP HANA database under Systems window.
For this SAP HANA tutorial, I preferred to use SAP MAKT table.
If the ABAP developer double-clicks on the table name from the list shown on left, table column details can be displayed as follows.
I want to export MAKT SAP HANA database table data in csv format to a text file using following method.
On Systems windows where the tables are listed under selected schema for MAKT database table, right click on table name.
Then on context menu, choose option "Export"
The export wizard screen will be displayed which enables ABAP developer and SAP professionals to choose the catalog objects to export. Since we have started the wizard by selecting the MAKT table, it is already in the "Selected Catalog Objects" list.
The next screen of the export wizard provides additional options for ABAP programmers to customize the export.
Column table format includes CSV and Binary options.
If the user wants to export table data then the "Export Catalog Objects Including data" checkbox must be marked.
Export catalog objects to current client selection option enables the SAP user to export HANA table data into its computer and select the file folder in Directory textbox.
When "Finish" button is pressed, data is exported in a file with CSV format into local file directory selected.
Following screenshot shows the file structure created for table data export created by SAP HANA Studio.
For the tutorial sample; high level MAKT folder is the directory I selected for data export, SALES_EMEA is the schema name of the selected table, and MAKT is the table name.
Data.csv file does not include a header line where column names are included.
As seen below, the string values are all encapsulated with "quotes" to avoid problems of possible comma including text values.
The encoding used for data csv file is "UTF-8"
Above screenshot shows some lines from the exported data included within csv file created by SAP HANA Studio export wizard.