<?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: creating different  spool requests based on sorting  -part II in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973638#M70300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The customer should  be the name of field where customer number is stored, I don't know how you have called it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Sep 2005 15:19:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-06T15:19:27Z</dc:date>
    <item>
      <title>creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973635#M70297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have added the group field to 'accitab' and as mentioned I have another itable (same as 'accitab') called 'final_accitab where I have the recrods for all the customers  and their corresponding group types too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;customernumber    ........      sortgroup&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1000001                              1&lt;/P&gt;&lt;P&gt;1000001                              1&lt;/P&gt;&lt;P&gt;1000001                              1&lt;/P&gt;&lt;P&gt;1000012                              1&lt;/P&gt;&lt;P&gt;1000012                              1&lt;/P&gt;&lt;P&gt;1000112                              1&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;10000002                              2&lt;/P&gt;&lt;P&gt;10000002                              2&lt;/P&gt;&lt;P&gt;10000002                              2&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;10000003                              3  and so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have to print the customers based on the sorting therefore I should be passing the records of all the customers that come under a common sort type into one spool request,( I think that way!!) and how to do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ii)how to print separate statements for each customer&lt;/P&gt;&lt;P&gt;for the same sort within the same spool request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Vinu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Sep 2005 20:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973635#M70297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-04T20:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973636#M70298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to open your sapscript or your smartform every time you have to create a new spool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I remember well you use a smartform, you shoUld use the function to open and close smartform to part from smartforms:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: E_SSFCOMPIN TYPE SSFCOMPIN,&lt;/P&gt;&lt;P&gt;      SORT        LIKE FINAL_ACCITAB-SORTGROUP,&lt;/P&gt;&lt;P&gt;      FL_OPEN,&lt;/P&gt;&lt;P&gt;      T_CUSTOMER  LIKE STANDARD TABLE OF FINAL_ACCITAB.&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;LOOP AT FINAL_ACCITAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a new spool while sortgroup is changing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF FINAL_ACCITAB-SORTGROUP &amp;lt;&amp;gt; SORT.&lt;/P&gt;&lt;P&gt;   SORT = FINAL_ACCITAB-SORTGROUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Before you close previous print (smartform and spool)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IF FL_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;       CALL FUNCTION 'SSF_CLOSE'.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'SSF_OPEN'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            INPUT  = E_SSFCOMPIN&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 = 0. FL_OPEN = 'X'. ENDIF.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Print data while customer is changing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  AT NEW CUSTOMER.&lt;/P&gt;&lt;P&gt;    IF NOT T_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION FM_NAME_OF_SMART&lt;/P&gt;&lt;P&gt;         .......&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            CUSTOMER = T_CUSTOMER.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;After printing data, clear the customer table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      REFRESH T_CUSTOMER.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append records of the same customer &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  INSERT FINAL_ACCITAB INTO TABLE T_CUSTOMER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Print data of last customer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF NOT T_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION FM_NAME_OF_SMART&lt;/P&gt;&lt;P&gt;         .......&lt;/P&gt;&lt;P&gt;          TABLES&lt;/P&gt;&lt;P&gt;            CUSTOMER = T_CUSTOMER.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'SSF_CLOSE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;After printing data, clear the customer table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      REFRESH T_CUSTOMER.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Sep 2005 20:53:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973636#M70298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-04T20:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973637#M70299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max happen to share this piece of information here. &lt;/P&gt;&lt;P&gt;Thanks a lot for the help. But  I am finding hard to incorporate thsi piece into my code &lt;/P&gt;&lt;P&gt;I am not able to understand that 'CUSTOMER' he has used and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting an error at 'AT NEW CUSTOMER'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module that I have declared for the smartform goes like  this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can ANY ONE OF you help me understand THIS piece of code w.r.t the function module I am using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now call the generated function module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call function fm_name&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_index        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_parameters   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                control_parameters   =  control&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_appl_obj        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_recipient       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_sender          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                output_options       =  output_options&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                user_settings        = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                    ZTOTAL = ZTOTALAMOUNT&lt;/P&gt;&lt;P&gt;                    zscan_code = scan_number&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   zpartner = bpartner&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                    z_bdate = e_date&lt;/P&gt;&lt;P&gt;                    zadnumber = adnumber&lt;/P&gt;&lt;P&gt;                    zadnumber1 = zzadnumber&lt;/P&gt;&lt;P&gt;                    zagencynumber = agencynumber&lt;/P&gt;&lt;P&gt;                    z_payment_terms = v_payment_terms&lt;/P&gt;&lt;P&gt;                    zzadname         = adname1&lt;/P&gt;&lt;P&gt;                     zadname         = adname&lt;/P&gt;&lt;P&gt;                    zagencyname     = agencyname&lt;/P&gt;&lt;P&gt;                    zphone          = bphone&lt;/P&gt;&lt;P&gt;                    zcreditgroup    =  zcredittext&lt;/P&gt;&lt;P&gt;                    z_bperiod       = monthn&lt;/P&gt;&lt;P&gt;                    ztotalcredits   = zappliedcredits1&lt;/P&gt;&lt;P&gt;                    ztotalbalance   = zcurrenttotal&lt;/P&gt;&lt;P&gt;                    ZZEXTZIP        = zzextensionzip&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                bookings             = bookings&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;     importing  document_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                job_output_info      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                job_output_options   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           tables&lt;/P&gt;&lt;P&gt;                    stribunecustomer     = customer&lt;/P&gt;&lt;P&gt;                    accountdata       = T_CUSTOMER&lt;/P&gt;&lt;P&gt;                    zcdatar               = zcdata&lt;/P&gt;&lt;P&gt;                    zaging                = agingdataitab&lt;/P&gt;&lt;P&gt;                  ZADDRESS              = i_address_number&lt;/P&gt;&lt;P&gt;         exceptions formatting_error     = 1&lt;/P&gt;&lt;P&gt;                    internal_error       = 2&lt;/P&gt;&lt;P&gt;                    send_error           = 3&lt;/P&gt;&lt;P&gt;                    user_canceled        = 4&lt;/P&gt;&lt;P&gt;                    others               = 5.&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;Thanks for your help..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VINU&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 15:02:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973637#M70299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T15:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973638#M70300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The customer should  be the name of field where customer number is stored, I don't know how you have called it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 15:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973638#M70300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T15:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973639#M70301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to declare the export parameter 'INPUT = E_SSFCOMPIN' IN THE SMARTFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you elaborate as how to declare them in the smartform?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 16:28:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973639#M70301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T16:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973640#M70302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added your peice of code in this way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR** tHE parameter 'INPUT' has not been defined. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just take a llok into my code and can you help me through here?&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;    call function 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;         exporting  formname           = p_form&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                variant            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                direct_call        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         importing  fm_name            = fm_name&lt;/P&gt;&lt;P&gt;         exceptions no_form            = 1&lt;/P&gt;&lt;P&gt;                    no_function_module = 2&lt;/P&gt;&lt;P&gt;                    others             = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  error handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:E_SSFCOMPIN TYPE SSFCOMPIN,&lt;/P&gt;&lt;P&gt;     SORT LIKE FINAL_ACCITAB-ZSORTGROUP,&lt;/P&gt;&lt;P&gt;     FL_OPEN,&lt;/P&gt;&lt;P&gt;     T_CUSTOMER LIKE STANDARD TABLE OF FINAL_ACCITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT FINAL_ACCITAB.&lt;/P&gt;&lt;P&gt;     IF FINAL_ACCITAB-ZSORTGROUP &amp;lt;&amp;gt; SORT.&lt;/P&gt;&lt;P&gt;      SORT = FINAL_ACCITAB-ZSORTGROUP.&lt;/P&gt;&lt;P&gt;        IF FL_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;       CALL FUNCTION 'SSF_CLOSE'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;       CALL FUNCTION 'SSF_OPEN'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;        INPUT = E_SSFCOMPIN&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 = 0. FL_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT NEW zadvertiser.&lt;/P&gt;&lt;P&gt;   IF NOT T_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now call the generated function module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call function fm_name&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_index        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_parameters   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                control_parameters   =  control&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_appl_obj        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_recipient       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_sender          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                output_options       =  output_options&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                user_settings        = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                    ZTOTAL = ZTOTALAMOUNT&lt;/P&gt;&lt;P&gt;                    zscan_code = scan_number&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   zpartner = bpartner&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                    z_bdate = e_date&lt;/P&gt;&lt;P&gt;                    zadnumber = adnumber&lt;/P&gt;&lt;P&gt;                    zadnumber1 = zzadnumber&lt;/P&gt;&lt;P&gt;                    zagencynumber = agencynumber&lt;/P&gt;&lt;P&gt;                    z_payment_terms = v_payment_terms&lt;/P&gt;&lt;P&gt;                    zzadname         = adname1&lt;/P&gt;&lt;P&gt;                     zadname         = adname&lt;/P&gt;&lt;P&gt;                    zagencyname     = agencyname&lt;/P&gt;&lt;P&gt;                    zphone          = bphone&lt;/P&gt;&lt;P&gt;                    zcreditgroup    =  zcredittext&lt;/P&gt;&lt;P&gt;                    z_bperiod       = monthn&lt;/P&gt;&lt;P&gt;                    ztotalcredits   = zappliedcredits1&lt;/P&gt;&lt;P&gt;                    ztotalbalance   = zcurrenttotal&lt;/P&gt;&lt;P&gt;                    ZZEXTZIP        = zzextensionzip&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                bookings             = bookings&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;     importing  document_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                job_output_info      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                job_output_options   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           tables&lt;/P&gt;&lt;P&gt;                    stribunecustomer     = customer&lt;/P&gt;&lt;P&gt;                    accountdata       = T_CUSTOMER&lt;/P&gt;&lt;P&gt;                    zcdatar               = zcdata&lt;/P&gt;&lt;P&gt;                    zaging                = agingdataitab&lt;/P&gt;&lt;P&gt;                    ZADDRESS              = i_address_number&lt;/P&gt;&lt;P&gt;         exceptions formatting_error     = 1&lt;/P&gt;&lt;P&gt;                    internal_error       = 2&lt;/P&gt;&lt;P&gt;                    send_error           = 3&lt;/P&gt;&lt;P&gt;                    user_canceled        = 4&lt;/P&gt;&lt;P&gt;                    others               = 5.&lt;/P&gt;&lt;P&gt;       REFRESH T_CUSTOMER.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;       ENDAT.&lt;/P&gt;&lt;P&gt;    INSERT FINAL_ACCITAB INTO TABLE T_CUSTOMER.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&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;Print data of last customer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        IF NOT T_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call function fm_name&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_index        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                archive_parameters   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                control_parameters   =  control&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_appl_obj        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_recipient       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                mail_sender          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                output_options       =  output_options&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                user_settings        = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                    ZTOTAL = ZTOTALAMOUNT&lt;/P&gt;&lt;P&gt;                    zscan_code = scan_number&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   zpartner = bpartner&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;                    z_bdate = e_date&lt;/P&gt;&lt;P&gt;                    zadnumber = adnumber&lt;/P&gt;&lt;P&gt;                    zadnumber1 = zzadnumber&lt;/P&gt;&lt;P&gt;                    zagencynumber = agencynumber&lt;/P&gt;&lt;P&gt;                    z_payment_terms = v_payment_terms&lt;/P&gt;&lt;P&gt;                    zzadname         = adname1&lt;/P&gt;&lt;P&gt;                     zadname         = adname&lt;/P&gt;&lt;P&gt;                    zagencyname     = agencyname&lt;/P&gt;&lt;P&gt;                    zphone          = bphone&lt;/P&gt;&lt;P&gt;                    zcreditgroup    =  zcredittext&lt;/P&gt;&lt;P&gt;                    z_bperiod       = monthn&lt;/P&gt;&lt;P&gt;                    ztotalcredits   = zappliedcredits1&lt;/P&gt;&lt;P&gt;                    ztotalbalance   = zcurrenttotal&lt;/P&gt;&lt;P&gt;                    ZZEXTZIP        = zzextensionzip&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                bookings             = bookings&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;     importing  document_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                job_output_info      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                job_output_options   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           tables&lt;/P&gt;&lt;P&gt;                    stribunecustomer     = customer&lt;/P&gt;&lt;P&gt;                    accountdata       = T_CUSTOMER&lt;/P&gt;&lt;P&gt;                    zcdatar               = zcdata&lt;/P&gt;&lt;P&gt;                    zaging                = agingdataitab&lt;/P&gt;&lt;P&gt;                    ZADDRESS              = i_address_number&lt;/P&gt;&lt;P&gt;         exceptions formatting_error     = 1&lt;/P&gt;&lt;P&gt;                    internal_error       = 2&lt;/P&gt;&lt;P&gt;                    send_error           = 3&lt;/P&gt;&lt;P&gt;                    user_canceled        = 4&lt;/P&gt;&lt;P&gt;                    others               = 5.&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'SSF_CLOSE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;After printing data, clear the customer table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;REFRESH T_CUSTOMER.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;    if  sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  error handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt; endif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 16:52:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973640#M70302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T16:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973641#M70303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code is extracted from my old program, but it should be good for you (I hope):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open smartforms:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF  E_SSFCOMPIN IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get user data:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT SINGLE * FROM USR01 INTO W_USR01 WHERE BNAME = SY-UNAME.&lt;/P&gt;&lt;P&gt;    E_SSFCOMPIN-TDDEST   = W_USR01-SPLD.&lt;/P&gt;&lt;P&gt;    IF W_USR01-SPDB = 'G'.&lt;/P&gt;&lt;P&gt;      E_SSFCOMPIN-TDIMMED  = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    E_SSFCOMPIN-TDNEWID  = 'X'.&lt;/P&gt;&lt;P&gt;    IF W_USR01-SPDA = 'D'.&lt;/P&gt;&lt;P&gt;      E_SSFCOMPIN-TDDELETE = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open dialog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    E_SSFCOMPIN-DIALOG = 'X'.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Only first time it opens dialog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR E_SSFCOMPIN-DIALOG.&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;  CALL FUNCTION 'SSF_OPEN'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            INPUT  = E_SSFCOMPIN&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           RESULT = I_SSFCRESOP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 S012(SSFCOMPOSER).&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;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL SMARTFORMS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:  SSFCTRLOP    LIKE SSFCTRLOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set this flag becouse you drive opening and closing &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;smartforms&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SSFCTRLOP-NO_OPEN   = 'X'.&lt;/P&gt;&lt;P&gt;  SSFCTRLOP-NO_CLOSE  = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION FM_NAME&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ARCHIVE_INDEX              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ARCHIVE_INDEX_TAB          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ARCHIVE_PARAMETERS         = ARC_PARAMS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            CONTROL_PARAMETERS         = SSFCTRLOP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 17:07:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973641#M70303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T17:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973642#M70304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it should works, try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:E_SSFCOMPIN TYPE SSFCOMPIN,&lt;/P&gt;&lt;P&gt;SORT LIKE FINAL_ACCITAB-ZSORTGROUP,&lt;/P&gt;&lt;P&gt;FL_OPEN,&lt;/P&gt;&lt;P&gt;T_CUSTOMER LIKE STANDARD TABLE OF FINAL_ACCITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fill structure E_SSFCOMPIN with print parameters, if &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;you don't know them open dialog:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You can get user parameters:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT SINGLE * FROM USR01 INTO W_USR01 WHERE BNAME = SY-UNAME.&lt;/P&gt;&lt;P&gt;  E_SSFCOMPIN-TDDEST   = W_USR01-SPLD.&lt;/P&gt;&lt;P&gt;  IF W_USR01-SPDB = 'G'.&lt;/P&gt;&lt;P&gt;      E_SSFCOMPIN-TDIMMED  = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  E_SSFCOMPIN-TDNEWID  = 'X'.&lt;/P&gt;&lt;P&gt;  IF W_USR01-SPDA = 'D'.&lt;/P&gt;&lt;P&gt;      E_SSFCOMPIN-TDDELETE = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open dialog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  E_SSFCOMPIN-DIALOG = 'X'.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Block opening and closing in FM of smartforms&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA:  SSFCTRLOP    LIKE SSFCTRLOP&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  SSFCTRLOP-NO_OPEN   = 'X'.&lt;/P&gt;&lt;P&gt;  SSFCTRLOP-NO_CLOSE  = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT FINAL_ACCITAB.&lt;/P&gt;&lt;P&gt;  IF FINAL_ACCITAB-ZSORTGROUP &amp;lt;&amp;gt; SORT.&lt;/P&gt;&lt;P&gt;    SORT = FINAL_ACCITAB-ZSORTGROUP.&lt;/P&gt;&lt;P&gt;    IF FL_OPEN = 'X'.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'SSF_CLOSE'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SSF_OPEN'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        INPUT  = E_SSFCOMPIN&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 = 0.&lt;/P&gt;&lt;P&gt;      FL_OPEN = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Only first time it opens dialog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CLEAR E_SSFCOMPIN-DIALOG.     &lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  AT NEW ZADVERTISER.&lt;/P&gt;&lt;P&gt;    IF NOT T_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;now call the generated function module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION FM_NAME&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;archive_index =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;archive_parameters =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      control_parameters = SSFCTRLOP&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mail_appl_obj =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mail_recipient =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mail_sender =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;output_options = output_options&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;user_settings = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ZTOTAL = ZTOTALAMOUNT&lt;/P&gt;&lt;P&gt;      ZSCAN_CODE = SCAN_NUMBER&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;zpartner = bpartner&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      Z_BDATE = E_DATE&lt;/P&gt;&lt;P&gt;      ZADNUMBER = ADNUMBER&lt;/P&gt;&lt;P&gt;      ZADNUMBER1 = ZZADNUMBER&lt;/P&gt;&lt;P&gt;      ZAGENCYNUMBER = AGENCYNUMBER&lt;/P&gt;&lt;P&gt;      Z_PAYMENT_TERMS = V_PAYMENT_TERMS&lt;/P&gt;&lt;P&gt;      ZZADNAME = ADNAME1&lt;/P&gt;&lt;P&gt;      ZADNAME = ADNAME&lt;/P&gt;&lt;P&gt;      ZAGENCYNAME = AGENCYNAME&lt;/P&gt;&lt;P&gt;      ZPHONE = BPHONE&lt;/P&gt;&lt;P&gt;      ZCREDITGROUP = ZCREDITTEXT&lt;/P&gt;&lt;P&gt;      Z_BPERIOD = MONTHN&lt;/P&gt;&lt;P&gt;      ZTOTALCREDITS = ZAPPLIEDCREDITS1&lt;/P&gt;&lt;P&gt;      ZTOTALBALANCE = ZCURRENTTOTAL&lt;/P&gt;&lt;P&gt;      ZZEXTZIP = ZZEXTENSIONZIP&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;bookings = bookings&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;importing document_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;job_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;job_output_options =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;      STRIBUNECUSTOMER = CUSTOMER&lt;/P&gt;&lt;P&gt;      ACCOUNTDATA = T_CUSTOMER&lt;/P&gt;&lt;P&gt;      ZCDATAR = ZCDATA&lt;/P&gt;&lt;P&gt;      ZAGING = AGINGDATAITAB&lt;/P&gt;&lt;P&gt;      ZADDRESS = I_ADDRESS_NUMBER&lt;/P&gt;&lt;P&gt;      EXCEPTIONS FORMATTING_ERROR = 1&lt;/P&gt;&lt;P&gt;      INTERNAL_ERROR = 2&lt;/P&gt;&lt;P&gt;      SEND_ERROR = 3&lt;/P&gt;&lt;P&gt;      USER_CANCELED = 4&lt;/P&gt;&lt;P&gt;      OTHERS = 5.&lt;/P&gt;&lt;P&gt;      REFRESH T_CUSTOMER.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDAT.&lt;/P&gt;&lt;P&gt;  INSERT FINAL_ACCITAB INTO TABLE T_CUSTOMER.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Print data of last customer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT T_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION FM_NAME&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;archive_index =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;archive_parameters =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;control_parameters = control&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mail_appl_obj =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mail_recipient =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;mail_sender =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;output_options = output_options&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;user_settings = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ZTOTAL = ZTOTALAMOUNT&lt;/P&gt;&lt;P&gt;    ZSCAN_CODE = SCAN_NUMBER&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;zpartner = bpartner&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    Z_BDATE = E_DATE&lt;/P&gt;&lt;P&gt;    ZADNUMBER = ADNUMBER&lt;/P&gt;&lt;P&gt;    ZADNUMBER1 = ZZADNUMBER&lt;/P&gt;&lt;P&gt;    ZAGENCYNUMBER = AGENCYNUMBER&lt;/P&gt;&lt;P&gt;    Z_PAYMENT_TERMS = V_PAYMENT_TERMS&lt;/P&gt;&lt;P&gt;    ZZADNAME = ADNAME1&lt;/P&gt;&lt;P&gt;    ZADNAME = ADNAME&lt;/P&gt;&lt;P&gt;    ZAGENCYNAME = AGENCYNAME&lt;/P&gt;&lt;P&gt;    ZPHONE = BPHONE&lt;/P&gt;&lt;P&gt;    ZCREDITGROUP = ZCREDITTEXT&lt;/P&gt;&lt;P&gt;    Z_BPERIOD = MONTHN&lt;/P&gt;&lt;P&gt;    ZTOTALCREDITS = ZAPPLIEDCREDITS1&lt;/P&gt;&lt;P&gt;    ZTOTALBALANCE = ZCURRENTTOTAL&lt;/P&gt;&lt;P&gt;    ZZEXTZIP = ZZEXTENSIONZIP&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;bookings = bookings&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;importing document_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;job_output_info =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;job_output_options =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;    STRIBUNECUSTOMER = CUSTOMER&lt;/P&gt;&lt;P&gt;    ACCOUNTDATA = T_CUSTOMER&lt;/P&gt;&lt;P&gt;    ZCDATAR = ZCDATA&lt;/P&gt;&lt;P&gt;    ZAGING = AGINGDATAITAB&lt;/P&gt;&lt;P&gt;    ZADDRESS = I_ADDRESS_NUMBER&lt;/P&gt;&lt;P&gt;    EXCEPTIONS FORMATTING_ERROR = 1&lt;/P&gt;&lt;P&gt;    INTERNAL_ERROR = 2&lt;/P&gt;&lt;P&gt;    SEND_ERROR = 3&lt;/P&gt;&lt;P&gt;    USER_CANCELED = 4&lt;/P&gt;&lt;P&gt;    OTHERS = 5.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'SSF_CLOSE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;After printing data, clear the customer table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    REFRESH T_CUSTOMER.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;error handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 17:16:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973642#M70304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T17:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973643#M70305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max, I did not understand  the purpose of getting this user data. Can you just elaborate on that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 18:27:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973643#M70305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T18:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973644#M70306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Max I will go through it. I will getback and award full points once I get it right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 18:28:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973644#M70306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T18:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973645#M70307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max, the error points to the function module 'SSF_OPEN' with the parameter 'INPUT' and this parameter is not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to enter the input parameters where should I be doing it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me out here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 19:17:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973645#M70307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T19:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973646#M70308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is showing an runtime error saying that the parameter 'INPUT'  is not defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate your help in this regard.&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;Vinu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 19:35:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973646#M70308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T19:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973647#M70309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry but I wasn't conneted to the forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway the problem depend on release which are you using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My piece of code is extracted from a program in release 4.6C, in this release the function SSF_OPEN has a parameter called INPUT (as structure SSFCOMPIN), but I could see this function in rel. 4.7 and there isn't parameter INPUT but there is OUTPUT_OPTIONS as structure SSFCOMPOP.&lt;/P&gt;&lt;P&gt;So I believe you should use OUTPUT_OPTIONS instead of INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 20:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973647#M70309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T20:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973648#M70310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks  for your time,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I am going through runtime analysis and in the dialog box, but when I check the 'Print' button  it throws an error,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Handle not valid for open spool request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The release 4.7 so I need to be using  the structure SSFCOMPOP  and it does not have the &lt;/P&gt;&lt;P&gt;E_SSFCOMPOP-DIALOG field, I commented it,  For the version 4.7 is there any changes that I need to make in the code?&lt;/P&gt;&lt;P&gt;Can you help me on that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;vinu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 21:14:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973648#M70310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T21:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973649#M70311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You also mentioned to use print parameters like from the structure 'SSFCOMPOP'&lt;/P&gt;&lt;P&gt;'TDDEST' 'TDPRINTER', 'TDNEWID', 'TDIMMED', something like that... which print parameters to be used because they have not highlighted anything related to that in the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all they have asked is customers need to be grouped according to their sort type and directed into one spool request and within that spool request the statements for these customers have to be printed separately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE YOU CAN HELP ME THROUGH THIS ISSUE.&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;VINU&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 21:33:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973649#M70311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T21:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973650#M70312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check your code, I think you call FM for closing before printing something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 21:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973650#M70312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T21:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973651#M70313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Max, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the issue is in a far better shape.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question: while looping through 'final_accitab' into 'T_Customers'  I am gathering the data for each customer number separately through the &lt;/P&gt;&lt;P&gt;  ' INSERT FINAL_ACCITAB INTO TABLE T_CUSTOMER' within the 'function fm_name' &lt;/P&gt;&lt;P&gt;once the entire data is gathered for a customer it runs through the FM FM_name to  REFRESH T_CUSTOMER AND IT DOES NOT PRINT ANY STATEMENTS AT THIS TIME  BUT IT RUNS THROUGH THE LOOP AGAIN GATHERS DATA INTO T_CUSTOMER AND NOW IT PRINTS THE STATEMENT THAT HAS THE DATA OF BOTH THE CUSTOMERS IN  ONE PAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more thing,  in the fm module &lt;/P&gt;&lt;P&gt;ZADNUMBER = ADNUMBER&lt;/P&gt;&lt;P&gt; ZADNUMBER1 = ZZADNUMBER&lt;/P&gt;&lt;P&gt;ZADNAME = ADNAME&lt;/P&gt;&lt;P&gt;ZAGENCYNAME = AGENCYNAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these values pick up the last record of the final_accitab i.e the last customer number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is one of the major issues I am working on, I would really appreciate if you could help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vinu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2005 23:57:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973651#M70313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-06T23:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973652#M70314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The print starts when the closing (FM SSF_CLOSE) is called.&lt;/P&gt;&lt;P&gt;The system should print as many documents as many calling of smartforms, and for every calling it should create a new page: check your smartform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try to test this situation creating a case like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Open smartform,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Load customer table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Call smartform,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Load customer table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Call smartform;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Close smartform; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save your data ADNUMBER,..... at end of loop or after inserting a record into T_CUSTOMER.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2005 07:52:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973652#M70314</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-07T07:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973653#M70315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program code is throwing up a different error (I was not changed anything) now it is gathering the data based on the customer into 'T_customer' but is not printing any statement out here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It throws a cancel dialog box gives an error message :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'No output request open. End not possible'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what does that mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not explored a lot in this area (generating spool requests) , henceforth seeking your help a lot. Thanks a lot for your help in advance.&lt;/P&gt;&lt;P&gt;Vinu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2005 13:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973653#M70315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-07T13:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: creating different  spool requests based on sorting  -part II</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973654#M70316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i Vinu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have that error becouse you close your print without printing something before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't know how your smartform is, but I create an example in my system and I hope it can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I create a smartform ZTEST with only one page, after I create a control program that calls my smartform:&lt;/P&gt;&lt;P&gt;it open my smartform for 3 times (so I have 3 spool) and for every opening It calls my smartform for 4 times: so I have 4 prints in each spool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA FM_NAME TYPE  RS38L_FNAM.&lt;/P&gt;&lt;P&gt;DATA: SSFCTRLOP TYPE SSFCTRLOP,&lt;/P&gt;&lt;P&gt;      SSFCTRLOP_OPEN TYPE SSFCTRLOP,&lt;/P&gt;&lt;P&gt;      SSFCRESOP TYPE SSFCRESOP,&lt;/P&gt;&lt;P&gt;      SSFCOMPOP TYPE SSFCOMPOP.&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 FM name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    FORMNAME = 'ZTEST'&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    FM_NAME  = FM_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 3 TIMES.&lt;/P&gt;&lt;P&gt;  IF NOT SSFCOMPOP IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;After first time dialog doesn't open  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SSFCTRLOP_OPEN-NO_DIALOG = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SSF_OPEN'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      USER_SETTINGS      = SPACE&lt;/P&gt;&lt;P&gt;      OUTPUT_OPTIONS     = SSFCOMPOP&lt;/P&gt;&lt;P&gt;      CONTROL_PARAMETERS = SSFCTRLOP_OPEN&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      JOB_OUTPUT_OPTIONS = SSFCRESOP&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      FORMATTING_ERROR   = 1&lt;/P&gt;&lt;P&gt;      INTERNAL_ERROR     = 2&lt;/P&gt;&lt;P&gt;      SEND_ERROR         = 3&lt;/P&gt;&lt;P&gt;      USER_CANCELED      = 4&lt;/P&gt;&lt;P&gt;      OTHERS             = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get print parameter choosen in the first print and &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;transfer them for next call of fm SSF_OPEN  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MOVE-CORRESPONDING SSFCRESOP TO SSFCOMPOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Block open and close of smartform in FM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SSFCTRLOP-NO_OPEN  = 'X'.&lt;/P&gt;&lt;P&gt;  SSFCTRLOP-NO_CLOSE = 'X'.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  DO 4 TIMES.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Print my document for three times  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION FM_NAME&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        CONTROL_PARAMETERS = SSFCTRLOP.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'SSF_CLOSE'.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example works fine: I run it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think your program should be organized as my example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Call fM SSF_OPEN everytime you want to create a new spool, but before you have to close the previous spool (SSF_CLOSE);&lt;/P&gt;&lt;P&gt;- Call FM of smartform as many time as prints which should be in a spool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: max bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: max bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2005 14:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-different-spool-requests-based-on-sorting-part-ii/m-p/973654#M70316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-07T14:39:37Z</dc:date>
    </item>
  </channel>
</rss>

