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

at selection- screen output issue

Former Member
0 Likes
570

Hi,

I have a issue regarding at selection-screen output event with radio buttons,

Fields are like,

Block B1

RB1

Block B2

RB2

field 1 (Check box)

field 2 (Check box)

User can select one radio button at a time. If the user clicks on radio button RB1 then fields under Block B2 will be disabled. If user click on RB2 field 1 and fields 2 will be input enabled. Could you please give the solution asap

Note: Radio buttons are in different selection screen blocks.

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
549

Check this code -

*SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.

*PARAMETERS:

*

*Pi1 TYPE C RADIOBUTTON GROUP G1 DEFAULT 'X',

*Pi2 TYPE CHAR25,

*Pi3 TYPE C RADIOBUTTON GROUP G1,

*Pi4 TYPE CHAR25.

*SELECTION-SCREEN END OF BLOCK B.

*PARAMETERS check AS CHECKBOX.

*

*PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.

*

*SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

*PARAMETERS: ip1(10) TYPE c,

  • ip2(10) TYPE c,

  • ip3(10) TYPE c.

*SELECTION-SCREEN END OF BLOCK b1.

*

*SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.

*PARAMETERS: ip4(10) TYPE c MODIF ID bl2,

  • ip5(10) TYPE c MODIF ID bl2,

  • ip6(10) TYPE c MODIF ID bl2.

*SELECTION-SCREEN END OF BLOCK b2.

*

*AT SELECTION-SCREEN OUTPUT.

  • LOOP AT SCREEN.

  • IF show_all <> 'X' AND

  • screen-group1 = 'BL2'.

  • screen-active = '0'.

  • ENDIF.

  • MODIFY SCREEN.

  • ENDLOOP.

Regards,

Amit Khare

reward all helpful replies.

Read only

0 Likes
549

Radio buttons should be in different frames

Read only

Former Member
0 Likes
549

Hi,

Check this sample code. I hope the radio buttons are in one block and the two fields are in second block.

SELECTION-SCREEN : BEGIN OF BLOCK rb1 WITH FRAME.

PARAMETERS : rb1 RADIOBUTTON GROUP rad1 USER-COMMAND cmd DEFAULT 'X',

rb2 RADIOBUTTON GROUP rad1.

SELECTION-SCREEN : END OF BLOCK rb1.

SELECTION-SCREEN : BEGIN OF BLOCK rb2 WITH FRAME.

PARAMETERS : fld1 TYPE char20,

fld2 TYPE char20.

SELECTION-SCREEN : END OF BLOCK rb2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'FLD1' AND rb1 = 'X'.

screen-input = 0.

ENDIF.

IF screen-name = 'FLD2' AND rb1 = 'X'.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

-SatyaPriya

Read only

0 Likes
549

Radio buttons should be in different frames