Skip to Content
Author's profile photo Murali Balreddy

Tips – SAP HANA Auto-Documentation – Excel Way

SAP provides an Auto Documentation tool in the HANA Studio to document the models in a PDF.

Sometimes this auto-generated PDF does not provide all the information in a useful format or in a customized way to prepare a document like a mapping document.

 

 

 

This blog briefly explains how to generate a detailed mapping document using the XML data and an Excel-Macro based generator.

 

In HANA studio, every calculation view comes with its generated XML.

 

  • Display the View XML by selecting from the toolbar

 

 

 

  • Save the View XML in a .XML format

 

 

 

 

 

  • An Excel-based mapping document is generated with individual worksheets for different information (eg: Semantic Layer, Filters, Joins, Unions, Ranks etc)

 

 

 

 

This document generator generates a document for a 30+ node view in under 30 seconds.

 

Example of a generated document

 

 

Alternatively, If you are skeptical about using the macro, open the XML in Excel as a read-only workbook

and  utilize the XML data in a pivot table, to generate different reports

 

 

Hope this tool and tip helps you.

 

Note: Sometimes the XML file has to be edited. When using star joins, I have noticed the XML is not well qualified like “” for schema name as shown in this example XML line

<entity>#//”SAP_HANA_DEMO”.sap.hana.democontent.epm.data::SO.Header</entity>

Removing the double quotes from the schema name “SAP_HANA_DEMO” enables Excel to process the XML.

Assigned Tags

      14 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Rama Shankar
      Rama Shankar

       

      Thanks Murali - Good tip to know - came handy for me today while I was documenting a complex CV - Cheers

      Author's profile photo Amaury Van Espen
      Amaury Van Espen

      Good afternoon Murali Balreddy

      I'm facing an issue with your file, it returns error number 5 or another one is "faux.xlsx" does not exist

      Could you tell me a bit more about the macro ?

      Thank you

      Amaury

      Author's profile photo Murali Balreddy
      Murali Balreddy
      Blog Post Author

      Will send u a message

      Author's profile photo Amaury Van Espen
      Amaury Van Espen

      Good morning @Murali Balreddy

      I would like to know a bit more about supported version of Excel and the XML parser.

      Thank you

      Amaury

      Author's profile photo Murali Balreddy
      Murali Balreddy
      Blog Post Author

      Hi, I did the coding and testing in Excel 2016 and its inbuilt parser. Didn't get a chance to test it in other versions. hopefully, it runs fine on other Excel versions.

      Author's profile photo Geetanjali Deshpande
      Geetanjali Deshpande

      Very useful utility ! Thanks for sharing it. 🙂

      Author's profile photo Sateesh Kumar B
      Sateesh Kumar B

      Hi Murali ,

      Useful document ,good work .

      I’m facing an issue with the file, it returns  Runtime error 5 ,Invalid Procedure call or argument .

      Generated "XML data of hana view page ", all other are blank.

      Code is password protected to debug . Can you help to resolve .

       

      Thank you

      Sateesh B

      Author's profile photo Andrew Jabbitt
      Andrew Jabbitt

      Hi https://people.sap.com/murali.balreddy2,

      I'd like to use this, but I get the same error.

      I also see that you have password protected the Macros, can you share the password so I can debug myself?

      Many thanks,

      Andrew

      Author's profile photo sreenivas tadicherla
      sreenivas tadicherla

      Hi Murali,

      I am using Excel 2016 as well but still i am getting same error.

      You did a great job but with this error this can't be used .

      Please share the password for vbx macro so i can debug and fix the error .

      I am suspecting that it is referring something from your local machine.

      Thanks,

      Sreenivas

      Author's profile photo Christopher Günther
      Christopher Günther

      Hi Murali,

      thanks for sharing! Worked for me on Excel 2016 (got an error when trying to open in Excel 2010).

      Regards Christopher.

      Author's profile photo Stephan Leibiger
      Stephan Leibiger

      Hi Murali,

      Thanks for the great tool. I get to a view "Run-time Error '1004' - Method 'Open' of object

      'Workbooks' failed" for others everything goes without a problem. I use Excel 2016.

      Can you help me.

      Regards Stephan

      Author's profile photo Amaury Van Espen
      Amaury Van Espen

      Hi Stephan

       

      After debugging XML

      (open XML in Excel file to map it), I've found an "extra" character in the file  => "

      it has caused a general error in Open method

      You should try as well

      Best

      Amaury

      Author's profile photo Jyothirmayee A
      Jyothirmayee A

      Hi Murali,

      This is so handy. thanks for sharing.

      Thanks,

      Jothi

      Author's profile photo Joseph Yeruva
      Joseph Yeruva

      This is Very useful. Thanks for sharing.