Print LOGO in classical report printout
Hi GURUS,
Is it possible to take print of logo in classical report.
refer this link:[click|http://tinyurl.com/5s22vp]
the code is copied from that link.
Make the changes in the code as given below.
REPORT zgb_prog06.
* START OF DO NOT CHANGE***********************************
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*************************************
DATA : sum(4) , num1(4) , num2(4).
PARAMETERS: p_dummy(4) DEFAULT '4' .
PARAMETERS: p_dummy1(4) DEFAULT '5' .
AT SELECTION-SCREEN OUTPUT. "Remove this event
START-OF-SELECTION.
write 'Testing picture printing in classic report'.
PERFORM show_pic. "Add it here
end-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_FIT.
CALL METHOD picture_control_1->set_position "change positions
EXPORTING
height = 70
left = 800
top = 20
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 = 'ZLOGO'.
APPEND query_table.
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.
*Syntax for URL
*url = 'file://D:\corp-gbanerji\pickut\cartoon_184.gif'.
*url = 'http://l.yimg.com/a/i/ww/beta/y3.gif'.
ENDFORM. "show_pic
Similar Messages
-
Print Logo in Classic Report (Write Method,Not ALV)
Hi All,
I'm currently doing conversion of the All the Classic Report with addition of Header with 'LOGO'.
I'm willing to find out that Function (CALL FUNCTION 'WWW_GET_MIME_OBJECT') is only able for display but not show out during printing.
Is that any method, I can do it(Print with Logo) without conversion to SAP Script or Smartform that was exhausted.
*Please take note is Classic Report with Write Method (Line by Line), Not ALV.
Thank you all in advance
Regards,
Trevor Wong.Hi,
It is possible to include logo in classical report but its not possible to print logo in classical report. It can be done in ALV's.
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.
Regards
Purnand -
Classical report printout problem
Hi
Classical report printout is coming landscap while i want it to come in portrait.
Any idea ???Mani
Change Print Format through Properties Button on the Print Popup which comes when you press the Print Button..
Thanks
Amol Lohade -
How to insert a Grpahics logo in Classical report?
Hi Experts,
I need to insert a graphics logo in a classical report without using split screen or graphics control. The size of the logo is normal Company logo we use in Smartform. The difference here is : I need to print the logo in a classical report.
Regards,
Anid
Reward Points Guaranteed.Hi..
It is possbile only when u create ALV report. In normal report we cannot insert Logos.
In case of ALV:
Inserting Logo:
In the transaction OAOR, you should be able to insert your company Logo.
GOTO - OAOR (Business Document Navigator)
Give Class Name - PICTURES Class Type - OT..... then Execute
It will show you the list, then select ENJOYSAP_LOGO.
On that list, you will find one control with a "create" tab.
Click std. doc types.
Select SCREEN and double-click.
It will push FILE selection screen.
Select your company logo (.gif) and press OK.
It will ask for a description- for instance: "company logo".
It will let you know your doc has been stored successfully.
You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
<b>Reward if Helpful.</b> -
Hi,
I created a classical report in that the output which display i want to take a printout.here i my case if i give print it is not taking.even i tryed in the SP01 it created a spool request only i cannot take the printout.so hoe to solve this issue
Thanks,
Rajendra.Hi,
Some one help me to get the printout of my report.i tryed above all methods like when i give a print it asking the output device i given lp01afthe that i got the message Spool request (number 0000017933) created without immediate output.then open the transaction SP02 and tick that spool no and again i given the print here.then i got the message output request created.but i cant get the printout in my printer.But other files in PC i can take printout wityhout any problem.pls help me to solve the issue.
Thanks,
Rajendra. -
How to print watermark in classical reports?
How to display the watermark in classical reports?
hi
go to se78 graphics -> enter
BMAP(BITMAP IMAGES)
Name MYBMP
select radio button
color ->import
filename: c:\pictures\123.bmp.
name : mybmp
description : BMP ->continur ->save.(activate it)
now go to se71->choose the prog -> layout ->right click ->create graphics.
utilities -> printing test -> output device -> LP01.
Hope this helps
if it helped, you can acknowledge the same by rewarding
regards
dinesh -
How to print logo in standard report
Hi,
How to print a logo in sap ordinary report
Thanks,
SreedharHi Sreedhar,
It is not possible to print logo in the ordinary report, but it can done through ALV.
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.
Rewards if it is helpful...
Regards,
Omkar. -
Hi Experts,
I hv been used the COL_NEGATIVE and COL_TOTAL in my classical report for the SubTotal purpose. On the screen, they r looking fine.
But,
When am printing it on SAP Printer, am getting like, /////////////////////// over my totals!
So,
Is it my printer fault?
OR it is a property of theses clours? I mean, I need to change the clour to like, CLO_KEY!
thanq.Hi
No doubt it is purely a Printer problem
certain printers will behave like that for colors
I hope there is some OSS note also reg this
If you wants to take out print of the Report
better don't give colors to the fields and the data
Reward points for useful Answers
Regards
Anji -
HI ,
Is it possible to display the logo in classical basic) reports.
if possible tell me how to doHi,
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 -
Hi,
I've created an ALV report with a logo in the header.
But, when i'm taking the printout ,the logo is not printed.
How to solve this problem,..please help me .
Thanks and regards.
RajeshIt is not possible to Print the logo, which you are showing in ALV Grid.
But you have to work with Cl_DD_DOCUMENT class
Check this program DD_ADD_PICTURE, Here you can print the logo.the same you can try to implement if you want. -
Printing logo with ALV report output?
Hi all,
I have written a sinple program to display a report output in ALV grid format and inserted a logo in it usingh standrad FM. Though the logo is inserted successfully displaying with list , but when i am clicking on print preview the logo is missing.
Please help me on how to print the logo with the list?
Thanks,
Vamshi.Hi Krishna,
-->Firstly go to T-Code OAER.
-->Give Class Name as PICTURES
-->Give Class Type as OT
-->Give Object Key as(watever the name you wish to give)
-->Example key 1000
-->Click on Execute.
Here you will get Standard Document Types.
Select which ever you want i.e., Attachment,Screen,Template ,etc.
Double click on Attchment it will ask you the File on the Desktop.
Upload the image.
Now you can see the Image in the Folder PICTURES.
Now go to the Report.
Function Module 'REUSE_ALV_COMMENTARY_WRITE'.
i_logo = '1000'.
Hope this will Help you.
With Regards,
Sharmishta. -
How to PRINT DATA in classical report when ever execute
Hi,
All ABAP experts,
I am updating PM work order in IW32 by using BADI, with addition to success or error log i need to display data in basic list and also system has to print that data automatically by using system's default printer. User can not press print button in basic list because sometimes this program will schedule in background, due to this user wants see upload results in a print out.
I dont know how to write logic to get output like this. Please can anyone share how to write logic for this issue.
Before posting this issue i search in forms but I didnt get appropriate solution.
Thanks in advance and any sort of help will appreciate highly.Hi,
Try with this piece of code
Declaration of local constants
CONSTANTS : lc_paart LIKE sy-paart VALUE 'X_65_132', " Paper Format
lc_locl TYPE sypdest VALUE 'LOCL'. " Destination
MOVE 'X' TO v_print.
Setup the Print Parmaters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
immediately = v_print
new_list_id = c_x
no_dialog = c_x
user = sy-uname
IMPORTING
out_parameters = v_print_parms
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0.
CLEAR : v_print_parms.
ENDIF.
The printer destination has to be set up
IF v_print_parms-pdest = space.
v_print_parms-pdest = lc_locl.
ENDIF.
Explicitly set line width, and output format so that
the PDF conversion comes out OK
v_print_parms-linsz = c_linsz.
v_print_parms-paart = lc_paart.
Regards,
nagaraj -
How to print logo in printout using classical report.
Hello Friends,
By using below code i am displaying logo in output using Classical report.
What my problem is it is not displaying in print out.
Please help. or else tell me how to print logo in classical report as well as output print out.
DATA: docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c ,
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,
repid LIKE sy-repid.
repid = sy-repid.
START-OF-SELECTION.
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 = 100
left = 700
top = 1
width = 200.
"Position
IF url IS INITIAL.
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
" Logo Name
query_table-value = 'ENJOYSAP_LOGO'.
APPEND query_table.
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.
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.
WRITE : /'Classical Report Logo'.
Regards,
Phaneendra
Edited by: phaneendra punukollu on Dec 31, 2009 11:38 AM
Code Formatted by: Alvaro Tejada Galindo on Jan 4, 2010 4:52 PMHello Nidhi,
Thanks for your sugessition.
Actual we have data from IDOCS and it is maintained in Ztables
and need to dispaly in report ( Service centre - Warranty data ).
The report is completed. So again going to Script means waste of time for us.
So Plz help me if possible in Classical report.
Regards,
Phaneendra -
Logo not printing in classical report
hello friends,
i have displayed logo in classical report but while taking printout its not showing any image in printout.
pls suggest.
Regards,
SunnyHi Sunny,
Printing logo is not possible in classical using write statments, but it is possible using ALV grid.
Still you can refer to these links:-
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9ba5061c-0901-0010-2da8-9a0ac9a313c4
Re: Logo in Report
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir -
Is there any way to display the employee photo in classic report.
want to know whether " Dynamic Documents " is applicable for this.Hi,
Refer to this link..[LOGO IN CLASSICAL REPORT|LOGO IN CLASSICAL REPORT] this will tell you how to insert Logo in the Classical Report. Check this might help .
Maybe you are looking for
-
have a problem with my ipod nano, when i listen to music on it there is a very annoying buzzing sound from the left ear, its not the ear phones that are the problem i think it may be the ipod itself can anyone help ? or sugest how i could get it fixe
-
Newbie in Learning Oracle Failed to connect
Hi everybody, Just bought a book titled "Oracle 10g: SQL" by Joan Casteel, installed the Oracle 10g software that comes with the book, I was looking for a database using the Administration Assistant for windows, unable to find it, I search the intern
-
On clicking services menu, say in TextEdit, on my i7 Snow Leopard I get a very short list (3) compared to my G5 PowerMac (20). Is this normal? jmf
-
I have an iCloud problem please help me
i locked my Mac with iCloud lock , and someone played with the passcode and now my Mac doesn't show me the white lock pins so I can enter the password and login . (I know the password )
-
Simple Question (sorry I have not gotten the latest book yet - if the info is there). When I use a higher MP DSLR like the Canon 5D Mark II... I only get one option to uprez (from 21. to 25.2) in ACR 6.1. I want to know if in this situation (choosin