<?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: When spool will genereate in Scripts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-spool-will-genereate-in-scripts/m-p/7169261#M1517036</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Get the spool no we can use this logic...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN FM OPEN_FORM Import Parameter OPTIONS(Print Options) pass TDDATASET and TDCOVTITLE for spool details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example If ur working for Order then maintain ur OR if invouce IN u can maintain ur custom text. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then for Title MaintainCONCATENATE p_vbeln sy-datum sy-uzeit INTO g_title SEPARATED BY '_'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After CLOSE_FORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then write select statement to fetch the form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE rqident INTO tsp01-rqident&lt;/P&gt;&lt;P&gt;         FROM   tsp01&lt;/P&gt;&lt;P&gt;         WHERE  rq0name  = c_rq0name&lt;/P&gt;&lt;P&gt;           AND  rqowner  = sy-uname&lt;/P&gt;&lt;P&gt;           AND  rqtitle  = g_title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then pass this Spool number with path to this program PDF will be Genrated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT rstxpdft4 WITH spoolno = tsp01-rqident&lt;/P&gt;&lt;P&gt;                      WITH p_file  = v_path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Aug 2010 16:10:38 GMT</pubDate>
    <dc:creator>naveen_kumar116</dc:creator>
    <dc:date>2010-08-02T16:10:38Z</dc:date>
    <item>
      <title>When spool will genereate in Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-spool-will-genereate-in-scripts/m-p/7169260#M1517035</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 am posting 2 quires.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I would like to know when Spool will generate after CLOSE_FORM. Pls remember, I am passing printer name to this FM soe we will not get a pop-up for Printer.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want spool no, bcoz, want to convet it to PDF and mail it as attachment by using FM 'CONVERT_ABAPSPOOLJOB_2_PDF'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In FM CONVERT_OTF_MEMORY, other FM 'READ_OTF_FROM_MEMORY'. In 2nd FM, login is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;memkey = memory_key.&lt;/P&gt;&lt;P&gt;import otf from memory id memkey.&lt;/P&gt;&lt;P&gt;if sy-subrc 0.&lt;/P&gt;&lt;P&gt;raise memory_empty.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while debugging mode I try to find active memory id's from Menr-&amp;gt;Goto-&amp;gt;Sys area-&amp;gt; ABAP memory, Iam not able to fine ID DEF_OTF_MEMORY_KEY. It means cann't we read data from memory to OTF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My case sy-subrc is not 0. Is this reason for this??? Please sugget how to convert data to pdf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 14:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-spool-will-genereate-in-scripts/m-p/7169260#M1517035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T14:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: When spool will genereate in Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/when-spool-will-genereate-in-scripts/m-p/7169261#M1517036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To Get the spool no we can use this logic...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN FM OPEN_FORM Import Parameter OPTIONS(Print Options) pass TDDATASET and TDCOVTITLE for spool details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example If ur working for Order then maintain ur OR if invouce IN u can maintain ur custom text. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then for Title MaintainCONCATENATE p_vbeln sy-datum sy-uzeit INTO g_title SEPARATED BY '_'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After CLOSE_FORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then write select statement to fetch the form&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE rqident INTO tsp01-rqident&lt;/P&gt;&lt;P&gt;         FROM   tsp01&lt;/P&gt;&lt;P&gt;         WHERE  rq0name  = c_rq0name&lt;/P&gt;&lt;P&gt;           AND  rqowner  = sy-uname&lt;/P&gt;&lt;P&gt;           AND  rqtitle  = g_title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then pass this Spool number with path to this program PDF will be Genrated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT rstxpdft4 WITH spoolno = tsp01-rqident&lt;/P&gt;&lt;P&gt;                      WITH p_file  = v_path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 16:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/when-spool-will-genereate-in-scripts/m-p/7169261#M1517036</guid>
      <dc:creator>naveen_kumar116</dc:creator>
      <dc:date>2010-08-02T16:10:38Z</dc:date>
    </item>
  </channel>
</rss>

