<?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: clear in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188703#M759533</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;In this case clear will clears the body of your internal table, pls test the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:&lt;/P&gt;&lt;P&gt;     begin of x_mara,&lt;/P&gt;&lt;P&gt;           matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;     end  of x_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_mara type standard table of x_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr from mara into table t_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear t_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&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;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreeram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Dec 2007 09:07:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-28T09:07:29Z</dc:date>
    <item>
      <title>clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188698#M759528</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;for a internal table without header line wht will the clear statement do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kb&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 08:58:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188698#M759528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T08:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188699#M759529</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;use this . itab is the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Santosh Thorat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:01:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188699#M759529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188700#M759530</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;if the header line is not available we cant do with the clear statement, if we want to remove the data of internal table at that time we use Clear itab[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;satish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points.if it is useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188700#M759530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188701#M759531</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;use the work area. clear the work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;clear wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S.Nehru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:02:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188701#M759531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188702#M759532</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;You can initialize internal tables with the:&lt;/P&gt;&lt;P&gt;CLEAR &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;statement. This statement restores an internal table to the state it was in immediately after you declared it. This means that the table contains no lines. However, the memory already occupied by the memory up until you cleared it remains allocated to the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using internal tables with header lines, remember that the header line and the body of the table have the same name. If you want to address the body of the table in a comparison, you must place two brackets ([ ]) after the table name:&lt;/P&gt;&lt;P&gt;CLEAR &amp;lt;itab&amp;gt;[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188702#M759532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188703#M759533</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;In this case clear will clears the body of your internal table, pls test the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types:&lt;/P&gt;&lt;P&gt;     begin of x_mara,&lt;/P&gt;&lt;P&gt;           matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;     end  of x_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: t_mara type standard table of x_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr from mara into table t_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear t_mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&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;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreeram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188703#M759533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188704#M759534</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;   You have to use work area for without header line internal table. For that the statement is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;PRashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:07:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188704#M759534</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-12-28T09:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188705#M759535</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;&lt;EM&gt;Internal Tables without Header Line :&lt;/EM&gt; Here there is no work area associated with the table. Work area is to be explicitly specified when we need to access such tables. Hence these tables cannot be accessed directly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CLEAR&lt;/STRONG&gt; statement has different effects for different data types:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Elementary ABAP types&lt;/P&gt;&lt;P&gt;The CLEAR statement sets the value of elementary variables to their initial value (see the keyword documentation) not to the start value, which is set using the VALUE parameter of the DATA statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        References&lt;/P&gt;&lt;P&gt;The CLEAR statement resets a reference variable to its initial value, that is, so that it does not point to an object. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Structures&lt;/P&gt;&lt;P&gt;The CLEAR statement resets the individual components of a structure to their respective initial values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Internal tables&lt;/P&gt;&lt;P&gt;The CLEAR statement deletes the entire contents of an internal table.&lt;/P&gt;&lt;P&gt;You cannot use the CLEAR statement to reset a constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Reward if helpful.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188705#M759535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188706#M759536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you declared an internal table without header line,&lt;/P&gt;&lt;P&gt;if you use clear statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It &lt;STRONG&gt;removes the all entries from that internal table&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;So your internal table will be empty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:08:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188706#M759536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188707#M759537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;without herader line the clear statement will clear the contents of the table. With header line clear will clear the header of the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:13:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188707#M759537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188708#M759538</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;for a table with out headerline we cannot give clear statement as an internal table without headerline cannot have work areaso it wont be doing any thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;swaroop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 09:22:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188708#M759538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T09:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188709#M759539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CLEAR statement initializes the object. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if this object is a header line, the header line will be cleared or initialized. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this object is a table, the tablw will be cleared. Table remains in the memory but will not have any data or lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say an internal table itab is defined with a header line then itab refers to both the &lt;STRONG&gt;header line&lt;/STRONG&gt; and the &lt;STRONG&gt;table&lt;/STRONG&gt; (body) itself. In this case,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR itab. " this will clear the header line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default itab refers to the header line, if there is one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For clearing the table, we need to refer to the table (body). the reference to the table can be made using [] after the table name like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR itab[]. "this will clear the table (body)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if the table itab is defined without header line there will be no other object than the table body itself to refer to. So, in this case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR itab. " this will clear the table (body) as itab refers &lt;/P&gt;&lt;P&gt;                   "to only one object, table (body)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR itab[]. "this will clear the table (body)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is better to stop defining internal tables with header line as this is obsolete in ABAP Objects context and this is going to be the rule eventually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanjeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 16:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188709#M759539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T16:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188710#M759540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 22:17:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188710#M759540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T22:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: clear</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188711#M759541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you stop for a while please.&lt;/P&gt;&lt;P&gt;I have to open one thread in ABAP,and it is saying ABAP server is too busy ,try again later &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2009 22:19:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/clear/m-p/3188711#M759541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-14T22:19:14Z</dc:date>
    </item>
  </channel>
</rss>

