Yes, I meant at first. This happens only for at first and at last.
It does not happen for the at new component event.
This is what happens in the at first and at last event.
Between the at first and endat, or between the at last and endat, the component values of the work area row will not contain any data. The default key fields are filled with * (asterisks) and the numeric fields are set to zeros. The endat restores the contents to the values they had prior to entering the at. Changes to the work area within at and endat are lost.
To resolve this, just move the contents to another work area before the event at first or at last as had mentioned above. It will definitely work. If not share your code.
LOOP AT it_collect.
wa_collect = it_collect.
atfirst.
write :/ 'At first'.
write :/ wa_collect-bukrs, wa_collect-belnr, wa_collect-gjahr.
endat.
atlast.
write :/ 'At last'.
write :/ wa_collect-bukrs, wa_collect-belnr, wa_collect-gjahr.
endat.
endloop.