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

RE: Radio button

Former Member
0 Likes
483

Hi Expert,

I have created 3 radiobutton which i have to give to the user as shown in the below code

in the selection screen one radiobutton should appear remaining 2 radiobutton i dont want i.e Z1 i need can any one suggest me how to achieve this.

  SELECTION-SCREEN begin of block b1 with frame title text-001.
  PARAMETERS:  z1 RADIOBUTTON GROUP RG1,
              z2 radiobutton group RG1,
              z3 radiobutton group RG1.

SELECTION-SCREEN end of block b1.


if z1 = 'X'.
  CALL TRANSACTION 'ZTOP'.
ELSEIF Z2 = 'X'.
  CALL TRANSACTION 'ZB2'.
ELSEIF Z3 = 'X'.
  call TRANSACTION 'ZB3'.
  ENDIF.

Regards,

Addu

Moderator message : Not enough re-search before posting, discussion locked.

Message was edited by: Vinod Kumar

Hi Expert,

I have created 3 radiobutton which i have to give to the user as shown in the below code

in the selection screen one radiobutton should appear remaining 2 radiobutton i dont want i.e Z1 i need can any one suggest me how to achieve this.

  SELECTION-SCREEN begin of block b1 with frame title text-001.
  PARAMETERS:  z1 RADIOBUTTON GROUP RG1,
              z2 radiobutton group RG1,
              z3 radiobutton group RG1.

SELECTION-SCREEN end of block b1.


if z1 = 'X'.
  CALL TRANSACTION 'ZTOP'.
ELSEIF Z2 = 'X'.
  CALL TRANSACTION 'ZB2'.
ELSEIF Z3 = 'X'.
  call TRANSACTION 'ZB3'.
  ENDIF.

Regards,

Addu

Moderator message : Not enough re-search before posting, discussion locked.

Message was edited by: Vinod Kumar

2 REPLIES 2
Read only

former_member282968
Contributor
0 Likes
457

Hi,

Radio buttons work in the group b'se only one button can be selected in a group hence you must have morethan one radio button.If you need selection of only one why dont you use a check box instead?

With regards,

Read only

Former Member
0 Likes
457

Hi,

Follow the code..

SELECTION-SCREEN: BEGIN OF SCREEN 1100.

PARAMETERS: u1 RADIOBUTTON GROUP a USER-COMMAND sel  MODIF ID M1,

              u2 RADIOBUTTON GROUP A  MODIF ID M2 ,

              u3 RADIOBUTTON GROUP A  MODIF ID M3.

SELECTION-SCREEN: END OF SCREEN 1100.

CALL SCREEN 1100.

AT SELECTION-SCREEN OUTPUT.

    IF u1 = 'X'.

      LOOP AT SCREEN.

        IF SCREEN-GROUP1 = 'M1'.

          SCREEN-INVISIBLE = '0'.

          MODIFY SCREEN.

        elseIF SCREEN-GROUP1 = 'M2'.

          SCREEN-INVISIBLE = '1'.

          MODIFY SCREEN.

        elseIF SCREEN-GROUP1 = 'M3'.

          SCREEN-INVISIBLE = '1'.

          MODIFY SCREEN.

        ENDIF.

      ENDLOOP.

    ELSEIF u2 = 'X'.

      LOOP AT SCREEN.

        IF SCREEN-GROUP1 = 'M1'.

          SCREEN-INVISIBLE = '1'.

          MODIFY SCREEN.

        elseIF SCREEN-GROUP1 = 'M2'.

          SCREEN-INVISIBLE = '0'.

          MODIFY SCREEN.

        elseIF SCREEN-GROUP1 = 'M3'.

          SCREEN-INVISIBLE = '1'.

          MODIFY SCREEN.

        ENDIF.

      ENDLOOP.

    ELSEIF u3 = 'X'.

      LOOP AT SCREEN.

        IF SCREEN-GROUP1 = 'M1'.

          SCREEN-INVISIBLE = '1'.

          MODIFY SCREEN.

        elseIF SCREEN-GROUP1 = 'M2'.

          SCREEN-INVISIBLE = '1'.

          MODIFY SCREEN.

        elseIF SCREEN-GROUP1 = 'M3'.

          SCREEN-INVISIBLE = '0'.

          MODIFY SCREEN.

        ENDIF.

      ENDLOOP.

    ENDIF.

Regards,

Venkat.