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
- Using this attached Excel macro based document generator, provide the saved XML file and generate the mapping document
- 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.
Thanks Murali - Good tip to know - came handy for me today while I was documenting a complex CV - Cheers
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 ?
Will send u a message
Good morning @Murali Balreddy
I would like to know a bit more about supported version of Excel and the XML parser.
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.
Very useful utility ! Thanks for sharing it. 🙂
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 .
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?
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 for sharing! Worked for me on Excel 2016 (got an error when trying to open in Excel 2010).
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.
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
This is so handy. thanks for sharing.
This is Very useful. Thanks for sharing.
The link to download the document generator is not working ...
Here is the file