Skip to Content

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


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

To report this post you need to login first.


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

    1. Murali Balreddy 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.

  1. 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

    1. Andrew Jabbitt


      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,



Leave a Reply