Saturday 8 October 2016

SAP HANA Calculation View Columns Origin

After using so many Calc.Views that call another bunch of Calc.Views, etc. is really difficult to identify the correct origin (table.column/formula) of some field. This was causing some rework to understand all information needed and to correctly check and model the data

To solve that, I developed a really simple way to connect to HANA, get the dependency data and generates a JSON using Python and jQuery:


SAP HANA Calculation View Columns Origin

You can enter a Calculation View name and it will check all its dependencies generating a JSON with this information:

  <COLUMN NAME>: {
       "sourceType": <Shows "DATA_BASE_TABLE" for table columns and "formula" for Formulas>,
       "source": <Shows table name for table columns and the Calculation View Node for Formulas>,
       "column": <Shows column name for table columns and the formula for Formulas>,
       "source": <Shows schema name for table columns and the Calculation View Name for Formulas>
  }
}

You can check the code and how to used it at my GitHub: 



Source: scn.sap.com

No comments:

Post a Comment