Application Development and Automation 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: 
Read only

ALV

Former Member
0 Likes
528

Hi,

we developed one ALV Report use the FM REUSE_ALV_GRID_DISPLAY, heading will be displayed using FM REUSE_ALV_COMMENTARY_WRITE

I have aquery

I want add the footer for this ALV GRID Report,

How to add the footer

Plz send the logic or sample program

Award points compusory for helpful answer

Regards

SEK

Hi,

we developed one ALV Report use the FM REUSE_ALV_GRID_DISPLAY, heading will be displayed using FM REUSE_ALV_COMMENTARY_WRITE

I have aquery

I want add the footer for this ALV GRID Report,

How to add the footer

Plz send the logic or sample program

Award points compusory for helpful answer

Regards

SEK

4 REPLIES 4
Read only

Former Member
0 Likes
505

hi,

1. Please give me general info on ALV.

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

2. How do I program double click in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=11601

http://www.sapfans.com/forums/viewtopic.php?t=23010

3. How do I add subtotals (I have problem to add them)...

http://www.sapfans.com/forums/viewtopic.php?t=20386

http://www.sapfans.com/forums/viewtopic.php?t=85191

http://www.sapfans.com/forums/viewtopic.php?t=88401

http://www.sapfans.com/forums/viewtopic.php?t=17335

4. How to add list heading like top-of-page in ABAP lists?

http://www.sapfans.com/forums/viewtopic.php?t=58775

http://www.sapfans.com/forums/viewtopic.php?t=60550

http://www.sapfans.com/forums/viewtopic.php?t=16629

5. How to print page number / total number of pages X/XX in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)

6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.

http://www.sapfans.com/forums/viewtopic.php?t=64320

http://www.sapfans.com/forums/viewtopic.php?t=44477

7. How can I set the cell color in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=52107

8. How do I print a logo/graphics in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=81149

http://www.sapfans.com/forums/viewtopic.php?t=35498

http://www.sapfans.com/forums/viewtopic.php?t=5013

9. How do I create and use input-enabled fields in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=84933

http://www.sapfans.com/forums/viewtopic.php?t=69878

10. How can I use ALV for reports that are going to be run in background?

http://www.sapfans.com/forums/viewtopic.php?t=83243

http://www.sapfans.com/forums/viewtopic.php?t=19224

11. How can I display an icon in ALV? (Common requirement is traffic light icon).

http://www.sapfans.com/forums/viewtopic.php?t=79424

http://www.sapfans.com/forums/viewtopic.php?t=24512

12. How can I display a checkbox in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=88376

http://www.sapfans.com/forums/viewtopic.php?t=40968

http://www.sapfans.com/forums/viewtopic.php?t=6919

Link containing all the important PDFS. ( There is a PDF for ALV Grid in this link)

http://www.easymarketplace.de/online-pdfs.php

Hope this helps, Do reward.

Read only

Former Member
0 Likes
505

Hi,

Refer the following code.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = gt_events

EXCEPTIONS

list_type_wrong = 0

OTHERS = 0.

READ TABLE gt_events INTO lwa_events

WITH KEY name = slis_ev_end_of_list.

IF sy-subrc = 0.

lwa_events-form = 'END_OF_LIST'.

MODIFY gt_events FROM lwa_events INDEX sy-tabix.

CLEAR lwa_events.

ENDIF.

  • The form is called dynamically.

form end_of_list .

write:

write:

endform.

Reward if useful.

Regards,

Ramya

Read only

0 Likes
505

Thanks for your rely

but this is not useful for ALV GRID,

Is there is any other method plz let meknow

Thanks

SEK

Read only

Former Member
0 Likes
505

Hi,

1. If you are using FM

Use

wa_footer-typ = 'S'.

wa_footer-info = 'Tanaya'.

APPEND wa_footer TO it_footer.

wa_footer-typ = 'H'.

wa_footer-info = 'Tanaya'.

APPEND wa_footer TO it_footer.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = it_footer.

i_end_of_list_grid = 'X'.

2. If you are using OOPs

&----


*& 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 = TEXT-L02.

  • 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(normal)

CALL METHOD END->ADD_TEXT

EXPORTING

TEXT = TEXT-L03.

  • adds new line (start new line)

CALL METHOD END->NEW_LINE.

    • display text(normal)

CALL METHOD END->ADD_TEXT

EXPORTING

TEXT = TEXT-L04.

  • adds new line (start new line)

CALL METHOD END->NEW_LINE.

    • display text(normal)

CALL METHOD END->ADD_TEXT

EXPORTING

TEXT = TEXT-L05.

  • adds new line (start new line)

CALL METHOD END->NEW_LINE.

    • display text(normal)

CALL METHOD END->ADD_TEXT

EXPORTING

TEXT = TEXT-L06.

*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.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = IT_VARIANT-REPORT

IT_FIELDCAT = GT_FIELDCAT

I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

I_CALLBACK_HTML_END_OF_LIST = 'END_OF_LIST_HTML'

I_SAVE = 'A'

IS_VARIANT = IT_VARIANT

  • IT_EVENTS = GT_EVENTS[]

TABLES

T_OUTTAB = GT_FINAL[]

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IF SY-SUBRC 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.