Skip to Content
author's profile photo Former Member
Former Member

dock container

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 18, 2006 at 04:20 AM

    Hi,

    We use docking container to place ALV grid.We do not need to drag and drop container in the screen.It will be created through coding.

    We can also use custom container to hold ALV grid.In that,it needs to be placed in the screen thro' drag and drop.

    We can create docking container in a report as follows.

    data : o_docking type ref to cl_gui_docking_container.

    Then go to pattern in ABAP Editor.

    Select ABAP object patterns radio button.

    Then click Create object radio button.

    Instance : o->docking

    Objecttypename :CL_GUI_docking_container

    Then you will get

    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.

    Fill the necessary parameters.

    Kindly reward points by clicking the star on the left of reply,if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Nothing is required for parent parameter.

      DATA:pav1 TYPE REF TO cl_gui_alv_grid.

      data : o_docking type ref to cl_gui_docking_container.

      <b>data itab type standard table of mara.

      *If you are not giving standard table,you should pass the user defined structure in SE11.

      </b>PARAMETERS: s_matnr LIKE mara-matnr.

      SELECT * FROM mara INTO TABLE

      itab WHERE matnr = s_matnr.

      call screen 9000.

      class lcl_event_receiver definition.

      public section.

      methods:

      endclass.

      class lcl_event_receiver implementation.

      endclass.

      module STATUS_9000 output.

      • Creating docking container

      CREATE OBJECT o_docking

      EXPORTING

      RATIO = '95'.

      • Creating grid

      create object pav1 exporting i_parent = o_docking.

      • Placing the ALV output table in the grid

      CALL METHOD pav1->set_table_for_first_display

      EXPORTING

      I_STRUCTURE_NAME = 'MARA'

      • MARA should be in uppercase

      CHANGING

      it_outtab = itab.

      endmodule. " STATUS_9000 OUTPUT

      module USER_COMMAND_9000 input.

      endmodule. " USER_COMMAND_9000 INPUT

      PS:Just copy and paste the program and double click 9000 in the line call screen 9000.Ceate a screen by giving description.In the flow logic of the screen,uncomment PBO and PAI module.Activate flow logic,screen and program.Then execute the program.

      Kindly reward points by clikcing the star on the left of reply,if you found it useful.Hope this solves your problem.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.