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: 

how to add a logo in application toolbar or title bar of ALV report

yasu_1096
Explorer
0 Kudos
614

this the code for logo i have written in my logic can any one tell me that how to display this logo in the application tool bar or titlebar of sap alv report iam sharing reference image also please help me out from this Second Requirement is Function i have used how to overcome the obsolete FM of WWW_GET_MIME_OBJECT the alternate way to use this function module screenshot-2023-11-29-171050.png

gv_repid = sy-repid.

CREATE OBJECT ci_picture_control_1 EXPORTING parent = co_docking.
CHECK sy-subrc = 0.
CALL METHOD ci_picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD ci_picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD ci_picture_control_1->set_position
EXPORTING
height = 30
left = 1400
top = 05
width = 70.
*CHANGE POSITION AND SIZE ABOVE***************************
IF gv_url IS INITIAL.
REFRESH g_query_table.
g_query_table-name = '_OBJECT_ID'.
*CHANGE IMAGE NAME BELOW UPLOADED IN SWO0******************
g_query_table-value = 'LOGO'.
APPEND g_query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = g_query_table
html = g_html_table
mime = g_pic_data
CHANGING
return_code = g_return_code
content_type = g_content_type
content_length = g_content_length
EXCEPTIONS
object_not_found = 1
parameter_not_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
size = gv_pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = g_pic_data
CHANGING
url = gv_url
EXCEPTIONS
OTHERS = 1.
ENDIF.
CALL METHOD ci_picture_control_1->load_picture_from_url
EXPORTING
url = gv_url.
4 REPLIES 4

jens_michaelsen
Participant
0 Kudos
534

To add a logo in titelbar, that means "branding". You can choose a branding logo for the titelbar in SAP GUI options, if your system administrator allows that.

Sandra_Rossi
Active Contributor
0 Kudos
534

Please edit your question (Actions>Edit), select your code and press the button [CODE], which makes the code appear colored/indented, it'll be easier for people to look at it. Thanks!

Sandra_Rossi
Active Contributor
0 Kudos
534

Please show the images instead of hyperlinks, in order to have both the text and the image in one place. It's even more useful when there are several images, it avoids the pain to open and close each of them separately and repeatedly.

Sandra_Rossi
Active Contributor
0 Kudos
534

There are lots of questions and answers about adding an image above the ALV grid. Did you find them, what did you try?