Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

creat object


something I don't understand. I create a instance grid to display my alv as follows:

DATA: grid TYPE REF TO cl_gui_alv_grid.

      i_parent = cl_gui_custom_container=>default_screen.

  CALL METHOD grid->set_table_for_first_display
      i_structure_name              = 'ZXML'
      is_layout                     = gs_layout
      it_outtab                     = gs_structure-list
      invalid_parameter_combination = 1
      program_error                 = 2
      too_many_lines                = 3
      OTHERS                        = 4.

what I not understand is, why can I use default screen from cl_gui_custom_container? It's not the class which I define for grid.

And the classes cl_gui_custom_container and cl_gui_alv_grid don't inherit from each other.

Former Member
Former Member replied

The classes don't inherit from each other, they are performing certain task thats all.

You can use this always because they are public static and also you need to keep in mind before using that it meets your requirement. certain times it may happen that you need to create a screen with the ALV container and some parameters on the screen, at this point of time, default screen will not work, you will have to create your own screen

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question