This is the code that seems to be working. I have not done any ABL before so I have no idea what I am doing and this could be done better I am sure....
DEFINE QUERY GetAll FOR UD100 .
OPEN QUERY GetAll FOR EACH UD100 BY INT(UD100.Key1).
Get last GetAll.
FOR EACH TTUD100:
ASSIGN TTUD100.KEY1 = STRING(INTEGER(UD100.Key1) + 1 ).
END.