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: 

End Of Page in ALV Using oops

Former Member
0 Kudos

Experts,

Could you please help me to display the data in the end of page of ALV report which I am developing using oops. Already I searched in SDN , I didn't get exact solution for my issue.

I am using END_OF_LIST event in my logic. Please help me.

Thanks...

Sridhar..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

refer to the demo program BCALV_TEST_GRID_EVENTS

2 REPLIES 2

Former Member
0 Kudos

Hi,

refer to the demo program BCALV_TEST_GRID_EVENTS

Former Member
0 Kudos

hello Sridhar. First you'll need these data declarations


*&---------------------------------------------------------------------*
*&      Form  END_OF_PAGE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM end_of_page .

*** Declaraciones para dibujar el header y footer del ALV
DATA: lr_content         TYPE REF TO cl_salv_form_element,
          footer               TYPE REF TO cl_salv_form_layout_grid,
          lr_flow              TYPE REF TO cl_salv_form_layout_flow,
          lr_label             TYPE REF TO cl_salv_form_label,
          lr_text              TYPE REF TO cl_salv_form_text,
          lr_header         TYPE REF TO cl_salv_form_header_info,
          lr_action          TYPE REF TO cl_salv_form_action_info.

After that, this is the code i have in my end_of_page subroutine.


CREATE OBJECT footer.

  lr_flow = footer->create_flow( row = 1 column = 1 ).

***********************Fila de titulos**************************************
*  Add a label to the footer grid
  lr_label = footer->create_label( row = 2 column = 2
                                               text = 'Sample Text' ).
* Add text
  lr_text = footer->create_text( row = 2 column = 2 text = sample_text_value ).
* Match text to label
  lr_label->set_label_for( lr_text ).
* Add blank row
  footer->add_row( ).
  lr_content = footer.
  cl_salv_form_content=>set( lr_content ).
ENDFORM.                    " END_OF_PAGE

You can add as many rows as you want, and playing with the row and column values can get you very nice results.

Greetings,