This week at work our SAP system was "dumping" on a routine night time batch job. After some digging into the code I figured out what was happening. The code was logically flawed - actually it was quite poorly written and not only was it flawed, it wasn't very efficient either.
I created a patch and ran the tested data that caused the dump, and low and behold it ran perfectly. Annoyingly we couldn't create the dump with other test data on the original code, so I'm not sure what the upstream conditions are that cause the dump but I can prevent them now.
I've not been using SAP's ABAP language for long but the error in the original code is quite striking and it's repeated three times in quick succession throughout that block of code (cut'n'paste