<?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 Re: spool file data to internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456147#M1056339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Feb 2009 06:13:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-05T06:13:09Z</dc:date>
    <item>
      <title>spool file data to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456144#M1056336</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;I have spool file , I want to transfer spool file data to internal table , how can I acheive the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bobby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2008 10:59:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456144#M1056336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-09T10:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: spool file data to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456145#M1056337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this code out. Hope this helps. This code is to read spool data and print it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE * FROM tsp01&lt;/P&gt;&lt;P&gt;               WHERE rqident = p_spool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING tsp01 TO wf_req_view.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Attrinbutes for the spool&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'RSTS_GET_ATTRIBUTES'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;        authority     = 'SP01'&lt;/P&gt;&lt;P&gt;        client        = wf_req_view-rqo1clie&lt;/P&gt;&lt;P&gt;        name          = wf_req_view-rqo1name&lt;/P&gt;&lt;P&gt;        part          = wf_req_view-rqo1part&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;        charco        = wf_req_view-rqcharco&lt;/P&gt;&lt;P&gt;        noof_parts    = wf_req_view-rqparts&lt;/P&gt;&lt;P&gt;        rectyp        = wf_req_view-rqrectyp&lt;/P&gt;&lt;P&gt;        size          = wf_req_view-rqsize&lt;/P&gt;&lt;P&gt;        stotyp        = wf_req_view-rqstotyp&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          TYPE          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        objtype       = wf_req_view-rqdtype&lt;/P&gt;&lt;P&gt;        locat         = wf_req_view-rqlocat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;        fb_error              = 2&lt;/P&gt;&lt;P&gt;        fb_rsts_other         = 3&lt;/P&gt;&lt;P&gt;        no_object             = 4&lt;/P&gt;&lt;P&gt;        no_permission         = 5&lt;/P&gt;&lt;P&gt;        OTHERS        = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    STOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING wf_req_view TO wf_rq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read Spool Data in RAW format.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'RSPO_IRETURN_RAW_DATA'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            rq          = wf_rq&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            line_buffer = int_line_buffer&lt;/P&gt;&lt;P&gt;            page_index  = int_page_index&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            error       = 1&lt;/P&gt;&lt;P&gt;            OTHERS      = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;    STOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  wf_page_count = 9999.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display Report.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  PERFORM show_job TABLES int_line_buffer USING space&lt;/P&gt;&lt;P&gt;  wf_page_count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;      FORM SHOW_JOB                                                 *&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      ........                                                      *&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  BUFFER                                                        *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  IS_OTF                                                        *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  wf_page_count                                                 *&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 show_job TABLES buffer TYPE sp01r_data_set_t&lt;/P&gt;&lt;P&gt;              USING is_otf page_count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: line_length TYPE rststype-linelength,&lt;/P&gt;&lt;P&gt;        lowl(1024) TYPE c,&lt;/P&gt;&lt;P&gt;        highl(1024) TYPE c,&lt;/P&gt;&lt;P&gt;        offset TYPE i,&lt;/P&gt;&lt;P&gt;        len TYPE i,&lt;/P&gt;&lt;P&gt;        loc_spool(15).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loc_spool = p_spool.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SET PF-STATUS 'DISPLAY'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE sy-title '-' 'Spool' loc_spool INTO sy-title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  NEW-PAGE LINE-SIZE p_linsiz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'RSPO_SPOOLDATA_WRITE_INIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT buffer.&lt;/P&gt;&lt;P&gt;    IF buffer-precol = 'P' AND buffer-data_line(1) = ' '.&lt;/P&gt;&lt;P&gt;      NEW-PAGE.&lt;/P&gt;&lt;P&gt;      CONTINUE.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    compute line length&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF buffer-data_len IS INITIAL.&lt;/P&gt;&lt;P&gt;      line_length = strlen( buffer-data_line ) - 1.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      line_length = buffer-data_len - 1.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    IF line_length &amp;gt; 0.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'RSPO_SPOOLDATA_WRITE'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                spool_data     = buffer-data_line&lt;/P&gt;&lt;P&gt;                data_length    = line_length&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                data_too_short = 1&lt;/P&gt;&lt;P&gt;                OTHERS         = 2.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      SKIP.               " empty line&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2008 12:28:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456145#M1056337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-09T12:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: spool file data to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456146#M1056338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Suresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This helped me to get a solution to a problem.&lt;/P&gt;&lt;P&gt;One of my custom program used the c-calls  to transfer data from spool buffer into internal table. And then print the data thru a script.&lt;/P&gt;&lt;P&gt;     CALL 'RSPOARSD'&lt;/P&gt;&lt;P&gt;        ID 'BUFF'         FIELD DATA_SET_LINE+5&lt;/P&gt;&lt;P&gt;        ID 'DATALEN'   FIELD DATA_SET_LENGTH&lt;/P&gt;&lt;P&gt;        ID 'RC'             FIELD RC&lt;/P&gt;&lt;P&gt;        ID 'ERRMSG'   FIELD ERRMSG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I replaced this with the Function Module      RSPO_IRETURN_RAW_DATA  to read data from buffer into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers Swati.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 15:45:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456146#M1056338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T15:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: spool file data to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456147#M1056339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 06:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456147#M1056339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-05T06:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: spool file data to internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456148#M1056340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bobby,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Were you able to read the spool data. If yes, can I request you to please share the solution with us. Actually I have also come across the same kind of issue, I am able to read the spool but since the data in spool is too large it is getting truncated in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please suggest something on this. I have opened a thread also, you can refer the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1426448"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2009 11:58:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-file-data-to-internal-table/m-p/4456148#M1056340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-28T11:58:27Z</dc:date>
    </item>
  </channel>
</rss>

