<?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 Not Generated Conditionally in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-not-generated-conditionally/m-p/2200569#M470108</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Requirement :&amp;lt;/b&amp;gt;Developing a data transfer program. Approach used is Call Transaction in S mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases(if Receiving Storage Location is PKGX) I need to load only MB11 and other cases I need to load 3 transaction sequentially &amp;#150; MB11 creates Mat. Doc. No. which in turn passed to the LT06 to create TO(Transfer Order) and the TO passed to LT12 to confirm TO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Problem &amp;#150;&amp;lt;/b&amp;gt; When I run it in background(it generates report in foreground), job finished successfully, data is loaded into system and spool status shown as error ONLY IF ALL THE 3 TRANSACTIONS CALLED AND LOADED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;I debugged the Batch Job(using t-code JDBG) line by line output,contents are writen to output but at the end spool goes into error and report is not visible&amp;lt;/u&amp;gt;.&lt;/P&gt;&lt;P&gt;In all other cases like messages/outputs due to record not correct or/and only MB11 is to be processed, spool is generated with status Waiting and report is visible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Statement at top &amp;#150;&amp;lt;/b&amp;gt; REPORT ZL6C_LOAD_INVENTORY_WM_SLOC&lt;/P&gt;&lt;P&gt;NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;MESSAGE-ID ZOLSC_AS&lt;/P&gt;&lt;P&gt;LINE-COUNT 65&lt;/P&gt;&lt;P&gt;LINE-SIZE 148.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;It works if I set line-size as 132 .&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome this I used FM GET_PRINT_PARAMETER with various cominations of parameter passed but it doesn&amp;#146;t work &amp;#150; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COPIES = L_C_ONE&lt;/P&gt;&lt;P&gt;DEPARTMENT = L_C_SYSTEM&lt;/P&gt;&lt;P&gt;DESTINATION = L_C_LOCL&lt;/P&gt;&lt;P&gt;EXPIRATION = L_C_2&lt;/P&gt;&lt;P&gt;LAYOUT = L_C_X_65_255&lt;/P&gt;&lt;P&gt;LINE_COUNT = L_C_65&lt;/P&gt;&lt;P&gt;LINE_SIZE = L_C_255&lt;/P&gt;&lt;P&gt;LIST_NAME = L_LIST_NAME&lt;/P&gt;&lt;P&gt;LIST_TEXT = L_LIST_TEXT&lt;/P&gt;&lt;P&gt;MODE = 'BATCH'&lt;/P&gt;&lt;P&gt;NEW_LIST_ID = G_C_X&lt;/P&gt;&lt;P&gt;NO_DIALOG = G_C_X&lt;/P&gt;&lt;P&gt;RECEIVER = L_C_SAP&lt;/P&gt;&lt;P&gt;RELEASE = G_C_X&lt;/P&gt;&lt;P&gt;SAP_COVER_PAGE = G_C_X&lt;/P&gt;&lt;P&gt;REPORT = SY-REPID&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;OUT_PARAMETERS = L_PARAMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;ARCHIVE_INFO_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;INVALID_PRINT_PARAMS = 2&lt;/P&gt;&lt;P&gt;INVALID_ARCHIVE_PARAMS = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0 AND NOT L_PARAMS IS INITIAL.&lt;/P&gt;&lt;P&gt;NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG NEW-SECTION.&lt;/P&gt;&lt;P&gt;G_SPOOL = 'X'.&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;Also when I use this FM under INITIALIZATION then it generates the spool but content written at TOP_OF_PAGE not displayed. When I use it under START-OF-SELECTION, problem still remain same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Sonal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2007 10:21:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-09T10:21:54Z</dc:date>
    <item>
      <title>Spool Not Generated Conditionally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-not-generated-conditionally/m-p/2200569#M470108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;Requirement :&amp;lt;/b&amp;gt;Developing a data transfer program. Approach used is Call Transaction in S mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases(if Receiving Storage Location is PKGX) I need to load only MB11 and other cases I need to load 3 transaction sequentially &amp;#150; MB11 creates Mat. Doc. No. which in turn passed to the LT06 to create TO(Transfer Order) and the TO passed to LT12 to confirm TO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Problem &amp;#150;&amp;lt;/b&amp;gt; When I run it in background(it generates report in foreground), job finished successfully, data is loaded into system and spool status shown as error ONLY IF ALL THE 3 TRANSACTIONS CALLED AND LOADED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;I debugged the Batch Job(using t-code JDBG) line by line output,contents are writen to output but at the end spool goes into error and report is not visible&amp;lt;/u&amp;gt;.&lt;/P&gt;&lt;P&gt;In all other cases like messages/outputs due to record not correct or/and only MB11 is to be processed, spool is generated with status Waiting and report is visible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Statement at top &amp;#150;&amp;lt;/b&amp;gt; REPORT ZL6C_LOAD_INVENTORY_WM_SLOC&lt;/P&gt;&lt;P&gt;NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;MESSAGE-ID ZOLSC_AS&lt;/P&gt;&lt;P&gt;LINE-COUNT 65&lt;/P&gt;&lt;P&gt;LINE-SIZE 148.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;It works if I set line-size as 132 .&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To overcome this I used FM GET_PRINT_PARAMETER with various cominations of parameter passed but it doesn&amp;#146;t work &amp;#150; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COPIES = L_C_ONE&lt;/P&gt;&lt;P&gt;DEPARTMENT = L_C_SYSTEM&lt;/P&gt;&lt;P&gt;DESTINATION = L_C_LOCL&lt;/P&gt;&lt;P&gt;EXPIRATION = L_C_2&lt;/P&gt;&lt;P&gt;LAYOUT = L_C_X_65_255&lt;/P&gt;&lt;P&gt;LINE_COUNT = L_C_65&lt;/P&gt;&lt;P&gt;LINE_SIZE = L_C_255&lt;/P&gt;&lt;P&gt;LIST_NAME = L_LIST_NAME&lt;/P&gt;&lt;P&gt;LIST_TEXT = L_LIST_TEXT&lt;/P&gt;&lt;P&gt;MODE = 'BATCH'&lt;/P&gt;&lt;P&gt;NEW_LIST_ID = G_C_X&lt;/P&gt;&lt;P&gt;NO_DIALOG = G_C_X&lt;/P&gt;&lt;P&gt;RECEIVER = L_C_SAP&lt;/P&gt;&lt;P&gt;RELEASE = G_C_X&lt;/P&gt;&lt;P&gt;SAP_COVER_PAGE = G_C_X&lt;/P&gt;&lt;P&gt;REPORT = SY-REPID&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;OUT_PARAMETERS = L_PARAMS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;ARCHIVE_INFO_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;INVALID_PRINT_PARAMS = 2&lt;/P&gt;&lt;P&gt;INVALID_ARCHIVE_PARAMS = 3&lt;/P&gt;&lt;P&gt;OTHERS = 4&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0 AND NOT L_PARAMS IS INITIAL.&lt;/P&gt;&lt;P&gt;NEW-PAGE PRINT ON PARAMETERS L_PARAMS NO DIALOG NEW-SECTION.&lt;/P&gt;&lt;P&gt;G_SPOOL = 'X'.&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;Also when I use this FM under INITIALIZATION then it generates the spool but content written at TOP_OF_PAGE not displayed. When I use it under START-OF-SELECTION, problem still remain same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Sonal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 10:21:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-not-generated-conditionally/m-p/2200569#M470108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T10:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Spool Not Generated Conditionally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/spool-not-generated-conditionally/m-p/2200570#M470109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FM  : RSPO_OUTPUT_SPOOL_REQUEST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if it is helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2007 21:40:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/spool-not-generated-conditionally/m-p/2200570#M470109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-09T21:40:17Z</dc:date>
    </item>
  </channel>
</rss>

