<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Spool to HTML Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710304#M893263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            Can anyone help me please.  Is there any FM that can convert spool to HTML?  Just like converting spool to PDF but only I need it in HTML.  I can't use spool to PDF because I'm having problems when it comes to massive pages, but if it's only 5 pages it actually works but not with 100 pages or more.  So please, if anyone can help me with spool to html.  Points will be given and also to those who tried.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2008 03:00:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-23T03:00:25Z</dc:date>
    <item>
      <title>Spool to HTML Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710304#M893263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            Can anyone help me please.  Is there any FM that can convert spool to HTML?  Just like converting spool to PDF but only I need it in HTML.  I can't use spool to PDF because I'm having problems when it comes to massive pages, but if it's only 5 pages it actually works but not with 100 pages or more.  So please, if anyone can help me with spool to html.  Points will be given and also to those who tried.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 03:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710304#M893263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T03:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Spool to HTML Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710305#M893264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  First convert the spool to internal table by using FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RSPO_RETURN_ABAP_SPOOLJOB&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next  from internal table to HTML....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link: /people/rammanohar.tiwari/blog/2006/01/29/abap-utility-print-screen-to-html&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or try the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try the follwoing:&lt;/P&gt;&lt;P&gt;1. define HTML internal table with ref to type W3HTML&lt;/P&gt;&lt;P&gt;2. download it as BIN type and give total lenght of the strings as a parameter in the down load.&lt;/P&gt;&lt;P&gt;See the code extract below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table html lines entries.&lt;/P&gt;&lt;P&gt;read table html into w_html index entries.&lt;/P&gt;&lt;P&gt;size = ( entries - 1 ) * 255 + strlen( w_html ).&lt;/P&gt;&lt;P&gt;concatenate p_path file into file.&lt;/P&gt;&lt;P&gt;call function 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;bin_filesize = size&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename = file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filetype = 'BIN'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;data_tab = html&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reward if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 03:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710305#M893264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T03:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Spool to HTML Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710306#M893265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this sample code..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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.
 
start-of-selection.
 
* Produce a list
  do 100 times.
    write:/ sy-index, at 30 sy-index, at 50 sy-index.
  enddo.
 
* Save the list
  call function 'SAVE_LIST'
       tables
            listobject         = list
       exceptions
            list_index_invalid = 1
            others             = 2.
 
* Convert the list
  call function 'WWW_LIST_TO_HTML'
       tables
            html = htmllines.
 
