Wednesday, 21 September 2016

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

Finding SAP Dependent object / Catalog object form HANA System is always a challenge. Once we used to do some change in Information model, before doing so, we should have analyzed the dependent object list. Here is a Graphical way, how you can found the dependent object from Active_ObjectCrossRef table.

This will help you to understand the foot print of your model and other affecting areas. Moreover, it is required before modifying Modeling object or information model. To know, which all are affected object of this change. If you required, the list of models and tables for a particular Top information model you can use this model to identify those stuff.

To Get Free HANA Clout system please have a look in this Video

Free SAP HANA Server Access in Cloud 

Solutions: 

There is a Table name as Active_ObjectCrossRef which used to keep track of all the dependent object and it is updated by HANA system. This is one of the most used table to build up the relation among views.
 
Here I have developed A Model which will give you the list of views till Level 5. I could not able to achieve recursive functionality so this model can give you dependent object unto Level 5. If we need to find more level some more block need to be added. Please have a look into following Model.
 
I Have Created a Model Hierarchy like this.

SAP HANA Certifications, SAP HANA Materials


1 ) Get a projection and add Active_ObjectCrossRef in table in the Projection.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View


2) Now look in to the complete model and then I will describe how to achieve it.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View


3 ) Take this information in 2 different projection and do a self join as shown here.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View


4) Join To_Object of the First projection to Form_Object of Second one. Here You will get Upto Level 3 Dependent objects.


5) Add 1 more join and and join with the base projection as shown here.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View


6) Now you can get the object Upto 4th Level.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

7) To keep it uniform, Please take 2 projection and rename the fields as

To_Object_Name_1 -->> To_Object_Name
To_Object_Name_2 -->> To_Object_Name_1

8) Then Do an Union to get the uniform Structure.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

9) Now you can do one more left outer join to get upto Level 5 Objects

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

10) Joining Logic as follows.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

11) Break the out put of the join into 3 different project and repeat Union to get the list of object.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

12) Union Details.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

13 ) Add an Aggregation note to get the unique row. You can refer the following link to understand the same. 

14) Get the output for a single View. I am running query as bellow.

SELECT * FROM "_SYS_BIC"."Demo/CA_GET_DEPENDENT_004"
    where "FROM_OBJECT_NAME" = 'CA_CALCULATION_005'  
  
15) Output is as follows.

How to Get Dependent Object List (Models & Tables) of a Model using Graphical Calculation View

Source: scn.sap.com

No comments:

Post a Comment