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

make my field as input not possible.....

naveen_inuganti2
Active Contributor
0 Likes
1,221

Hi all...

in module pool screen.....

How can i make one input field as "input not possible" for one perticuler condition met??

ex: iam having one input field in my screen.... so i can enter the values for it.... similer ly iam also having another one... here if i enter value in the second one and push the pushbotton to do some caluclation part.

then my first input field has to appear but in no input possible mode...

Thank you,

Naveen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
837

Hi,

You said you have two fields on your screen and a pushbutton...

So You can do like this....

**********************************

if sy-datar = 'X'.

loop at screen.

if screen-name eq 'FIELD1'.

screen-input = 0.

endif.

Modify screen.

Endloop.

Endif.

*************************************

Or you can also do like this....

*****************************************

If sy-ucomm = 'PUSHBUTTON'.

loop at screen.

if screen-name eq 'FIELD1'.

screen-input = 0.

endif.

Modify screen.

Endloop.

Endif.

*********************************

here PUSHBUTTON is the Fcode for the Pushbutton and FIELD1 is the screen name of the field which has to get diabled.

Reward if helpful.

Regards,

Syed

Hi all...

in module pool screen.....

How can i make one input field as "input not possible" for one perticuler condition met??

ex: iam having one input field in my screen.... so i can enter the values for it.... similer ly iam also having another one... here if i enter value in the second one and push the pushbotton to do some caluclation part.

then my first input field has to appear but in no input possible mode...

Thank you,

Naveen

4 REPLIES 4
Read only

Former Member
0 Likes
837

Hi,

Try this code:

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

if <condition for no input>

IF screen-name = <Field name>

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDIF.

endloop.

Reward points if helpful.

Regards,

Mukul

Read only

Former Member
0 Likes
837

try to put code after ur conditions are met .

Loop at screen.

if screen-name = <Fieldname> and screen-group1 = <group name>.

screen-input = 0.

modify screen.

endif.

endloop.

Read only

Former Member
0 Likes
838

Hi,

You said you have two fields on your screen and a pushbutton...

So You can do like this....

**********************************

if sy-datar = 'X'.

loop at screen.

if screen-name eq 'FIELD1'.

screen-input = 0.

endif.

Modify screen.

Endloop.

Endif.

*************************************

Or you can also do like this....

*****************************************

If sy-ucomm = 'PUSHBUTTON'.

loop at screen.

if screen-name eq 'FIELD1'.

screen-input = 0.

endif.

Modify screen.

Endloop.

Endif.

*********************************

here PUSHBUTTON is the Fcode for the Pushbutton and FIELD1 is the screen name of the field which has to get diabled.

Reward if helpful.

Regards,

Syed

Read only

Former Member
0 Likes
837

Hi,

Here's an example,

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

refresh s_mtpos.

IF screen-name = 'S_MTPOS-LOW' OR screen-name = 'S_MTPOS-HIGH'.

screen-output = 1.

screen-input = 0.

MODIFY SCREEN.

CLEAR screen-name.

ENDIF.

Regards,

Pritha.

Reward if useful.