SAP interview question

Determine longest consecutive substring in a string