05-10-2014 6:56 PM
Hi All,
i need to place a button in the selection screen..
i am able to place a button but not able to perform actions for Expand and collapse....
help me with the logic....
Regards,
Naresh.
05-10-2014 6:59 PM
Naresh, Can you be a little more detailed. What are you trying to expand and collapse?
05-10-2014 7:15 PM
Hi Vikram,
i have 8 radio buttons and one push button on my selection-screen.
by default, only one radio button should display...
if we click on pushbutton, it should expand and display all 8 radio buttons.
if we click second time, it should collapse and should display the 1st as default...
let me know if required more detailed...
Regards,
Naresh.
05-10-2014 8:17 PM
Try something like below:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: r1 RADIOBUTTON GROUP g1 USER-COMMAND uc1,
r2 RADIOBUTTON GROUP g1,
r3 RADIOBUTTON GROUP g1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (20) text-t01 USER-COMMAND exp.
SELECTION-SCREEN PUSHBUTTON (20) text-t02 USER-COMMAND col.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'EXP'.
LOOP AT SCREEN.
IF screen-name = 'R2' OR screen-name = 'R3'.
screen-active = '1'.
screen-output = '1'.
screen-invisible = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
WHEN 'COL'.
LOOP AT SCREEN.
IF screen-name = 'R2' OR screen-name = 'R3'.
screen-active = '0'.
screen-output = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDCASE.