‎2008 Jan 03 6:29 AM
hi all, could u pls help me on my thread. i have two fields in myselection screen.
like company code this is a select-options field,and one is parameter field is country.
if the user select company code i need to disable the parameter field.
else vice versa.
means not to allow the user to give both values.
if possible send me the code.
‎2008 Jan 03 6:32 AM
Hi Nrayana rao,
Have a look on this logic.It will help you out.
If you want to do it using Selection screen then it is possible.
for that you have to use AT SELECTION-SCREEN output. event..
See the below code and use it according to your requirement.
======================================
tables: pa0000, pa0001.
parameters: p_rad1 radiobutton group rad1 default 'X' user-command rusr,
p_rad2 radiobutton group rad1.
selection-screen: begin of block blk1 with frame.
select-options: s_pernr for pa0000-pernr modif id ABC.
selection-screen: end of block blk1.
selection-screen: begin of block blk2 with frame.
select-options: s_stat2 for pa0000-stat2 modif id DEF.
select-options: s_werks for pa0001-werks modif id DEF.
selection-screen: end of block blk2.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
IF p_rad1 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'DEF'.
IF p_rad2 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
=====================================
Hope it will solve your problem.
Reward points if useful.
thanks,
swaroop.
‎2008 Jan 03 6:34 AM
REPORT demo_sel_screen_param_modif.
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.
‎2008 Jan 03 6:41 AM
tables:t001.
SELECT-OPTIONS bukrs for t001-bukrs MODIF ID C2.
PARAMETERS: country type char10 MODIF ID c1.
at SELECTION-SCREEN OUTPUT.
if bukrs is NOT INITIAL.
LOOP at SCREEN.
if screen-group1 = 'C1'.
screen-input = 0.
MODIFY SCREEN.
endif.
ENDLOOP.
ELSEIF country is NOT INITIAL.
LOOP AT SCREEN.
if screen-group1 = 'C2'.
screen-input = 0.
MODIFY SCREEN.
endif.
ENDLOOP.
endif.
Edited by: abapuser on Jan 3, 2008 7:42 AM
‎2008 Jan 03 6:42 AM
I think this can be done through dialouge programming in se80. U have the functions ENABLE and DISABLE so u can use them.
Reward if found helpful.