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

Former Member
0 Kudos
101

Hi Folks,

Question 1:

-


I have a selection screen in such a way,

i have 2 selection blocks.

in 1st selection block i have 2 radio buttons .and

in 2nd selection block i have 2 select-options.

If i select 1st radiobutton in first selection box then

1st select option in second selection box shud be grayed out and vice versa...

How can i achieve this???

Question 2:

-


I have a selection screen in such a way, i have 2 selection blocks.

First selection block contains 2 radio buttons of group rg1.

2nd selection block contains 5 radio buttons of group rg2.

If i select 1st radio button then first 2 radiobuttons in 2nd selection block shud be grayed .

How can i acheive this functionality??

Points will be rewarded in full....

Thanks in advance...

5 REPLIES 5

Former Member
0 Kudos
65

Hi,

Check the below code...

selection-screen : begin of block blk1.
parameters : p_button1 radiobutton group rbg1 default 'X' user-command usr.
parameters : p_button2 radiobutton group rbg1.
selection-screen : end of blk1.

selection-screen : begin of block blk2.
select-options : s_date1 for sy-datum modif id bt2.
select-options : s_Date2 for sy-datum modif id bt1.
selection-screen : end of block blk2.

at selection-screen.

if sy-ucomm = 'USR'.
   IF p_button1 = 'X'.
       g_group = 'BT1'.
   ELSE.
      G_GROUP = 'BT2'.
   ENDIF.
ENDIF.
      
at selection-screen output.
  loop at screen.
      if screen-group1 = G_GROUP.
        SCREEN-OUTPUT = 0.
        MODIFY SCREEN.
      ENDIF.
  ENDLOOP.

Similarly you can do for the other selection-screen also. Assign modif IDs to the parameters/select options/radio buttons. It will be easy for you to disable them.

Edited by: Pavan Mulukutla on May 21, 2008 7:31 AM

Former Member
0 Kudos
65

hi there...

radio buttons and check buttons hav a property caled input. simply set it as ' ' when u want it to be grayed ....

for simplicity, open ur program in se80 and there, fo to screen painter and make the required changes.

do reward if helpful or get back with further queries....

Former Member
0 Kudos
65

Hi

Just check this code...

And at selection screen output.

{

&----


*

*& Form selection_output

&----


  • Selection Screen Output

----


FORM selection_output.

LOOP AT SCREEN.

**-If Custom Display radio-button is chosen

IF screen-group1 = 'MD1'.

IF p_custom is initial.

screen-input = 0.

screen-invisible = 1.

  • screen-REQUIRED = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDLOOP.

ENDFORM. " selection_output

}

Use accordingly....

Former Member
0 Kudos
65

Hi

go through thsese two codes:

first one

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : pdhplant RADIOBUTTON GROUP rb1 USER-COMMAND rad1 DEFAULT 'X',

ppplant RADIOBUTTON GROUP rb1 ." OTHERS

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS : offspec RADIOBUTTON GROUP rb2 MODIF ID oth ,

linespec RADIOBUTTON GROUP rb2 MODIF ID oth,

line1 RADIOBUTTON GROUP rb2 MODIF ID oth,

line2 RADIOBUTTON GROUP rb2 DEFAULT 'X' MODIF ID oth.

SELECTION-SCREEN END OF BLOCK b2.

*----


*AT SELECTION-SCREEN OUTPUT

*----


AT SELECTION-SCREEN OUTPUT.

IF pdhplant EQ 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'OTH'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

second one

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.

PARAMETER: p_radio1 RADIOBUTTON GROUP grp1 USER-COMMAND ucomm1 DEFAULT

'X',

p_radio2 RADIOBUTTON GROUP grp1 .

SELECTION-SCREEN: END OF BLOCK b1.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME.

PARAMETER: p_radio3 RADIOBUTTON GROUP grp2 ,

p_radio4 RADIOBUTTON GROUP grp2.

SELECTION-SCREEN: END OF BLOCK b2.

AT SELECTION-SCREEN.

IF p_radio1 = 'X'.

CLEAR p_radio4.

p_radio3 = 'X'.

ELSE.

IF p_radio2 = 'X'.

CLEAR p_radio3.

p_radio4 = 'X'.

ENDIF.

ENDIF.

Former Member
0 Kudos
65

Hi,

Solution 1:

tables:pa0001.

selection-screen begin of block blk1 with frame.

PARAMETERS: p_r1 RADIOBUTTON GROUP grp1 default 'X' user-command rusr,

p_r2 RADIOBUTTON GROUP grp1.

selection-screen end of block blk1.

selection-screen begin of block blk2 with frame.

select-options: s_pernr for pa0001-pernr modif id abc,

s_ename for pa0001-ename.

selection-screen end of block blk2.

at selection-screen output.

loop at screen.

if p_r1 = 'X'.

if screen-group1 = 'ABC'.

screen-input = 0.

else.

screen-input = 1.

endif.

endif.

modify screen.

endloop.

Solution 2:

tables:pa0001.

selection-screen begin of block blk1 with frame.

PARAMETERS: p_r1 RADIOBUTTON GROUP grp1 default 'X' user-command rusr,

p_r2 RADIOBUTTON GROUP grp1.

selection-screen end of block blk1.

selection-screen begin of block blk2 with frame.

PARAMETERS: p_r3 RADIOBUTTON GROUP grp2 modif id abc,

p_r4 RADIOBUTTON GROUP grp2 modif id abc,

p_r5 RADIOBUTTON GROUP grp2 modif id abc,

p_r6 RADIOBUTTON GROUP grp2 modif id abc,

p_r7 RADIOBUTTON GROUP grp2 modif id abc.

.

selection-screen end of block blk2.

at selection-screen output.

loop at screen.

if p_r1 = 'X'.

if screen-group1 = 'ABC'.

screen-input = 0.

else.

screen-input = 1.

endif.

endif.

modify screen.

endloop.