Get the deepest text of chained exceptions
If you’re not already using ABAP Objects you’re chicken.
If you use them, I do hope you’re following the best practice of using class exceptions.
And if you’re using class exceptions you better understand the best way of using them, particularly the advantages of chaining them.
This said, here’s what brings us here today. In the post about chained exceptions I showed a way to get the text of the deepest exception in the chain by using a WHILE loop: