https://www.abapforum.com/forum/viewtopic.php?f=1&t=25570
Two variants to fulfill the following requirement:
A test result has to be entered in field RESULT.
If the result is OK then the field REASON is set to display only.
If the result is NOK (Not okay) then the user has to enter a reason in field REASON
Class main1 uses a listbox for field RESULT
Class main2 uses free text. After user presses TAB the value in RESULT will be analyzed. If value is OK then the column REASON will be set to display-only. Glitch: if the user already entered the value OK and changes it to NOK then the ALV grid does not recognize the focus change after TAB so that column REASON is not set back to editable