Application Development and Automation 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: 
Read only

Alv Header Box

Former Member
0 Likes
777

Hi Abapers,

I added a top-of-page event to my alv grid and now I am getting the header box that you get when you use the function module ALV_COMMENTARY_WRITE.

Does anyone have an idea how to stop this box from appearing?

code:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_grid_title = ztitle

i_callback_program = 'SAPLZSUSD'

i_callback_pf_status_set = 'PF_STATUS_SET_USER'

i_callback_user_command = 'USER_COMMAND_USER'

is_layout = ct_layout

I_CALLBACK_TOP_OF_PAGE = 'PAGE_HEADING'

it_fieldcat = ct_fieldcat

it_excluding = it_excluding

i_save = 'X'

TABLES

t_outtab = gt_users_complete

EXCEPTIONS

program_error = 1

OTHERS = 2.

4 REPLIES 4
Read only

Former Member
0 Likes
596

Hi James,

Try commenting following code part and check..

I_CALLBACK_TOP_OF_PAGE = 'PAGE_HEADING'

Hope that helps.

Regards

Kapadia

***Assigning points is the way to say thanks in SDN.***

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
596

Hi

Use:

itab_listheader TYPE slis_t_listheader, " ListHeader

PERFORM top_of_page.

FORM top_of_page .

  • ALV commetry write function

FORM alv_event .

  • Get ALV event

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = itab_event.

READ TABLE itab_event WITH KEY name = slis_ev_top_of_page INTO wa_event.

  • READ TABLE itab_event WITH KEY name = slis_ev_end_of_list INTO wa_event.

IF sy-subrc = 0.

MOVE 'TOP_OF_PAGE' TO wa_event-form.

  • MOVE 'END_OF_LIST' TO wa_event-form.

APPEND wa_event TO itab_event.

ENDIF.

CLEAR wa_event.

ENDFORM. " alv_event

&----


*& Form top_of_page

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM top_of_page .

  • ALV commetry write function

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = itab_listheader.

ENDFORM. " top_of_page

and give the itab_event parameter in ALV Grid display.

Regards,

kumar

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = itab_listheader.

ENDFORM. " top_of_page

Read only

Former Member
0 Likes
596

What I am try to say is that I <b>don't</b> want the header box to appear. But I <b>do</b> want to use the top of page event so when the grid is printed out the title is at the beggining of each page.

Read only

Former Member
0 Likes
596

Hi

Ur provided coding is not enough

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_grid_title = ztitle

i_callback_program = 'SAPLZSUSD'

i_callback_pf_status_set = 'PF_STATUS_SET_USER'

i_callback_user_command = 'USER_COMMAND_USER'

is_layout = ct_layout

I_CALLBACK_TOP_OF_PAGE = 'PAGE_HEADING'

it_fieldcat = ct_fieldcat

<b>it_events = i_events</b>(shud be there)

it_excluding = it_excluding

i_save = 'X'

TABLES

t_outtab = gt_users_complete

EXCEPTIONS

program_error = 1

OTHERS = 2.

Otherwise its not display the TOP-OF-PAGE.

**Please reward suitable points***

With Regards

Navin Khedikar