<?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: SAPSCRIPT - INCLUDE TEXT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881760#M1325032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, it works correctly....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2009 06:16:18 GMT</pubDate>
    <dc:creator>lydia_martinezmartinez</dc:creator>
    <dc:date>2009-07-24T06:16:18Z</dc:date>
    <item>
      <title>SAPSCRIPT - INCLUDE TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881754#M1325026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with SapScript, because I'm trying to add dinamic text. I have two options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I use the sentence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
*IN THE SAPSCRIPT:*
/:	 	INCLUDE &amp;amp;LOT&amp;amp; OBJECT QPRUEFLOS ID QALS LANGUAGE &amp;amp;NAST-SPRAS&amp;amp;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to add the text corresponding to the object prueflos LOT. This sentence writes all lines of the text but I don´t need the first two. It's possible use this sentence and say it what lines i want to write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I used the next code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*IN THE SAPSCRIPT:*
/:	 	PERFORM observation IN PROGRAM ZQAMV
/:	 	USING &amp;amp;LOT&amp;amp;
/:	 	CHANGING &amp;amp;TEXT1&amp;amp;
..........
/:	 	CHANGING &amp;amp;TEXT11&amp;amp;
/:	 	ENDPERFORM

*IN THE PERFORM*
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        id                         = 'QALS'
        language             = sy-langu
        name                   = G_LOT
        object                  = 'QPRUEFLOS'
      TABLES
        lines                     = it_lines
      EXCEPTIONS
        id                          = 1
        language              = 2
        name                    = 3
        not_found            = 4
        object                   = 5
        reference_check = 6
        wrong_access_to_archive = 7
        OTHERS                = 8.

   
    LOOP AT it_lines INTO wa_lines.

      CASE sy-tabix.
        WHEN 1.
          MOVE wa_lines-tdline TO cadena.
          output_table-name = 'TEXTO1'.
          output_table-value = cadena.
          MODIFY output_table INDEX 1.
       .........
        WHEN 11.
          MOVE wa_lines-tdline TO cadena.
          output_table-name = 'TEXTO11'.
          output_table-value = cadena.
          MODIFY output_table INDEX 11.
      ENDCASE.

    ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn´t work well because if the text has more than 11 lines, the form doesn´t write all lines and the text of a line is cut, only show 50 characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please any can help me, THANKS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 07:58:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881754#M1325026</guid>
      <dc:creator>lydia_martinezmartinez</dc:creator>
      <dc:date>2009-07-22T07:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSCRIPT - INCLUDE TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881755#M1325027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi LydiaMM,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The text may conaitn any number of lines.So Its not good to use the case statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So better to try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_lines INTO wa_lines.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;MOVE wa_lines-tdline TO cadena.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;output_table-name = 'TEXTO1'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;output_table-value = cadena.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;          &lt;STRONG&gt;MODIFY output_table sy-tabix.&lt;/STRONG&gt;&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;SO the above code works for all the lines irrespective of totallines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if u see the case of truncating the characters (getting only upto 50 characters),The problem could be solved with either of the below two:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.Make sure that  the length of cadena (datatype) is atleast of tdline's length.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.Or try to replace the tdline reference with similar but with more length datatype reference.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rama chary.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 09:07:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881755#M1325027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-22T09:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSCRIPT - INCLUDE TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881756#M1325028</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;I wrote your code in my program and it doesn't work, because only appear the first line of recover text, and i only fill the table output with lines 3, 4, 5... not 1 and 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 13:33:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881756#M1325028</guid>
      <dc:creator>lydia_martinezmartinez</dc:creator>
      <dc:date>2009-07-23T13:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSCRIPT - INCLUDE TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881757#M1325029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lydia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you may try this approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in Program&lt;/P&gt;&lt;P&gt;=========&lt;/P&gt;&lt;P&gt;do your method to populate a text table with little modification:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_lines ...&lt;/P&gt;&lt;P&gt; if sy-tabix = 1 or sy-tabix = 2.&lt;/P&gt;&lt;P&gt;  continue.&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;append output_table.  {use append instead of modify, so no need to think about the index}&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{and add a process which does loop  the output_table, and write new element on the SAPScript}&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;loop at output_table .&lt;/P&gt;&lt;P&gt; {call the write function }&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in SAPScrip:&lt;/P&gt;&lt;P&gt;=========&lt;/P&gt;&lt;P&gt;you can add new element to write your text table. ex: text_elm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help u,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Oki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 14:41:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881757#M1325029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T14:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSCRIPT - INCLUDE TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881758#M1325030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to do this, but the program where i define the perform where i recover the text is not the same as the program where i call the sapscript because this is a standard program, so i needed to create a new program, and it doesn't work, because if you put write form SAP doesn't know what is the sapscript and it do anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 14:59:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881758#M1325030</guid>
      <dc:creator>lydia_martinezmartinez</dc:creator>
      <dc:date>2009-07-23T14:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSCRIPT - INCLUDE TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881759#M1325031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps a weird proposal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call a subroutine in SAPSPRICT then you don't have to modify the SAP Standard. The subroutine can be in any report you like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the subroutine you might read the original text and you can eliminate the lines you don't like to put onto the form.&lt;/P&gt;&lt;P&gt;Store this text in a new standard text you create within your subroutine (perhaps something which includes the lot number, date and time in its key).&lt;/P&gt;&lt;P&gt;Then you return the key of the new text to the sapscript.&lt;/P&gt;&lt;P&gt;Afterwards you can include the the new standard text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call of subroutines is designed to do something which in the print program hasn't been included....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't test to be frank.  Perhaps there might be a problem with "commit work" .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2009 15:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881759#M1325031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-23T15:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSCRIPT - INCLUDE TEXT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881760#M1325032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, it works correctly....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 06:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript-include-text/m-p/5881760#M1325032</guid>
      <dc:creator>lydia_martinezmartinez</dc:creator>
      <dc:date>2009-07-24T06:16:18Z</dc:date>
    </item>
  </channel>
</rss>

