Skip to Content
0
Former Member
Apr 21, 2014 at 02:55 PM

alv is not appearing in the same Selection Screen

57 Views

Hi people..
First time using cl_gui_docking_container.

I have a problem, my alv is not appearing in the same Selection Screen.
is there somethign wrong with my code? it doesnt even show a dump or catch.

Regards

DATA: lo_dock TYPE REF TO cl_gui_docking_container,

lo_cont TYPE REF TO cl_gui_container.

DATA: gr_table type ref to cl_salv_table,

gr_functions type ref to cl_salv_functions,

gr_display type ref to cl_salv_display_settings,

gr_columns type ref to cl_salv_columns_table,

gr_column type ref to cl_salv_column_table,

gr_sorts type ref to cl_salv_sorts,

gr_agg type ref to cl_salv_aggregations,

gr_filter type ref to cl_salv_filters,

gr_layout type ref to cl_salv_layout,

color type lvc_s_colo,

key type salv_s_layout_key.

SELECT * INTO TABLE tbl_datos_items FROM zsd_micros_bd.

CHECK lo_dock IS INITIAL.

CREATE OBJECT lo_dock

EXPORTING

repid = sy-cprog

dynnr = sy-dynnr

ratio = 70

side = cl_gui_docking_container=>dock_at_bottom

name = 'DOCK_CONT'.

IF sy-subrc <> 0.

MESSAGE 'Error in the Docking control' TYPE 'S'.

ENDIF.

TRY.

lo_cont ?= lo_dock.

cl_salv_table=>factory(

exporting r_container = lo_cont

container_name = 'DOCK_CONT'

list_display = if_salv_c_bool_sap=>false

importing r_salv_table = gr_table

changing t_table = tbl_datos_items ).

CATCH cx_salv_msg .

ENDTRY.

gr_functions = gr_table->get_functions( ).

gr_functions->set_all( abap_true ).

gr_display = gr_table->get_display_settings( ).

gr_display->set_striped_pattern( cl_salv_display_settings=>true ).

gr_display->set_list_header( 'Items de Ventas' ).

gr_table->display( )