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: 

radiobuttons

Former Member
0 Kudos
98

HI,

In selectio screen, i have 2 radio buttons.

if iam selecting the second one,

i have to get 4 more radiobuttons in the screen.

if first is selected all 4 should be in invisible.

please reply as soon as possible.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos
78

Look at this sample

* First radiobutton group, user-command to assure immediate reaction
  PARAMETERS: a01 RADIOBUTTON GROUP one USER-COMMAND one DEFAULT 'X',
              a02 RADIOBUTTON GROUP one.

* Second group, with MODIF ID for easiest identification
  PARAMETERS: b01 RADIOBUTTON GROUP two MODIF ID two DEFAULT 'X',
              b02 RADIOBUTTON GROUP two MODIF ID two,
              b03 RADIOBUTTON GROUP two MODIF ID two,
              b04 RADIOBUTTON GROUP two MODIF ID two.


* Hide / Display
  AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      CASE screen-group1.
*       If group two, hide or display
        WHEN 'TWO'.
          IF a01 = 'X'.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
      ENDCASE.
      MODIFY SCREEN.
    ENDLOOP.

Regards

4 REPLIES 4

Former Member
0 Kudos
78

Hi,

You can find there a sample code in order to inactive some parameters.

PARAMETERS : p_aff_to RADIOBUTTON GROUP r02 DEFAULT 'X'.

PARAMETERS : p_aff_ec RADIOBUTTON GROUP r02. " Affichage par ecarts

PARAMETERS : p_ec_inf TYPE INT4.
PARAMETERS : p_ec_sup TYPE INT4.

AT SELECTION-SCREEN OUTPUT.

  DATA : l_active  type c.

* Affichage total => on masque les écarts
  IF NOT p_aff_to IS INITIAL.
    l_active = '0'.
  ELSE.
* Affichage des ecarts
    l_active = '1'.
  ENDIF.

* Modification des deux champs d'écart
  LOOP AT SCREEN.

    IF   screen-name = 'P_EC_INF'
      OR screen-name = 'P_EC_SUP'.

      screen-input    = l_active
      MODIFY screen.

    ENDIF.
  ENDLOOP.

Regards,

Mathieu

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Kudos
78

Hi,


PARAMETERS: rad1 as RADIOBUTTON GROUP xxx DEFUALT 'X' MODIF ID aa.
PARAMETERS: rad2 as RADIOBUTTON GROUP xxx MODIF ID aa.

PARAMETERS: rad3 as RADIOBUTTON GROUP yyy MODIF ID bb.
PARAMETERS: rad4 as RADIOBUTTON GROUP yyy MODIF ID bb.
PARAMETERS: rad5 as RADIOBUTTON GROUP yyy MODIF ID bb.
PARAMETERS: rad6 as RADIOBUTTON GROUP yyy MODIF ID bb.

AT SELECTION-SCREEN OUTOUT.

if rad1 = 'X'.
LOOP AT SCREEN.
if screen-group1 = 'BB'.
screen-active = 0.
modify screen.
endif.
ENDLOOP.
elseif rad2 = 'X'.
LOOP AT SCREEN.
if screen-group1 = 'BB'.
screen-active = 1.
modify screen.
endif.
ENDLOOP.
endif.

Regards,

Sesh

anversha_s
Active Contributor
0 Kudos
78

hi,

<u><i>Chk this sample code.</i></u>

1.PARAMETERS: R_1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND ABC,
               R_2  RADIOBUTTON GROUP G1 .
 
2.AT SELECTION-SCREEN OUTPUT.
  IF R_1 = 'X'.
    PERFORM DISABLE_1.
  ENDIF.
  IF R_2 = 'X'.
    PERFORM DISABLE_2.
  ENDIF.
 
3.FORM DISABLE_1 .
  LOOP AT SCREEN.
    CASE SCREEN-NAME.
      WHEN 'P_EXIDV'.
        SCREEN-INPUT = 0.
        CLEAR P_EXIDV.
        MODIFY SCREEN.
    ENDCASE.
  ENDLOOP.
ENDFORM.                    " disable_1

Like that u have to write code for disable_2.

Regards

Anversha

Rgds

Anversha

raymond_giuseppi
Active Contributor
0 Kudos
79

Look at this sample

* First radiobutton group, user-command to assure immediate reaction
  PARAMETERS: a01 RADIOBUTTON GROUP one USER-COMMAND one DEFAULT 'X',
              a02 RADIOBUTTON GROUP one.

* Second group, with MODIF ID for easiest identification
  PARAMETERS: b01 RADIOBUTTON GROUP two MODIF ID two DEFAULT 'X',
              b02 RADIOBUTTON GROUP two MODIF ID two,
              b03 RADIOBUTTON GROUP two MODIF ID two,
              b04 RADIOBUTTON GROUP two MODIF ID two.


* Hide / Display
  AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      CASE screen-group1.
*       If group two, hide or display
        WHEN 'TWO'.
          IF a01 = 'X'.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
      ENDCASE.
      MODIFY SCREEN.
    ENDLOOP.

Regards