Skip to Content
0
Former Member
May 20, 2010 at 05:12 PM

Grind on ALV not showing on Screen

23 Views

Hi Gurus,

can someone identify what I am missing? The ALV header shows when I run the screen and my back buttons work correctly but no data shows?

this code in inside my PBO section

MODULE STATUS_0100 OUTPUT.
 SET PF-STATUS 'DISPLAY'.
 SET TITLEBAR '100'.

 PERFORM display_alv.

ENDMODULE.                 " STATUS_0100  OUTPUT

FORM DISPLAY_ALV .

  if grid_leg_gl is INITIAL.
*----Creating custom container instance
    CREATE OBJECT custom_cont_lg_gl
      EXPORTING
        container_name              = gr_leg_gl.
    IF sy-subrc <> 0.
*--Exception handling
    ENDIF.

*----Creating ALV Grid instance
    CREATE OBJECT grid_leg_gl
      EXPORTING
        i_parent          = custom_cont_lg_gl.
    IF sy-subrc <> 0.
*--Exception handling
    ENDIF.

*----Preparing field catalog.
    PERFORM prepare_field_catalog CHANGING gt_gl_fieldcat .
*----Preparing layout structure
    PERFORM prepare_layout CHANGING gs_gl_layout .

*----Here will be additional preparations
*--e.g. initial sorting criteria, initial filtering criteria, excluding
*--functions

    call method grid_leg_gl->set_table_for_first_display
      EXPORTING "i_structure_name = 'ZSTR_VARIANCE2'
        is_layout       = gs_gl_layout
      CHANGING
        it_fieldcatalog = gt_gl_fieldcat
        it_outtab       = gt_leg_gl.

    IF sy-subrc <> 0.
*--Exception handling
    ENDIF.

  ELSE .
    CALL METHOD grid_leg_gl->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
    EXCEPTIONS
    finished = 1
    OTHERS = 2 .
    IF sy-subrc <> 0.
*--Exception handling
    ENDIF.
  ENDIF .

ENDFORM.                    " DISPLAY_ALV



Edited by: ABAP-ER19 on May 20, 2010 7:12 PM