cancel
Showing results for 
Search instead for 
Did you mean: 

Top-of-page for list display thru ALV

Former Member
0 Kudos

Hi All,

I was suppose to write a detail report thru ALV, this I have handled thru hotspot and in the user_command,I am have the below code.. for ALv I am using FM REUSE_ALV_GRID_DISPLAY

FORM User_command.

WHEN '&IC1'.

PERFORM LIST_DISPLAY using RS_SELFIELD-tabindex.

ENDFORM.

FORM LIST_DISPLAY USING P_INDEX.

LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 500.

SET PF-STATUS space.

SUPPRESS DIALOG.

Read table g_t_sum index p_index.

loop at g_t_emp where code = g_t_sum-code and

keyfld = g_t_sum-keyfld

write 😕 g_t_emp-pernr, 10(25) g_t_emp-sname.

endloop.

ENDFORM.

The above write statment is not trigerring either top-of-page ot top-od-page during line-selection.

I have even tried pushing the event and form name into it it_events..

Kindly suggest how to go about this, I need to get top-of-page for this list-display.

Thanks in advance

Regards,

Mangalagi S V

Accepted Solutions (1)

Accepted Solutions (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

In this Reuse funtion module, are you passing,

i_callback_top_of_page = 'TOP-OF-PAGE' .

Check this link for sample program.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_rephead.htm

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Thanks for all your replies.

I am not looking at top_of_page for GRID, it's working for me but I need top_of_page for the list display that is for the list which I am generating when the users double click it particular row.

By default I am getting the below header automatically.

Dynamic data selection 1

-


Though I have coded the header in top-of-page during line selection since I am writing the list under USER_COMMAND, I thought I will get the header but it's not..

The FM is attached below..

  • Ausgaberoutine mit FB REUSE_ALV_GRID_DISPLAY

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_f_repid

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'USER_COMMAND'

i_callback_top_of_page = 'TOP_OF_PAGE'

is_layout = g_r_layout

it_fieldcat = g_t_fcat

i_save = 'A'

  • is_variant = s_variant "70492INF0039

is_variant = g_f_variant "70492INF0039

is_events = it_events[]

TABLES

t_outtab = g_t_sum.

----


  • FORM USER_COMMAND *

----


  • Callbackroutine: Ausgabe Fehlerliste XDGL9CK069538 *

----


FORM USER_COMMAND USING R_UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

case r_ucomm.

when 'OK'.

**

WHEN '&IC1'.

PERFORM LIST_DISPLAY using RS_SELFIELD-tabindex.

endcase.

ENDFORM.

Kindly suggest

Thanks in advance.

Regards,

Mangalagi S V

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You are using function module for GRID display.You should use LIST function module.

Check this link for top of page for list display.

http://www.sapdevelopment.co.uk/reporting/alv/alvlist_code.htm

Former Member
0 Kudos

I'm having the same problem as well !!

@ Jayanthi

The source code fails for ALV List , since there's no "i_callback_top_of_page = 'TOP-OF-PAGE' ' in the function module for ALV List. It's only for Grid !! It gives a run time error.

Former Member
0 Kudos

Hi,

To get top-of-page using REUSE_ALV_GRID_DISPLAY, Check whether u r passing the TOP-OF-PAGE event in the funtion. Also check this link for sample code and discussion

https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_rephead.htm

Have a look at the above link and the related link in the same link.

Get back to me if u have any queries.

Thanks & Regards,

Judith.

Message was edited by: Judith Jessie Selvi

Message was edited by: Judith Jessie Selvi

former_member214131
Active Contributor
0 Kudos

Hello,

I am not clear about your requirement. Do you want to display the Top of Page only in LIST form in an ALV grid output?

Have you checked the SAP sample programs on ALV in Dev. class SLIS ( BCALV_TEST_* )

Best Regards, Murugesh AS