On_Select userexit in widget- and edit-menus/button-areas or On_Event userexit in widget-state or in query-mode of mask-edit state.
It is a pre-condition for the record scan that the database sort criterion was set for the previous query.
Example:
In DataView system mask the userexit for the record scan buttons is defined below the vertical scroll bars.