Dock container

what is dock container in a class?how to create it in a report.

hi, plz check the following code.wht i have to give in the exporting parameter parent in the below dock container o_docking?and to display the values of this sample internal table?urgent plz.thanx in advance
code:
tables:mara.
DATA:pav1 TYPE REF TO cl_gui_alv_grid.
data : o_docking type ref to cl_gui_docking_container.
DATA:BEGIN OF itab OCCURS 0,
     matnr LIKE mara-matnr,
     mtart LIKE mara-mtart,
     matkl LIKE mara-matkl,
END OF itab.
PARAMETERS: s_matnr LIKE mara-matnr.
SELECT matnr mtart matkl FROM mara INTO CORRESPONDING FIELDS OF TABLE
itab WHERE matnr = s_matnr.
CREATE OBJECT o_docking
EXPORTING
   PARENT                      =
   REPID                       =
   DYNNR                       =
   SIDE                        = DOCK_AT_LEFT
   EXTENSION                   = 50
   STYLE                       =
   LIFETIME                    = lifetime_default
   CAPTION                     =
   METRIC                      = 0
   RATIO                       =
   NO_AUTODEF_PROGID_DYNNR     =
   NAME                        =
EXCEPTIONS
   CNTL_ERROR                  = 1
   CNTL_SYSTEM_ERROR           = 2
   CREATE_ERROR                = 3
   LIFETIME_ERROR              = 4
   LIFETIME_DYNPRO_DYNPRO_LINK = 5
   others                      = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
create object pav1 exporting i_parent = o_docking.
CALL METHOD pav1->set_table_for_first_display
  EXPORTING
   I_BUFFER_ACTIVE               =
   I_BYPASSING_BUFFER            =
   I_CONSISTENCY_CHECK           =
    I_STRUCTURE_NAME               = 'mara'
   IS_VARIANT                    =
   I_SAVE                        =
   I_DEFAULT                     = 'X'
   IS_LAYOUT                     =
   IS_PRINT                      =
   IT_SPECIAL_GROUPS             =
   IT_TOOLBAR_EXCLUDING          =
   IT_HYPERLINK                  =
   IT_ALV_GRAPHICS               =
   IT_EXCEPT_QINFO               =
  CHANGING
    it_outtab                     =  itab[]
   IT_FIELDCATALOG               =
   IT_SORT                       =
   IT_FILTER                     =
