SAP interview question

Implement undo and redo.