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: 

Logo not getting displayed in ALV

former_member216668
Participant
0 Kudos
133

Hi all,

I have a a title and logo in an ALV header.

While the title gets printed the logo does not appear.

though the logo is present in SE78.

Any idea as where exactly im going wrong?

Rgds,

K

1 ACCEPTED SOLUTION

Former Member
0 Kudos
102

Hi ken ,

you should upload logo using oaer tcode not se78 tciode

Follow this .

Run 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 or go to standard doc type text and give the path name.

Now you can use the same object/picture name in your ALV FM

Now you will get.

Regards

Rajendra

7 REPLIES 7

former_member404244
Active Contributor
0 Kudos
102

Hi,

Have u used REUSE_ALV_COMMENTARY_WRITE function module.

Regards,

Nagaraj

0 Kudos
102

Yes i have , my title gets printed but not my logo

0 Kudos
102

Hi ,

Did you print it in event HTML_TOP_OF_PAGE?

0 Kudos
102

Nope i used TOP_OF_PAGE

0 Kudos
102

Hi,

Have u imported the bitmap image.

Regards,

Nagaraj

Former Member
0 Kudos
102

Hi,

Observe the below code I think you will get an idea.see Form Header and Form Top-of-Page.

type-pools: slis.

tables: vbap.

selection-screen: begin of block b1.

select-options: s_vbeln for vbap-vbeln,

s_posnr for vbap-posnr.

selection-screen: end of block b1.

data: begin of i_vbap occurs 0,

vbeln like vbap-vbeln,

posnr like vbap-posnr,

matnr like vbap-matnr,

matwa like vbap-matwa,

end of i_vbap,

it_fieldcat type slis_t_fieldcat_alv,

wa_fieldcat type slis_fieldcat_alv,

it_events type slis_t_event,

gt_list_top_of_page type slis_t_listheader.

start-of-selection.

perform get_data.

end-of-selection.

if not i_vbap[] is initial.

perform fieldcat.

perform modify_fieldcat.

perform header using gt_list_top_of_page[].

perform event_builder using it_events[].

perform alv_display.

endif.

&----


*& Form get_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form get_data .

select vbeln

posnr

matnr

matwa

from vbap

into table i_vbap

where vbeln in s_vbeln

and posnr in s_posnr.

endform. " get_data

&----


*& Form fieldcat

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form fieldcat .

call function 'REUSE_ALV_FIELDCATALOG_MERGE'

exporting

i_program_name = sy-repid

i_internal_tabname = 'I_VBAP'

i_inclname = sy-repid

changing

ct_fieldcat = it_fieldcat

exceptions

inconsistent_interface = 1

program_error = 2

others = 3

.

endform. " fieldcat

&----


*& Form modify_fieldcat

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form modify_fieldcat .

loop at it_fieldcat into wa_fieldcat.

case wa_fieldcat-fieldname.

when 'VBELN'.

wa_fieldcat-col_pos = 1.

wa_fieldcat-seltext_m = 'Sales Doc. No.'.

when 'POSNR'.

wa_fieldcat-col_pos = 2.

wa_fieldcat-seltext_m = 'Sales Doc. Item No.'.

when 'MATNR'.

wa_fieldcat-col_pos = 3.

wa_fieldcat-seltext_m = 'Material Number'.

when 'MATWA'.

wa_fieldcat-col_pos = 4.

wa_fieldcat-seltext_m = 'Material Entered'.

endcase.

modify it_fieldcat from wa_fieldcat.

endloop.

endform. " modify_fieldcat

&----


*& Form header

&----


  • text

----


  • -->P_GT_LIST_TOP_OF_PAGE[] text

----


form header using p_gt_list_top_of_page type slis_t_listheader.

data ls_line type slis_listheader.

clear ls_line.

ls_line-typ = 'H'.

ls_line-info = text-001.

append ls_line to p_gt_list_top_of_page.

ls_line-typ = 'S'.

ls_line-info = text-002.

append ls_line to p_gt_list_top_of_page.

endform. " header

&----


*& Form event_builder

&----


  • text

----


  • -->P_IT_EVENTS[] text

----


form event_builder using p_it_events type slis_t_event.

data: wa_event type slis_alv_event.

wa_event-name = 'PF_STATUS_SET'.

wa_event-form = 'TOOLBAR'.

append wa_event to p_it_events.

clear wa_event.

wa_event-name = 'TOP_OF_PAGE'.

wa_event-form = 'TOP_OF_PAGE'.

append wa_event to p_it_events.

clear wa_event.

endform. " event_builder

&----


*& Form TOOLBAR

&----


  • text

----


  • -->P_IT_EVENTS[] text

----


form toolbar using extab type slis_t_extab.

set pf-status 'YTOOLBAR' excluding extab.

endform.

&----


*& Form TOP_OF_PAGE

&----


  • text

----


  • -->P_IT_EVENTS[] text

----


form top_of_page.

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

it_list_commentary = gt_list_top_of_page

i_logo = 'ENJOYSAP_LOGO'.

endform.

&----


*& Form alv_display

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form alv_display .

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = sy-repid

it_fieldcat = it_fieldcat

it_events = it_events

tables

t_outtab = i_vbap

exceptions

program_error = 1

others = 2

.

"CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

" EXPORTING

" I_CALLBACK_PROGRAM = sy-repid

" IT_FIELDCAT = it_fieldcat

" IT_EVENTS = it_events

" TABLES

" t_outtab = i_vbap

" EXCEPTIONS

" PROGRAM_ERROR = 1

" OTHERS = 2.

Thank U,

Jay....

Former Member
0 Kudos
103

Hi ken ,

you should upload logo using oaer tcode not se78 tciode

Follow this .

Run 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 or go to standard doc type text and give the path name.

Now you can use the same object/picture name in your ALV FM

Now you will get.

Regards

Rajendra