Application Development and Automation 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: 
Read only

selection screen design

sreeramkumar_madisetty
Active Contributor
0 Likes
808

Hi Folks

When i was selected the Radio Button, certain check boxes have to be enabled and when i select another radio button, certain radio buttons have to be enabled.

Can anyone please provide me the sample code.

Points are assured.

Regards,

Sreeram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
788

Hi,

You have to do the validations in the event 'At Selection-Screen'

Loop at screen.

If screen-name = 'RB1'.

if rb1 = 'X'.

chb-active = 0.

else.

chb-active = 1.

endif.

endif.

modify screen.

endloop.

Note : rb1 - Radio button

chb - checkbox

Reward if it is helpful

Regards,

Sangeetha.A

7 REPLIES 7
Read only

Former Member
Read only

Former Member
0 Likes
789

Hi,

You have to do the validations in the event 'At Selection-Screen'

Loop at screen.

If screen-name = 'RB1'.

if rb1 = 'X'.

chb-active = 0.

else.

chb-active = 1.

endif.

endif.

modify screen.

endloop.

Note : rb1 - Radio button

chb - checkbox

Reward if it is helpful

Regards,

Sangeetha.A

Read only

Former Member
0 Likes
788

Just Copy paste:

PARAMETERS: p_rb1 RADIOBUTTON GROUP rb1 USER-COMMAND uc,

p_rb2 RADIOBUTTON GROUP rb1.

PARAMETERS: p_cb1 AS CHECKBOX,

p_cb2 AS CHECKBOX.

AT SELECTION-SCREEN OUTPUT.

IF p_rb1 = 'X'.

LOOP AT SCREEN.

IF screen-name = 'P_CB1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

IF p_rb2 = 'X'.

LOOP AT SCREEN.

IF screen-name = 'P_CB2'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Regards,

Ravi

Read only

Former Member
0 Likes
788

Hi ,

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'ABC'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

You can use above code to grey out.

Reward if Useful.

Thanks,

USR

Read only

Former Member
0 Likes
788

Hi sree ram,

This program is similar to your requiment........

Just copy and paste execute..... Analyse the code.

I am sure it is definetely helpful for you.

TABLES: spfli,

sflight.

selection-screen begin of block b1 with frame.

PARAMETERS:

rad1 RADIOBUTTON GROUP rad USER-COMMAND radio.

SELECT-OPTIONS:

s_carrid FOR spfli-carrid MODIF ID sl1,

s_connid FOR spfli-connid MODIF ID sl1.

PARAMETERS:

rad2 RADIOBUTTON GROUP rad.

SELECT-OPTIONS:

s_fldate FOR sflight-fldate MODIF ID sl2.

selection-screen end of block b1.

DATA:

w_min TYPE spfli-carrid,

w_max TYPE spfli-carrid.

----


  • Internal table to hold spfli information. *

----


DATA:

t_spfli LIKE

STANDARD TABLE

OF spfli.

----


  • Internal table to hold sflight information. *

----


DATA:

t_sflight LIKE

STANDARD TABLE

OF sflight.

----


  • INITIALIZATION EVENT. *

----


INITIALIZATION.

PERFORM init.

----


  • AT SELECTION-SCREEN OUTPUT EVENT. *

----


AT SELECTION-SCREEN OUTPUT.

PERFORM radio_check.

----


  • AT SELECTION-SCREEN EVENT. *

----


AT SELECTION-SCREEN.

IF s_fldate-low IS INITIAL AND rad2 = 'X' AND sy-ucomm = 'ONLI'.

MESSAGE 'make an entry in all required fields' TYPE 'E'.

ENDIF.

----


  • START-OF-SELECTION EVENT. *

----


START-OF-SELECTION.

PERFORM select_info.

----


  • END-OF-SELECTION EVENT. *

----


END-OF-SELECTION.

PERFORM display_info.

&----


*& Form radio_check

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM radio_check .

LOOP AT SCREEN.

IF rad1 = 'X'.

IF screen-group1 = 'SL2'.

screen-active = 0.

  • ELSEIF screen-group1 = 'SL1'.

  • screen-active = 1.

ENDIF.

ELSEIF rad2 = 'X'.

IF screen-group1 = 'SL2'.

screen-active = 1.

  • ELSEIF screen-group1 = 'SL1'.

  • screen-active = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDFORM. " radio_check

&----


*& Form select_info

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM select_info .

IF rad1 = 'X'.

SELECT carrid

connid

cityfrom

cityto

FROM spfli

INTO CORRESPONDING FIELDS OF TABLE t_spfli

WHERE carrid IN s_carrid

AND connid IN s_connid.

ELSE.

SELECT carrid

connid

fldate

FROM sflight

INTO CORRESPONDING FIELDS OF TABLE t_sflight

WHERE carrid IN s_carrid

AND connid IN s_connid

AND fldate IN s_fldate.

ENDIF.

ENDFORM. " select_info

&----


*& Form display_info

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM display_info .

IF rad1 = 'X'.

LOOP AT t_spfli INTO spfli.

WRITE:/ spfli-carrid,

10 spfli-connid,

20 spfli-cityfrom,

35 spfli-cityto.

ENDLOOP.

ELSE.

LOOP AT t_sflight INTO sflight.

WRITE:/ sflight-carrid,

10 sflight-connid,

20 sflight-fldate.

ENDLOOP.

ENDIF.

ENDFORM. " display_info

&----


*& Form init

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM init .

rad1 = 'X'.

SELECT MIN( carrid )

MAX( carrid )

FROM spfli

INTO (w_min,w_max).

s_carrid-low = w_min.

s_carrid-high = w_max.

APPEND s_carrid.

<b>

Reward all helpful answers.......</b>

Regards,

V.Raghavender.

Read only

former_member673464
Active Contributor
0 Likes
788

parameters:

rad1 RADIOBUTTON GROUP rad,

rad2 RADIOBUTTON GROUP rad.

PARAMETERS check1 AS CHECKBOX modif id 'GR1',

CHECK2 AS CHECKBOX MODIF ID 'GR2'.

LOOP AT SCREEN.

if screen-group1 = 'GR1'.

IF RAD1 = 'X'.

screen-active = 0.

modify screen.

ENDIF.

endif.

if screen-group1 = 'GR2'.

IF RAD2 = 'X'.

screen-active = 0.

modify screen.

ENDIF.

endif.

ENDLOOP.

REGARDS,

VEERESH

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
788

It's answered