Skip to Content

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

Alv Grid -- field name heading missing

Hi ,

Here am creating a alv report . in my ouput am not getting output field name please help me

*    n.a.                                                              *

************************************************************************

REPORT z30_reckauf_logreport.

** Data declarations

TABLES: z30_reckauf_log.

DATA:lo_container TYPE REF TO cl_gui_custom_container,

      lo_grid      TYPE REF TO cl_gui_alv_grid,

      lt_z30_reckauf_log TYPE TABLE OF z30_reckauf_log,

      OK_CODE LIKE sy-ucomm.

SELECT-OPTIONS: s_store   FOR z30_reckauf_log-retailstoreid,

                 s_date    FOR z30_reckauf_log-businessdaydate,

                 s_cust    FOR z30_reckauf_log-plantcustomer.

START-OF-SELECTION.

** Fetch log data from custom table

   SELECT INTO TABLE lt_z30_reckauf_log

     FROM z30_reckauf_log

     WHERE retailstoreid   IN s_store

      AND businessdaydate  IN s_date

       AND plantcustomer   IN s_cust.

   CALL SCREEN 100.

*&---------------------------------------------------------------------*

*&      Module  CREATE_CONTROL  OUTPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE create_control OUTPUT.

   CHECK lo_container IS INITIAL.

   CREATE OBJECT lo_container

     EXPORTING

       container_name              = 'CONTAINER'

     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 lo_grid

     EXPORTING

       i_parent          = lo_container

     EXCEPTIONS

       error_cntl_create = 1

       error_cntl_init   = 2

       error_cntl_link   = 3

       error_dp_create   = 4

       OTHERS            = 5.

   IF sy-subrc <> 0.

     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

   ENDIF.

    CALL METHOD lo_grid->set_table_for_first_display

     EXPORTING

       i_structure_name              = 'z30_reckauf_log'

     CHANGING

       it_outtab                     = lt_z30_reckauf_log

     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.

ENDMODULE.

*&---------------------------------------------------------------------*

*&      Module  STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE status_0100 OUTPUT.

   SET PF-STATUS 'STATUS'.

   SET TITLEBAR ' TITLE'.

ENDMODULE.

*&---------------------------------------------------------------------*

*&      Module  USER_COMMAND_0100  INPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

MODULE user_command_0100 INPUT.

CASE OK_CODE.

   WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

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