Hi Kunal,
you have to write code in PBO. If you want to grey out an input field as soon you select F4 value, you need write below logic.
** In PBO
Module HIDE_INPUT.
** inside module
IF MARA-MATNR IS NOT INITIAL. (Screen input field name)
LOOP AT SCREEN.
IF SCREEN-NAME CS 'MARA-MATNR'. "(Screen input field name)
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Thanks
Chittoor