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

Regarding Hiding of Screen fields in module pool program

Former Member
0 Likes
584

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

2 REPLIES 2
Read only

Former Member
0 Likes
486

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.

Read only

Former Member
0 Likes
486

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