Skip to Content
0
Jul 30, 2012 at 11:15 AM

How to disable button once click

148 Views

Hi,

I have made a dialog program, in which, on the screen I have to push button, PB1 and PB2, my requirement is Once the user click on PB1 then that button I want to disable (inactive mode) or invisible till user click on PB2, I have written the code as below but it is not working,

module USER_COMMAND_0100 input.

OK_CODE = SY-UCOMM.

CASE OK_CODE.

WHEN 'PB2'.

CLEAR : VBELN,WA_VBAP,IT_VBAP[],WA_VBAP_RFC,IT_VBAP_RFC,MESSAGE.

WHEN 'PB1'.

PERFORM GET_SO_LINE.


ENDCASE.

endmodule. " USER_COMMAND_0100 INPUT

now when the OK_CODE is PB1 in that I have below code

**********

LOOP AT SCREEN.
IF SCREEN-NAME = 'PB1'.
SCREEN-ACTIVE = '0'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'VBELN'.
SCREEN-ACTIVE = '0'.
SCREEN-INPUT = '0'.
* SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

*****************

but with this code it is not working.

regards,

zafar