Application Development 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: 

Urgent regarding Display fields in ALV End of Page

Former Member
0 Kudos

Hi,

I am displaying the output using ALV List Display. Output of the report is displayed in different pages based on a particular delivery address. I have to display some of the fields (Delivery address) of the final internal table in the end of page. I need to trigger this end of page in alv based on the selection of radio buttons also.

Its very urgent. Respond immediately.

Thanks

Geeta

5 REPLIES 5

Former Member
0 Kudos

Refer the follwoing code:

call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  
            i_callback_html_end_of_list = 'END_OF_LIST_HTML'
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            i_save                  = 'X'
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.


*&------------------------------------------------------------------*
*&      Form  end_of_list_html
*&------------------------------------------------------------------*
*       output at the end of the list - not in printed output       *
*&------------------------------------------------------------------*

FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
  DATA: ls_text TYPE sdydo_text_element,
        l_grid     TYPE REF TO cl_gui_alv_grid,
        f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.

  ls_text = 'Footer title'.

* adds and icon (red triangle)
  CALL METHOD end->add_icon
    EXPORTING
      sap_icon = 'ICON_MESSAGE_ERROR_SMALL'.

* adds test (via variable)
  CALL METHOD end->add_text
    EXPORTING
      text         = ls_text
      sap_emphasis = 'strong'.

* adds new line (start new line)
  CALL METHOD end->new_line.

* display text(bold)
  CALL METHOD end->add_text
    EXPORTING
      text         = 'Bold text'
      sap_emphasis = 'strong'.

* adds new line (start new line)
  CALL METHOD end->new_line.

* display text(normal)
  CALL METHOD end->add_text
    EXPORTING
      text         = 'Normal text'.

* adds new line (start new line)
  CALL METHOD end->new_line.

* display text(bold)
  CALL METHOD end->add_text
    EXPORTING
      text         = 'Yellow triangle'
      sap_emphasis = 'strong'.

* adds and icon (yellow triangle)
  CALL METHOD end->add_icon
    EXPORTING
      sap_icon = 'ICON_LED_YELLOW'.

* display text(normal)
  CALL METHOD end->add_text
    EXPORTING
      text         = 'More text'.

*set height of this section
  CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
      e_grid = l_grid.

  CALL METHOD l_grid->parent->parent->(f)
    EXPORTING
      id     = 3
      height = 14.

ENDFORM. "end_of_list_html.

Former Member
0 Kudos

Hi Geeta,

Use FM <b>REUSE_ALV_EVENTS_GET</b> for getting all the events in ALV. Use event <b>END_OF_PAGE</b> to fulfil ur requirement.

Reward points if helpful.

Regards,

Hemant

Former Member
0 Kudos

hi

good

try this

form END_OF_LIST.

data: listwidth type i,

ld_pagepos(10) type c,

ld_page(10) type c.

skip.

write:/40 'Page:', sy-pagno .

endform.

thanks

mrutyun^

Former Member
0 Kudos

Hi,

Thanks a lot for your response. I am displaying the output using normal ALV List (without oops concept). I am able to display the fields in the top of page using loop and endloop for final internal table and just write the field. But the same is not working in the end of page.

I have written the following code for reserving lines for footer

and page break based on material number.

ls_prntparams-reserve_lines = '7'. "Lines reserved for footer

ls_prntparams-no_coverpage = 'X'.

ls_sort-fieldname = 'MATNR'.

ls_sort-group = '*'.

APPEND ls_sort TO ls_sort1.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = gv_repid

is_layout = gs_layout

it_fieldcat = gt_fcat[]

it_events = gs_events

is_print = ls_prntparams

it_sort = ls_sort1

TABLES

t_outtab = gt_final.

I want to know if we give page break based on a particular field the end of page will be triggered or not? End of page is not triggering for me. Please help me out how to get fields in end of page in alv.

0 Kudos

HI, i want to display page no using end of page event.

so, if possible help me in this regd.

bye.