In the next part of the SAP HANA Academy’s Live 4 ERP Agile Solutions in SAP HANA Cloud Platform course, Tahir Hussain (Bob) Babar shows how to create four target tables in the SAP HANA Cloud Platform. The data definition language (DDL) of the four tables is based on SAP ERP objects and is then used by SAP HANA Cloud Integration for Data Services (HCI-DS) as a target datastore for where the ERP data will be loaded in the SAP HANA Cloud Platform. Watch Bob’s tutorial video below.

Screen Shot 2015-06-11 at 1.23.35 PM.png

(1:00 – 3:45) Creating the Empty Tables in Eclipse

In the Live4 schema that’s connected to the SAP HANA Cloud Platform system Bob’s tables folder is currently empty. You must have the DDL defined before you create a table with HCI-DS. Therefore you will have to run a few commands within Eclipse or the SAP HANA Web-based IDE.

Bob launches a SQL console and then opens the Live4 ERP Agility code repository on GitHub. This GitHub page is free to access from any browser and will be regularly updated as the course continues to be released.

In the scripts folder open the HCIDS_ERP_SDI.sql file and select to view its raw format. Copy the entire file and then paste it into the SQL console in Eclipse. This DDL will create four tables in total and includes a series of comments that describe each of the columns.

Screen Shot 2015-06-11 at 1.35.02 PM.png

The four tables this DDL we will create are:

  1. 1) VBAP Table (sales transactions)
  2. 2) T001W Table (list of store locations)
  3. 3) MAKT Table (list of product descriptions)
  4. 4) MARD Table (list of product inventories)

Execute the script and then refresh the Tables folder to see the four tables.

Screen Shot 2015-06-11 at 1.35.42 PM.png

(3:45- 4:35) Importing the Tables with HCI-DS

Back in the DATASTORES tab of your HCI-DS account with your recently created datastore selected (Bob’s named MyHCP) click on the Import Objects button. Now scroll down the list of objects, find and select the four recently created Live4 tables and click Import. Now the DDL definition for those four tables is in HCI-DS.

Screen Shot 2015-06-11 at 1.49.00 PM.png

(4:35 – 6:45) Granting the Insert, Update and Delete Rights

These tables will be written to and that essentially means that we’re going to extract data from the ERP system and load it into the SAP HANA Cloud Platform. We must allocate certain rights in order to load the data into the SAP HANA Cloud Platform.

Back in Eclipse, Bob opens a new SQL console and pastes in the two lines of code from the HCIDS_Grants.sql file located in the Live4 GitHub repository.

First separate the two commands, as they must be run individually. The first line will select the role name from our list of granted roles where the role name starts with neo. Execute that statement to get the role name beginning with neo.

Screen Shot 2015-06-11 at 1.50.36 PM.png

Copy that role name and then paste it inside the “???” in the second line of code. Executing this line grants the insert, update and delete functions to the neo role inside the Live4 schema. Now you won’t have any authorization issues when loading the data with HCI-DS.

Screen Shot 2015-06-11 at 1.51.43 PM.png

Reminder the SAP HANA Academy will build, for free, an ad hoc SAP ERP Agile Solution for any SAP ERP or Business Suite customer. Please contact us hanaacademy@sap.com to inquire.


For further tutorial videos about the ERP Agility with HCP course please view this playlist.


SAP HANA Academy – Over 1,000 free tutorial videos on SAP HANA, Analytics and the SAP HANA Cloud Platform.


Follow us on Twitter @saphanaacademy.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply