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

Show/hide docking container

Former Member
0 Likes
3,702

Hi there,

i have a docking container in my z-report. with method set_visible i can set the docking container visable or hide it (putting blank to visible parameter):

    CALL METHOD docking_control->set_visible
      EXPORTING
        visible = 'X'
      EXCEPTIONS
        OTHERS  = 1.

so far, so good, BUT: i want to hide/display the container via one button in my alv grid. so i need to know the actual status of the container. so i have found the method get_visible of the class cl_gui_docking_container, see below. BUT: the lf_visible parameter returns always BLANK. there it does not matter if container is actual hided or displayed.

any ideas what i do wrong here ? Or is there any other method to find out if the docking container is currently displayed or hided ?

br Martin

  CALL METHOD docking_control->get_visible
    IMPORTING
      visible           = lf_visible
    EXCEPTIONS
      cntl_error        = 1
      cntl_system_error = 2
      OTHERS            = 3.

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
1,521

Many control framework methods require a subsequent CL_GUI_CFW=>FLUSH to get the variable filled out.

Read only

Former Member
0 Likes
1,521

Hello,

when i do it like this, the variable lv_visible is still BLANK 😞

  CALL METHOD lo_docking_container->set_visible EXPORTING visible = 'X'.
  CALL METHOD cl_gui_cfw=>flush.
  CALL METHOD lo_docking_container->get_visible IMPORTING visible = lv_visible.
Read only

Former Member
0 Likes
1,521

Now i have found out that in the "normal" SAP GUI the lv_visible variable is set correct !!!! But NOT when i use SAP GUI HTML. unfortunately my application is SAP GUI HTML 😞

so any ideas what i can use instead of this cl_gui_cfw=>flush ??

br Martin