‎2006 Aug 21 1:21 PM
Hi friends,
I need to display two pushbuttons and two parameters on the selection screen, when I click one push button I have to display one parameter and hide the another parameter,same with the second pushbutton.Please give me some sample code.
sathish.
‎2006 Aug 21 1:28 PM
hi satish,
case sy-ucomm.
when 1.
loop at screen.
if screen-name = 'field1'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
when 2.
loop at screen.
if screen-name = 'field2'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
endcase.
‎2006 Aug 21 1:23 PM
hi satish,
case sy-ucomm.
when 1.
loop at screen.
if screen-name = 'field1'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
when 2.
loop at screen.
if screen-name = 'field2'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
endcase.
hope this helps,
do reward if it helps,
‎2006 Aug 21 1:26 PM
Hello,
Try this code:
DATA: W_COMM LIKE SY-UCOMM.
SELECTION-SCREEN PUSHBUTTON 1(10) P_1 USER-COMMAND PB1.
SELECTION-SCREEN PUSHBUTTON 21(10) P_2 USER-COMMAND PB2.
PARAMETERS: P_f1(10) MODIF ID GP1,
P_f2(10) MODIF ID GP2.
INITIALIZATION.
P_1 = 'But1'.
P_2 = 'but2'.
w_comm = 'PB1'.
AT SELECTION-SCREEN.
W_COMM = SY-UCOMM.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF W_COMM = 'PB1'.
IF SCREEN-GROUP1 = 'GP2'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
IF W_COMM = 'PB2'.
IF SCREEN-GROUP1 = 'GP1'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
regards,
Naimesh
‎2006 Aug 21 1:28 PM
hi satish,
case sy-ucomm.
when 1.
loop at screen.
if screen-name = 'field1'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
when 2.
loop at screen.
if screen-name = 'field2'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
endcase.
‎2006 Aug 21 1:31 PM
hi satish,
case sy-ucomm.
when 1.
loop at screen.
if screen-name = 'field1'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
when 2.
loop at screen.
if screen-name = 'field2'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
endcase.