This week at work our SAP system was "dumping"[1] 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[2] 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 ...?). Considering it was written by an experienced ABAP developer, I do wonder at the quality of ABAP code used throughout industry world wide.