Download and Upload of Table Data for SAP BTP ABAP Environment
This Git repository provides an utility to download and upload table data from one SAP BTP ABAP Environment (aka "Steampunk") system to another system. The code is compliant to ABAP Cloud and can also be used in SAP S/4HANA Cloud, public edition.
The utility consists of two http services (URLs), one to download data and the other one to upload data. A SAP UI5 web page is provided for both features.
The utility supports only custom-defined database tables, but not SAP-delivered database tables. All types of database tables are supported. Please consider the implications if you are upload data of client-independent tables, configuration or system tables.
You can specify one or more database tables for the download. A search-as-you-type feature is supported for the first table name. The xml format is used as file format for the download. The created files are only intended and optimized for the upload by the same utility. It is not posible to process the data with other tools.
When upload the data, you can specify whether the data should be appended only or whether the data in all tables to be uploaded should be deleted before the upload - which means to be replaced.
Please grant the authorizations for the utility carefully. Only the start authorization of the http services is checked. There is no further authorization check on table level. This utility is intended to be used by adminstators or key users only.
Prerequisites
Make sure to fulfill the following requirements:
- You have access to an SAP BTP ABAP Environment instance (see here or here for additional information).
- You have downloaded and installed ABAP Development Tools (ADT). Make sure to use the most recent version as indicated on the installation page.
- You have created an ABAP Cloud Project in ADT that allows you to access your SAP BTP ABAP Environment instance (see here for additional information). Your log-on language is English.
- You have installed the abapGit plug-in for ADT from the update site
http://eclipse.abapgit.org/updatesite/
.
Download
Use the abapGit plug-in to install the Download and Upload of Table Data by executing the following steps:
- Optional, but recommended if two different systems are involved: Open the Administrator's Fiori Launchpad and start the app Maintain Software Components. Create a new software component
ZDBTAB_DATA
of type Development. Press the button Clone which creates the software component and the stucture package with the same nameZDBTAB_DATA
in the respective ABAP system (see here for additional information). - In your ABAP cloud project, create the ABAP package
ZDBTAB_DOWN_AND_UPLOAD
(using the superpackageZDBTAB_DATA
) as the target package for the utility to be downloaded (leave the suggested values unchanged when following the steps in the package creation wizard). - To add the abapGit Repositories view to the ABAP perspective, click
Window
>Show View
>Other...
from the menu bar and chooseabapGit Repositories
. - In the abapGit Repositories view, click the
+
icon to clone an abapGit repository. - Enter the following URL of this repository:
https://github.com/frankjentsch/dbtab-down-and-upload.git
and choose Next. - Select the branch refs/heads/main and enter the newly created package
ZDBTAB_DOWN_AND_UPLOAD
as the target package and choose Next. - Create a new transport request that you only use for this utility installation (recommendation) and choose Finish to link the Git repository to your ABAP cloud project. The repository appears in the abapGit Repositories View with status Linked.
- Right-click on the new ABAP repository and choose
Pull ...
to start the cloning of the repository content. Note that this procedure may take a few seconds. - The first pull leads to import errors for SIA6 and SIA7 objects due to the import sequence. Please repeat the pull once again. If the second pull has finished, the status is set to
Pulled successfully
. Refresh theabapGit Repositories
view to see the progress of the import. Then refresh your project tree.
As a result of the installation procedure above, the ABAP system creates an inactive version of all artifacts for the utility. Further manual steps are required to finally use the utility. Please refer to the next section.
Configuration
To activate all development objects from the ZDBTAB_DOWN_AND_UPLOAD
package:
- Click the mass-activation icon (Activate inactive ABAP development objects) in the toolbar.
- In the dialog that appears, select all development objects in the transport request (that you created for the utility installation) and choose
Activate
.
To setup the required authorizations for testing in the development system:
- Please open the http service
ZDBTAB_DOWNLOAD
in the editor and press the buttonPublish Locally
. - Please open the http service
ZDBTAB_UPLOAD
in the editor and press the buttonPublish Locally
.
To test the utility in the development system:
- At this point in time, the utility can be tested. Please open the respective http service
ZDBTAB_DOWNLOAD
/ZDBTAB_UPLOAD
in the editor. - Press the
URL
link to open the browser with download or upload feature.
To transport the finally completed utility:
- Release the task and transport via ADT view
Transport Organizer
. As a result of this release, the developed objects of that software component are written into a hidden Git repository. - Import the utility in a subsequent system: Open the Administrator's Fiori Launchpad of the subsequent system and start the app Maintain Software Components. Press the button Clone which imports all the released objects into the subsequent system.
To setup the authorization in a subsequent system:
- Open the Administrator's Fiori Launchpad of the subsequent system and start the app Maintain Business Roles. Press
New
and enter Business Role IDZDBTAB_DOWNLOAD
, Business Role DescriptionDownload Table Data
. Navigate to sectionAssigned Business Catalogs
and addZDBTAB_DOWNLOAD
. Navigate to sectionAssigned Business Users
and add all users to be able to download data. - Repeat these steps for a second Business Role with Business Role ID
ZDBTAB_UPLOAD
, Business Role DescriptionUpload Table Data
. Navigate to sectionAssigned Business Catalogs
and addZDBTAB_UPLOAD
. Navigate to sectionAssigned Business Users
and add all users to be able to upload data.
To show the created logs:
- Open class
ZCL_DBTAB_APPLOG_SHOW
. - Press
F9
to run the class as console application. As a result, all logs about the download and upload activities are shown as console output of the last 24 hours. In order to show this data, the current user needs to have the respective S_APPL_LOG authorizations as explained above in the section to create the IAM Apps.
How to obtain support
This project is provided "as-is": there is no guarantee that raised issues will be answered or addressed in future releases.