‎2007 Nov 29 2:43 PM
hi all,
i have a requirement. i have two fields on the screen.
A- radio button.
B-parameter.
only wen i check the radio button the field B is to be ready for input, else greyed out.
all answers rewarded
‎2007 Nov 29 2:49 PM
Try this code:"
REPORT ZTEST_NP.
PARAMETERS: P_RD1 RADIOBUTTON GROUP RD1 USER-COMMAND USR1,
P_RD2 RADIOBUTTON GROUP RD1 DEFAULT 'X'.
PARAMETERS: P_DATE TYPE BKPF-BUDAT MODIF ID GP1.
AT SELECTION-SCREEN OUTPUT.
IF P_RD1 IS INITIAL.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'GP1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Regards,
Naimesh Patel
‎2007 Nov 29 2:47 PM
Hi,
follow the below code.
at selction-screen output.
if radio button A = 'X'.
loop at screen.
if screen -NAME = 'Parameter field name'.
screen-INPUT = 1.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen -NAME = 'Parameter field name'.
screen-INPUT = 0.
modify screen.
endif.
endloop.
endif.
reward if needful.
Thanks,
Sreeram.
‎2007 Nov 29 2:49 PM
hi Sampath,
PARAMETERS : p_rb TYPE c RADIOBUTTON GROUP 1
USER COMMAND 'UC01',
p_cb AS CHECKBOX MODIF ID 001.
...
AT SELECTION SCREEN OUTPUT.
IF p_rb IS NOT INITIAL.
LOOP AT screen.
IF screen-group1 EQ '001'.
screen-input = '1'.
ELSE.
screen-input = '0'.
ENDIF.
MODIFY screen.
ENDLOOP.
ENDIF.hope this helps
ec
‎2007 Nov 29 2:49 PM
Try this code:"
REPORT ZTEST_NP.
PARAMETERS: P_RD1 RADIOBUTTON GROUP RD1 USER-COMMAND USR1,
P_RD2 RADIOBUTTON GROUP RD1 DEFAULT 'X'.
PARAMETERS: P_DATE TYPE BKPF-BUDAT MODIF ID GP1.
AT SELECTION-SCREEN OUTPUT.
IF P_RD1 IS INITIAL.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'GP1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Regards,
Naimesh Patel
‎2007 Nov 29 3:00 PM
thanks to all and naimesh,
i tried out ur code...'but my code is as follows..
PARAMETERS: A TYPE C AS CHECKBOX .
PARAMETERS: B(10) TYPE C MODIF ID SC1.
AT SELECTION-SCREEN OUTPUT.
if A IS INITIAL .
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
so wen i check the radio button...the field is not being active...its still greyed out..can u suggest on this?
‎2007 Nov 29 3:04 PM
You need to add the UESR COMMAND addition to checkbox.
REPORT ZTEST_NP.
PARAMETERS: A TYPE C AS CHECKBOX user-command usr1. " <<<
PARAMETERS: B(10) TYPE C MODIF ID SC1.
AT SELECTION-SCREEN OUTPUT.
if A IS INITIAL .
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SC1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Regards,
Naimesh Patel
‎2007 Nov 29 2:49 PM
hai friend..firrst u have to do r @& d and u have to say this wewya i triend and i am not geeting then it will be helpfuyll for u ok opther wise its of no use..
ok i am giving code..
parameterss: x( 10).
hey 1 radio button dont allow..ok..i think u ned to writE: check obox ok..
pameter: y as check box.
if y = 'x'.
loop at screen.
if screen-name = x.
screen-input = 1.
endif.
else .
screen-input = 0.
endif.
regards points if helpfull..
thanks alot..
‎2007 Nov 29 3:12 PM
Hi Sampath,
Try the below code. Surely it will solve ur problem.
PARAMETERS: R_A1 RADIOBUTTON GROUP RB1 USER-COMMAND UC,
R_A2 RADIOBUTTON GROUP RB1 DEFAULT 'X'.
PARAMETERS: C_B1 AS CHECKBOX MODIF ID SCR.
AT SELECTION-SCREEN OUTPUT.
IF R_A1 IS INITIAL.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SCR'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.