<?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: PRINT_TEXT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-text/m-p/1585811#M264110</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;Defining your printer in SPAD transaction helps i guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here give details fo printer on which you want to print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;HR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Sep 2006 11:50:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-26T11:50:48Z</dc:date>
    <item>
      <title>PRINT_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-text/m-p/1585810#M264109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi....I am trying to use the FM - PRINT_TEXT for printing a word document which is attached to the application - Appropriation Request. &lt;/P&gt;&lt;P&gt;(For details..goto transaction 'IMA11' and click on the long text button. If the config is set for word document, this will appear on the screen). &lt;/P&gt;&lt;P&gt;My problem is printing this document directly from the prom the program using PRINT_TEXT. I am capturing the required long text information using READ_TEXT. The problem is not with the printing but the printer. Evenif I specify the printer details in the "options" parameter of the FM, it prints the document in the windows default printer only. Can anyone help me on what needs to be done to make the document print in the required printer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find below the code. &lt;/P&gt;&lt;P&gt;********************************&lt;/P&gt;&lt;P&gt;DATA: LINES LIKE TLINE OCCURS 0 with header line.&lt;/P&gt;&lt;P&gt;data: head like thead.&lt;/P&gt;&lt;P&gt;data: options like itcpo.&lt;/P&gt;&lt;P&gt;DATA: L_ITCPP LIKE ITCPP.&lt;/P&gt;&lt;P&gt;data: l_input like itcpo.&lt;/P&gt;&lt;P&gt;options-tddest = 'TEC'.&lt;/P&gt;&lt;P&gt;options-tdIMMED = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    CLIENT                        = SY-MANDT&lt;/P&gt;&lt;P&gt;    ID                            = 'XLTD'&lt;/P&gt;&lt;P&gt;    LANGUAGE                      = sy-langu&lt;/P&gt;&lt;P&gt;    NAME                          = '001000000041'&lt;/P&gt;&lt;P&gt;    OBJECT                        = 'IMAK'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_HANDLE                = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LOCAL_CAT                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    HEADER                        = head&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    LINES                         = lines&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    ID                            = 1&lt;/P&gt;&lt;P&gt;    LANGUAGE                      = 2&lt;/P&gt;&lt;P&gt;    NAME                          = 3&lt;/P&gt;&lt;P&gt;    NOT_FOUND                     = 4&lt;/P&gt;&lt;P&gt;    OBJECT                        = 5&lt;/P&gt;&lt;P&gt;    REFERENCE_CHECK               = 6&lt;/P&gt;&lt;P&gt;    WRONG_ACCESS_TO_ARCHIVE       = 7&lt;/P&gt;&lt;P&gt;    OTHERS                        = 8&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&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;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the print parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  l_INPUT-TDDEST = 'TEC'.&lt;/P&gt;&lt;P&gt;  l_INPUT-TDIMMED = 'X'.&lt;/P&gt;&lt;P&gt;  l_INPUT-TDCOPIES = 1.&lt;/P&gt;&lt;P&gt;  l_input-tdnewid = 'X'.&lt;/P&gt;&lt;P&gt;  l_input-tdsenddate = syst-datum.&lt;/P&gt;&lt;P&gt;  l_input-tdsendtime = syst-uzeit.&lt;/P&gt;&lt;P&gt;  l_input-tdprogram = sy-repid.&lt;/P&gt;&lt;P&gt;  L_INPUT-TDTITLE = '001000000041'.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'EFG_GET_ITCPO'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      X_ITCPO                  = l_input&lt;/P&gt;&lt;P&gt;      X_DEVICE                 = 'PRINTER'&lt;/P&gt;&lt;P&gt;      X_NO_PRINT_BUTTONS       = ' '&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_RDI                    = '*'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_ARCHIVE_PARAMS         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    X_ARCHIVE_INDEX          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      X_DIALOG                 = ' '&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      Y_ITCPO                  = options&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Y_ITCPP                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CANCELLED                = 1&lt;/P&gt;&lt;P&gt;      FAILED                   = 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;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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Print&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'PRINT_TEXT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      APPLICATION                    = 'TX'&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_PARAMS                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      DEVICE                         = 'PRINTER'&lt;/P&gt;&lt;P&gt;      DIALOG                         = ' '&lt;/P&gt;&lt;P&gt;      HEADER                         = head&lt;/P&gt;&lt;P&gt;      OPTIONS                        = options&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NEW_ARCHIVE_PARAMS             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      RESULT                         = L_ITCPP&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      LINES                          = lines&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTFDATA                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CANCELED                       = 1&lt;/P&gt;&lt;P&gt;      DEVICE                         = 2&lt;/P&gt;&lt;P&gt;      FORM                           = 3&lt;/P&gt;&lt;P&gt;      OPTIONS                        = 4&lt;/P&gt;&lt;P&gt;      UNCLOSED                       = 5&lt;/P&gt;&lt;P&gt;      UNKNOWN                        = 6&lt;/P&gt;&lt;P&gt;      FORMAT                         = 7&lt;/P&gt;&lt;P&gt;      TEXTFORMAT                     = 8&lt;/P&gt;&lt;P&gt;      COMMUNICATION                  = 9&lt;/P&gt;&lt;P&gt;      BAD_PAGEFORMAT_FOR_PRINT       = 10&lt;/P&gt;&lt;P&gt;      OTHERS                         = 11&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&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;  else.&lt;/P&gt;&lt;P&gt;*For test purpose&lt;/P&gt;&lt;P&gt;    loop at lines.&lt;/P&gt;&lt;P&gt;      write: / lines-tdline.&lt;/P&gt;&lt;P&gt;    endloop.&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>Tue, 26 Sep 2006 11:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-text/m-p/1585810#M264109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T11:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: PRINT_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-text/m-p/1585811#M264110</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;Defining your printer in SPAD transaction helps i guess.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here give details fo printer on which you want to print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;HR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 11:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-text/m-p/1585811#M264110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T11:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: PRINT_TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-text/m-p/1585812#M264111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...thanx for the reply but I hv all those things set up. The printer is already defined and I am using it for printing from SAP already. &lt;/P&gt;&lt;P&gt;The problem here is what are the values that needs to be passed and in what parameters of PRINT_TEXT. As you can see, I am passing the required values for printing to the parameter "options" so as to print in the required printer. But, it is still getting printed in the windows default printer only. Is there anything else that is influencing this printing to the default printer??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Sep 2006 12:22:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-text/m-p/1585812#M264111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-26T12:22:26Z</dc:date>
    </item>
  </channel>
</rss>

