Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SELECTION SCREEN DISAPPEAR

Former Member
0 Kudos

Dear friends,

I have two radio buttons.When one radio button is highlighted, then a portion of screen should be made visible. If I highlight the other radio button then the portion should not made invisible.

Ex: Normal and Special are two radio buttons.

If I select Normal then the selection block 1 should appear.

If I select Special then the selection block 1 should disappear.

This is a very critical requirement.

Please help me in this regards.

4 REPLIES 4

venkata_ramisetti
Active Contributor
0 Kudos

Hi,

Write code like below.

selection-screen begin of block b2 with frame title text-010.

parameter: p_tstrun as checkbox default 'X' user-command file.

selection-screen begin of line.

selection-screen comment (22) text-016 for field p_file1

modif id fil.

selection-screen position 25.

parameters: p_file1 like rlgrap-filename modif id fil.

selection-screen position 73.

parameters: p_chfl1 as checkbox modif id fil.

selection-screen comment (7) text-017 for field p_chfl1

modif id fil.

selection-screen end of line.

selection-screen begin of line.

selection-screen comment (22) text-018 for field p_cfile

modif id fil.

selection-screen position 25.

parameters: p_cfile like rlgrap-filename modif id fil.

selection-screen position 73.

parameters: p_cnfl1 as checkbox modif id fil.

selection-screen comment (7) text-017 for field p_cnfl1

modif id fil.

selection-screen end of line.

parameters: p_pcfils radiobutton group src1 default 'X'

modif id fil. "PC file.

parameters: p_uxfils radiobutton group src1 modif id fil .

selection-screen end of block b2.

----


  • Event: At Selection-Selection output *

----


at selection-screen output.

loop at screen.

if not p_tstrun is initial and screen-group1 = 'FIL'.

screen-active = 0.

modify screen.

endif.

endloop.

Message was edited by: Ramakrishna Prasad

Former Member
0 Kudos

Hi Madhav,

You can use LOOP AT SCREEN in the AT SELECTION-SCREEN event & do that.check the fields in the structure SCREEN .

Former Member
0 Kudos

Hi Madhav,

You can use <b>'AT SELECTION-SCREEN OUTPUT'</b> to disable and make the block elements invisible based on the radio button clicked.

You loop on the screen, and based on screen-name, set the property

<b> screen-invisible = option_on.</b>

for the elements of the block.

Regards,

Raj

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can do something like this.



report zrich_0004 .

selection-screen begin of block b1 with frame title text-001 .
select-options: s_datum1 for sy-datum modif id bk1.
selection-screen end of block b1.

selection-screen begin of block b2 with frame title text-002.
select-options: s_datum2 for sy-datum modif id bk2.
selection-screen end of block b2.

parameters: p_check1 radiobutton group gr1 default 'X'
                                user-command check,
            p_check2 radiobutton group gr1.

at selection-screen output.


  if p_check1 = 'X'.
    loop at screen.
      if screen-group1 = 'BK2'.
        screen-invisible = '1'.
        screen-active = '0'.
        modify screen.
      endif.
    endloop.
  endif.

  if p_check2 = 'X'.
    loop at screen.
      if screen-group1 = 'BK1'.
        screen-invisible = '1'.
        screen-active = '0'.
        modify screen.
      endif.
    endloop.
  endif.

Regards,

Rich Heilman