2007 Mar 28 8:07 PM
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
2007 Mar 28 8:11 PM
2007 Mar 28 8:16 PM
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
2007 Mar 28 8:21 PM
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
2007 Mar 28 8:29 PM
wow thats too much work. I think I will just show it on the screen. Thanks
2007 Mar 28 8:15 PM
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
2007 Mar 29 6:27 AM
hello
I think logo can be displayed in only grid dislay.It cannot be done in list display.
Regards
shibino
2007 Mar 29 6:32 AM
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
2007 Mar 29 6:48 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |