‎2006 Jan 18 5:38 AM
hai !
i want to display the logo on the grid .
can any one suggest me which function i should use?
any help will be appreciated.
‎2006 Jan 18 5:42 AM
Hi,
Look at the sample code to display LOGO.
**********************
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = i_repid
i_callback_user_command = 'USER_COMMAND_PERNR'
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.
clear t_output.
*****************
----
Form TOP-OF-PAGE1
----
form top-of-page1.
data: header type slis_t_listheader,
wa type slis_listheader. "infield like wa-info, nline type n.
TITLE AREA
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.
********" LOGO
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = header
i_logo = 'ENJOYSAP_LOGO'.
*********" LOGO
endform.
Here in TOP-OF-PAGE form it will show you the Prog name,Date, User Name.
Just you need to give the text in it.
You can refer the below link also.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
Thanks.
If this helps you reward with points.
Message was edited by: KDeepak
‎2006 Jan 18 5:42 AM
Hi,
Look at the sample code to display LOGO.
**********************
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = i_repid
i_callback_user_command = 'USER_COMMAND_PERNR'
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.
clear t_output.
*****************
----
Form TOP-OF-PAGE1
----
form top-of-page1.
data: header type slis_t_listheader,
wa type slis_listheader. "infield like wa-info, nline type n.
TITLE AREA
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.
********" LOGO
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = header
i_logo = 'ENJOYSAP_LOGO'.
*********" LOGO
endform.
Here in TOP-OF-PAGE form it will show you the Prog name,Date, User Name.
Just you need to give the text in it.
You can refer the below link also.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
Thanks.
If this helps you reward with points.
Message was edited by: KDeepak
‎2006 Jan 18 5:42 AM
‎2006 Jan 18 5:54 AM
Hi Raghavendra kulkarni,
By using FM 'REUSE_ALV_COMMENTARY_WRITE', u r able to insert logo in ALV Grid.
Regards,
Digesh Panchal
‎2006 Jan 18 5:59 AM
Hi Kulkami,
You can use "REUSE_ALV_COMMENTARY_WRITE" function module to display your ALV, you can automatically insert your logo to the header. You can define the name of logo file which must be stored in SAP Web Repository Tcode: SMW0 , at the event "TOP_OF_PAGE" .
<b>Example</b>
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
Note: The logo can not be printed.
If you are using the OO version of the ALV Grid Control i.e. an instance of the class "cl_gui_alv_grid", there is no automatic way.
But independent from the ALV Grid, you can put in your screen a custom control which will be related to a "cl_gui_picture" object showing pictures in it.
For the "REUSE..." version, inspect the demo "BCALV_FULLSCREEN_DEMO"
Also see following links for reference.
Dont forget to reward pts, if it helps ;>)
Regards,
Rakesh.
Message was edited by: Rakesh
‎2006 Jan 18 8:28 AM
hi, to insert a logo u have to use fn module
REUSE_ALV_COMMENTARY_WRITE
SEE THE EXAMPLE,
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY =
I_LOGO = 'MY_SAP'.
MY_SAP SHOULD BE UPLOADED INTO APPLICATION SERVER USING TRANSACTION 'OAER'.
goto 'OAER'.
GIVE CLASS NAME "PICTURES"
CLASS TYPE "OT".
GO INSIDE , U WILL FIND OPTION TO UPLOAD LOGO.
ONCE THE LOGO IS IN THE APPLICATION SERVER,
U CAN CALL THE FN MODULE.
NO NEED TO GIVE PATH, JUST GIVE THE NAME OF LOGO U HAVE GIVEN.
‎2006 Jan 18 9:36 AM
thanks a lot it really solved my problem.thanks a lot.
by d by i am a raghu. how are u?
‎2006 Jan 18 9:40 AM
hi raghavendra,
if it solved ur problem,
pls reward the points
‎2006 Jan 18 11:05 AM
Hi,
For any ALV related query first you can check <b>SLIS</b> Development class , it has many beautiful examples .
Hope This Info Helps YOU.
<i>
Reward Points If It Helps YOU.</i>
Regards,
Raghavendra