Printing HTML on ABAP Report
Hello!
I retrieve the html from a BSP application to an internal table type SOLI_TAB. After i try to load the data using:
CALL METHOD HTML_CONTROL->LOAD_DATA
EXPORTING
TYPE = 'text'
SUBTYPE = 'html'
* SIZE = 0
* ENCODING =
* CHARSET =
* LANGUAGE =
IMPORTING
ASSIGNED_URL = doc_url
CHANGING
DATA_TABLE = IT_HMTL
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_GENERAL = 2
CNTL_ERROR = 3
others = 4.
IF sy-subrc EQ 0.
CALL METHOD html_control->show_url
EXPORTING
url = doc_url.
ENDIF.
The problem is that the html viewer is showing me the html source and not the page as it is shown on a browser.
What am I doing wrong?
Regards,
Pedro Barbosa
1. use http_client->response->get_cdata( ).
to get the response data in string format instead of xstring format.
2. use FM CONVERT_STRING_TO_TABLE to covert the string to table of type W3HTML
3. use method
data: l_doc_url(255) type c.
call method html_control->load_data
exporting
type = 'text'
subtype = 'html'
importing
assigned_url = l_doc_url
changing
data_table = html_table.
call method html_control->show_data
exporting
url = l_doc_url.
to load the html content and show it in cl_gui_html_viewer
Similar Messages
-
Barcode printing in simple abap report
Hai,
I want to print Barcode for 'RESERVATION' in my simple abap report.Can you please give step by step procedure to achieve this?
Thank you.
Note :I saw many threads in sdn,it is NOT clear for me.
With Regards,
Jaheer.Hi Hussain ,
Go through the program RSPO0031
This will help you out.
Regards,
Yogendra Bhaskar -
Printing problem in ABAP report
Hi All,
I have a ABAP report with line size 225 and line count 65. We are taking print out of the report on Dot matrix printer.
When taking the printouts, while going in to the 3rd page the logo on the top of the page is getting printed on the data and further going down as the pages are getting printed.
Please suggest how to control this so that the logo gets printed on top for every page.
Hope I'm clear.
Regards
AdiThanks for the reply.
I have used the no standard page heading.
We are taking prinouts on a letter head page.
Regards
Adi -
Getting error while printing PDF from ABAP Report
hi everyone,
I am trying to print PDF form from a report. But the output i get is an error msg on the Paper
ERROR: limitcheck
OFFENDING COMMAND: PDF Parser: Damaged PDF file, failed reading trailer STACK:
thanks.Some additional information:
In the defaulttrace, I can see this:
Service XMLFormService: Native process (PID=15892) E:\usr\sap\PEP\JC00\j2ee\os_libs\adssap\XMLFormService\bin\XMLForm.exe terminated abnormally with error code 128
Processing exception during a "Render" operation.
Request start time: Fri Mar 06 10:11:55 CET 2009
com.adobe.ProcessingException: XMLFM Exception during render: org.omg.CORBA.COMM_FAILURE
Exception while connecting to <SERVER-IP>:3533
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method -
Extracting a Photo and Printing through ABAP Report
Hi,
How to extract a picture of an employee from PA30 or PA20. After extracting the picture how to print it in ABAP report.
Waiting for help.
Thanks in Advance with Regards.
MAMThank You very much Mr. Carlos Vera Baca
That is one way of putting and printing the picture. But my main question is when the picture is displayed in <b><u>PA20</u></b> or <b><u>PA30</u></b> how to extract that picture which is diplaying in the above transactions. I think I have put the question little clear.
Thanks
Abdul Mannan -
Print html file with barcode from abap report
hi
i am printing html file from abap program using gui_execute.
i am using netscape.exe , its printing first time and when reprint its not working
basically html file contains gif file which has fedex barcode.
could you please let me know how to print html file from reportDGU wrote:
where to check RAW or TEXT? the print report vi only asks for file name and printer name.
When I print from notepad, everything just goes by default. This is a label printer, so I never need to specify printing parameter such as size, orientation, etc in the past
Famous last words go something like this: "...never had to do that before." Maybe you have to do that now. It's worth at least comparing the defaults settings for bothe generic drivers. It could save you a lot of headache if you notice something different.
Bill
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all. -
Use abap report program to print bar code instead of smartforms
Do anyone know how to use abap report program to print bar code?
Hi Celina,
http://searchsap.techtarget.com/tip/1,289483,sid21_gci839063,00.html
I hope this will help, also it depends on the barcode type like ARTNR-code 128...
Regards,
Sudhi -
Print HTML Report.vi doesn't scale properly.
LV 8.5.1, Report Generation Toolkit, XP. Our application uses the Print HTML Report.vi to print an HTML report.
We found that on some installations the resulting page does not scale properly. Instead of being one page wide,
the printout is about 1.5 pages wide (and proportionately longer), leading to our report being truncated.
Tried different printers, different print drivers, no difference.
Finally we noticed that the affected computers all had Internet Explorer 6 installed. Updating to Internet
Explorer 7 fixed the problem. Don't know about IE8, I expect that will work as well.
Hopefully this will help someone else who runs across this problem. I couldn't find any reference to
an IE > 6 dependency in the Report Generation Toolkit readme system requirement.
MattHi Charlie,
The layout option is not wired to anything in the Standard, HTML, Excel and Word Report, but it is used in the Quick Print default case. The Help document for this VI mentions that the layout option is ignored on Standard and HTML Reports but does not mention the Excel or Word Reports.
This was discovered a little while ago in this discussion forum. And a report has be filed to R&D by Ben.
Justin Parker
National Instruments
Product Support Engineer -
Print HTML Report Automatica​lly after Each UUT
Hello
I saw the document on NI site called "Print HTML Report Automatically after Each UUT". That's exactly what I want to do with XML files. So I put it in my sequence file and it works fine, but when it opens the xml file at the first step, there's a pop-up from IE who say that "Scripts are generally safe, do you want to authorise this script" (This message is also displayed when I open my file in files explorer).
So, the print is not automatically anymore as I must answer to this pop-up. does anybody has a solution to bypass this pop-up ?
I tried to use the property silent on the class IWebBrowser2. Inded, the pop-up doesn't appear anymore, but my XML file isn't correctly printed. I supposed the default response of the pop-up (which is no) is applied. So the script isn't executed.
I also tried to configure IE to not display this pop-up : No result
Regards
LaurentHello,
I think that you need to configure your browser, can you take a look a this article:
http://www.maxi-pedia.com/scripts+are+usually+safe+do+you+want+to+allow+scripts+to+run
Regards,
Nacer M. | Certified LabVIEW Architecte -
Problem with NIReport.llb\Print HTML Report using IE.vi on different machines
We have 5 machines here in our workgroup which have the same state regarding security patches and other system updates. We recently found out that there is a problem with the NIReport.llb\Print HTML Report using IE.vi on the different machines.
If I would open the VI on MachineA the control could be loaded. If I would open the VI on MachineB the control could be loaded. If I would copy the VI from MachineB to MachineA and open the VI the control could not be loaded. If I would copy the VI from MachineA to MachineB and open the VI on MachineB the control could be loaded. MachineB could load the version from MachineA and MachineB but on MachineA only the own version will load. I have seen that both versions have the same GUID for the Microsoft Webbrowser but are different in some other aereas.
Since printing HTML Reports is part of the application which will be distributed as application I want to know if someone else have seen such a behaviour or has got problems distributing an application.
Also I want to know which additional information is stored in an Active-X container about the control beside the GUID.
We have Win XP Prof SP2 with MS IE 6.0.2900.2180 on all machines in the workgroup.
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questionsHi Tom,
this is the VI <vi.lib>\Utillitiy\NIReport.llb\Print HTML Report using IE.vi copied from a machine that can load and run the VI and it will print. On this machine the control in the VI is white.
This VI will give the "Control could not be loaded" message on my machine.
The file shdocvw.dll is 2006-10-23 16:18 size 1.460 KB and I verifyed that both machines have the same version of this file.
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Attachments:
Print HTML Report using IE.png 11 KB -
Hi,
I have read the very interesting posts about calling ABAP reports from BSP applications.
Nevertheless, I noticed 2 constraints in order for a Report to be called :
- the <b>sap/bc/report</b> must be active in Transaction SICF
- the report must have an <b>Authorization Group</b> defined
<b>Am i right, so far ?</b>
Besides, I tried to implement the solution given in the forum as follows :
DATA: html TYPE TABLE OF w3html. " occurs 10 with header line.
DATA: html_wa TYPE w3html.
DATA: listobject TYPE TABLE OF abaplist. " occurs 10.
DATA: report_name TYPE syrepid.
DATA: result TYPE string.
report_name = 'SHOWCOLO'.
SUBMIT (report_name) EXPORTING LIST TO MEMORY AND RETURN .
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject.
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
report_name = 'WEBREPORTING_REPORT'
TABLES
html = html
listobject = listobject.
LOOP AT html INTO html_wa.
CONCATENATE result html_wa INTO result SEPARATED BY space.
ENDLOOP.
The problem is that the 'WWW_HTML_FROM_LISTOBJECT' is fauly. There is a call to the FM 'RECORDER_PLAY_BACK' which itself calls 'ABAPLIST_VERSION %_RFC' and the code stops !
<b>Any idea why this is happening ?
Am I missing a service in SICF ?</b>
Of course, when I do the same code in a classic ABAP Program everything works fine...
Thanks in advance.
Cheers,
Guillaume
Message was edited by: Guillaume Garcia<i> the sap/bc/report must be active in Transaction SICF
- the report must have an Authorization Group defined</i>
both the points above are correct, more than that, using sap/bc/report you cannot pass selection screen values or variants.
regarding
'WWW_HTML_FROM_LISTOBJECT'
i have been using this and no problem at all. where is your BSP you wrote the logic using 'WWW_HTML_FROM_LISTOBJECT'.
also dose it generate a dump? if so can you give us the gist of the dump analysis.
REgards
Raja -
How can I print PDF attachments from ABAP report in transaction ME23N?
Hi,
Users attach PDF files using "services for objects" in transaction ME23N.
How can I print the PDF attachments from ABAP report ?
Thanks in advance,,Hi,
check this link,this might help you to solve your problem
/people/thomas.jung3/blog/2005/04/28/setting-up-an-adobe-writer-for-abap-output
Regards
Kiran Sure -
Hi All,
Is it possible to print ABAP report output written through se38.
Thanks
RakeshHi,
You can use
NEW-PAGE PRINT ON.
WRITE :/ 'Test'.
NEW-PAGE PRINT OFF.
or if a spool is generated, then use the following FM to print the spool output.
RSPO_RPRINT_SPOOLREQ
Best regards,
Prashant -
How to directly print PDF file(which is stored in SAP) in ABAP report?
Hi experts,
I searched SDN for printing PDF file but everything is about OTF to PDF and to use fm: CONVERT_OTF which is not the solution for my problem.
I have to build ABAP report which will take the PDF file attached to SAP document (CV02N) and print it.So, which function module or program can I use to print the PDF file?
Thank you very much.
Kind regards,
DanijelaDear
this is the code for down load smartform for PDF format. its working properly
2nd way is
set your Acrobat Printer as your default printer
when you print select printer as LOCAL
then you will file dialog box for Naming PDF
DATA : T_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE.
DATA : WA_CTRLOP TYPE SSFCTRLOP.
DATA : WA_OUTOPT TYPE SSFCOMPOP.
DATA : T_OTFDATA TYPE SSFCRESCL.
DATA : T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA : V_FILESIZE TYPE I.
DATA : W_BIN_SIZE TYPE I.
WA_CTRLOP-GETOTF = 'X'.
WA_CTRLOP-NO_DIALOG = 'X'.
WA_OUTOPT-TDNOPREV = 'X'.
CALL FUNCTION P_LV_FNAME
EXPORTING
OUTPUT_OPTIONS = WA_OUTOPT
USER_SETTINGS = 'X'
CONTROL_PARAMETERS = WA_CTRLOP
IMPORTING
JOB_OUTPUT_INFO = T_OTFDATA
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
T_OTF[] = T_OTFDATA-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = W_BIN_SIZE
TABLES
OTF = T_OTF
LINES = T_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
DATA : LV_DOWN_FILE TYPE RLGRAP-FILENAME.
DATA : LV_TEXT TYPE STRING.
CASE SSCRFIELDS-UCOMM.
WHEN 'REPRUNMOLD'.
CONCATENATE '(' SO_SCHDT-LOW '-' SO_PLANT-LOW ')' INTO LV_TEXT.
CONCATENATE '\\lkdb01\FTP-Loadstar\0.PP_Planning\ZPP014\Run_Moulds\' SY-DATUM '-' SY-TIMLO '-' 'Running Mould' '-' LV_TEXT '.pdf' INTO LV_DOWN_FILE SEPARATED BY SPACE.
WHEN 'REPLINESIT'.
CONCATENATE '(' SO_SCHDT-LOW '-' SO_PLANT-LOW '-' SO_LINE2-LOW ')' INTO LV_TEXT.
CONCATENATE '\\lkdb01\FTP-Loadstar\0.PP_Planning\ZPP014\Line_Situation\' SY-DATUM '-' SY-TIMLO '-' 'Line Situation' '-' LV_TEXT '.pdf' INTO LV_DOWN_FILE SEPARATED BY SPACE.
ENDCASE.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_SIZE
FILENAME = LV_DOWN_FILE
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = V_FILESIZE
TABLES
DATA_TAB = T_PDF_TAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC <> 0.
MESSAGE 'File not downloaded succesfully' TYPE 'I'.
EXIT.
ELSE.
MESSAGE 'PDF File downloaded succesfully' TYPE 'I'.
ENDIF.
ENDFORM. " Print_PDF
Rewards if useful. -
Abap report print logo or image in reverse order
Dear all,
Currently we are using sap enterprise 4.7 . in our abap report sap report and data is OK but log is print in reverse in HP LaserJet p255d and HP LaserJet p250 series PCL 6.
But same report in hp leaser jet 1320 run ok in SWIN driver.
I change the driverson output dvice in sap but result is same how can I update or install print driver that can be I see in SPAD --> output device --> device type
thanks
ShahidHi,
please check this [LINK|http://sap.ittoolbox.com/groups/technical-functional/sap-basis/how-to-install-new-printer-drivers-in-sap-1262490?cv=expanded] and SAP Note : 8928
Regards,
Srinu
Maybe you are looking for
-
Firefox is 3.6.9. I have a Mac OSX, 10.4.11, PowerPC processor.
-
How can I create a PDF with cad layers visible and switchable?
I am producing CAD drawings in Vectorworks 2013 on a Mac OS X 10.6.8. I can export these as Autocad .dwg files and read them in E-Drawings viewer but do not have Autocad. I want to create a PDF of a drawing for a client to use which will display Vect
-
Passing XMLType Data into oracle stored procedure using JDBC
Hi Friends, I have requirement where my oracle stored procedure accepts XML file as an input. This XML File is generated in runtime using java, I need to pass that xml file using JDBC to oracle stored procedure. Please let me know the fesibile soluti
-
Buildtms on Solaris 8(SPARC)
Help!!! Environment:oracle 9i,Solaris 8(SPARC,64),Tuxedo 8.0,GCC3.2 Input:buildtms -o ORA_TMS9i -r Oracle_XA Output: gcc: language arch=v9 not recognized gcc: language arch=v9 not recognized gcc: language arch=v9 not recognized gcc: language arch=v9
-
How can I uninstall mozilla from my computer I can not do it from my uninstall program
When I signed on to my computer Mozilla Fire Fox will not come up therefore not able to get into my favorites or anything. I do not know what happened and I can not uninstall from my computer and need to get it off so hopefully I can reinstall and ge