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.
Showing results for 
Search instead for 
Did you mean: 

Graphics in ALV Header

Former Member
0 Kudos

It is possible insert a graphic in the ALV HEADER????


Former Member
0 Kudos

If you are using OO Approach , definitely possible. Few days back there was a similar post where Durairaj Athavan Raja has shared a code , how to use CL_GUI_PICTURE and a docking container to show pictures.

Take a look at this post:


Subramanian V.

0 Kudos

Thanks for your response Subramanian, i checked the URL but that post refer to insert a graphic in a selection-screen... i need it to be insert inside the ALV's Header....

0 Kudos

That is why I mentioned if you are using the OO - Approach for displaying ALV report. If so, then all that you need to do is :

a) Chalk out a custom container in the screen

b) Use the CL_GUI_PICTURE class and its respective method and show graphic, which you intend to do.

In that post, it created a docking container and used CL_GUI_PICTURE to insert a graphic. In OO approach, you can either create a docking container/custom container.


Subramanian V.

P.S. - I presume you are not using the OO Approach, if so then it would be difficult to put a picture in ALV Header

0 Kudos

I got your point.. but as you say i'm no using OO =S

0 Kudos

Use this FM


Upload the graphics from OAER



0 Kudos

hi carlos, here is the answer for your query.

FORM top-of-page1.

*ALV Header declarations

DATA: header TYPE slis_t_listheader,

wa TYPE slis_listheader.


wa-typ = 'H'.


APPEND wa TO header.

  • Function module to display logo



it_list_commentary = header

i_logo = 'ALVLOGO'.


Carlos, u have to pass the logo for ALV header in the above function module's i_logo exporting parmeter (ie., 'ALVLOGO' ). Once it is over, then pass the subroutine that holds this function module to the Reuse_ALV_Grid_Display function module's i_callback_top_of_page exporting parameter. refer the code below.



i_callback_top_of_page = 'TOP-OF-PAGE1'

it_fieldcat = fieldcatalog[]

i_save = 'A'

is_variant = newvar


t_outtab = itab_alv1


program_error = 1


here the form 'TOP-OF-PAGE1' which contains the reuse_alv_commentary_write function module is passed to exporting parameter. Now you will have your logo displayed in the ALV header.

To upload a logo ( bmp or jpg file) from the local system to SAP, use transaction code - OAER. (business Doc. navigator).

Inside that give class name - pictures

class type - OT

object key - ALVLOGO

click execute/f8. Then inside the screen below, click standard doc.type list and select screen. Right click on it and click import file. Then select a file from ur local system and upload it. The object key which we give here is the value passed to Reuse_alv_commentary_write function.

Hope this clears your doubt.

0 Kudos

Hi Prabaharan,

<i>Thanks for this excellent piece of information. I have followed all the steps you have mentioned, however the logo is not being displayed. I downloaded the Google Logo - Winter one(2004) , uploaded through <b>OAER</b> transaction , as you have mentioned. The object id and the logo in the parameter of the FM <b>REUSE_ALV_COMMENTARY_WRITE</b> is the same. Is there any OSS Note that I need to refer here ? I have done this previously, and I was not able to see any logo. I thought , perhaps I am doing it incorrectly. However, after following your steps, I still have not hit the bulls eye.

Once again, thanks for the information.</i>

<b>Aah silly me, didn't pass the repid. Thanks a lot , Prabaharan.</b>


Subramanian V.

Message was edited by: Subramanian Venkateswaran

Former Member
0 Kudos

Tis poosible to insert graphic in ALV header using the following...

FORM TOP_OF_PAGE : This form will contain the top of page event for the report i.e header etc

Using the function module ‘REUSE_ALV_COMMENTARY_WRITE’, the internal table containing the headings for top of page event can be passed to the list output. Also, any logo specific to the report can be passed to the function module.

DATA: i_list_top_of_page TYPE slis_t_listheader.



i_logo = 'ENJOYSAP_LOGO'

it_list_commentary = i_list_top_of_page.

You hav to fill i_list_top_of_page