‎2007 May 31 7:54 AM
Hi All,
I have a selection screen defined as following
PARAMETERS : p_last RADIOBUTTON GROUP r1 ,
p_all RADIOBUTTON GROUP r1 DEFAULT 'X',
p_some RADIOBUTTON GROUP r1.
SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION.
My requirement is i have to enable s_res_no only when p_some is checked.or else it shud be disabled.How can i do that.
Regards,
Sai
‎2007 May 31 8:00 AM
Just copy and paste this code and check if it works, otherwise revert with the problme that u've faced
PARAMETERS :
p_last RADIOBUTTON GROUP r1 user-command RAD ,
p_all RADIOBUTTON GROUP r1 DEFAULT 'X',
p_some RADIOBUTTON GROUP r1 .
SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION MODIF ID MOD.
at selection-output.
if p_some = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
‎2007 May 31 7:56 AM
use AT SELECTION SCREEN OUTPUT event and there use LOOP AT SCREEN.
You can find lots of post in SDN on this.
Regards,
Atish
‎2007 May 31 7:58 AM
PARAMETERS : p_last RADIOBUTTON GROUP r1 ,
p_all RADIOBUTTON GROUP r1 DEFAULT 'X' user-command ucom,
p_some RADIOBUTTON GROUP r1.
SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION.
at selection-screen ooutput.
if p_some = 'X'.
loop at screen.
if screen-name = 'S_RES_NO-LOW' or screen-name = 'S_RES_NO-HIGH'.
screen-input = '1'.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-name = 'S_RES_NO-LOW' or screen-name = 'S_RES_NO-HIGH'.
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
regards
shiba dutta
‎2007 May 31 7:58 AM
Hi,
You will have to some of the following steps
1). Assign a USERCOMMAND for the check box.
2). Assign a MODIF ID to the filed for which you want to make changes.
3). Write the event AT SELECTION-SCREEN OUTPUT
4). Inside the event AT SELECTION-SCREEN OUTPUT loop at the SCREEN table and modify the atrribute of the field which you want to make it non mandatory.
A sample program
REPORT demo_at_selection_screen_pbo.
PARAMETERS: test1(10) TYPE c MODIF ID sc1,
test2(10) TYPE c MODIF ID sc2,
test3(10) TYPE c MODIF ID sc1,
test4(10) TYPE c MODIF ID sc2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SC1'.
screen-intensified = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF screen-group1 = 'SC2'.
screen-intensified = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
‎2007 May 31 7:59 AM
hi,
AT SELECTION-SCREEN OUTPUT.
Loop at screen.
if screen-name = 's_res_no'.
if p_some = 'X'.
screen-active = 1.
else.
screen-active = 0.
endif.
endif.
modify screen.
endloop.
reward points if it is helpful.
regards,
Sangeetha.a
‎2007 May 31 8:00 AM
Just copy and paste this code and check if it works, otherwise revert with the problme that u've faced
PARAMETERS :
p_last RADIOBUTTON GROUP r1 user-command RAD ,
p_all RADIOBUTTON GROUP r1 DEFAULT 'X',
p_some RADIOBUTTON GROUP r1 .
SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION MODIF ID MOD.
at selection-output.
if p_some = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
‎2007 May 31 9:05 AM
it is giving an error message 'at selection output is allowed only with loop end loop'
‎2007 May 31 9:09 AM
try this, this will definitley work
PARAMETERS :
p_last RADIOBUTTON GROUP r1 user-command RAD ,
p_all RADIOBUTTON GROUP r1 DEFAULT 'X',
p_some RADIOBUTTON GROUP r1 .
SELECT-OPTIONS : s_res_no FOR syst-index NO-EXTENSION MODIF ID MOD.
at selection-screen output.
<b>if p_some = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
else.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.</b>
Message was edited by:
Rajesh
‎2007 May 31 9:13 AM
‎2007 May 31 8:03 AM
AT selection-screen output.
loop at screen.
if p_some = ' '.
s_res_no = no input.
endif.
endloop[.
‎2007 May 31 9:12 AM
have you tried my previous post coding? what output are you getting there ?
regards
shiba dutta