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

radiobuttons

Former Member
0 Likes
678

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
Read only

RaymondGiuseppi
Active Contributor
0 Likes
658

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

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.

4 REPLIES 4
Read only

Former Member
0 Likes
658

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

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
658

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

Read only

anversha_s
Active Contributor
0 Likes
658

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
659

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