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 - logo

Former Member
0 Likes
986

Hello all,

I want to display company logo in ALV report for this what I did -

1. uploaded the company logo through OAER

2.


  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      I_LOGO                 = 'ZXYZ_LOGO'
      IT_LIST_COMMENTARY     = LIST_COMMENTARY.

I get the company logo in the output.

Couple of questions.

1. I dont see the logo netiher in the print preview nor in the exported spreadsheet. How can I get the logo into the spreadsheet and output print preview.

2. I think I must assign the upload file to a transport. how can I do this?

Thanks

Hello all,

I want to display company logo in ALV report for this what I did -

1. uploaded the company logo through OAER

2.


  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      I_LOGO                 = 'ZXYZ_LOGO'
      IT_LIST_COMMENTARY     = LIST_COMMENTARY.

I get the company logo in the output.

Couple of questions.

1. I dont see the logo netiher in the print preview nor in the exported spreadsheet. How can I get the logo into the spreadsheet and output print preview.

2. I think I must assign the upload file to a transport. how can I do this?

Thanks

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
958

1) The log will not show in the list output(printable output) nor will it show in the excel spreadsheet. This is simply not supported.

Regards,

Rich Heilman

Read only

0 Likes
958

I figured out the (2) transport thing myself.

But (1) logo export is not supported. WOW whats the point in showing the logo just on the screen? I don't understand.

But Rich you can do it if you want. Think about it

Read only

0 Likes
958

I don't really know what the point of it is to show on the screen when printing it out on the list is not supported. Maybe for looks? Anyway, yes you can put the logo on a printout, but you would have to code around the ALV. This means, put a custom print button on the alv toolbar which would fire a custom sapscript/smartform/adobe form which would have your logo and the data which was presenting in the ALV in the body.

Regards,

Rich Heilman

Read only

0 Likes
958

wow thats too much work. I think I will just show it on the screen. Thanks

Read only

Former Member
0 Likes
958

Hi Raju,

u will see the logo on the printout not on the layout or on the spread sheet

if u still having the problem on the printout page then better to assing the above function module in top_of_page event...

then call this event in the display function module..

hopt it will help u out

~~Guduri

Read only

Former Member
0 Likes
958

hello

I think logo can be displayed in only grid dislay.It cannot be done in list display.

Regards

shibino

Read only

Former Member
0 Likes
958

it will not seen in print preview.

Use Function module REUSE_ALV_COMMENTARY_WRITE.

Write the code in Top-of-page event in ALV.

The following is the code for inserting the logo in ALV.

FORM TOP_OF_PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

I_LOGO = 'ENJOYSAP_LOGO'

IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.

ENDFORM.

see this

EXAMPLE REPORT FOR LOGO IN ALV

CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE

'TOP_OF_PAGE',

GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE

'USER_COMMAND',

GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE

'BEFORE_OUTPUT'.

FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.

DATA : HLINE TYPE SLIS_LISTHEADER,

TEXT(60) TYPE C.

CLEAR : HLINE,TEXT.

HLINE-TYP = 'H'.

WRITE 'ROOTS INDUSTRIES LTD' TO TEXT.

HLINE-INFO = TEXT.

APPEND HLINE TO LIST_HEADER.

SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.

CLEAR : HLINE,TEXT.

HLINE-TYP = 'H'.

WRITE 'PLANT :' TO TEXT.

WRITE WERKS TO TEXT+8.

HLINE-INFO = TEXT.

APPEND HLINE TO LIST_HEADER.

CLEAR : HLINE,TEXT.

HLINE-TYP = 'H'.

WRITE T001W-NAME1 TO TEXT.

HLINE-INFO = TEXT.

APPEND HLINE TO LIST_HEADER.

CLEAR : HLINE,TEXT.

HLINE-TYP = 'H'.

WRITE T001W-STRAS TO TEXT.

HLINE-INFO = TEXT.

APPEND HLINE TO LIST_HEADER.

CLEAR : HLINE,TEXT.

HLINE-TYP = 'H'.

WRITE T001W-ORT01 TO TEXT.

HLINE-INFO = TEXT.

APPEND HLINE TO LIST_HEADER.

CLEAR : HLINE,TEXT.

HLINE-TYP = 'H'.

WRITE 'DATE :' TO TEXT.

WRITE BUDAT-LOW TO TEXT+7.

IF BUDAT-HIGH NE ''.

WRITE 'TO' TO TEXT+18.

WRITE BUDAT-HIGH TO TEXT+22.

ENDIF.

HLINE-INFO = TEXT.

APPEND HLINE TO LIST_HEADER.

ENDFORM. "TOP_OF_PAGE_LIST_HEADER

&----


*& Form ALV_EVENT_INIT

&----


  • text

----


FORM ALV_EVENT_INIT .

CLEAR ALV_EVENT.

ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.

ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.

APPEND ALV_EVENT TO EVENTCAT.

CLEAR ALV_EVENT.

ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.

ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.

APPEND ALV_EVENT TO EVENTCAT.

  • CLEAR ALV_EVENT.

  • ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.

  • ALV_EVENT-FORM = 'ALV_END_OF_LIST'.

  • APPEND ALV_EVENT TO GT_EVENTS.

  • CLEAR ALV_EVENT.

  • ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.

  • ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.

  • APPEND ALV_EVENT TO GT_EVENTS.

ENDFORM. "ALV_EVENT_INIT

&----


*& Form ALV_TOP_OF_PAGE

&----


  • text

----


FORM ALV_TOP_OF_PAGE.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = LIST_HEADER

I_LOGO = 'ENJOYSAP_LOGO'.

ENDFORM. "ALV_TOP_OF_PAGE

&----


*& Form BUILD_EVENT

&----


  • text

----


  • -->P_GT_EVENTS[] text

----


FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = P_EVENTS

EXCEPTIONS

LIST_TYPE_WRONG = 1

OTHERS = 2.

READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO

ALV_EVENT.

IF SY-SUBRC = 0.

MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.

APPEND ALV_EVENT TO P_EVENTS.

ENDIF.

READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO

ALV_EVENT.

IF SY-SUBRC = 0.

MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.

APPEND ALV_EVENT TO P_EVENTS.

ENDIF.

reward if helpfull

Message was edited by:

sunil kumar

Message was edited by:

sunil kumar

Read only

Former Member
0 Likes
958

Hello Raju.

Same thread i have posted some days ago, To check the answer Please go through following link.

<b>

the concept is this you can't take it in print Out.

Thanks

Swati..