2007 Apr 10 6:37 PM
Hi,
How can i specify end-of-page in ALV (like top-of-page)?
Thanks
Hi,
How can i specify end-of-page in ALV (like top-of-page)?
Thanks
2007 Apr 10 6:40 PM
Please see this example program.
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
Regards,
RIch Heilman
2007 Apr 10 6:47 PM
Hi,
Check this code
Perform following steps if you are using ALV FM.
<b>REPORT ZTEST LINE-COUNT 64(10). "reserve 10 lines for endof page</b>
Note: END OF PAGE can be found in Printout, you can't see it in Display.
check it in Print.
1. Build the events table
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS.
IF SY-SUBRC <> 0.
ENDIF.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE ALV_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO RT_EVENTS.
ENDIF.
2. Write a subroutine END_OF_PAGE
FORM END_OF_PAGE. "#EC CALLED
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = SPACE
IT_LIST_COMMENTARY = ALV_LIST_TOP_OF_PAGE.
IF SY-SUBRC NE 0.
ENDIF.
ENDFORM.
3. Build the comments you want to write at the End of Page.
4. Now call the ALV FM
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = ALV_FCAT[]
I_SAVE = 'X'
IT_EVENTS = ALV_EVENTS[]
TABLES
T_OUTTAB = ITAB1
EXCEPTIONS
PROGRAM_ERROR = 0
OTHERS = 0.
Thanks,
Vinay
2007 Apr 10 6:50 PM
2007 Apr 10 6:58 PM
check the below link ... u will get lot of alv examples....
http://www.geocities.com/mpioud/Abap_programs.html
~~Guduri
2007 Apr 10 7:45 PM
Hi..,
yes u can !!
we have the event END_OF_PAGE in ALV...
give a form name to the it_event table along with this event name..
and in the form write whatever u want ..
this will be appeared a End-of-page in the Output display , if u have multiple number of pages !!
regards,
sai ramesh
2007 Apr 11 2:07 PM
i am using function 'REUSE_ALV_GRID_DISPALY'. i display top_of_page (title, date, etc) but not end_of_page. I went write sy-uname in end_of_page.
please help
2007 Apr 11 2:13 PM
Hi,
Data: it_events type slis_t_event.
Data: w_events type slis_alv_event.
w_events-name = 'END_OF_LIST'.
w_events-form = 'SUB_END_LIST'.
append w_events to it_events.
Form sub_end_list.
write: sy-uname,sy-pagno.
endform.
pass the it_events to the it_event parametrers in ur FM
santhosh
2007 Apr 11 2:59 PM
2007 Apr 11 5:43 PM
thanks santhosh but this code is for end of list me i went end of page. I replaced end_of_list by end_of_page but its not ok.
Data: it_events type slis_t_event.
Data: w_events type slis_alv_event.
w_events-name = 'END_OF_LIST'.
w_events-form = 'SUB_END_LIST'.
append w_events to it_events.
Form sub_end_list.
write: sy-uname,sy-pagno.
endform.
pass the it_events to the it_event parametrers in ur FM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |