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: 

enable/disable - AT SELECTION-SCREEN OUTPUT

Former Member
0 Kudos

Hi! Friends,

plz help me.

i need to disable a radiobutton after processing it.

i have done it using AT SELECTION-SCREEN OUTPUT but this makes the two radiobuttons in disable mode.

selection-screen begin of block block1.

parameters: r1 radiobutton group rad1 MODIF ID RR1,

r2 radiobutton group rad1 MODIF ID RR2.

selection-screen end of block block1.

start-of-selection.

if r1 = 'X'.

write: /10 'R1 Selected'.

falg = 'R2'.

else.

write: /10 'R2 Selectred'.

endif.

<b> at selection-screen output.

if flag = 'R2'.

loop at screen.

if screen-group1 = 'RR1'.

screen-input = 0.

elseif screen-group1 = 'RR2'.

screen-input = 1.

endif.

modify screen.

clear screen.

endloop.

endif.</b>

it makes both r1 and r2 INPUT = 0.

but i have to make R1 alone INPUT = 0 after printing "R1 Selected" and after completing both the process both Radiobuttons has to be enabled.

Regards,

Nagulan.

3 REPLIES 3

Former Member
0 Kudos

Hi,

The AT SELECTION-SCREEN OUTPUT always gets triggered before START-OF-SELECTION.

Hence in ur code for AT SELECTION-SCREEN OUTPUT, the value of flag will not be filled and hence the issue.

Anyways, u have two radiobuttons only and if u disable one on the click of other, then how will u be able to select the other radiobutton if needed

Regards,

Himanshu.

gopi_narendra
Active Contributor
0 Kudos

Check this sample code.

PARAMETERS : p_c1 RADIOBUTTON GROUP r1 USER-COMMAND m1.
PARAMETERS : p_c2 RADIOBUTTON GROUP r1 DEFAULT 'X'.

PARAMETERS : p_1(10) TYPE c.
PARAMETERS : p_2(10) TYPE c.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF p_c1 = 'X'.
      IF screen-name = 'P_2'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ELSEIF p_c2 = 'X'.
      IF screen-name = 'P_1'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.

Regards

Gopi

Former Member
0 Kudos

Hi

try like this

selection-screen begin of block block1.

parameters: r1 radiobutton group rad1 MODIF ID RR1,

r2 radiobutton group rad1 MODIF ID RR2.

selection-screen end of block block1.

at selection-screen output.

loop at screen.

if screen-group1 = 'RR1'.

screen-input = 0.

modify screen.

clear screen.

endif.

if screen-group1 = 'RR2'.

screen-input = 1.

modify screen.

clear screen.

endif.

endloop.

start-of-selection.

if r1 = 'X'.

write: /10 'R1 Selected'.

falg = 'R2'.

else.

write: /10 'R2 Selectred'.

endif.