Matthias - since you are using GUIDE, I think what is missing from your callback is the call to guidata so that the updated handles structure is saved and all other callbacks then receive the latest version of this structure. So your callback function would become
function okayButton(hObject, eventData, handles)
%record input data
handles.report.Serial = handles.popup.editSerial.String;
handles.report.name = handles.popup.editName.String;
handles.report.date = handles.popup.editDate.String;
guidata(hObject,handles); % save the updated structure
%close window
close(handles.popup.f);
As an aside, your above example code creates the okay button callback and passes an additional parameter handles. Please remember that this structure is a copy at the time that the callback is created. And so if handles is updated elsewhere, only the older copy of handles will be passed into the function. For scenarios like this, I would pass the handle to the figure (if using GUIDE) and then do the following
function okayButton(hObject, eventData, hFigure)
handles = guidata(hFigure);
% rest of code
guidata(hFigure,handles);
% etc.
It may be possible to just use hObject and so avoid the need to pass in hFigure as
function okayButton(hObject, eventData)
handles = guidata(hObject);
% etc.
since calling guidata on hObject should mean that the parent figure of hObject be used instead (please read the documentation for guidata for more details).
