on 01-23-2008 10:21 AM
Hello Gurus, i need a "before end of page event" in a smartform or "last line of the table on the current page event". I have a table running on three or more pages. The problem is that before the page changes i have to use a different linetype so that the last line of the table on the current page has a different design. The footer of the table must appear only on the last page. Can anyone help ?
hi
good
U need to call the FM 'REUSE_ALV_EVENTS_GET' and capture the end-of-page event in a internal table and call the respective form to triger endofpage like the below example:
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = pa_events
exceptions
list_type_wrong = 1
others = 2.
if sy-subrc 0.
endif.
Specify events used in selection screen
read table pa_events with key name = slis_ev_top_of_page
into ls_events.
if sy-subrc = 0.
if flag = 1.
ls_events-form = 'TOP_OF_PAGE1'.
elseif flag = 2.
ls_events-form = 'TOP_OF_PAGE2'.
else.
ls_events-form = 'TOP_OF_PAGE3'.
endif.
modify pa_events from ls_events index sy-tabix.
clear ls_events.
endif.
form top_of_page1.
write: 'Last Year'.
endform. "TOP_OF_PAGE1
U just need to replace the TOP-OF-PAGE WITH END-OF-PAGE event.
thanks
mrutyun^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
create two different line types and count the number of lines fits per a page and count the variable in a lopp then put the condition that when count reaches to that number of lines (Say number of lines fits per page 15) use the second line type. and initialize the count to 1 when it reaches to second page.
Reward if useful.
Regards,
Nageswar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.