Hi Thomas,
As far as I can judge there is nothing wrong with your coding. You are coming in the coding during debugging and the variable is processed as designed. However, I understood that you are using some kind of framework around the user-exit variables. I cannot judge if there might be a problem there, i.e. outside of this piece of coding / implementation. I can also not judge if there might be somewhere else (e.g. in another user-exit variable implementation), coding which wipes out everything done here.
I suggest to continue with debugging AFTER processing this coding. I suggest to put a break-point in the "generic implementation" where the framework is implemented to see if any problem can be observed outside of this implementation. Debug from an overview point-of-view, i.e.try to analyze this way how the variables table is filled before entering a subsequent user-exit variable (i.e. in the framework), at the beginning of the implementation coding and at the end of the implementation coding.
By the way, did you observe (similar) problems with other user-exit variables?
Best regards,
Sander