Hi,
I am facing a few hicups in my code, I needed to make certain FIelds as updateable and some as non updateable but the problem is that this is not happening. Can you tell me where i am going wrong. I have written this code in my PBO at the end. The Code should enable FIELD KAWRT for the 1st Line and disable the rest, while for the others it should enable Field KWERT. what is the problem in my code.
LOOP AT itab.
IF sy-tabix = 1.
LOOP AT SCREEN.
IF screen-name = 'ITAB-KSCHL' OR
screen-name = 'ITAB-KBETR' OR
screen-name = 'ITAB-KWERT'.
screen-input = '0'.
screen-output = '0'.
MODIFY SCREEN.
ELSEIF screen-name = 'ITAB-KAWRT'.
screen-input = '1'.
screen-output = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
READ TABLE i_kschl WITH KEY kschl = itab-kschl.
IF sy-subrc = 0.
LOOP AT SCREEN.
IF screen-name = 'ITAB-KSCHL' OR
screen-name = 'ITAB-KAWRT' OR
screen-name = 'ITAB-KBETR'.
screen-input = '0'.
screen-output = '0'.
MODIFY SCREEN.
ELSEIF screen-name = 'ITAB-KWERT'.
screen-input = '1'.
screen-output = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.