Monday, 23 November 2020

Understanding the development process of calculation view in HANA 2.0 XSA environment using Web IDE

In this blog I will discuss about the development lifecycle process and steps of develop an calculation view in HANA 2.0 XSA environment using Web IDE.

In HANA 1.0 till SPS12 we have developed Calculation view with the catalog object tables from a schema also the operation available for development like Join, Union is very less.

In HANA 2.0 XSA environment using web IDE we will get more operation option like NonEqui Join, Graph, Rank, Rank, Hierarchy Function, Anonymization etc. which are not  available in HANA studio. Those option any body can easily adopt and use in their view development. I will not discuss this in my blog.

My objective of this blog is to discuss the part which is the critical one, i.e. using data or table from same HDI container, from different or cross HDI container or from XS classic schema. When I started my development activity initially 2 year before in XSA environment using web IDE this cross contains access troubles me lot. I want to create a smoother path to the the developer or modeler to avoid mistakes and optimize time using my blog which is the main goal.

Please find the process below –

## Prerequisite Steps:

This prerequisite will help you to develop calculation view in optimize way without any mistake.

1. Create an MTA project : First we need to create an MTA project in our workspace using Web IDE.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

2. Create a DB Module : Create a DB module inside the MTA project.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

3. Identify the tables: Identify all the tables one by one.

4. Tables exists in the same HDI container :  If all the identified tables exists in the same HDI container then no action needed.

5. Tables exists in the Different  HDI container : Add the Source HDI container as a service to the target database where we will create the Calculation view.

Understanding the development process of calculation view in HANA 2.0 XSA environment using Web IDE

Then create a .hdbgrants configuration file inside your MTA project under DB module src package. The code should be similar like the below in which you need to changed the role name as per the role mentioned in the .hdbrole configuration file of the required table’s source HDI container.

Understanding the development process of calculation view in HANA 2.0 XSA environment using Web IDE

In this scenario Role1 is the role mentioned in the .hdbrole file in the source table HDI container. You need to access the source table by matching the role of the grant conf. file and the .hdbrole file of the source HDI .Let draw a diagram to understand the scenario-

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

inside the .hdbgrants we  put # before role i.e. roles” : [“EPM_XXX::Role1#”] which means the synonym’s source database object is in an XS advanced application’s HDI container.  When creating Calculation view, we will choose external data source and create synonym’s then you have to put the Object Owner Role and Application User Role need to be put. This is the reason if you do this prerequisite step then it will easy for you to develop.

6. Table exists in a XS classic schema : Add the Source XS Classic schema as a service to the target database where we will create the Calculation view.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

Similar to the step and architecture . we need to create .hdbgrants file in the target HDI (Where creating calculation view) but we do not put # after the role to indicate that the table is from XS classic schema not from an HDI container.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

## Main Steps to create Calculation view –


1. Create a calculation view : Create a view from the wizard.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

2. Now we are in the workspace pane and added  join node.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

3. Add data source. then the popup will be open from there select the external service to choose the source. This step will apply both for Different HDI and XS Classic schema scenario.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

4. The chick on the create synonym.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

5. In this step we have to provide the Object Owner Role and Application User Role which we have create in the .hdbgrants file in the prerequisite steps. click Finish.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

6. Tow table from different source will appear in the join node. Then add the joins as per condition and push the column  in the output of the semantics one by one which is common with HANA Studio development which I am not discussion in details.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

7. Save and build the view.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

8. Go to the database container and data preview the CV. you can see the data.

SAP HANA Tutorials and Material, SAP HANA Certifications, SAP HANA Learning, SAP HANA Study Materials, SAP HANA Exam Prep, SAP HANA Prep

No comments:

Post a Comment