Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Changing the Selection Screen on the selection of a radio button

Hi experts,

I am stuck with a situation here.

I have a selection screen with 2 blocks.

The first block contains 5 radio buttons.

The second block contains 7 select options fields.

Now i want to show different select options when the user selects different radio buttons.

For example, when the user selects radio button 1, select options 1, 2, 3, 4, and 5 should be shown.

When the user selects radio button2, select options 3, 4, 5, 6, and 7 should be shown.

How do i go about implementing this????

I guess i need to do the coding in event "AT SELECTION-SCREEN OUTPUT".

Should i use MODIF ID????

Please help.

Points will be awarded.

Thanks and Regards

Gaurav Kumar Raghav

Tags:
replied

Hi Gaurav,

Look in the sample code.

TABLES : MARA,SSCRFIELDS.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS : RB1 RADIOBUTTON GROUP RB1 USER-COMMAND COM MODIF ID R11,
             RB2 RADIOBUTTON GROUP RB1 MODIF ID R12,
             RB3 RADIOBUTTON GROUP RB1 MODIF ID R13.
SELECTION-SCREEN : END OF BLOCK B1.

SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR MODIF ID R11,
                S_MTART FOR MARA-MTART MODIF ID R12,
                S_MBRSH FOR MARA-MBRSH MODIF ID R13.
SELECTION-SCREEN : END OF BLOCK B2.


AT SELECTION-SCREEN OUTPUT.
IF RB1 = 'X'.
LOOP AT SCREEN.
 IF SCREEN-GROUP1 = 'R11'.
   SCREEN-INTENSIFIED = '1'.
   SCREEN-ACTIVE      = 1.
   SCREEN-DISPLAY_3D  = '1'.
  MODIFY SCREEN.
 ENDIF.
 IF SCREEN-GROUP1 = 'R12'.
  SCREEN-INTENSIFIED = '0'.
  SCREEN-ACTIVE      = 0.
  SCREEN-DISPLAY_3D  = '0'.
  MODIFY SCREEN.
 ENDIF.

 IF SCREEN-GROUP1 = 'R13'.
  SCREEN-INTENSIFIED = '0'.
  SCREEN-ACTIVE      = 0.
  SCREEN-DISPLAY_3D  = '0'.
  MODIFY SCREEN.
 ENDIF.

ENDLOOP.
ENDIF.

1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question