2012 Sep 27 9:03 AM
Hi,
I have a requirement to convert the spool data into HTML.
I tried the following ways
1.FPCOMP_CREATE_PDF_FROM_SPOOL (getting RAWSTRING)
then SCMS_XSTRING_TO_BINARY
then SCMS_BINARY_TO_STRING
thenVB_CP_CONVERT_STRING_2_ITF
then CONVERT_ITF_TO_HTML..
But i dont know what are the values to be passed on header values in this FM
2.RSPO_RETURN_ABAP_SPOOLJOB
SAVE_LIST
WWW_LIST_TO_HTML
In this RSPO_RETURN_ABAP_SPOOLJOB returns only the spool details like number date .the spool data details is not retrieved
Please guide me to convert spool data to HTML
Thanks in advance .
Regards,
Latha
2012 Sep 27 9:26 AM
Hi Hema,
There are various methods to do this. I used the below method for a program to convert spool to html and send as email. Try and let me know if it works;
FORM convert_spool_to_html .
SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
WITH rqident = gs_spool-spoolno.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
* message e418 raising read_error.
ENDIF.
gv_template = 'WEBREPORTING_REPORT'.
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
template_name = gv_template
TABLES
html = gt_html_attach
listobject = listtab
EXCEPTIONS
OTHERS = 1.
PERFORM create_email.
ENDFORM. " CONVERT_SPOOL_TO_HTML
Regards,
Karthik Dharmarajan
2012 Sep 27 10:47 AM
Hi Karthick,
I tried this way too. But the spool content is not displayed. It s just retrieving the spool details like spool number and date.
Any other way?
2012 Sep 27 9:27 AM
Hi,
there are many thread on it. u can search.
try like this
declare table :w3html.
then
data : begin of <itab> occurs 0,
include structure w3html,
end of......
then
SY-TITLE = 'Convert Spool List to HTML'.
Use call function " list_download_html"
with exporting
list index = 0.
and with exception.
then
TOP-OF-PAGE.
WRITE:/ SY-TITLE, 'Page ', SY-PAGNO.
like this
Thanks
Gourav.
2012 Sep 27 10:49 AM
Kumar,
I searched the entire forum.My requirement is Spool request data should be converted into html format.
Moreover, I cannot download anywhere in the server.