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

LOGO IN CLASSICAL REPORT

Former Member
0 Likes
1,107

HI ,

Is it possible to display the logo in classical basic) reports.

if possible tell me how to do

HI ,

Is it possible to display the logo in classical basic) reports.

if possible tell me how to do

5 REPLIES 5
Read only

Former Member
0 Likes
834

Hi,

I have inserted a picture in my classical report. According to the position where you want can be adjusted. If you know how to upload Logo in SMW0 then upload and just copy paste the code that i have shown will display the image.

DATA: docking TYPE REF TO cl_gui_docking_container,

picture_control_1 TYPE REF TO cl_gui_picture,

url(256) TYPE c .

DATA: query_table LIKE w3query OCCURS 1 WITH HEADER LINE,

html_table LIKE w3html OCCURS 1,

return_code LIKE w3param-ret_code,

content_type LIKE w3param-cont_type,

content_length LIKE w3param-cont_len,

pic_data LIKE w3mime OCCURS 0,

pic_size TYPE i.

  • END OF DO NOT CHANGE----------------------*

FORMAT HOTSPOT ON.

DATA : sum(4) , num1(4) , num2(4).

PARAMETERS: A(4) DEFAULT '4' .

PARAMETERS: B(4) DEFAULT '5' .

DATA: ANSWER TYPE I.

ANSWER = A + B.

WRITE:/ ANSWER.

AT SELECTION-SCREEN OUTPUT.

PERFORM show_pic.

  • PERFORM show_pic1.

START-OF-SELECTION.

*&----


*& Form show_pic

*&----


FORM show_pic.

DATA: repid LIKE sy-repid.

repid = sy-repid.

CREATE OBJECT picture_control_1 EXPORTING parent = docking.

CHECK sy-subrc = 0.

CALL METHOD picture_control_1->set_3d_border

EXPORTING

border = 5.

CALL METHOD picture_control_1->set_display_mode

EXPORTING

display_mode = cl_gui_picture=>display_mode_stretch.

CALL METHOD picture_control_1->set_position

EXPORTING

height = 90

left = 40

top = 30

width = 190.

CHANGE POSITION AND SIZE ABOVE****************

IF url IS INITIAL.

REFRESH query_table.

query_table-name = '_OBJECT_ID'.

CHANGE IMAGE NAME BELOW UPLOADED IN SWO0*****************

query_table-value = 'YREDDY'. "name which u have given in SMW0

APPEND query_table.

query_table-value = 'YLOGO'.

APPEND query_table.

*FORMAT HOTSPOT ON.

CALL FUNCTION 'WWW_GET_MIME_OBJECT'

TABLES

query_string = query_table

html = html_table

mime = pic_data

CHANGING

return_code = return_code

content_type = content_type

content_length = 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 = pic_size

lifetime = cndp_lifetime_transaction

TABLES

data = pic_data

CHANGING

url = url

EXCEPTIONS

OTHERS = 1.

ENDIF.

CALL METHOD picture_control_1->load_picture_from_url

EXPORTING

url = url.

FORMAT HOTSPOT OFF.

ENDFORM.

INSERT PICTURE IN SMW0 TXCODE.

Cheers!!

VEnk@

Edited by: Venkat Reddy on Oct 29, 2008 1:16 PM

Read only

matt
Active Contributor
0 Likes
834

>

> Hi,

> I have inserted a picture in my classical report. According to the position where you want can be adjusted. If you know how to upload Logo in SMW0 then upload and just copy paste the code that i have shown will display the image.

>

> DATA: docking TYPE REF TO cl_gui_docking_container,

...

This program was originally found [here|http://tinyurl.com/5s22vp] and [here|;

Read only

0 Likes
834

Hi Venkat,

If you use code from somewhere else, then please reference the source.

I know that some code has been going around for so long that the original source is probably not known anymore, so just mention that it is a sort of "general code" which everyone knows about...

You will not be able to link easily to the "sap technical dot com" website.

The site is blocked by SDN's content filters because of plagarism and spamming.

Cheers,

Julius

Read only

Former Member
0 Likes
834

<ignore>

Read only

0 Likes
834

Hi

Just as Vijay said, it's not possible to insert a logo in a classical report ( if you means "Abap list).

It can load a picture in a screen (dialog screen) only: so u can insert a logo in a screen of module pool, in a screen (header side) of ALV GRID or in a screen generated for selection-screen.

Max