How to Debug Hierarchy Exit ZXRSAU04
In many BI projects it is necessary to create a custom hierarchy either by combining several logically linked characteristics, or by creating a subset hierarchy (diluted hierarchy according to business rules).
One of the ways to do it is to use an enhancement RSAP0001 with EXIT_SAPLRSAP_004 component in ZXRSAU04 include.
Here, after CASE/WHEN “8DATA_SOURCE_NAME”, we can place an ABAP coding which builds a hierarchy according to our logic (sure, important prerequisite is to generate export data source in RSA1 for the characteristic).
If our coding is OK and the hierarchy was created successfully – well done.
But if something was wrong (dump, errors, erroneous hierarchy structure) we would want to debug the coding.
Setting any breakpoint in ZXRSAU04 (hard-coded BREAK-POINT, using checkpoint, setting external breakpoint) doesn’t bring us to debugger session.
In this article I will explain one of the ways to debug ZXRSAU04 exit.
First, go to SE38 and show the report SAPLRSAP.
Then, go to include LRSAPF06 to the line 475.
In the line 475 we can see customer function ‘004’ is called – that is a call to EXIT_SAPLRSAP_004, so put an external breakpoint here.
It is possible that line number may vary depending on your system version, so, if there is no such call in the line 475, just try to search it around.
Then execute an info package which loads a custom hierarchy from “8DATA_SOURCE_NAME” (debugger still doesn’t called).
After the info package load was finished go to SM37, find your job (should have prefix BIREQU_*), check the line, write in transaction line JDBG and press enter.
Debugger will appear.
Press F8 and you will get to your breakpoint.
Finally, press F5 will get you into your ABAP coding.
Nice debugging 🙂