Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

REUSE_ALV_COMMENTARY_WRITE IN TOP OF PAGE

Former Member
0 Kudos

Hello experts ,

I want to write comment in top of page on my alv , i was do this way :

l_repid = sy-cprog.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = 'X '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

i_callback_program = l_repid

  • I_CALLBACK_PF_STATUS_SET = 'ALV_PF_STATUS_SET'

i_callback_user_command = 'ALV_USER_COMMAND'

i_callback_top_of_page = 'TOP_OF_PAGE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

i_structure_name = 'ZAGE_LCLBLK'

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

is_layout = l_layout

  • IT_FIELDCAT =

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

i_save = 'A'

is_variant = is_variant

it_events = gt_events[]

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_ADD_FIELDCAT =

  • IT_HYPERLINK =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IT_EXCEPT_QINFO =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = dtab

  • 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 e04_comment_build USING e04_lt_top_of_page TYPE slis_t_listheader.

DATA: ls_line TYPE slis_listheader.

CLEAR ls_line.

ls_line-typ = 'H'.

ls_line-info = 'LOCAL CUSTOMERS AGE REPORT INCL BLOCKING INFO'(001).

APPEND ls_line TO e04_lt_top_of_page.

CLEAR ls_line.

ls_line-typ = 'H'.

  • ls_line-info = text-com , p_comCod.

CONCATENATE text-com '' p_comcod INTO ls_line-info ."devlop30.11.08

APPEND ls_line TO e04_lt_top_of_page.

ENDFORM.

FORM top_of_page.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = gt_list_top_of_page.

ENDFORM.

After this code , i wasn't sea my comment in my alv report , what can be the problem ?

Thanks for your help.

Avi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You should instead pass e04_lt_top_of_page as a parameter to the function module.

6 REPLIES 6

Former Member
0 Kudos

Hi,

You should instead pass e04_lt_top_of_page as a parameter to the function module.

Former Member
0 Kudos

Hi

see this link

see taruns answer.

Former Member
0 Kudos

Hi Avi,

In the TOP_OF_PAGE subroutine populate the gt_list_top_of_page internal tables TYP and INFO fields.

INFO should contain the content of the header in lines of 60 characters each and TYP defines the type of the INFO e.g. 'S' for normal or 'H' for header etc.

Cheers,

Aditya

former_member212002
Active Contributor
0 Kudos

Hi,

Please have a look here

http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm

Regards

Abhinab

Edited by: Abhinab Mishra on Apr 12, 2009 5:46 PM

MarcinPciak
Active Contributor
0 Kudos

Hi,

The problem lies here:


FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = e04_lt_top_of_page. "you fill this table with data not gt_list_top_of_page, so pass it here
ENDFORM.

Regards

Marcin

Former Member
0 Kudos
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = e04_lt_top_of_page. " <-- Please change this since you are populating data in this table.
ENDFORM.

Regards,

Lalit Mohan Gupta.