EXCEPTIONS
   INVALID_PARAMETER_COMBINATION = 1
   PROGRAM_ERROR                 = 2
   TOO_MANY_LINES                = 3
   others                        = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • How can I pass a docking container to a program in a non-simple context?

    Dear colleagues,
    I want to pass a docking container like the one in SE80 to another program.
    The following code works fine:
    REPORT z_moving_dock.
    DATA: cl_docker type REF TO cl_gui_docking_container.
    PARAMETERS: test.
    INITIALIZATION.
      CREATE OBJECT cl_docker EXPORTING no_autodef_progid_dynnr = 'X'.
    END-OF-SELECTION.
      WRITE:/ test.
    But I cannot extend this to my current program. There I sourced out anything related to the GUI into a function group to obey the MVC paradigma. (That's maybe the error in reasoning, but I'm following the book Design Patterns in Object-Oriented ABAP from SAP Press and -- of course -- good and healthy programming style.)
    So it's a function group which knows the dynpros and controls, the main program knows only the data.
    Now I have a docking container like the one in SE80. We have many working older programs and I want to switch to them carrying the docking container with me. I have searched the Demos in SAP, the Online Help, the SAP Library, Books, the Web, this Forum, but none of them goes beyond the simpler examples that always work.
    I tried the LINK method on the docking container. I tried it before calling the new program (btw. by SUBMIT). I tried it afterwards from the called program (via a function module from the aforementioned group -- but the group is tied to the old program context and therefore I am in a new "instance" of it). I tried different values for REPID and DYNNR in LINK. I debugged SE80 -- too complicated!
    If it works well I get the container back when I return to the calling program. If it works badly the container is completely lost.
    Perhaps I should export something to memory?
    But I strongly would prefer not to alter the called programs: In the future I might also want to call a SAP standard program.
    I also didn't find some documentation explaining what is going on in the background so I could figure out in which direction to "think".
    I also tested the following code on SAP R/3 4.7 and SAP ERP 2005 with the same results.
    In the meantime I also created a minimal example. First the triggering report:
    REPORT z_moving_docking_container.
    DATA: g_example TYPE REF TO zcl_moving_docking_container.
    CREATE OBJECT g_example.
    This obviously calls the main class ZCL_MOVING_DOCKING_CONTAINER which has only this constructor:
    METHOD constructor.
      CALL FUNCTION 'Z_SHOW_DYNPRO'.
    ENDMETHOD.
    Normally this class should handle the business logic. Here it only calls this function module. In the appropriate function group, say Z_MOVING_DOCKING_CONTAINER, I have these declarations in the TOP-Include:
    FUNCTION-POOL z_moving_docking_container.
    DATA:
      gv_okcode TYPE ui_func,
      go_docker TYPE REF TO cl_gui_docking_container.
    The function group also contains a dynpro 9000 with this flow logic:
    PROCESS BEFORE OUTPUT.
      MODULE status_9000.
    PROCESS AFTER INPUT.
      MODULE user_command_9000.
    The modules are straightforward:
    MODULE status_9000 OUTPUT.
      SET PF-STATUS '9000'.
      IF go_docker IS INITIAL.
        CREATE OBJECT go_docker
               EXPORTING no_autodef_progid_dynnr = 'X'.
      ENDIF.
    ENDMODULE.
    with at least the function code ONLI defined in PF-status 9000 and
    MODULE user_command_9000 INPUT.
      IF gv_okcode = 'ONLI'.
        SUBMIT z_sample_report AND RETURN.
      ELSE.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.
    The report Z_SAMPLE_REPORT can be any report you like.
    At last the function module contains the following code:
    FUNCTION z_show_dynpro.
    *"*"Lokale Schnittstelle:
      CALL SCREEN 9000.
    ENDFUNCTION.
    As I see this, this is a straightforward application of the working example at the top and the principles of MVC and encapsulation of the dynpro logic (to "avoid" global variables as best as possible).
    Clearly in some sense this is an academic question, but I have built a fairly big application like that up to now ...
    </edit>
    Thanks for reading and contemplating,
    Thomas
    Edited by: Thomas Geiß on Feb 4, 2009 11:03 AM
    Edited by: Thomas Geiß on Feb 4, 2009 11:59 AM
    Edited by: Thomas Geiß on Feb 4, 2009 12:01 PM

    You'll either have to pass the data in as parameters in the applet tags or create a JavaScript tag and have the JavaScript pass it in. If the array is very large then you open a connection between the Applet and a servlet and pass the data that way.

  • How to set background color in a docking container?

    Hi guys!
    Is it possible to set a background color for a docking container?
    I don't find any appropriate method to do that.
    Is there actually a way?

    Hi,
    Please refer the below program as a reference for Color using Docking Container Concept.
    REPORT zcuitest_alv_07.
    * Use of colours in ALV grid (cell, line and column)            *
    * Table
    TABLES : mara.
    * Type
    TYPES : BEGIN OF ty_mara,
              matnr         LIKE mara-matnr,
              matkl         LIKE mara-matkl,
              counter(4)    TYPE n,
              free_text(15) TYPE c,
              color_line(4) TYPE c,           " Line color
              color_cell    TYPE lvc_t_scol,  " Cell color
    END OF ty_mara.
    * Structures
    DATA  : wa_mara     TYPE ty_mara,
            wa_fieldcat TYPE lvc_s_fcat,
            is_layout   TYPE lvc_s_layo,
            wa_color    TYPE lvc_s_scol.
    * Internal table
    DATA : it_mara     TYPE STANDARD TABLE OF ty_mara,
           it_fieldcat TYPE STANDARD TABLE OF lvc_s_fcat,
           it_color    TYPE TABLE          OF lvc_s_scol.
    * Variables
    DATA : okcode LIKE sy-ucomm,
           w_alv_grid          TYPE REF TO cl_gui_alv_grid,
           w_docking_container TYPE REF TO cl_gui_docking_container.
    PARAMETERS : p_column AS CHECKBOX,
                 p_line   AS CHECKBOX,
                 p_cell   AS CHECKBOX.
    START-OF-SELECTION.
      PERFORM get_data.
    END-OF-SELECTION.
      PERFORM fill_catalog.
      PERFORM fill_layout.
      CALL SCREEN 2000.
    *&      Module  status_2000  OUTPUT
    *       text
    MODULE status_2000 OUTPUT.
      SET PF-STATUS '2000'.
    ENDMODULE.                 " status_2000  OUTPUT
    *&      Module  user_command_2000  INPUT
    *       text
    MODULE user_command_2000 INPUT.
      DATA : w_okcode LIKE sy-ucomm.
      MOVE okcode TO w_okcode.
      CLEAR okcode.
      CASE w_okcode.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " user_command_2000  INPUT
    *&      Module  alv_grid  OUTPUT
    *       text
    MODULE alv_grid OUTPUT.
      IF w_docking_container IS INITIAL.
        PERFORM create_objects.
        PERFORM display_alv_grid.
      ENDIF.
    ENDMODULE.                 " alv_grid  OUTPUT
    *&      Form  create_objects
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_objects.
    * Ratio must be included in [5..95]
      CREATE OBJECT w_docking_container
        EXPORTING
          ratio                       = 95
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          others                      = 6.
      CREATE OBJECT w_alv_grid
        EXPORTING
          i_parent          = w_docking_container.
    ENDFORM.                    " create_objects
    *&      Form  display_alv_grid
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display_alv_grid.
      CALL METHOD w_alv_grid->set_table_for_first_display
        EXPORTING
          is_layout                     = is_layout
        CHANGING
          it_outtab                     = it_mara
          it_fieldcatalog               = it_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
    ENDFORM.                    " display_alv_grid
    *&      Form  get_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_data.
      SELECT * FROM mara UP TO 5 ROWS.
        CLEAR : wa_mara-color_line, wa_mara-color_cell.
        MOVE-CORRESPONDING mara TO wa_mara.
        ADD 1                   TO wa_mara-counter.
        MOVE 'Blabla'           TO wa_mara-free_text.
        IF wa_mara-counter = '0002'
        AND p_line = 'X'.
    * Color line
          MOVE 'C410' TO wa_mara-color_line.
        ELSEIF wa_mara-counter = '0004'
        AND p_cell = 'X'.
    * Color cell
          MOVE 'FREE_TEXT' TO wa_color-fname.
          MOVE '5'         TO wa_color-color-col.
          MOVE '1'         TO wa_color-color-int.
          MOVE '1'         TO wa_color-color-inv.
          APPEND wa_color TO it_color.
          wa_mara-color_cell[] = it_color[].
        ENDIF.
        APPEND wa_mara TO it_mara.
      ENDSELECT.
    ENDFORM.                    " get_data
    *&      Form  fill_catalog
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_catalog.
    * Colour code :                                                 *
    * Colour is a 4-char field where :                              *
    *              - 1st char = C (color property)                  *
    *              - 2nd char = color code (from 0 to 7)            *
    *                                  0 = background color         *
    *                                  1 = blue                     *
    *                                  2 = gray                     *
    *                                  3 = yellow                   *
    *                                  4 = blue/gray                *
    *                                  5 = green                    *
    *                                  6 = red                      *
    *                                  7 = orange                   *
    *              - 3rd char = intensified (0=off, 1=on)           *
    *              - 4th char = inverse display (0=off, 1=on)       *
    * Colour overwriting priority :                                 *
    *   1. Line                                                     *
    *   2. Cell                                                     *
    *   3. Column                                                   *
      DATA : w_position TYPE i VALUE '1'.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'MATNR'    TO wa_fieldcat-fieldname.
      MOVE 'MARA'     TO wa_fieldcat-ref_table.
      MOVE 'MATNR'    TO wa_fieldcat-ref_field.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'MATKL'    TO wa_fieldcat-fieldname.
      MOVE 'MARA'     TO wa_fieldcat-ref_table.
      MOVE 'MATKL'    TO wa_fieldcat-ref_field.
    * Color column
      IF p_column = 'X'.
        MOVE 'C610'     TO wa_fieldcat-emphasize.
      ENDIF.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'COUNTER'  TO wa_fieldcat-fieldname.
      MOVE 'N'        TO wa_fieldcat-inttype.
      MOVE '4'        TO wa_fieldcat-intlen.
      MOVE 'Counter'  TO wa_fieldcat-coltext.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position  TO wa_fieldcat-col_pos.
      MOVE 'FREE_TEXT' TO wa_fieldcat-fieldname.
      MOVE 'C'         TO wa_fieldcat-inttype.
      MOVE '20'        TO wa_fieldcat-intlen.
      MOVE 'Text'      TO wa_fieldcat-coltext.
      APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM.                    " fill_catalog
    *&      Form  fill_layout
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_layout.
    * Field that identify color line in internal table
      MOVE 'COLOR_LINE' TO is_layout-info_fname.
    * Field that identify cell color in inetrnal table
      MOVE 'COLOR_CELL' TO is_layout-ctab_fname.
    ENDFORM.                    " fill_layout

  • Refresh cl_salv_table= factory attached to a Docking Container

    Hi Gurus!!
    I have a issue with a cl_salv_table=>factory attached to a Docking Container.
    Here is my code set up, which might be wrong actually:
    I've created a simple report, with a TOP and some include for PBO, PAI and routines. In the Report, I call a Screen, here 2000.
    The TOP contains
    DATA: docking_container     TYPE REF TO cl_gui_docking_container,
          gc_table_alv          TYPE REF TO cl_salv_table.
    The Screen Flow is basic:
    PROCESS BEFORE OUTPUT.
      MODULE status_2000.
    PROCESS AFTER INPUT.
      MODULE user_command_2000.
    With status_2000:
    MODULE status_2000 OUTPUT.
      SET PF-STATUS 'STATUS'.
    *  SET TITLEBAR 'xxx'.
    * Initialization of docking container
      IF docking_container IS INITIAL.
        CREATE OBJECT docking_container
          EXPORTING
            side   = cl_gui_docking_container=>dock_at_bottom
          EXCEPTIONS
            OTHERS = 1.
        IF sy-subrc <> 0. MESSAGE a500. ENDIF.
        CALL METHOD docking_container->set_height
          EXPORTING
            height = 170.
      ENDIF.
    ENDMODULE.                 " STATUS_2000  OUTPUT
    Then the Screen PAI looks dumb, but in this example, I have drastically made the code simpler

    I think you are not releasing proxy object with method FREE of docking container.
    Check the below code. It first displays SFLIGHT table, then after another dialog step is concluded, it shows SPFLI table.
    DATA: r_dock_container TYPE REF TO cl_gui_docking_container,
          r_salv_table     TYPE REF TO cl_salv_table.
    DATA: it_sflight TYPE sflight OCCURS 0,
          it_spfli   TYPE spfli   OCCURS 0.
    DATA: count TYPE i.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO TABLE it_sflight UP TO 10 ROWS.
      SELECT * FROM spfli INTO TABLE it_spfli UP TO 10 ROWS.
      CALL SCREEN 0200.
    MODULE pbo OUTPUT.
      SET PF-STATUS space.
      IF count IS INITIAL.
        CREATE OBJECT r_dock_container
          EXPORTING
            side   = cl_gui_docking_container=>dock_at_bottom
          EXCEPTIONS
            OTHERS = 1.
        CALL METHOD r_dock_container->set_height
          EXPORTING
            height = 170.
        CALL METHOD cl_salv_table=>factory
          EXPORTING
            r_container  = r_dock_container
          IMPORTING
            r_salv_table = r_salv_table
          CHANGING
            t_table      = it_sflight.
    *  ALV Display
        r_salv_table->display( ).
      ELSE.
        r_dock_container->free( ).   "this is crucial to release proxy object of docking container
        CLEAR r_dock_container.   "and clear a reference variable (with these two statements your control will disapear from screen)
        "now you can create a new one and bound a new ALV to it
        CREATE OBJECT r_dock_container
           EXPORTING
             side   = cl_gui_docking_container=>dock_at_bottom
           EXCEPTIONS
             OTHERS = 1.
        CALL METHOD r_dock_container->set_height
          EXPORTING
            height = 170.
        CALL METHOD cl_salv_table=>factory
          EXPORTING
            r_container  = r_dock_container
          IMPORTING
            r_salv_table = r_salv_table
          CHANGING
            t_table      = it_spfli.
    *  ALV Display
        r_salv_table->display( ).
      ENDIF.
      ADD 1 TO count .
    ENDMODULE.                  
    Of course you have to adjust it with your tables and data, but this works fine
    Regards
    Marcin
    Edited by: Marcin Pciak on Jun 16, 2009 12:57 PM

  • Background Execution Problem-Docking Container with 2 ALV Grids in one scre

    Hi Friends,
    I have created 2 ALV Grids in one screen - one below another using DOCKING CONTAINER.
    The objects are 'g_dock_cont' and 'g_dock_cont1'.
    I am getting the foreground output as expected with 2 ALV Grids.
    While executing in background (F9), I am getting only output of first ALV grid. Second ALV is not getting displayed in BACKGROUND(F9) mode.
    How to solve this.
    FORM create_objects.
    * Materials with data
      IF   g_dock_cont IS INITIAL.
       IF sy-batch NE 'X'.
    *CREATE THE OBJECT FOR DOCKING CONTAINER
        CREATE OBJECT g_dock_cont
          EXPORTING
            side                  = cl_gui_docking_container=>dock_at_top
            extension             = 300.
        ENDIF.
    *CREATE THE OBJECT FOR ALV GRID
        CREATE OBJECT g_alvgrid
               EXPORTING i_parent = g_dock_cont.
        wa_layout-grid_title =
              'Materials with Data'.
      ENDIF.
    IF NOT I_DETAIL[] IS INITIAL.
    CALL METHOD g_alvgrid->set_table_for_first_display
      EXPORTING
        IS_VARIANT                    = WA_VARIANT_STX
        IS_LAYOUT                     = wa_layout
      CHANGING
        it_outtab                     = I_DETAIL
        IT_FIELDCATALOG               = LIT_FIELDCATALOG[]
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF sy-subrc <> 0.
    ENDIF.
    ENDIF.
    *MATERIALS WITHOUT DATA
      IF   g_dock_cont1 IS INITIAL.
       IF sy-batch NE 'X'.
    *CREATE THE OBJECT FOR DOCKING CONTAINER
        CREATE OBJECT g_dock_cont1
          EXPORTING
            side                  = cl_gui_docking_container=>dock_at_bottom
            extension             = 300.
       ENDIF.
    *CREATE THE OBJECT FOR ALV GRID
        CREATE OBJECT g_alvgrid1
               EXPORTING i_parent = g_dock_cont1.
        wa_layout1-grid_title =
              'Materials without Data'.
      ENDIF.
    IF NOT I_MARA[] IS INITIAL.
    CALL METHOD g_alvgrid1->set_table_for_first_display
      EXPORTING
        IS_LAYOUT                     = wa_layout1
      CHANGING
        it_outtab                     = I_MARA
        IT_FIELDCATALOG               = i_fieldcat[]
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF sy-subrc <> 0.
    ENDIF.
    ENDIF.
    ENDFORM.                    " create_objects
    Regards,
    Viji.

    Hi,
    What i was saying is that you need to code again for background mode of execution.
    AT END OF SELECTION.
    IF SY-BATCH EQ 'X'.
      PERFORM DISPLAY1.
      PERFORM DISPLAY2.
    In DISPLAY1 use REUSE_ALV_LIST_DISPLAY to display data from outtab1.
    In DISPLAY2 use REUSE_ALV_LIST_DISPLAY to display data from outtab2.
    For example : execute this report in background mode.this will not execute in online mode.
    After execution you will get two spools one for KNA1 and one for LFA1 data. Spool can be controlled via IS_PRINT structure.
    report  zrbackground.
    data gt_lfa1 type standard table of lfa1.
    data gt_kna1 type standard table of kna1.
    start-of-selection.
      select * from lfa1 into table gt_lfa1 up to 10 rows.
      select * from kna1 into table gt_kna1 up to 20 rows.
    end-of-selection.
      if sy-batch eq 'X'.
        perform display_lfa1.
        perform display_kna1.
      endif.
    *&      Form  DISPLAY_LFA1
          text
    -->  p1        text
    <--  p2        text
    form display_lfa1 .
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program = sy-repid
          i_structure_name   = 'LFA1'
        tables
          t_outtab           = gt_lfa1
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " DISPLAY_LFA1
    *&      Form  DISPLAY_KNA1
          text
    -->  p1        text
    <--  p2        text
    form display_kna1 .
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program = sy-repid
          i_structure_name   = 'KNA1'
        tables
          t_outtab           = gt_kna1
        exceptions
          program_error      = 1
          others             = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " DISPLAY_KNA1
    Please let me know if its not clear or you need more info.
    Thanks,
    Abhishek
    Edited by: abhishek sinha on May 8, 2009 7:42 PM
    Edited by: abhishek sinha on May 8, 2009 8:45 PM

  • ALV tree in docking container

    i am trying to call a docking container (on hotspot click of ALV.-> Reuse_alv_grid_display).
    And a alv tree is to be displayed in docking container.
    I have wrote the entire code and there is no error is thrown by the system, but docking container displayed.
    I am posting entire code .Please let me know where i am mistaken.
    check r_ucomm eq '&IC1'."when user double click on any cell of ALV.
       CASE rs_selfield-SEL_TAB_FIELD.
         WHEN 'I_MKPF-WERKS'.
           perform create_dock.
           perform create_alv_tree.
    *           WHEN .
    *           WHEN OTHERS.
       ENDCASE.
    FORM CREATE_DOCK ."docking container is created
       check obj1 is initial.
       CREATE OBJECT OBJ1
         EXPORTING
    *    PARENT                      =
         REPID                       = sy-repid
         DYNNR                       = sy-dynnr
           SIDE                        = obj1->DOCK_AT_bottom
         EXTENSION                   = 500
         EXCEPTIONS
           CNTL_ERROR                  = 1
           CNTL_SYSTEM_ERROR           = 2
           CREATE_ERROR                = 3
           LIFETIME_ERROR              = 4
           LIFETIME_DYNPRO_DYNPRO_LINK = 5
           others                      = 6
       IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    ENDFORM.         
    FORM CREATE_ALV_TREE . "alv Tree
    create object tree
         exporting
             parent              = obj1
             node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
             item_selection      = 'X'
             no_html_header      = 'X'
             no_toolbar          = ''
         exceptions
             cntl_error                   = 1
             cntl_system_error            = 2
             create_error                 = 3
             lifetime_error               = 4
             illegal_node_selection_mode  = 5
             failed                       = 6
             illegal_column_name          = 7.
       if sy-subrc <> 0.
         message x208(00) with 'ERROR'.                          "#EC NOTEXT
       endif.
       data l_hierarchy_header type treev_hhdr.
       perform build_hierarchy_header changing l_hierarchy_header.
       IF gt_fieldcatalog[] is   initial.
         perform buildfield_cat using 'TRNTYP' 'TRNTYP' .
         perform buildfield_cat using 'EXDAT' 'Excise Doc' .
         perform buildfield_cat using 'WERKS' 'Excise Doc' .
         perform buildfield_cat using 'EXNUM' 'Excise Doc' .
         perform buildfield_cat using 'EXYEAR' 'Excise Doc' .
         perform buildfield_cat using 'MATNR' 'Excise Doc' .
         perform buildfield_cat using 'RITEM1' 'Excise Doc' .
         perform buildfield_cat using 'RITEM2' 'Excise Doc' .
         perform buildfield_cat using 'MAKTX' 'Excise Doc' .
         perform buildfield_cat using 'REMOVAL' 'Excise Doc' .
         perform buildfield_cat using 'MEINS' 'Excise Doc' .
         perform buildfield_cat using 'EXBAS' 'Excise Doc' .
         perform buildfield_cat using 'EXBED' 'Excise Doc' .
       endif.
    call method tree->set_table_for_first_display
         EXPORTING
    *      i_structure_name    = 'SFLIGHT'
           is_hierarchy_header = l_hierarchy_header
         CHANGING
           it_outtab           = t_J_1IEXCDTL[] "table must be empty !
           it_fieldcatalog     = gt_fieldcatalog.
    perform create_hierarchy.
    call method tree->frontend_update.
    FORM CREATE_HIERARCHY .
    sort IJ_1IEXCDTL by chapid matnr.
       LOOP AT IJ_1IEXCDTL into WJ_1IEXCDTL.
         on change of WJ_1IEXCDTL-chapid.
           perform add_carrid_line using    WJ_1IEXCDTL
                                        changing l_carrid_key.
         endon.
         on change of WJ_1IEXCDTL-matnr.
           perform add_complete_line using  WJ_1IEXCDTL"last complete line.
                                            l_carrid_key
                                   changing l_last_key.
         endon.
       ENDLOOP.
    endform.
    form add_carrid_line using     WJ_1IEXCDTL1 type J_1IEXCDTL
                                    p_relat_key type lvc_nkey
                          changing  p_node_key type lvc_nkey.
       data: l_node_text type lvc_value.
       l_node_text =   WJ_1IEXCDTL1-chapid.
       call method tree->add_node
         EXPORTING
           i_relat_node_key = p_relat_key
           i_relationship   = cl_gui_column_tree=>relat_last_child
           i_node_text      = l_node_text
           is_outtab_line   = WJ_1IEXCDTL
         IMPORTING
           e_new_node_key   = p_node_key.
    endform.                    "add_carrid_line
    form add_complete_line using   WJ_1IEXCDTL2 type J_1IEXCDTL
                                  p_relat_key type lvc_nkey
                        changing  p_node_key type lvc_nkey.
       data: l_node_text type lvc_value.
       write WJ_1IEXCDTL2-matnr to l_node_text .
       call method tree->add_node
         EXPORTING
           i_relat_node_key = p_relat_key
           i_relationship   = cl_gui_column_tree=>relat_last_child
           is_outtab_line   = WJ_1IEXCDTL2
           i_node_text      = l_node_text
         IMPORTING
           e_new_node_key   = p_node_key.
    endform.                    "add_complete_line

    This is the ALV and i want docking container containing alv tree to be displayed with the details of this alv
    at bottom of screen.

  • Embedding a screen in a docking container - Is it possible at all??

    I am working on a screen design similar to SE80, where I will be required to display a tree structure in screen say '0100' to the left of the screen and upon node_double_click event, I should be able to bring up another screen '0200' on to the right side with out navigating away from the screen 0100.
    I have a custom control in my initial screen 0100, covering the full area, and I am instantiating the docking container object in the node_double_click handler method of the tree control. I have passed sy-repid and dynpro number '0200' but to no avail.
    The following is the code sample.
          IF docking_right IS INITIAL.
            CREATE OBJECT docking_right
              EXPORTING
                repid     = g_repid
                dynnr     = '0200'
                side      = cl_gui_docking_container=>dock_at_right
                extension = 900.
          ENDIF.
    I have gone through many posts in this forum but none of them have a definitive indication if that can be possible, that is why I had to create this new thread. I will be glad if any of you could let me know if there is way accomplishing this.
    Thanks in advance,
    Raghu.

    Hi Raghu,
    I was specifically interested in exploring the option (if any) of combining conventional controls and the new GUI controls because I am trying to get to a scenario where I should be able create conventional controls like list boxes and buttons dynamically based on user actions. .
    For GUI controls you always need some container which is a "bridge" b/w control created in program and the screen. For standard dialogs you don't need such container. You just place them on the screen. Therefore you can combine these techniques by simply placing a container (which you already have and will use for tree control). The rest of the screen area can be used by standard controls (listoboxes, i/o fields etc). This way standard controls would be statically set, whereas container would store GUI control assinged dynamically in program.
    If, on the other hand, you want both controls and GUI controls be dynamically determined, just keep you container (for GUI control) and create a subscreen area where you dynamically swap different screens. These screen must be set as subscreens and must have statically defined layout, thus only determination of the screen to be displayed is dynamic here.
    Anyhow, there is no way to dynamically set standard controls on the screen. You could, however in turn switch them on/off in PBO (based on certain conditions) but this would require placing all the possible controls and just hiding/showing them. No replacment is then possible, so image empty gaps which this approach would produce.
    Ironically the constructor of docking container supports repid and dynpro for no apparent utility.
    As I said, container is used only to place some GUI control in it and then send this entire package (container+ GUI control) to appropriate place on the screen. That's why in container's constructor there is both repid and dynpro. These only determine where this container should be attached.
    Regards
    Marcin

  • Docking container

    Hello,
    Could you please tell me what is wrong either in the code below or in my logic:
      DATA: d_container TYPE REF TO cl_gui_docking_container,
            e_control TYPE REF TO cl_gui_abapedit.
      CALL SCREEN 200.
      CREATE OBJECT d_container
        EXPORTING
    *      repid                       = sy-cprog
    *      dynnr                       = sy-dynnr
          side                        = cl_gui_docking_container=>dock_at_left.
      check sy-subrc = 0.
      CREATE OBJECT e_control
        EXPORTING
          parent = d_container.
    Logic
    - create empty screen 0200
    - create docking container docking it to the left part of screen
    - embedding abap editor control to this docking container
    My question is: why when running program I don't see anything, as the docking container with the control inside wouldn't be there?
    Thank you for help in advance.
    Marcin

    Hi Jonathan,
    The problem was obvious. The code simply should be included in PBO module of the screen.
    There is no need to pass neither sy-repid nor sy-dynnr unless it displayed in other screen/program.
    Gr8 thanks for your help:)
    Regards,
    Marcin

  • Docking container in a subscreeen

    hy gurus, got an issue on the putting a docking container in a subscreen.
    the subscreen doesn't display.
    I've created a dynpro 202 as subscreen ,
    i've  created a custom container( GO_CONTAINER_OBJECT)  in the dynpro 202.
    in the main dynpro (200)
    i have in the pbo and pai
    pbo
    CALL SUBSCREEN sub_202 INCLUDING 'SAPMZPMCMO' '0202'.
    pai.
    CALL SUBSCREEN sub_202.
    in the pbo of 202 i have.
      MODULE  tree_and_docking.
      MODULE alv_display.
    module tree_and_docking.
    * container for alv-tree
      CREATE OBJECT:
       go_container_object
        EXPORTING
          side      = cl_gui_docking_container=>dock_at_bottom
          repid     = sy-repid
          ratio = '40'
          extension = 250
          dynnr     = '0202',
       go_splitter
          EXPORTING parent = go_container_object
                rows = 1
              columns = 2.
      CALL METHOD:
      go_splitter->set_border
      EXPORTING border = space,
      go_splitter->get_container
      EXPORTING row = 1
      column = 1
      RECEIVING container = dock_sub_cont1,
      go_splitter->set_row_height
      EXPORTING id = 1
      height = '30',
    go_splitter->set_column_width
      EXPORTING id = 1
        width = '20',
      go_splitter->get_container
          EXPORTING row = 1
                column = 2
      RECEIVING container = dock_sub_cont2,
      go_splitter->set_column_width
      EXPORTING id = 2
        width = '100'.
    etc...
    but nothing is displaying when i call the screen.
    Did i miss something?
    Edited by: EBONGUE ANDRE on Oct 5, 2010 5:59 PM

    I guess you can't mix docking container with subscreen. How would that look like (docked at bottom of subscreen's?). No this can't be used like that. Use custom container instead.
    @Uwe
    I got used to this little yellow sign next to your name. How that happens that their take it away from you? I thought SAP Mentor honor is granted forever.
    Regards
    Marcin

  • How to disable the sizing option in docking container

    Hi experts,
    I have created a grid in a docking container ( cl_gui_docking_container ) which will appear on the selection screen, docking at the bottom. The requirement is to disable the resizing functionality of the grid when I use the sizing arrow with the mouse on dragging. Ideally I am able to expand the grid vertically covering the selection parameters. This option has to be disabled. Please suggest any options for the same.

    CREATE OBJECT r_dock_container
        EXPORTING
       side                        = cl_gui_docking_container=>dock_at_right
          extension                   = 780
          caption                     = 'Materials'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF
    I think extension my help..  

  • Cannot run X apps in a docker container

    Hi, I have a Dockerfile which enables me to run X apps.
    It works perfectly in Ubuntu, but not in Archlinux:
    FROM mascip/archlinux:2014.12.09
    # To avoid a bug with the filesystem: https://registry.hub.docker.com/u/base/arch/
    RUN sed 's/^CheckSpace/#CheckSpace/g' -i /etc/pacman.conf
    # BROWSERS
    RUN pacman --noconfirm -S nvidia-libgl && pacman --noconfirm -S leafpad
    # NON-ROOT USER
    # Replace you uid, gid, and username
    RUN pacman --noconfirm -S sudo
    RUN export uid=1000 gid=1000 && the_user="abla" && \
    the_home="/home/${the_user}" && \
    the_capital_user=$(echo $the_user | sed 's/./\U&/') && \
    mkdir -p $the_home && \
    echo "${the_user}:x:${uid}:${gid}:${the_capital_user},,,:/${the_home}:/bin/bash" >> /etc/passwd && \
    echo "${the_user}:x:${uid}:" >> /etc/group && \
    echo "${the_user} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${the_user} && \
    chmod 0440 /etc/sudoers.d/${the_user} && \
    chown ${the_user}:${the_user} -R ${the_home}
    # Replace username and home
    ENV USER abla
    ENV HOME /home/abla
    WORKDIR /home/abla
    USER abla
    CMD /usr/bin/leafpad
    In order to run it, I do:
    $ docker build -t a1 .
    $ docker run -ti \
    -e DISPLAY -e XAUTHORITY=/tmp/.Xauthority -v /home/user/.Xauthority:/tmp/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix \
    a1 leafpad
    which works in Ubuntu (a Leafpad window opens), but not in Arch where I get:
    leafpad: Cannot open display:
    PS: I have a similar Docker container which runs leafpad in a Ubuntu container; the problem is exactly the same for that container too.
    PPS: the Dockerfile stems from here: http://fabiorehm.com/blog/2014/09/11/ru … th-docker/
    Edit: I need to make it work soon. I would appreciate any idea to investigate further. I find X11 magic very confusing.
    Last edited by mascip (2015-03-02 14:09:58)

    I have tried checking that the Xserver was running with
    $ ps aux | grep X
    and it wasn't (is that even possible, as things were displaying on my screen?)
    So I installed the whole xorg group:
    $ sudo pacman -Sy xorg
    After that, startx wouldn't start anymore, and I had to upgrade everything:
    $ sudo pacman -Syu
    which fixed the problem.
    Now the X server is running:
    $ ps aux | grep X
    grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
    root 335 0.8 1.0 289376 42688 tty1 Ssl+ 06:46 0:01 /usr/lib/xorg-server/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt1 -novtswitch
    user 459 0.0 0.2 304648 9980 ? Ssl 06:46 0:00 /usr/bin/lxsession -s LXDE -e LXDE
    user 531 0.4 0.6 497908 24460 ? Sl 06:47 0:00 lxpanel --profile LXDE
    user 532 0.2 0.8 607376 34960 ? Sl 06:47 0:00 pcmanfm --desktop --profile LXDE
    user 944 0.0 0.0 10712 2256 pts/1 S+ 06:49 0:00 grep --color=auto X
    but Leafpad still won't be displayed and throws the same error.
    Any more ideas?
    Last edited by mascip (2015-03-02 08:04:26)

  • Selection screen elements in docking container

    Hi fellow abapers
    Is there any way to create pushbutton, input fields (Parameters or select-options ) in a docking container.
    Plz help.
    Regards
    Prabumanoharan

    Abhi,
    I can understand what are you trying to do. But that is not possbile with a DOCKING container.
    Here is a work around. Have two screens, one with the fields that you want to display and other one empty. Whenever you want to decrease the size, just replace the actual screen with fields with the dummy empty screen.
    There is NO other way of doing this.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Docking container and SAP standard transaction

    Hello,
    in one screen I have a tree control container and a docking container. With the tree control container everything is perfect. If the user does a click on a node on the tree in the docking container there should be shown a SAP standard transaction (QA03) with the corresponding data.
    I have not found a possibility to show QA03 or QM03 in a docking container. I also tried it in a splitter container, but I do not know how.
    Can anybody help me?
    Greetings
    Corinna

    Hello Corinna
    There is a simple answer to your question: it is not possible.
    Container can only hold other containers or controls.
    Do not be fooled by the ABAP workbench where we apparently can switch between different transactions (e.g. display a class [SE24], show method coding [SE80], double-click on a DDIC structure [SE11]). The ABAP workbench simply changes the control to be displayed but NOT the transaction (remains always the same).
    Regards
      Uwe

  • Problem with ALV in Docking container

    Dear All,
    I have created an <b>editable ALV</b> in a <b>docking container</b>. In this ALV there are some custom buttons in the toolbar. In case a custom activity, in the toolbar, is executed some checks are performed which when fail an error message issued.
    The problem: After the error msg is received if the user corrects the error and re-executes the toolbar custom activity the execution of the program is being terminated and it takes me out of the transaction which should not be the case. I tried to debug/place a hard break-point at the piece of code which should be executed but no success..
    Note: In case i use a custom control then everything is working fine. The reason i want to use a docking container over a custom container, is that if the ALV is placed in a docking container it occupies the complete screen area irrespective of the resolution of the screen.
    Can anyone help as to why this problem is happening and how it can be resolved.
    Thanks in advance for your help.
    regards
    Nitesh

    Well, if you want to try to use a custom container, the trick is to make the screen really big, and then make the container just as big, then double click on the control in screen painter, and set the vertical and horizontal resizing.   Doing this will make the ALV adjust depending on screen resolution. 
    Regards,
    RIch Heilman

  • Best way to implement a docking container

    Hi everyone,
    I need to create a docking container that behaves the same way the draggable panel system works in Flex Builder (Eclipse):
    - Dock other containers to the edges
    - Automatically layout other containers when the dragged container is docked into/out of an edge
    Is there a custom control that would enable me to do this? If not, what's the best approach to create one?
    Thanks,
    Amir

    Hi snidely_whiplash,
    snidely_whiplash wrote:
    What's the best way to implement a shared Blocking Queue that multiple JVMs can enqueue objects in and multiple JVM's can dequeue from simultaneously?
    Also, I see references on the web to com.tangosol.coherence.component.util.queue.ConcurrentQueue but I don't see it in the current API docs...
    ThanksThat class is an internal class, AFAIK.
    As for implementing a queue, you might want to look at Ashish Srivastava's ezMQ component for some ideas:
    http://ezsaid.blogspot.com/2009/01/implementing-jms-queue-on-top-of-oracle.html
    Best regards,
    Robert

  • Creating Context Menu in ALV tree defined inside DOCKING CONTAINER

    Dear Experts.
    Can you please tell me which EVENTS should i use in CLASS: CL_GUI_SIMPLE_TREE to get a Context menu after right click on any tree node in ALV Tree which has been defined inside a Docking Container.
    Regards Arnab.

    Hi,
    Check Program SAPSIMPLE_TREE_CONTEXT_MEN_DEM and check event node_context_menu_request
    Hope this helps you.
    Thanks,
    Prashanth
    Edited by: Prashanth KR on Jun 2, 2009 7:50 AM

Maybe you are looking for