<?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: Replace variables in a documentation text in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-variables-in-a-documentation-text/m-p/4842330#M1132721</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.  Although I had tried this before without success, your post encouraged me to try again.  This time I noticed a different icon in the text editor for entering a program symbol.  Previously, I used the "insert command" button.  By using the "program symbol" button, I was able to register the main program as a source for the global data/ddic table area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if there was another error I had previously, but now it is working thanks to you.  I didn't have to use open_form or anything else to prepare the data area either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Ray&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Dec 2008 10:58:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-03T10:58:35Z</dc:date>
    <item>
      <title>Replace variables in a documentation text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-variables-in-a-documentation-text/m-p/4842328#M1132719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've read posts to allow use of REPLACE_TEXTSYMBOL but I couldn't get it to work.  It seems that calling this function by virtue of ABAP necessarily takes you into another memory area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are formatting email messages which are a couple of paragraphs in length.  We want to substitute values into variables populated in the texts such as &amp;amp;SY-DATUM&amp;amp; or &amp;amp;VBAK-VBELN&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do this, I chose to use documentation objects in transaction SE61 rather than standard texts.  (Reason being that standard texts would need to be created in each environment.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I call READ_TEXT but when I debug in REPLACE_TEXTSYMBOL, the variables are all blank and don't exist.  Obviously because I am in a different main program.  Are there precursor function modules I'm supposed to call to permit my global data to be "visible" in REPLACE_TEXTSYMBOL?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help because otherwise I'm going to have to code this thing using field symbols and SCAN and I really don't want to do it that way if there is something simple I'm missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions you may have,&lt;/P&gt;&lt;P&gt;Ray&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA:
    LV_ENDLINE TYPE SYTABIX,
    LS_TLINE TYPE TLINE,
    LT_TLINE TYPE TLINETAB.

  CALL FUNCTION 'READ_TEXT'
    EXPORTING
*   CLIENT                        = SY-MANDT
      ID                            = 'ST'
      LANGUAGE                      = SY-LANGU
      NAME                          = P_TDNAME
      OBJECT                        = 'TEXT'
    TABLES
      LINES                         = LT_TLINE.             "#EC *
*- Let it abend if this fails.

  DESCRIBE TABLE LT_TLINE LINES LV_ENDLINE.

*
  CALL FUNCTION 'REPLACE_TEXTSYMBOL'
    EXPORTING
      ENDLINE                = LV_ENDLINE
*   FORMATWIDTH            = 72
*   LANGUAGE               = SY-LANGU
*   LINEWIDTH              = 132
*   OPTION_DIALOG          = ' '
*   REPLACE_PROGRAM        = 'X'
*   REPLACE_STANDARD       = 'X'
*   REPLACE_SYSTEM         = 'X'
*   REPLACE_TEXT           = 'X'
      STARTLINE              = 1
* IMPORTING
*   CHANGED                =
    TABLES
      LINES                  = lT_TLINE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 16:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-variables-in-a-documentation-text/m-p/4842328#M1132719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T16:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Replace variables in a documentation text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-variables-in-a-documentation-text/m-p/4842329#M1132720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; To do this, I chose to use documentation objects in transaction SE61 rather than standard texts.  (Reason being that standard texts would need to be created in each environment.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;standard texts can be created in lower region and get transported using program RSTXTRAN, then you can make use of function module TEXT_SYMBOL_REPLACE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May this will help you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 17:15:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-variables-in-a-documentation-text/m-p/4842329#M1132720</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-12-02T17:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Replace variables in a documentation text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/replace-variables-in-a-documentation-text/m-p/4842330#M1132721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.  Although I had tried this before without success, your post encouraged me to try again.  This time I noticed a different icon in the text editor for entering a program symbol.  Previously, I used the "insert command" button.  By using the "program symbol" button, I was able to register the main program as a source for the global data/ddic table area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if there was another error I had previously, but now it is working thanks to you.  I didn't have to use open_form or anything else to prepare the data area either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Ray&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2008 10:58:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/replace-variables-in-a-documentation-text/m-p/4842330#M1132721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-03T10:58:35Z</dc:date>
    </item>
  </channel>
</rss>

