SAP Interview Question

Determine longest consecutive substring in a string