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

select options

Former Member
0 Likes
522

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.

4 REPLIES 4
Read only

Former Member
0 Likes
496

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.

Read only

Former Member
0 Likes
496

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.

Read only

former_member188827
Active Contributor
0 Likes
496

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

Read only

Former Member
0 Likes
496

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.