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

disabling a screen field

Former Member
0 Likes
470

Hi,

iam having a two fields on the selection screen.

if any value has been entered on the first field then the second field shoud be disabled and vice versa. can anyone tell me how to do this.

Regards,

phyrose.

3 REPLIES 3
Read only

former_member189629
Active Contributor
0 Likes
456

Camilia,

I posted a program on my blog with similar functionality (dynamically modifying selection screen elements).

Use this for ref.

http://allaboutsap.blogspot.com/2007/09/dynamic-selection-screen-fields.html

Reward if helpful,

Karthik

Read only

former_member188827
Active Contributor
0 Likes
456

PARAMETERS:zfield1(10) MODIF ID z1,zfield2(10) MODIF ID z2.

at SELECTION-SCREEN output.

if zfield1 ne ' '.

loop at SCREEN.

if screen-group1 = 'Z2'.

screen-input = 0.

MODIFY SCREEN.

endif.

endloop.

elseif zfield2 ne ' '.

loop at SCREEN.

if screen-group1 = 'Z1'.

screen-input = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

endif.

plz reward points if dis helps

Read only

Former Member
0 Likes
456

Hi

THE SCREEN CHANGES WILL BE APPLIED ONLY AFTER PRESSING ENTER BUTTON THE SCREEN

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.

SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.

SELECTION-SCREEN END OF BLOCK B1.

******END OF SELECTION SCREEN DESIGN****************

***********SCREEN MODIFICATIONS*******************

AT SELECTION-SCREEN OUTPUT .

LOOP AT SCREEN .

IF SCREEN-GROUP1 EQ 'S2'.

SCREEN-INPUT = 0.

SCREEN-REQUIRED = 1.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 EQ 'S1'.

SCREEN-INPUT = 0.

SCREEN-REQUIRED = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

<b>REWARD IF USEFULL</b>