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

OOALV logo

Former Member
0 Likes
1,085

can anyone please tell me how to upload a logo in ooalv

Im using the below code but event is not getting triggered.

class lcl_receiver definition.
              top_of_page  for event top_of_page
                                   of cl_gui_alv_grid
                                         importing e_dyndoc_id,
 endclass.

class lcl_receiver implementation. 
  method top_of_page.
    perform event_top_of_page using e_dyndoc_id.
  endmethod.                    "top_of_page
 endclass

FORM event_top_of_page Using lcl_dd_doc TYPE CL_DD_DOCUMENT.
CALL METHOD lcl_dd_doc->ADD_PICTURE
  EXPORTING PICTURE_ID = 'SAPLOGO'.
ENDFORM.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
933

Hi,

For that you need to use splitter container and in top part of it place your image, whereas in bottom one - your alv.

Check [this blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4046] [original link is broken] [original link is broken] [original link is broken];. It will explain you how to achieve this.

Regards

Marcin

can anyone please tell me how to upload a logo in ooalv

Im using the below code but event is not getting triggered.

class lcl_receiver definition.
              top_of_page  for event top_of_page
                                   of cl_gui_alv_grid
                                         importing e_dyndoc_id,
 endclass.

class lcl_receiver implementation. 
  method top_of_page.
    perform event_top_of_page using e_dyndoc_id.
  endmethod.                    "top_of_page
 endclass

FORM event_top_of_page Using lcl_dd_doc TYPE CL_DD_DOCUMENT.
CALL METHOD lcl_dd_doc->ADD_PICTURE
  EXPORTING PICTURE_ID = 'SAPLOGO'.
ENDFORM.

5 REPLIES 5
Read only

Former Member
0 Likes
933

hi,

theres no top_of_page event in alv class.

check out this link :

http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5f5d2fe11d2b467006094192fe3/frameset.htm

it shows all the events for alv class.

also to display the image you can do:

First the Logo should be uploaded into application server using transaction 'OAER'.

so for this :

Go to Transaction OAER,

Give Class Name as PICTURES

Class type as OT

Object Key as the name of the Object u want to specify

Upon execution you would be prompted to give the file path details. Just upload which ever logo u want to display

Now you can use the same name in your ALV FM

In your ALV program, you need to have event for TOP_OF_PAGE, and also this works only in case of Grid not in ALV LIST.

then you can use :

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = i_repid

it_fieldcat = header

is_layout = gt_layout

i_callback_top_of_page = 'TOP-OF-PAGE1'

i_grid_title = xyz

it_sort = gt_sort[]

i_default = 'X'

i_save = 'U'

is_variant = gt_variant

it_events = gt_events

tables

t_outtab = t_output.

form top-of-page1.

data: header type slis_t_listheader,

wa type slis_listheader.

wa-typ = 'S'.

wa-info = text-h04.

append wa to header.

wa-typ = 'S'.

write sy-datum to wa-info mm/dd/yyyy.

concatenate text-h03 wa-info into wa-info separated by space.

append wa to header.

wa-typ = 'S'.

concatenate text-h02 sy-uname into wa-info separated by space.

append wa to header.

wa-typ = 'S'.

concatenate text-h01 sy-repid into wa-info separated by space.

append wa to header.

and for the logo :

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

it_list_commentary = header

i_logo = 'ENJOYSAP_LOGO'.

endform.

Here in TOP-OF-PAGE form it will show you the Prog name,Date, User Name.

Hope this will surely help you!!!!

Thanks & Regards,

Punit Raval.

Read only

MarcinPciak
Active Contributor
0 Likes
934

Hi,

For that you need to use splitter container and in top part of it place your image, whereas in bottom one - your alv.

Check [this blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4046] [original link is broken] [original link is broken] [original link is broken];. It will explain you how to achieve this.

Regards

Marcin

Read only

Former Member
0 Likes
933

Hi,

Please check the link given below. Hope it will help you:

Thanks & Regards,

Mamta Kumari

Read only

Former Member
0 Likes
933

Hi,

https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/logo%252bdisplay%252bby%252balv%252boops

This link tells how to add logo using OOPS ALV

Thanks,

Krishna

Read only

Former Member
0 Likes
933

thanks to everyone for replying. posts were helpful.