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: 

SAPGUI Expand and Collapse subsreen

Former Member
0 Kudos

HI Folks

On certain SAP transactions ME51N,ME21N,MIGO for example you are able to expand and collapse a subscreen by clicking on a icon, I tried debugging but cannot see how they do it

Does anybody have any ideas how the functionality can be coded

Thanks

Henry

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

You can assign all the subscreen fields to a group & modify the group proprteis based on the User command. ie When the use clicks on open/close icon or pushbutton of the subscreen, set a flag open/close. based on open/close, you can sue the folloing code..


*   Make all subscreen fields invisible for close option
    loop at screen.
      if screen-group1 = <grp>.
        screen-input = 0.
        screen-invisible = 1.
        modify screen.
      endif.
    endloop.

Regards,

Suresh Datti

3 REPLIES 3

suresh_datti
Active Contributor
0 Kudos

You can assign all the subscreen fields to a group & modify the group proprteis based on the User command. ie When the use clicks on open/close icon or pushbutton of the subscreen, set a flag open/close. based on open/close, you can sue the folloing code..


*   Make all subscreen fields invisible for close option
    loop at screen.
      if screen-group1 = <grp>.
        screen-input = 0.
        screen-invisible = 1.
        modify screen.
      endif.
    endloop.

Regards,

Suresh Datti

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

This can be done by using a dummy subscreen. First create your subscreen with fields in it, then create another subscreen that is blank, nothing in it. Now you set up a variable which will hold your screen number. You can set this field depending on what the user is clicking, use this variable in your CALL SUBSCREEN statement in the PBO of your screen.

Regards,

Rich Heilman

0 Kudos

hi rich,

I am interested to know more about this, can u give us the code for this