Ok, just a very quick note today with loads of screen shots and only a few lines of text.
The core statement is (for the ones with little time at their avail) is:
With a current BASIS SP (my test system is on SP 9) you can create Plan Visualization from within NetWeaver and display it later in SAP HANA Studio.
And here’s how 🙂 , but first something else I really like:
With NetWeaver 7.3 there is now the option to store stack traces together with the SQL calls in the SQL Performance trace (ST05).
Why is this really useful?
Think of well structured programs that encapsulate all DB access into a nice DB access ABAP class, like we have it with SAP BW.
If you review a SQL trace of such a program you may easily find, which SQL statement runs the longest, but finding the ABAP application logic that actually triggered it could become tricky.
Every time you click on ‘Display Call Position in ABAP programs’ you will always only end up in the DB access class.
Typically you now would have to set a break point in this class and wait until “your” statement comes along… not very efficient.
Today, you just activate the stack collection in the ‘Performance trace‘ menu of ST05 like this:
After that, you find the stack trace collection is active:
Now, run the trace as usually and display it:
Select the trace line you want to know the call stack for and click on the ‘stack’ icon marked in the picture above.
Then you’ll get a dialog window, containing the ABAP call stack that was active when this specific line of the trace had been written out:
If this wouldn’t be good enough, you can even double-click on the stack level you are interested in to navigate to the ABAP source:
Pretty cool, isn’t it?
Ok, but now back to the Plan Visualization…
Back in the trace list, you have to click on ‘EXPLAIN…‘ icon to display the explain plan for the statement of interest:
Clicking onto the obscure ‘Execution Trace‘ button, will trigger the creation of a XML trace file, that contains all information required for the Plan Visualization function. In fact it’s the same file format that SAP HANA studio uses to store PlanViz files in the file system.
Once finished you get a message box:
As the file name ‘xml.plv‘ indicates, it really is just a text file containing XML tags:
Now, to actually get the graphical output, all you have to to is to open a SAP HANA studio and to drag and drop the ‘xml.plv‘ file into it.
Alternatively you can use the ‘File’ -> ‘File open…’ option.
You don’t even have to be connected to the system to get the graphic output, as all information are in the XML file.
This means: no problems with permissions on DB level, no system access required.
Whatever you say, I like it! 🙂
But I’m pretty sure that you will agree…
There you go, now you know!
Thanks for taking your time again.