Converting SPool information into HTML Format
Hi Friends,
How to Converting SPool information into HTML Format
and send this HTML INFORMATION INTO MAIL..
can anyone send program for this issue pls.
it is an urgent issue
regards,
Hi Rich,
once again thanks for your kindly reply.
but i am developing below Code.. that HTMAL AATCHMENTS ARE NOT COMING IN MAIL.
PLS can you you verify the below code.
DATA DECLARATIONS *
DATA: I_LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE,
VARIANT LIKE RSVAR-VARIANT,
DOC_CHNG LIKE SODOCCHGI1,
RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE,
data: spoolid type tsp01-rqident.
DATA IT_MAIL LIKE TSP01 OCCURS 0 WITH HEADER LINE.
data report_html like W3HTML OCCURS 0 WITH HEADER LINE.
DATA: G_ICONS(32) OCCURS 10 WITH HEADER LINE.
DATA LISTOBJECT LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
DATA sent_to_all like sonv-flag.
data : RECEIVER(30),
spoolid type tsp01-rqident,
it_buffer like SOLI occurs 10 with header line.
data: list type table of abaplist with header line.
data: htmllines type table of w3html with header line.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
TABLE DECLARATIONS *
TABLES : TSP01.
SELECTION-SCREEN *
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN: SKIP.
PARAMETERS : RQ2NAME LIKE TSP01-RQ2NAME .
RQIDENT like TSP01-RQIDENT.
SELECT-OPTIONS : S_RECVR FOR RECEIVER NO INTERVALS.
SELECTION-SCREEN: SKIP.
SELECTION-SCREEN: END OF BLOCK B1.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM SEND_TO_SPOOL.
PERFORM GET_SPOOL_ID.
loop at it_mail.
PERFORM CONVERT_SPOOL_TO_PDF.
PERFORM SEND_MAIL.
endloop.
Save the list
call function 'SAVE_LIST'
tables
listobject = list
exceptions
list_index_invalid = 1
others = 2.
*& Form GET_SPOOL_ID
Getting the Latest Spool Request Number
FORM GET_SPOOL_ID.
SELECT *
FROM TSP01 INTO TABLE IT_MAIL
and RQIDENT = RQIDENT.
WHERE RQ2NAME = RQ2NAME .
ENDFORM. " GET_SPOOL_ID
*& Form CONVERT_SPOOL_TO_PDF
Converting the Spool to PDF Document
FORM CONVERT_SPOOL_TO_PDF.
*--Assigning the Spool number
WRITE :/ IT_MAIL-RQIDENT.
spoolid = IT_MAIL-RQIDENT.
*--Converting the Spool to PDF
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = spoolid
FIRST_LINE = 1
LAST_LINE =
TABLES
BUFFER = it_buffer
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LISTOBJECT = IT_BUFFER.
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
REPORT_NAME =
TEMPLATE_NAME = 'WEBREPORTING_REPORT'
TABLES
HTML = report_html
LISTOBJECT = LISTOBJECT
LISTICONS = G_ICONS.
ENDFORM. " CONVERT_SPOOL_TO_PDF
FORM SEND_MAIL.
call function 'WWW_LIST_TO_HTML'
tables
html = htmllines.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
LOOP AT S_RECVR.
reclist-receiver = S_RECVR-LOW.
reclist-rec_type = 'U'.
append reclist.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = report_html "mailtxt
object_content = mailtxt
receivers = reclist "mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc = 0.
write 'mail sent'.
endif.
ENDLOOP.
regards,
venu.
Similar Messages
-
How to convert table content into html format?
Hi,
Experts,
How to convert internal data into HTML format is there any function module or piece of code to download content into HTML.
Thank u,
Shabeer Ahmed.Then use this code....
REPORT ytest_table_html1.
* D A T A D E C L A R A T I O N
*-HTML Table
DATA:
t_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE,
" Html Table
*- Declare Internal table and Fieldcatalog
it_flight TYPE STANDARD TABLE OF sflight WITH HEADER LINE,
" Flights Details
it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
" Fieldcatalog
*-Variables
DATA:
v_lines TYPE i,
v_field(40).
*-Fieldsymbols
FIELD-SYMBOLS: <fs> TYPE ANY.
* S T A R T - O F - S E L E C T I O N
START-OF-SELECTION.
SELECT *
FROM sflight
INTO TABLE it_flight
UP TO 20 ROWS.
* E N D - O F - S E L E C T I O N
END-OF-SELECTION.
*-Fill the Column headings and Properties
* Field catalog is used to populate the Headings and Values of
* The table cells dynamically
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = it_fcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
DELETE it_fcat WHERE fieldname = 'MANDT'.
t_html-line = '<html>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<td><h1>Flights Details</h1></td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<table border = "1">'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate HTML columns from Filedcatalog
LOOP AT it_fcat.
CONCATENATE '<th bgcolor = "green" fgcolor = "black">'
it_fcat-scrtext_l
'</th>' INTO t_html-line.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
DESCRIBE TABLE it_fcat LINES v_lines.
*-Populate HTML table from Internal table data
LOOP AT it_flight.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate entire row of HTML table Dynamically
*-With the Help of Fieldcatalog.
DO v_lines TIMES.
READ TABLE it_fcat INDEX sy-index.
CONCATENATE 'IT_FLIGHT-' it_fcat-fieldname INTO v_field.
ASSIGN (v_field) TO <fs>.
t_html-line = '<td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = <fs>.
APPEND t_html.
CLEAR t_html.
t_html-line = '</td>'.
APPEND t_html.
CLEAR t_html.
CLEAR v_field.
UNASSIGN <fs>.
ENDDO.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</table>'.
APPEND t_html.
CLEAR t_html.
*-Download the HTML into frontend
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\Flights.htm'
TABLES
data_tab = t_html
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-Display the HTML file
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = 'C:\Flights.htm'
operation = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
none of the above function modules r obsolete... -
Convert JEditorPane document into HTML format
Hi,
I have developed an editor using swing's JEditorPane.
I want to know whether is it possible to convert the entire content of the
JEditorPane into HTML format using some API's.
For example if JEditorPane contains the text such as
JEditor pane to HTML
After converting it to HTML, it should appear as
<b>JEditorPane</b> <i>to</i> <u>HTML</u>
.editorPane.getDocument.getText()
-
Problem in converting Spool Request into PDF format
Hi,
I am facing problem to convert spool request (which store output of sap script) in to PDF format. Actually I have converted it with function module 'CONVERT_OTFSPOOLJOB_2_PDF' and it is working properly but the problem occurs where the BOLD fonts are used. I am unable to see the Text/Address where i have used Bold Font in script (PDF FORMAT). Even though in (SPO1) spool request shows every thing perfectly (along with Bold Font). It will great if you could suggest me something.
Thanks,
PradeepHi Pradeep,
Use ,
Closing the Sapscript, we save data (OTF) in a table
CALL FUNCTION 'CLOSE_FORM'
TABLES
otfdata = t_otfdata
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
OTHERS = 5.
DATA: BEGIN OF t_otfdata2 OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA: END OF t_otfdata2.
Move OTF data to another table with lenght 255
LOOP AT t_otfdata.
CONCATENATE t_otfdata-tdprintcom t_otfdata-tdprintpar INTO t_otfdata2.
APPEND t_otfdata2.
ENDLOOP.
Convert OTF format to PDF
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = 'OTF'
format_dst = 'PDF'
devtype = 'PRINTER'
FUNCPARA =
len_in = len_in
IMPORTING
len_out = len_out
TABLES
content_in = t_otfdata2
content_out = t_pdfdata
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
Have a look at Progs. RSTXPDF4 and RSTXPDFT2 for converting the Spool to PDF.
Regards,
Raj
Message was edited by: Rajasekhar Dinavahi
Message was edited by: Rajasekhar Dinavahi -
How to convert xml data into html format in bpel
Hi ,
Can any one tel me how to conevrt xml into html in oracle bpel.
Does bpel support this functionality or not.
Regards,
Ana
Edited by: user10181991 on Apr 5, 2009 11:16 PMAna,
We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
Let me know if this helps. -
How to export spool file into HTML file
Hi,
I have one Oracle procedure which meets our business requirement. I am keeping the output data into a log file and I am sharing that log file to the users.
Sample Code:
spool path\logile.log
declare
begin
dbms_output.Put_line('output will come here');
end;
Now I want to spool the same output data into a HTML file and need to share with the users.
Can any one please guide me, how to export our spool data into HTML format?
Thanks in advance.Hello 909127,
welcome to the forum.
This is the forum for the tool Oracle Reports, not a general forum for reporting. Your question might be better posted in {forum:id=75} or {forum:id=144}.
Nevertheless you need to give us more information, how your output looks like now and what you expect in HTML.
Regards
Marcus -
Hi Frns,
I wanna convert webi report into html format...
Is there any possibility in bo???
I'm using sap bo 4.1 sp2
Regards
RiazHi Riaz,
As per my knowledge Webi report export to HTML format is not possible in BI 4.1
You can raise a request in SAP IDEA's place
Refer the below links for workaround solution
[WebI XI 3.x] Export report to HTML or XML
Does BOE XI 3.1 supports exporting WebI to XML format? -
Anyone know a tool to convert PLSQL comments into HTML/other formats?
Hi - does anyone know if there's a tool out there to convert PLSQL comments into HTML or other formats like you can do in Java? Thanks in advance - Jon
This is only useful if you're using PL/SQL Developer. It has a free plugin called plsqldoc which will generate html pages that are similar to Javadoc pages.
check here for more information
http://www.allroundautomations.nl/plsqldevplugins.html
As an aside , if you haven't already, you may want to devise a way of auto generating your HTML when a change is made or by running a regular batch job. This will ensure that your docs are in sync with the code. Documentation is only valuable if it is kept up to date.
There is nothing worse than looking at the html docs for a package only to realise the docs are several versions behind the code. -
How to convert spool request to pdf format (to send mail) - SAP 3.1H
Hi,
I am working in 3.1H version. How to convert spool request into pdf cormat to send a mail?. Spool request is in TEXT format.
regards,
sundaram J.Hi sundaram,
1. I suppose u know how to send
mail with attachment.
2. If that is the case,
then no need to do anything.
3. Bcos
There is setting in SCOT,
for INTERNET
ABAP List ---> PDF
Raw TEXT -
PDF
(Your basis team will help u)
4. text data will get automatically converted
to pdf and get mailed.
regards,
amit m. -
Hi my question abt 2 convert a list into pdf format
hi
experts
i had problem to convert displayed list into pdf format showing an error cannot open the file file format not supported, but i am have downloaded the file in .pdf format
please help me
thank you allHi,
check out this program. this might help:
report zabap_pdf.
tables:
tsp01.
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
*-- INTERNAL TABLES
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
*-- SELECTION SCREEN
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 132, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
start-of-selection.
concatenate 'c:\'
p_repid
'.pdf'
into mc_filename.
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority= space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog= 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
*-- Make sure that a printer destination has been set up
*-- If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LOCL'.
endif.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
*-- Find out what the spool number is that was just created
perform get_spool_number using sy-repid
sy-uname
changing mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid= mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = mtab_pdf.
FORM get_spool_number *
Get the most recent spool created by user/report *
--> F_REPID *
--> F_UNAME *
--> F_RQIDENT *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(8)
f_uname+0(3)
into lc_rq2name separated by '_'.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number -
Convert gzip files into XML format
We have a requirement where we receive gzip files. These files are zipped file containing base64 binary format csv files. We would have to convert these files into XML format. Please let me know any of the following.
1. Is there any Xpath query or XSL function (somthing similar like doTranslateFromNative() ) to convert from gzip files to XML format.
2. If we need to unzip the zipfile outside fusion, then java code piece to unzip the gzip file. I guess after that we can use the usual doTranslateFromNative() function to translate to XML format, since after unzipping the gzip file, they are base64 binary formats.
Thanks in advance,
TomsThere is an option to do pre-processing and post processing of Files when using File adapter. You need to create a valve which will first do pre processing and send the output to FileAdapter.
You can get more information here:
http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#CACDHGGG
under section: 4.2.14 Pre-Processing and Post-Processing of Files
Essentially you will use Java to unzip the file first and then the unzipped content will be passed to the adapter. -
How can i make a form in access into html format?
I am trying to convert my form in access 2013 into into html format. When i try doing so it looks 100% different on the browser than it does in access. I tried doing the export command,
and this is what happened. What can i do to make sure that it looks the exact same and will receive the data from the database? thank you for the helpYou can avoid the Ken Burns effect, but it would be a lot of work:
See: http://help.apple.com/imovie/ipad/2.0/index.html#knac3eec39c6
If you don’t want the Ken Burns effect applied to a photo, set the image position and zoom level to be the same for the start and end points.
Adjust the movement of photos with the Ken Burns effect
iMovie applies the Ken Burns effect to the photos you add to your project. With this effect, the camera appears to sweep across and zoom in on the photo. If there are people in the photo, iMovie uses face detection to keep faces within the viewing area.
You can adjust the Ken Burns effect so that the motion starts and ends on the parts of the image you specify.
In the timeline, tap the photo you want to adjust.The Ken Burns effect controls appear in the lower-right corner of the image in the viewer.
To set the way the photo is framed at the beginning, tap the Start button .
Pinch to zoom in or out, then drag the image in the viewer to frame it the way you want.
To set the way the photo is framed at the end, tap the End button .
Pinch to zoom in or out, then drag the image in the viewer to frame it the way you want.
To close the controls, tap the Ken Burns Effect button , or tap outside of the clip.
If you don’t want the Ken Burns effect applied to a photo, set the image position and zoom level to be the same for the start and end points. -
Is it possible to convert PDF file into HTML
Dear friends
Is it possible to convert PDF file into HTML. I have few hundread PDF files i like to convert this files into HTML. I hope it can be done through Java but i don't know how to start this coding. anybody can give me a brief idea to go ahead.Why do you want to do this yourself? I quick search on Google showed several utilities to do this, some freeware, some commercial.
-
How to convert BLOB data into string format.
Hi,
I have problem while converting blob data into string format.
for example,
Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
will get me the first 4000 byte of BLOB .
When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
declare
my_var CLOB;
BEGIN
for x in (Select X from T)
loop
my_var:=dbms_lob.substr(x.X,32767,1)
end loop
return my_var;
I comfortably convert 32k BLOB field to string.
My problem is how to convert blob to varchar having size more than 32K.
Please help me to resolve this,
Thanx in advance for the support,
NileshNilesh,
. . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
-- resulting string:
☺AW(⌂özßHAA
Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
Regards,
Noel -
Converting excel source into csv format
Hi,
I have to convert excle source into csv format.
my excel source has around 40000 records.
Please give me the suggestions how to do it.
Thanks,
VenkatOr, if this is going to be an ongoing issue with new files needing to be converted, there are several utilities out there of various quality and price which can be considered. A quick google turned up a whole host of options for various platforms.
I can't comment on any of them as I haven't used them, but clearly there are several converters with command-line interfaces which should be capable to be utilized as an external command in your process flow.
Like: http://www.softinterface.com/Convert-XLS/Features/Convert-XLS-To-CSV.htm
Heck, if you really want to have fun and DIY, I know that there are native Perl Excel modules, so you could always build your own and make it cross-platform!
Maybe you are looking for
-
Chunked header line gets removed
Some webserver at akamai (for instance: www.fedex.com ) delivers the data chunked. A snoop trace indicated that the server sends a header line "Transfer-Encoding: chunked". The proxy (3.6 SP6 on Solaris) removes this header as it sends it to the clie
-
Safari adding .html to all attachments
I have used Safari for a couple of years now, and as of yesterday, all attachments I try to download now have a .html extension added to it, i.e. doc.html, exe.html, jpg.html thus being unable to open the files when they have been downloaded. I have
-
G4 does not accept my network password
All of a sudden, my ibook g4 does not accept my network password. My mac mini (also on my network) accepts it just fine. I restarted my network but the same problem occurs. Help please!
-
I keep getting the message "The product distribution file could not be verified. It may be damaged or was not signed." Does anyone know what I can do to correct this so I can download OSX? I have a MacBook Pro with all the necessary requirements.
-
Setting up Yahoo Japan e-Mail on 2G iPod Touch
How can it be done? What is the correct incoming and out going POP server host names? TIA, Apple //GS