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: Radio button

Former Member
0 Likes
701

HI,

I want to create a report with the selection screen.

In the selection screen. there are two radio button under which there are two fields in each of it. Like Below

Radio Button 1

Field 1

Field 2

Radio Button 2

Field 3

Field 4

if the User select the first radio button then Field 1 & 2 should be available for input and field 3 & 4 in the other radio button should not be available for input. which means it should be grayed out. Vice versa.

Where do i need to modify the screen parameter for the fields?..

Please suggest me a way forward

Regards

Suresh Kumar

HI,

I want to create a report with the selection screen.

In the selection screen. there are two radio button under which there are two fields in each of it. Like Below

Radio Button 1

Field 1

Field 2

Radio Button 2

Field 3

Field 4

if the User select the first radio button then Field 1 & 2 should be available for input and field 3 & 4 in the other radio button should not be available for input. which means it should be grayed out. Vice versa.

Where do i need to modify the screen parameter for the fields?..

Please suggest me a way forward

Regards

Suresh Kumar

5 REPLIES 5
Read only

Former Member
0 Likes
652

check this.

you need to handle this in at selection screen output.

REPORT zforum12 message-id vij.

PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .

*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.


selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.




*-------------------------------------------
at selection-screen output.


IF R1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'DEF'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

IF R2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC' .
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

regards,

vijay.

Read only

Former Member
0 Likes
652
*&---------------------------------------------------------------------*
*& Report  YCHATEST                                                    *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

REPORT  YCHATEST                                .
DATA : FLAG(1) value 1,
      FLAG1(1) value 0.

PARAMETERS : APPLSER  RADIOBUTTON GROUP  R1 USER-COMMAND R,
             PRESER   RADIOBUTTON GROUP  R1,
             P_ASER(25) MODIF ID AS,
             P_PSER(25) MODIF ID PS.

AT SELECTION-SCREEN.
  IF SY-UCOMM = 'R'.
      IF APPLSER = 'X'.
        FLAG = '1'.
        FLAG1 = '0'.
      ELSEIF PRESER = 'X'.
        FLAG = '0'.
        FLAG1 = '1'.
      ENDIF.
  ENDIF.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'AS'.
      SCREEN-INPUT = FLAG.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
  LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'PS'.
      SCREEN-INPUT = FLAG1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
Read only

Former Member
0 Likes
652

change screen-active = '0' to screen-input = '0'. in the code of my previous post

and execute .

this will make it to grey mode .

REPORT zforum12 message-id vij.


PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
PARAMETERS : R2 RADIOBUTTON GROUP RG .

*-------------------------------------------
selection-screen begin of block b1 with frame.
parameters : a(10) type c modif id abc.
parameters : b(10) type c modif id abc.
selection-screen end of block b1.

selection-screen begin of block b2 with frame.
parameters : c(40) type c modif id def.
parameters : d(20) type c modif id def.
selection-screen end of block b2.
*-------------------------------------------
at selection-screen output.


IF R1 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'DEF'.
screen-input = '0'.    "over here
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

IF R2 = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC' .
screen-input = '0'.  "and this
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

regards

vijay

Read only

Former Member
0 Likes
652

Report ZTEST1.

DATA : FLAG(1) value 1,

FLAG1(1) value 0.

selection-screen begin of block b1 with frame.

PARAMETERS : APPLSER RADIOBUTTON GROUP R1 USER-COMMAND R,

P_ASER(25) MODIF ID AS,

P_ASER1(25) MODIF ID AS.

*selection-screen end of block b1.

SELECTION-SCREEN COMMENT /1(30) comm2.

*selection-screen begin of block b2.

parameters : PRESER RADIOBUTTON GROUP R1,

P_PSER(25) MODIF ID PS,

P_PSER1(25) MODIF ID PS.

selection-screen end of block b1.

AT SELECTION-SCREEN.

IF SY-UCOMM = 'R'.

IF APPLSER = 'X'.

FLAG = '1'.

FLAG1 = '0'.

ELSEIF PRESER = 'X'.

FLAG = '0'.

FLAG1 = '1'.

ENDIF.

ENDIF.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'AS'.

SCREEN-INPUT = FLAG.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'PS'.

SCREEN-INPUT = FLAG1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Message was edited by:

Sriram Ponna

Read only

Former Member
0 Likes
652

Hi Suresh,

Check the below code for u r requirement.

<b>REPORT zex31 .

PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X',

field1(10) modif id md1,

field2(10) modif id md1.

PARAMETERS : R2 RADIOBUTTON GROUP RG ,

field3(10) modif id md2,

field4(10) modif id md2.

AT SELECTION-SCREEN output.

if r1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'MD1'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

elseif r2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'MD2'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

endif.

start-of-selection.</b>