Skip to Content
0
Former Member
Jun 03, 2010 at 03:32 PM

REUSE_ALV_COMMENTARY_WRITE not writing the the the hearder Lines in ECC 6.0

126 Views

Hi Experts,

I am using 'REUSE_ALV_COMMENTARY_WRITE' to write top of paGe in ALV display.

But it only display blank space in the header.

Any suggestions?

here is the code:

FORM top_of_page. "#EC CALLED

CLEAR : wa_commentary,

it_commentary,

it_commentary[].

MOVE sy-datum TO lv_date.

WRITE lv_date USING EDIT MASK '__.__.____' TO lv_date1.

CONCATENATE text-006 text-010 lv_date1 INTO lv_header_info SEPARATED BY space.

MOVE co_h TO wa_commentary-typ.

MOVE lv_header_info TO wa_commentary-info.

APPEND wa_commentary TO it_commentary.

SHIFT so_matnr-high LEFT DELETING LEADING '0'.

SHIFT so_matnr-low LEFT DELETING LEADING '0'.

IF so_matnr-high NE space.

CONCATENATE text-011 text-010 so_matnr-low text-016 so_matnr-high INTO lv_header_info SEPARATED BY space.

ELSE.

CONCATENATE text-011 text-010 so_matnr-low INTO lv_header_info SEPARATED BY space.

ENDIF.

MOVE co_s TO wa_commentary-typ.

MOVE lv_header_info TO wa_commentary-info.

APPEND wa_commentary TO it_commentary.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = it_commentary.

ENDFORM. "top_of_page

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

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = lv_repid

it_fieldcat = it_fieldcat

i_callback_top_of_page = 'TOP_OF_PAGE'

TABLES

t_outtab = it_sapnodiff

EXCEPTIONS

program_error = 1

OTHERS = 2.

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

Regards

Saroj