Application Development 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: 

Screen Painter - disable text field for input

Former Member
0 Kudos

Hi,

How do I disable a input field runtime in the screen painter?

Thanks,

Regards,

Morten

1 ACCEPTED SOLUTION

venkat_o
Active Contributor
0 Kudos

Hi Mortan Use LOOP AT SCREEN statement to disable at runtime at PBO event


LOOP AT SCREEN.
  IF screen-name = '<field-name>'.
    screen-active = '0'. "It totally disables the field
   "screen-input = '0'. It makes field to display mode
    MODIFY SCREEN.
    CLEAR screen.
  ENDIF.
ENDLOOP.
Thanks Venkat

8 REPLIES 8

Former Member
0 Kudos

Hi Morten,

Try this

Loop at Screen.

Endloop.

find appropriate parameter for your field.

Regards,

Vijay

0 Kudos

Hi

Yes i have the following code:

LOOP AT SCREEN.

" Screen field-input = '0'.

MODIFY SCREEN.

ENDLOOP.

But how do i reference the specific sceen field?

Thanks,

Morten

venkat_o
Active Contributor
0 Kudos

Hi Mortan Use LOOP AT SCREEN statement to disable at runtime at PBO event


LOOP AT SCREEN.
  IF screen-name = '<field-name>'.
    screen-active = '0'. "It totally disables the field
   "screen-input = '0'. It makes field to display mode
    MODIFY SCREEN.
    CLEAR screen.
  ENDIF.
ENDLOOP.
Thanks Venkat

Former Member
0 Kudos

Hi,

I have implemented the following code:

LOOP AT SCREEN.

IF screen-name = 'WA_DELEGATION_LIMIT-COST_CENTER'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

In the debugger the value for the input field is set to 0. However it still has no effect on the field. It is still active for input.

/Morten

Former Member
0 Kudos

Hi,

You have to assign screen-active = '0'...

Please change your code accordingly...

0 Kudos

Hi Morten,

Assign one MODIF ID to ur Screen field and Using SCREEN-GROUP component just like SCREEN-NAME u can set

the input in disabled mode.

Regards,

Lakshman.

Former Member
0 Kudos

Hi Lakshman,

Yes my field is based on a work area.

Where do I set this MODIF ID on my screen field?

Regards,

Morten

Former Member

Hi,

Please try this code:



 LOOP AT SCREEN.

    CASE screen-name.

when 'YOUR FIELD'.
 if 'check your work area value'....
screen-input = '0'. " If you want to make it un-editable.
screen-active = '0'. "If you dont want it to be displayed.
endif.
ENDCASE.

MODIFY SCREEN.

  ENDLOOP.

Edited by: sneha singhania on Jun 30, 2009 5:41 PM