cancel
Showing results for 
Search instead for 
Did you mean: 

End of page event in smartforms

former_member205645
Participant
0 Kudos

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 ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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^

Former Member
0 Kudos

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

former_member205645
Participant
0 Kudos

I can`t use the solution with the line count !!!!

I need an event or something like that.

former_member205645
Participant
0 Kudos

Solved it by using footer lines !