<?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: regading internaltable records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026953#M715757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i just want to know whethe the values in internal table are unique are not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2007 12:06:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-30T12:06:42Z</dc:date>
    <item>
      <title>regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026940#M715744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how can we find whether the records present in internal table same r not ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:49:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026940#M715744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026941#M715745</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;Once select statement is executed, check for sy-subrc, if it is zero then internal has values in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not from Select statement try this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        hkont like bsis-hkont,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      itab-hkont = '123546'.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;      clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      itab-hkont = '123546'.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;      clear itab.&lt;/P&gt;&lt;P&gt;      itab-hkont = '123546'.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;      clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if sy-tabix GT 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        write : 'values'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     else.&lt;/P&gt;&lt;P&gt;       write : 'No values'.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe lines of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026941#M715745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026942#M715746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Can you give more details of what exactly you want to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the select query executed you can chack the sy-dbcnt value to find how many records has been fetched. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Satish Panakala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:54:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026942#M715746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026943#M715747</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;by putting read statement u can try this , by copying the records to one more internal table of same structure.&lt;/P&gt;&lt;P&gt;loop at second table.&lt;/P&gt;&lt;P&gt;loop at first table.&lt;/P&gt;&lt;P&gt;read&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this logic&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:56:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026943#M715747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026944#M715748</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;/P&gt;&lt;P&gt;  After select statement check sy-subrc, if it is equal to zero then table contains the data. You can write like this also&lt;/P&gt;&lt;P&gt; If not itab[] is inital.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;staement&lt;/P&gt;&lt;P&gt;endif.&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>Tue, 30 Oct 2007 11:57:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026944#M715748</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-10-30T11:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026945#M715749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many ways to find records are present or not..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example...&lt;/P&gt;&lt;P&gt;DATA : lin TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE itab LINES lin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here lin returns number of records present in itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:57:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026945#M715749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026946#M715750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;itab1[] = itab[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table itab lines var1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab1 comparing all fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table itab1 lines var2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var1&amp;lt;&amp;gt;var2.&lt;/P&gt;&lt;P&gt;*---there are dupliacte records&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var1 ne 1 and var2 = 1.&lt;/P&gt;&lt;P&gt;*--all records in original internal table are same.....&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:57:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026946#M715750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026947#M715751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;suppose in an internal table we are having 5 records how can we check whether thse 5 recods are having same value or not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 11:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026947#M715751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T11:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026948#M715752</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;After Select statement check if not itab is initial.&lt;/P&gt;&lt;P&gt;then check if sy-subrc equal to 0.if it is 0 then records are present in internal table.&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;Regards,&lt;/P&gt;&lt;P&gt;Shilpi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:01:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026948#M715752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T12:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026949#M715753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you mean... you want to compare 5 records with data base table or with another internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026949#M715753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T12:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026950#M715754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;suppose itab is ur internal table with 5 records....move it to itab1......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1[] = itab[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table itab lines var1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab1 comparing all fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table itab1 lines var2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var1&amp;lt;&amp;gt;var2.&lt;/P&gt;&lt;P&gt;*---there are dupliacte records&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if var1 ne 1 and var2 = 1.&lt;/P&gt;&lt;P&gt;*--all 5 records in original internal table are same.....&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026950#M715754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T12:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026951#M715755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Its very simple procedure.&lt;/P&gt;&lt;P&gt;After filling internal table with data from Database table using SELECT stmt or some other internal table we have to use IS INITIAL[] statement for internal table.&lt;/P&gt;&lt;P&gt;For example if we want to print  internal table data and we want to check whether internal table contains some data or not we will check as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZSDNTEST_NOV .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:itab LIKE mara OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM mara INTO TABLE itab UP TO 10 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT itab[] IS INITIAL. "checking internal table contains data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT itab.&lt;/P&gt;&lt;P&gt;      WRITE:/ itab-matnr, itab-mtart.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:05:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026951#M715755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T12:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026952#M715756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;look at this short example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: mara.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;data: itab type table of mara with header line.&lt;/P&gt;&lt;P&gt;data: stru type mara.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;select * from mara up to 10 rows into      table itab.&lt;/P&gt;&lt;P&gt;select * from mara up to 05 rows APPENDING table itab.&lt;/P&gt;&lt;P&gt;select * from mara up to 05 rows APPENDING table itab.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;  sort itab.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  if itab = stru. write: / sy-tabix. endif.&lt;/P&gt;&lt;P&gt;  stru = itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:06:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026952#M715756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T12:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026953#M715757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i just want to know whethe the values in internal table are unique are not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026953#M715757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T12:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: regading internaltable records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026954#M715758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prasad,&lt;/P&gt;&lt;P&gt;once the select query is executed, you will have the data in internal table.&lt;/P&gt;&lt;P&gt;check each entry with database table by providing the same selections which you have given for select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward for helpful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:18:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regading-internaltable-records/m-p/3026954#M715758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T12:18:00Z</dc:date>
    </item>
  </channel>
</rss>

