06-30-2009 12:14 PM
Hi,
How do I disable a input field runtime in the screen painter?
Thanks,
Regards,
Morten
06-30-2009 12:24 PM
Hi Mortan
Use LOOP AT SCREEN statement to disable at runtime at PBO event
Thanks
Venkat
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.
06-30-2009 12:16 PM
Hi Morten,
Try this
Loop at Screen.
Endloop.
find appropriate parameter for your field.
Regards,
Vijay
06-30-2009 12:22 PM
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
06-30-2009 12:24 PM
Hi Mortan
Use LOOP AT SCREEN statement to disable at runtime at PBO event
Thanks
Venkat
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.
06-30-2009 1:01 PM
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
06-30-2009 1:06 PM
Hi,
You have to assign screen-active = '0'...
Please change your code accordingly...
06-30-2009 1:09 PM
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.
06-30-2009 1:18 PM
Hi Lakshman,
Yes my field is based on a work area.
Where do I set this MODIF ID on my screen field?
Regards,
Morten
06-30-2009 1:10 PM
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