‎2009 Dec 16 7:45 AM
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.
‎2009 Dec 16 7:50 AM
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'.
‎2009 Dec 16 7:50 AM
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'.
‎2009 Dec 16 7:51 AM
Hello
PARAMETERS: r_pre RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND com1, " <- 'X' must be in CAPITAL LETTERS
‎2009 Dec 16 9:25 AM
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.
‎2009 Dec 16 8:58 AM
Hi,
The parameters and value x must be in capital.
hope it helps.
‎2009 Dec 16 9:03 AM
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
‎2009 Dec 16 9:16 AM
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.
‎2009 Dec 16 11:42 AM
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