You have a trial developer account but still don’t know how to import/export a Delivery Unit? Then you are on the right page!
In this scenario you import a SAP HANA Interactive Education (SHINE) Delivery Unit (DU) from the web, make some small modifications in the code, and export the DU again.
To do that, you need to use the SAP HANA Multitenant Database Containers (MDC) feature and create a tenant database. If you haven’t created a tenant database on trial landscape yet, then you should first read this blog.
Are you back? Cool, so after creating the tenant database, follow these steps:
Add and Configure a Cloud System
- Install SAP HANA Tools for your Eclipse.
- Go to your Eclipse > Window > Perspective > Open Perspective and then choose SAP HANA Administration Console.
- In the Systems view, just right-click on the white field and choose Add Cloud System.
- Now, you are on the account information page and you have to enter your developer account details and then choose Next.
If you are confused about the account name and user name, you can go to SAP HANA Cloud Platform Cockpit and there you can see your account name on the tile and if you click on it, then in the URL. The user name is the same name, just without the “trial” part.
- Choose your tenant database, which you’ve already created and enter the database user name SYSTEM and password you specified when you created this database. Then choose Finish.
Now your Cloud System is added and you can see it right there:
Download SHINE DU & Manage Roles
- Go to GitHub-SHINE and download the SHINE Delivery Unit. Just click on Clone or download and choose Download ZIP. Don’t forget to export the zip file.
- Create another database user.
Go to your SAP HANA Cloud Platform Cockpit, then Persistence > Databases & Schemas and open your tenant database. Then click on SAP HANA Cockpit and enter your SYSTEM database user name and password.
- From the SAP HANA Database Administration page, choose Manage Roles and Users.
- From the Users context menu, choose New User.
- Enter a username, for example, SHINE_DEV, specify a password and assign the following roles to this user:
- Save the changes (after Save, the PUBLIC role is automatically added, so I didn’t forget to write it 🙂 ).
- Assign the following privilege to this user in the Object Privileges tab:
- Select EXECUTE and save again.
Import the Delivery Unit Using SAP HANA Web-based Development Workbench
- Log out from the SAP HANA Database Administration and log in again with your SHINE_DEV user.
After you type your new username (SHINE_DEV) and password, you have to change this password.
- Choose HANA Application Lifecycle Management > Delivery Units.
- Choose Import and then browse to the unzipped Delivery Unit you downloaded from GitHub. Locate the HCO_DEMOCONTENT_11.1.tgz archive and choose Open. Then, choose Import. Save the changes.
- Go to the SAP HANA Cockpit, log on with SHINE_DEV user and assign these roles::
Import the Delivery Unit Using Eclipse IDE
- Open Eclipse and switch to the SAP HANA Development Console perspective.
- Open the Systems view and double-click on your tenant database to start it.
- Open the Project Explorer view, right-click on the white field and then choose Import > Import > SAP HANA Content > Delivery Unit and choose Next.
- Select your tenant database and choose Next.
- Select the Client radio button and browse to the HCO_DEMOCONTENT_11.1.tgz archive and choose Open. Then, choose Finish.
- You can check that the import is in status Running.
Note: In the end, the status should be completed successfully. Even if it is completed with errors, that shouldn’t be a problem. The Delivery Unit is still imported.
- Refresh the Delivery Unit in HANA Application Lifecycle Management to check that the HCO_DEMOCONTENT_11.1.tgz archive is there. This means that the SHINE application is successfully imported.
- Go to the SAP HANA Cockpit, log on with the SHINE_DEV user and assign these roles and
save the changes:
Edit the Code and Run the Application
- Go to your SAP HANA Cloud Platform Cockpit, then Persistence > Database & Schemas and open your tenant database. Then click on SAP HANA Web-based Development Workbench.
- Select Editor and enter your SHINE_DEV database user name and password.
- Select sap > hana > democontent > epm > index.html
There we have an index file. With this file you can work on the code, change and save them again.
If you want to run your application, click the green run button above. Then you can see the Launchpad for your application.
Export the Delivery Unit
- Go to your SAP HANA Cloud Platform Cockpit, then Persistence > Database & Schemas and open your tenant database. Then click on SAP HANA Cockpit.
- Enter your SHINE_DEV database user name and password.
- Choose HANA Application Lifecycle Management > Delivery Units > HCO_DEMOCONTENT
- Select the Export button above.
- Choose your file format and select export.
That’s it! Now you know how to import and export the Delivery Unit. Thank you for reading this blog.