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

Regarding Enable and Disable fields

shadow
Participant
0 Likes
1,160

Hi All,

There is one requirement if i select one radio button in selection screen, the field should be active releted to that one ,another one is in disable mode.

could you check this code :

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: p_pre(100) TYPE c,

p_app(100) TYPE c.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: r_pre RADIOBUTTON GROUP g1 DEFAULT 'x' USER-COMMAND com1,

r_app RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .

IF r_pre = 'x' AND screen-name = 'p_app'.

screen-input = 0.

MODIFY SCREEN .

ELSEIF r_app = 'x' AND screen-name = 'p_pre'.

screen-input = 0.

MODIFY SCREEN .

ENDIF.

ENDLOOP.

i tried with this code but am getting reeeor like this: A parameter of a radio button group can only have 'x' as a default.

if i remove 'x' both fields are in Enabe mode. could you currect this one.p plz.

With Regards,

SHAIK.

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
929

make the changes below to your code.

PARAMETERS: r_pre RADIOBUTTON GROUP g1 USER-COMMAND COM1 DEFAULT 'X',

IF r_pre = 'X' AND screen-name = 'P_APP'.

ELSEIF r_app = 'X' AND screen-name = 'P_PRE'.

7 REPLIES 7
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
930

make the changes below to your code.

PARAMETERS: r_pre RADIOBUTTON GROUP g1 USER-COMMAND COM1 DEFAULT 'X',

IF r_pre = 'X' AND screen-name = 'P_APP'.

ELSEIF r_app = 'X' AND screen-name = 'P_PRE'.

Read only

Former Member
0 Likes
929

Hello


PARAMETERS: r_pre RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND com1, " <- 'X' must be in CAPITAL LETTERS

Read only

0 Likes
929

You can sort out this by using "modif id" additon to your selection fieldsi.e., you can group all the related fields using the modif id then write the logic accordingly.

Read only

Former Member
0 Likes
929

Hi,

The parameters and value x must be in capital.

hope it helps.

Read only

former_member404244
Active Contributor
0 Likes
929

hI,

Copy paste this code ....



SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: p_pre(100) TYPE c,
p_app(100) TYPE c.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: r_pre RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND com1,
r_app RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b2.


AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .
IF r_pre = 'X' AND screen-name = 'P_APP'.
screen-input = 0.
MODIFY SCREEN .
ELSEIF r_app = 'X' AND screen-name = 'P_PRE'.
screen-input = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.

Regards,

Nagaraj

Read only

Former Member
0 Likes
929

hi ,

try the below code.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: p_pre(100) TYPE c,

p_app(100) TYPE c.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: r_pre RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND com1,

r_app RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

if r_pre = 'X'.

LOOP AT SCREEN .

IF screen-name = 'P_APP'.

screen-input = 0.

MODIFY SCREEN .

ELSEIF r_app = 'X' AND screen-name = 'P_PRE'.

screen-input = 0.

MODIFY SCREEN .

ENDIF.

ENDLOOP.

endif.

Read only

Former Member
0 Likes
929

hi shaik,

your's finally code..............

changes.

1. default 'X' in caps.

2.parameters names are also in caps.........

else is fine......

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .

PARAMETERS: p_pre(100) TYPE c,
p_app(100) TYPE c.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002 .

PARAMETERS: r_pre RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND com1,
            r_app RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK b2.


AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN .
IF r_pre = 'X' AND screen-name = 'P_APP'.
screen-input = 0.
MODIFY SCREEN .
ELSEIF r_app = 'X' AND screen-name = 'P_PRE'.
screen-input = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.

Regards

Gaurav Khare