Skip to Content
0
Former Member
Nov 23, 2006 at 08:58 AM

Displaying top of page in ALV

97 Views

Hi. I've been trying to display the title on the top of page in ALV, the problem is, the title in the text symbol does not show up everytime I run the program. I have attached the code I used. Hope you could help me. Thanks.

PERFORM top_comment USING gt_list_top_of_page[].

DATA: it_t247 LIKE t247 OCCURS 0 WITH HEADER LINE.

DATA: ls_line TYPE slis_listheader,

li_recs TYPE i,

lc_name(60) TYPE c,

lc_from(30) TYPE c,

lc_to(30) TYPE c.

CALL FUNCTION 'MONTH_NAMES_GET'

TABLES

month_names = it_t247.

  • Company Name

CLEAR ls_line.

ls_line-typ = 'H'.

ls_line-info = TEXT-001. "Government Service Insurance System

APPEND ls_line TO my_top_of_page.

CLEAR ls_line.

ls_line-typ = 'S'.

ls_line-info = TEXT-002. "Regular Payroll Summary

APPEND ls_line TO my_top_of_page.

  • Date

CLEAR lc_name.

CONCATENATE sy-datum+6(2) ',' INTO lc_name.

READ TABLE it_t247 WITH KEY mnr = sy-datum+4(2).

CONCATENATE text-003 it_t247-ltx lc_name sy-datum(4)

INTO lc_name SEPARATED BY space.

CLEAR ls_line.

ls_line-typ = 'H'.

ls_line-info = lc_name.

APPEND ls_line TO my_top_of_page.