08-30-2008 5:56 AM
Hi All,
I am facing a problem in screen. I add some fields to screen.
Loop at Screen.
if sy-tcode = 'PB30' AND ( SY-UCOMM = 'DIS' ) .
IF SCREEN-NAME = 'P9001-WERKS'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'P9001-PSAREA1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'P9001-JDATE'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'P9001-DEPRT'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Now i want to grey these fields when the sy-ucomm eq Display. For the first three fields it's working fine but for the fourth field P9001-DEPRT it is not working. What could be the problem, Please Help me.
Thanks in advance.
AK
08-30-2008 6:01 AM
check the field name whether its correct or not...
give the if statement outside the loop.
Why are u checking the statemnt inside the loop.
08-30-2008 5:59 AM
Try it this way:
if sy-tcode = 'PB30' AND ( SY-UCOMM = 'DIS' ) .
Loop at Screen.
IF SCREEN-NAME = 'P9001-WERKS'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
endloop.
Loop at Screen.
IF SCREEN-NAME = 'P9001-PSAREA1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
endloop.
Loop at Screen.
IF SCREEN-NAME = 'P9001-JDATE'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
endloop.
Loop at Screen.
IF SCREEN-NAME = 'P9001-DEPRT'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
endloop.
ENDIF.
With luck,
Pritam.
08-30-2008 5:59 AM
Hi,
Check this code-
AT SELECTION-SCREEN OUTPUT.
If sy-tcode = 'PB30' AND ( SY-UCOMM = 'DIS' ) .
Loop at Screen.
IF SCREEN-NAME CS 'P9001-WERKS'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME CS 'P9001-PSAREA1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME CS 'P9001-JDATE'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME CS 'P9001-DEPRT'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Sujit
08-30-2008 6:01 AM
check the field name whether its correct or not...
give the if statement outside the loop.
Why are u checking the statemnt inside the loop.
08-30-2008 6:02 AM
IF SCREEN-NAME = 'P9001-DEPRT'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
may be the field name DEPRT is not there. is that DEPRT or some thing else..
you can try this also..
IF SCREEN-NAME CS 'P9001-DEP'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
just check it
08-30-2008 6:05 AM
Hi AK,
You can check out in debugging wheather the screen name is corrrect or not.
Best regards,
raam