<?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: smartform output issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523034#M1262217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go for below approach&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Use below parameters of structure SSFCTRLOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NO_OPEN, NO_CLOSE: These two flags prevent the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request. The value should be like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st call: &lt;/P&gt;&lt;P&gt;NO_OPEN = SPACE. &lt;/P&gt;&lt;P&gt;NO_CLOSE = 'X'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nth call: &lt;/P&gt;&lt;P&gt;NO_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;NO_CLOSE = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;last call: &lt;/P&gt;&lt;P&gt;NO_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;NO_CLOSE = SPACE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.SSFCOMPOP: Structure for the output option.&lt;/P&gt;&lt;P&gt;TDNEWID: A flag indicating whether a new request is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Define one data wa_print_control referencing the structure SSFCTRLOP, and define another data variable wa_output_option referencing the structure SSFCOMPOP in the top include file of this report.&lt;/P&gt;&lt;P&gt;5) Clear the above two work areas before the print loop happens on the internal table that contains the selected invoice headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) Initialize these two work areas with the values which would not change during the print loop as the following code fragment:&lt;/P&gt;&lt;P&gt;wa_print_control-no_dialog = ' '. u201DShow print setting dialog&lt;/P&gt;&lt;P&gt;wa_print_control-preview = 'X'. u201DEnable print preview&lt;/P&gt;&lt;P&gt;wa_output_option-TDNEWID = 'X'. u201CNew spool request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) In the loop at the internal table which holds the selected invoice headers, set blank value to of the field wa_print_control-NO_OPEN and set u2018Xu2019 to the field wa_print_control-NO_CLOSE for the first loop at the AT FIRST event because it will be the first call to the function module of the smartform. The code is bellow:&lt;/P&gt;&lt;P&gt;print_control-no_open = ' '.&lt;/P&gt;&lt;P&gt;print_control-no_close = 'X'.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Set blank value to the field wa_print_control-NO_CLOSE to close the spool request for the last loop at the AT LAST event.&lt;/P&gt;&lt;P&gt;wa_print_control-NO_CLOSE = u2018 u2018&lt;/P&gt;&lt;P&gt;9) Call the function module generated by the Form Design by passing the print control work area and output area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Lavanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2009 09:50:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-27T09:50:24Z</dc:date>
    <item>
      <title>smartform output issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523032#M1262215</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;one of smartform output conatanis 10 customer address.&lt;/P&gt;&lt;P&gt;when i click on print button it will print first customer address.&lt;/P&gt;&lt;P&gt;when i click on second time it will print second customer address.&lt;/P&gt;&lt;P&gt;i want to get the print for all customers at a time.&lt;/P&gt;&lt;P&gt;where can i change the code means smartform or printprogram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 09:39:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523032#M1262215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T09:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523033#M1262216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its simple now its generating individual Spool requests. Just make only one spool request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is a sample code for that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;    W_INPUT   TYPE SSFCOMPIN,&lt;/P&gt;&lt;P&gt;    W_CONTROL TYPE SSFCTRLOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  W_INPUT-DIALOG = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SSFCOMP_OPEN'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      INPUT = W_INPUT&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      ERROR = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT IT_FINAL INTO WA_FINAL.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;      W_CONTROL-NO_OPEN   = 'X'.&lt;/P&gt;&lt;P&gt;      W_CONTROL-NO_CLOSE  = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         CALL FUNCTION FNAME&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            CONTROL_PARAMETERS = W_CONTROL&lt;/P&gt;&lt;P&gt;            GV_MATNR           = WA_FINAL-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SSFCOMP_CLOSE'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      ERROR = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 09:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523033#M1262216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T09:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523034#M1262217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go for below approach&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Use below parameters of structure SSFCTRLOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NO_OPEN, NO_CLOSE: These two flags prevent the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request. The value should be like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st call: &lt;/P&gt;&lt;P&gt;NO_OPEN = SPACE. &lt;/P&gt;&lt;P&gt;NO_CLOSE = 'X'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nth call: &lt;/P&gt;&lt;P&gt;NO_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;NO_CLOSE = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;last call: &lt;/P&gt;&lt;P&gt;NO_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;NO_CLOSE = SPACE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.SSFCOMPOP: Structure for the output option.&lt;/P&gt;&lt;P&gt;TDNEWID: A flag indicating whether a new request is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Define one data wa_print_control referencing the structure SSFCTRLOP, and define another data variable wa_output_option referencing the structure SSFCOMPOP in the top include file of this report.&lt;/P&gt;&lt;P&gt;5) Clear the above two work areas before the print loop happens on the internal table that contains the selected invoice headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) Initialize these two work areas with the values which would not change during the print loop as the following code fragment:&lt;/P&gt;&lt;P&gt;wa_print_control-no_dialog = ' '. u201DShow print setting dialog&lt;/P&gt;&lt;P&gt;wa_print_control-preview = 'X'. u201DEnable print preview&lt;/P&gt;&lt;P&gt;wa_output_option-TDNEWID = 'X'. u201CNew spool request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) In the loop at the internal table which holds the selected invoice headers, set blank value to of the field wa_print_control-NO_OPEN and set u2018Xu2019 to the field wa_print_control-NO_CLOSE for the first loop at the AT FIRST event because it will be the first call to the function module of the smartform. The code is bellow:&lt;/P&gt;&lt;P&gt;print_control-no_open = ' '.&lt;/P&gt;&lt;P&gt;print_control-no_close = 'X'.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Set blank value to the field wa_print_control-NO_CLOSE to close the spool request for the last loop at the AT LAST event.&lt;/P&gt;&lt;P&gt;wa_print_control-NO_CLOSE = u2018 u2018&lt;/P&gt;&lt;P&gt;9) Call the function module generated by the Form Design by passing the print control work area and output area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Lavanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 09:50:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523034#M1262217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T09:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: smartform output issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523035#M1262218</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;you will have to change in the logic..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take a internal table fill all the address in it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;make a loop in this table and print all the address on the smart form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ritesh Jha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2009 09:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smartform-output-issue/m-p/5523035#M1262218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-27T09:51:35Z</dc:date>
    </item>
  </channel>
</rss>

