<?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: Write itab to spool in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-itab-to-spool/m-p/1280745#M152684</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can You please provide us with the BADI name through which you are actually sending the datas from SAP R/3 to APO as you mentioned?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Dec 2006 13:23:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-28T13:23:48Z</dc:date>
    <item>
      <title>Write itab to spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-itab-to-spool/m-p/1280743#M152682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a BADI that transfers master recipes from SAP r/3 to APO, In the BADI i actually delete some recipes that are not relevant. In production for troubleshooting of what actually got deleted, i would like to collect the lines i am going to delete in a internal table and write it to spool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can i use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;EXPORTING DESTINATION = 'LOCL'&lt;/P&gt;&lt;P&gt;COPIES = COUNT&lt;/P&gt;&lt;P&gt;LIST_NAME = 'TEST'&lt;/P&gt;&lt;P&gt;LIST_TEXT = 'Test NEW-PAGE PRINT ON'&lt;/P&gt;&lt;P&gt;IMMEDIATELY = 'X'&lt;/P&gt;&lt;P&gt;RELEASE = 'X'&lt;/P&gt;&lt;P&gt;NEW_LIST_ID = 'X'&lt;/P&gt;&lt;P&gt;EXPIRATION = DAYS&lt;/P&gt;&lt;P&gt;LINE_SIZE = 79&lt;/P&gt;&lt;P&gt;LINE_COUNT = 23&lt;/P&gt;&lt;P&gt;LAYOUT = 'X_PAPER'&lt;/P&gt;&lt;P&gt;SAP_COVER_PAGE = 'X'&lt;/P&gt;&lt;P&gt;RECEIVER = 'SAP*'&lt;/P&gt;&lt;P&gt;DEPARTMENT = 'System'&lt;/P&gt;&lt;P&gt;NO_DIALOG = ' '&lt;/P&gt;&lt;P&gt;IMPORTING OUT_PARAMETERS = PARAMS&lt;/P&gt;&lt;P&gt;VALID = VALID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF VALID &amp;lt;&amp;gt; SPACE.&lt;/P&gt;&lt;P&gt;NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE / 'First line'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2006 18:12:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-itab-to-spool/m-p/1280743#M152682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-22T18:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Write itab to spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-itab-to-spool/m-p/1280744#M152683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at this example program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ztestaks1 MESSAGE-ID 00 NO STANDARD PAGE HEADING
                               LINE-SIZE 160.


DATA: BEGIN OF i_mara OCCURS 0,
        matnr LIKE mara-matnr.
DATA: END OF i_mara.

DATA: v_dest            LIKE tsp01-rqdest,
      v_handle          LIKE sy-tabix,
      v_spool_id        LIKE tsp01-rqident,
      v_rc              TYPE c,
      v_errmessage(100) TYPE c,
      v_text(70)        TYPE c.

START-OF-SELECTION.

  SELECT matnr FROM mara INTO TABLE i_mara.

  CALL FUNCTION 'RSPO_OPEN_SPOOLREQUEST'
    EXPORTING
      dest                  = 'LOCL'
*     LAYOUT                =
*     NAME                  =
*     SUFFIX1               =
*     SUFFIX2               =
*     COPIES                =
*     PRIO                  =
*     IMMEDIATE_PRINT       =
*     AUTO_DELETE           =
*     TITLELINE             =
*     RECEIVER              =
*     DIVISION              =
*     AUTHORITY             =
*     POSNAME               =
*     ACTTIME               =
*     LIFETIME              = '8'
*     APPEND                =
*     COVERPAGE             =
*     CODEPAGE              =
*     DOCTYPE               =
    IMPORTING
      handle                = v_handle
      spoolid               = v_spool_id
      rc                    = v_rc
      errmessage            = v_errmessage.

  LOOP AT i_mara.
    v_text = i_mara-matnr.
    CALL FUNCTION 'RSPO_WRITE_SPOOLREQUEST'
      EXPORTING
        handle                 = v_handle
        text                   = v_text
*       LENGTH                 =
*       CODEPAGE               =
*       TRUNCATE               =
      IMPORTING
        rc               = v_rc
        errmessage       = v_errmessage
      EXCEPTIONS
        handle_not_valid = 1
        OTHERS           = 2.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

  ENDLOOP.

  CALL FUNCTION 'RSPO_CLOSE_SPOOLREQUEST'
    EXPORTING
      handle           = v_handle
    IMPORTING
      rc               = v_rc
      errmessage       = v_errmessage
    EXCEPTIONS
      handle_not_valid = 1
      OTHERS           = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2006 19:07:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-itab-to-spool/m-p/1280744#M152683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-22T19:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Write itab to spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-itab-to-spool/m-p/1280745#M152684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can You please provide us with the BADI name through which you are actually sending the datas from SAP R/3 to APO as you mentioned?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Dec 2006 13:23:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-itab-to-spool/m-p/1280745#M152684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-28T13:23:48Z</dc:date>
    </item>
  </channel>
</rss>

