2009 May 25 4:45 PM
Hi Experts,
I have created a module pool program, in that I need to hide(gray out) particular fields on the screen dased on a particular condition.
ex:
If sy-subrc = 0.
(all fields should be active and can be edited)
else.
(only 2 fields should be active and rest of the fields can't be edited)
Please help me out in this issue.
Thanks
Nivash S
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on May 25, 2009 12:01 PM
Hi Experts,
I have created a module pool program, in that I need to hide(gray out) particular fields on the screen dased on a particular condition.
ex:
If sy-subrc = 0.
(all fields should be active and can be edited)
else.
(only 2 fields should be active and rest of the fields can't be edited)
Please help me out in this issue.
Thanks
Nivash S
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on May 25, 2009 12:01 PM
2009 May 25 4:48 PM
You need to check you conditions in PBO module of Screen and depending on Hide the fields
that you want.
Loop at screen
IF screen-group1 = 'G1'.
screen-input = 0.
screen-invisible = 1.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
Endloop.
2009 May 25 4:50 PM
Hi Nivash,
first go to screen layout and double click on the fields and assign groups
.. for the fields which you wan tot disable or invisible.
next go to Screen PBO..
write the logic..
If sy-subrc = 0.
LOOP AT SCREEN .
IF screen-group1 = 'ID1' . "ID1 is the group assign for the field in the layout
screen-active = 0. "screen invisible
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN .
IF screen-group4 = 'ID4' . "ID4 is the group assign for the field in the layout
screen-active = '1'. "screen visible but no input ..If screen-input = '1'. visible and input
screen-input = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Prabhudas
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |