<?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: Errors and corrective action in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-and-corrective-action/m-p/3006028#M710304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace-&amp;gt;&lt;/P&gt;&lt;P&gt;To replace a string in a field with a different string, use the REPLACE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE str1 WITH str2 INTO c [LENGTH len].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE sub_string WITH new INTO dobj &lt;/P&gt;&lt;P&gt;                   [IN {BYTE|CHARACTER} MODE] &lt;/P&gt;&lt;P&gt;                   [LENGTH len].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement searches the field c  for the first occurrence of the first len positions of the pattern str1. If no length is specified, it searches for the pattern str1 in its full length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, the statement replaces the first occurrence of the pattern str1 in field c  with the string str2. If a length len was specified, only the relevant part of the pattern is replaced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the return code value of the system field sy-subrc is set to 0, this indicates that str1  was found in c  and replaced by str2. Another return value shows that nothing was replaced. str1, str2, and len can be variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE-&amp;gt;&lt;/P&gt;&lt;P&gt;You may sometimes need to find out the attributes of a data object at runtime that were not statically available. For example, you may need to find out the type of a generic interface parameter in a subroutine. To do this, you would use the statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD &amp;lt;f&amp;gt; [LENGTH &amp;lt;l&amp;gt;] [TYPE &amp;lt;t&amp;gt; [COMPONENTS &amp;lt;n&amp;gt;]]&lt;/P&gt;&lt;P&gt;                   [OUTPUT-LENGTH &amp;lt;o&amp;gt;] [DECIMALS &amp;lt;d&amp;gt;]&lt;/P&gt;&lt;P&gt;                   [EDIT MASK &amp;lt;m&amp;gt;] [HELP-ID &amp;lt;h&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attributes of the data object &amp;lt;f&amp;gt; specified by the parameters of the statement are written to the variables following the parameters. You can use any number of the additions in the same statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD DISTANCE BETWEEN &amp;lt;f1&amp;gt; AND &amp;lt;f 2&amp;gt; INTO &amp;lt;d&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement returns the distance between the data objects &amp;lt;f1&amp;gt; and &amp;lt;f 2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next sections describe the additions in detail: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE-&amp;gt;&lt;/P&gt;&lt;P&gt;The CONDENSE statement deletes redundant spaces from a string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE c [NO-GAPS].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.&lt;/P&gt;&lt;P&gt;DATA: string(25) TYPE c VALUE ' one  two   three    four',&lt;/P&gt;&lt;P&gt;      len TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( string ).&lt;/P&gt;&lt;P&gt;WRITE: string, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE string.&lt;/P&gt;&lt;P&gt;len = strlen( string ).&lt;/P&gt;&lt;P&gt;WRITE: string, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE string NO-GAPS.&lt;/P&gt;&lt;P&gt;len = strlen( string ).&lt;/P&gt;&lt;P&gt;WRITE: string, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2007 13:30:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-25T13:30:47Z</dc:date>
    <item>
      <title>Errors and corrective action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-and-corrective-action/m-p/3006027#M710303</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 am working in a upgrade project.&lt;/P&gt;&lt;P&gt;Can anybody help me in getting the possible errors and corrective action against these keywords. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or atleast a way to find. (some documentation )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Points will be rewarded.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 12:31:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-and-corrective-action/m-p/3006027#M710303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T12:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Errors and corrective action</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/errors-and-corrective-action/m-p/3006028#M710304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;replace-&amp;gt;&lt;/P&gt;&lt;P&gt;To replace a string in a field with a different string, use the REPLACE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE str1 WITH str2 INTO c [LENGTH len].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPLACE sub_string WITH new INTO dobj &lt;/P&gt;&lt;P&gt;                   [IN {BYTE|CHARACTER} MODE] &lt;/P&gt;&lt;P&gt;                   [LENGTH len].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement searches the field c  for the first occurrence of the first len positions of the pattern str1. If no length is specified, it searches for the pattern str1 in its full length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, the statement replaces the first occurrence of the pattern str1 in field c  with the string str2. If a length len was specified, only the relevant part of the pattern is replaced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the return code value of the system field sy-subrc is set to 0, this indicates that str1  was found in c  and replaced by str2. Another return value shows that nothing was replaced. str1, str2, and len can be variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE-&amp;gt;&lt;/P&gt;&lt;P&gt;You may sometimes need to find out the attributes of a data object at runtime that were not statically available. For example, you may need to find out the type of a generic interface parameter in a subroutine. To do this, you would use the statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD &amp;lt;f&amp;gt; [LENGTH &amp;lt;l&amp;gt;] [TYPE &amp;lt;t&amp;gt; [COMPONENTS &amp;lt;n&amp;gt;]]&lt;/P&gt;&lt;P&gt;                   [OUTPUT-LENGTH &amp;lt;o&amp;gt;] [DECIMALS &amp;lt;d&amp;gt;]&lt;/P&gt;&lt;P&gt;                   [EDIT MASK &amp;lt;m&amp;gt;] [HELP-ID &amp;lt;h&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attributes of the data object &amp;lt;f&amp;gt; specified by the parameters of the statement are written to the variables following the parameters. You can use any number of the additions in the same statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE FIELD DISTANCE BETWEEN &amp;lt;f1&amp;gt; AND &amp;lt;f 2&amp;gt; INTO &amp;lt;d&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement returns the distance between the data objects &amp;lt;f1&amp;gt; and &amp;lt;f 2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next sections describe the additions in detail: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE-&amp;gt;&lt;/P&gt;&lt;P&gt;The CONDENSE statement deletes redundant spaces from a string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE c [NO-GAPS].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.&lt;/P&gt;&lt;P&gt;DATA: string(25) TYPE c VALUE ' one  two   three    four',&lt;/P&gt;&lt;P&gt;      len TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( string ).&lt;/P&gt;&lt;P&gt;WRITE: string, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE string.&lt;/P&gt;&lt;P&gt;len = strlen( string ).&lt;/P&gt;&lt;P&gt;WRITE: string, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE string NO-GAPS.&lt;/P&gt;&lt;P&gt;len = strlen( string ).&lt;/P&gt;&lt;P&gt;WRITE: string, '!'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Length: ', len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 13:30:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/errors-and-corrective-action/m-p/3006028#M710304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T13:30:47Z</dc:date>
    </item>
  </channel>
</rss>

