<?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 How to get spool data? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104630#M1361048</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;We have requirement where a SAP query need to be converted to a ABAP program completly with the Output options available for the Query. As no modification is to be done to the logic, challenge is to get the data and place to Application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options available on Selection Screen for out put.&lt;/P&gt;&lt;P&gt;1.SAP Viewer&lt;/P&gt;&lt;P&gt;2. ALV list&lt;/P&gt;&lt;P&gt;3. Table display &lt;/P&gt;&lt;P&gt;4. File path&lt;/P&gt;&lt;P&gt;5. Graphics&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A wraper program is created where in this programe is submitted to memory and then  using FM LIST_TO_MEMORY fetching object list but the ouput is not correct, infact junk data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mohinder SIngh Chauhan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mohinder Singh Chauhan on Sep 17, 2009 8:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Sep 2009 06:44:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-09-17T06:44:39Z</dc:date>
    <item>
      <title>How to get spool data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104630#M1361048</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;We have requirement where a SAP query need to be converted to a ABAP program completly with the Output options available for the Query. As no modification is to be done to the logic, challenge is to get the data and place to Application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options available on Selection Screen for out put.&lt;/P&gt;&lt;P&gt;1.SAP Viewer&lt;/P&gt;&lt;P&gt;2. ALV list&lt;/P&gt;&lt;P&gt;3. Table display &lt;/P&gt;&lt;P&gt;4. File path&lt;/P&gt;&lt;P&gt;5. Graphics&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A wraper program is created where in this programe is submitted to memory and then  using FM LIST_TO_MEMORY fetching object list but the ouput is not correct, infact junk data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mohinder SIngh Chauhan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mohinder Singh Chauhan on Sep 17, 2009 8:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2009 06:44:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104630#M1361048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-17T06:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spool data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104631#M1361049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi,
Try this way.
&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
  EXPORTING
    SRC_SPOOLID   = G_SPOOL_NO
    NO_DIALOG     = ' '
  IMPORTING
    PDF_BYTECOUNT = L_NO_OF_BYTES
    PDF_SPOOLID   = L_PDF_SPOOLID
    BTC_JOBNAME   = L_JOBNAME
    BTC_JOBCOUNT  = L_JOBCOUNT
  TABLES
    PDF           = I_PDF.&lt;/CODE&gt;&lt;/PRE&gt;
&amp;lt;li&amp;gt;Use OPEN DATASET , TRANSFER and CLOSE DATASET to send the data to application server.
Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2009 06:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104631#M1361049</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-09-17T06:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spool data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104632#M1361050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply, FM is useful however it doesnt suffice to the condition. Getting output is still an issue.&lt;/P&gt;&lt;P&gt;Here is the code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'JOB_OPEN'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    jobname          = name&lt;/P&gt;&lt;P&gt;  importing&lt;/P&gt;&lt;P&gt;    jobcount         = number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  submit aqfpz_bw_team===zcom_details== to sap-spool&lt;/P&gt;&lt;P&gt;                    spool parameters print_parameters&lt;/P&gt;&lt;P&gt;                    without spool dynpro&lt;/P&gt;&lt;P&gt;                    via job name number number&lt;/P&gt;&lt;P&gt;                    and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    call function 'JOB_CLOSE'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        jobcount             = number&lt;/P&gt;&lt;P&gt;        jobname              = name&lt;/P&gt;&lt;P&gt;        strtimmed            = 'X'&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CALL FUNCTION 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; TABLES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   listobject = list_tab&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*IF sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL FUNCTION 'WRITE_LIST'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     listobject = list_tab.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; call function 'LIST_TO_ASCI'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         listasci           = alistreturn&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         listobject         = listreturn&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get current job details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'GET_JOB_RUNTIME_INFO'&lt;/P&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;P&gt;      eventid                 = gd_eventid&lt;/P&gt;&lt;P&gt;      eventparm               = gd_eventparm&lt;/P&gt;&lt;P&gt;      external_program_active = gd_external_program_active&lt;/P&gt;&lt;P&gt;      jobcount                = gd_jobcount&lt;/P&gt;&lt;P&gt;      jobname                 = gd_jobname&lt;/P&gt;&lt;P&gt;      stepcount               = gd_stepcount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select * from  tbtcp&lt;/P&gt;&lt;P&gt;                 into table it_tbtcp&lt;/P&gt;&lt;P&gt;                 where      jobname     = name&lt;/P&gt;&lt;P&gt;                 and        jobcount    = number.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                and        listident   &amp;lt;&amp;gt; '0000000000'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                order by   jobname&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                           jobcount&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                          stepcount.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   read table it_tbtcp into wa_tbtcp index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    spool_id = wa_tbtcp-listident.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;&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                    = spool_id&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIRST_LINE                 = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LAST_LINE                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    buffer                     =  spool_list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mohinder SIngh Chauhan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mohinder Singh Chauhan on Sep 21, 2009 7:47 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mohinder Singh Chauhan on Sep 21, 2009 7:48 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mohinder Singh Chauhan on Sep 21, 2009 7:53 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 05:46:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104632#M1361050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-21T05:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spool data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104633#M1361051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this blog.&lt;/P&gt;&lt;P&gt;here its demonstrated how to get data from backgorund job ( spool )&lt;/P&gt;&lt;P&gt;Hope it meets your requirement&lt;/P&gt;&lt;P&gt;link:[Displaying ALV Grid in Background Job|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID0899989750DB10582890596782339563End?blog=/pub/wlg/5898]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 05:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104633#M1361051</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-09-21T05:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spool data?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104634#M1361052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 06:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-spool-data/m-p/6104634#M1361052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-11T06:05:00Z</dc:date>
    </item>
  </channel>
</rss>

