Skip to Content
0
Former Member
Aug 10, 2007 at 12:26 AM

header in ALV

13 Views

Hi abapers,

I have a problem regarding my header in alv

here is my code:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = l_repid

i_callback_top_of_page = 'F_TOP_PAGE'

it_fieldcat = t_fieldcat[]

i_save = c_a

it_sort = t_sort[]

TABLES

t_outtab = t_final[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

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

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

ENDIF.

FORM f_top_page.

DATA: t_header TYPE slis_t_listheader,

t_header01 TYPE slis_listheader,

lv_vkorg(30) type c,

lv_vtweg(30) type c.

clear: t_header,

t_header01.

  • Sales Organization

t_header01-typ = 'H'.

concatenate 'Sales Organization:' s_vkorg

into lv_vkorg separated by space.

t_header01-info = lv_vkorg.

APPEND t_header01 TO t_header.

CLEAR t_header01.

  • Distribution Channel

t_header01-typ = 'H'.

concatenate 'Distribution Channel:' s_vtweg

into lv_vtweg separated by space.

t_header01-info = lv_vtweg.

APPEND t_header01 TO t_header.

CLEAR t_header01.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = t_header.

ENDFORM.

and the output was

Sales Organization: IEQS044

Distribution Channel: IEQ11