* Send mail
  maildata-obj_name = 'TEST'.
  maildata-obj_descr = 'Test Subject'.
 
  loop at htmllines.
    mailtxt = htmllines.
    append mailtxt.
  endloop.
 
  mailrec-receiver = 'you at yourcompany.com'.
  mailrec-rec_type  = 'U'.
  append mailrec.
 
  call function 'SO_NEW_DOCUMENT_SEND_API1'
       exporting
            document_data              = maildata
            document_type              = 'HTM'
            put_in_outbox              = 'X'
       tables
            object_header              = mailtxt
            object_content             = mailtxt
            receivers                  = 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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 03:19:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710306#M893265</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-04-23T03:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Spool to HTML Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710307#M893266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again.  Thanks for your reply.  But I'm actually having a problem with the list variable.  My dilemma actually is how I can transfer the jtab grabphical spool to the abaplist.  Please, please help me and  check what went wrong.  I'm actually trying to download the graphical spool to an html format.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: TBTCO, TBTCP, TSP01.&lt;/P&gt;&lt;P&gt;TYPE-POOLS: truxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;        sp_name TYPE tbtco-jobname,&lt;/P&gt;&lt;P&gt;        br_code(1),&lt;/P&gt;&lt;P&gt;        dumon(7),&lt;/P&gt;&lt;P&gt;        sp_numb TYPE TSP01-rqident,&lt;/P&gt;&lt;P&gt;        ofc(7),&lt;/P&gt;&lt;P&gt;      END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF btab OCCURS 5,&lt;/P&gt;&lt;P&gt;        fld1(24),&lt;/P&gt;&lt;P&gt;        fld2(12),&lt;/P&gt;&lt;P&gt;      END OF btab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: htmllines TYPE TABLE OF w3html WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;           w_jtab TYPE TABLE OF ABAPLIST WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF jtab OCCURS 0,&lt;/P&gt;&lt;P&gt;        fld1(11),&lt;/P&gt;&lt;P&gt;        fld2(41),&lt;/P&gt;&lt;P&gt;        fld3(21),&lt;/P&gt;&lt;P&gt;        fld4(11),&lt;/P&gt;&lt;P&gt;        fld5(10),&lt;/P&gt;&lt;P&gt;        fld6(22),&lt;/P&gt;&lt;P&gt;        fld7(72),&lt;/P&gt;&lt;P&gt;      END OF jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  PERFORM download_html.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  download_html&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM download_html.&lt;/P&gt;&lt;P&gt;  DATA: lv_file   TYPE string,&lt;/P&gt;&lt;P&gt;        lv_string TYPE string,&lt;/P&gt;&lt;P&gt;        lt_conv   TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT itab BY sp_name br_code dumon.&lt;/P&gt;&lt;P&gt;  LOOP AT itab.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        rqident = itab-sp_numb "Spool Number&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        BUFFER  = btab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT btab WHERE fld1 = 'BROKER REPORT ID'.&lt;/P&gt;&lt;P&gt;      PERFORM get_month.&lt;/P&gt;&lt;P&gt;      MOVE: btab-fld2+4(1) TO itab-br_code,&lt;/P&gt;&lt;P&gt;            date TO itab-dumon.&lt;/P&gt;&lt;P&gt;      MODIFY itab.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Move to jtab for Conversion HTML&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          rqident = itab-sp_numb "Spool Number&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          BUFFER  = jtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****SPOOL TO HTML&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SAVE_LIST'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;            listobject         = jtab&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;            list_index_invalid = 1&lt;/P&gt;&lt;P&gt;            others             = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'WWW_LIST_TO_HTML'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       html = htmllines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT NEW sp_name.&lt;/P&gt;&lt;P&gt;      CONCATENATE: p_file itab-sp_name '\' INTO p_file.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT NEW br_code.&lt;/P&gt;&lt;P&gt;      PERFORM get_brcode.&lt;/P&gt;&lt;P&gt;      CONCATENATE: p_file brc '\' INTO p_file.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT NEW dumon.&lt;/P&gt;&lt;P&gt;      CONCATENATE: p_file itab-dumon '\' INTO p_file.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CONCATENATE: p_file itab-ofc '.HTML' INTO p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      IF p_pres EQ 'X'.&lt;/P&gt;&lt;P&gt;        MOVE p_file TO lv_file.&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            filename = lv_file&lt;/P&gt;&lt;P&gt;            filetype = 'BIN'&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            data_tab = it_pdf_output.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;          MESSAGE e398(00) WITH 'Error creating file' p_file.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          MESSAGE i398(00) WITH 'File Created' p_file.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        APPEND LINES OF it_pdf_output TO lt_conv.&lt;/P&gt;&lt;P&gt;        IF lt_conv[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;          OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;          IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;            LOOP AT lt_conv INTO lv_string.&lt;/P&gt;&lt;P&gt;              TRANSFER lv_string TO p_file.&lt;/P&gt;&lt;P&gt;            ENDLOOP.&lt;/P&gt;&lt;P&gt;            CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;            IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;              MESSAGE i398(00) WITH 'File Created' p_file.&lt;/P&gt;&lt;P&gt;            ELSE.&lt;/P&gt;&lt;P&gt;              MESSAGE e398(00) WITH 'Error closing file' p_file.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;          ELSE.&lt;/P&gt;&lt;P&gt;            MESSAGE e398(00) WITH 'Error creating file' p_file.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "convert_spool_to_pdf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anna Bechayda on Apr 23, 2008 10:18 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2008 07:48:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710307#M893266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-23T07:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Spool to HTML Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710308#M893267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When called twice, the second time it displays the list twice.&lt;/P&gt;&lt;P&gt;How to refresh the spool ? I trye LIST_FREE_MEMORY but same problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 14:54:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-to-html-function-module/m-p/3710308#M893267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-30T14:54:36Z</dc:date>
    </item>
  </channel>
</rss>

