<?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 reading data from internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-internal-table/m-p/2693968#M623420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when I read a data from the internal table I should be able to validate the correct entry&lt;/P&gt;&lt;P&gt;My internal table is like this&lt;/P&gt;&lt;P&gt;Field1 Field2&lt;/P&gt;&lt;P&gt;X&lt;/P&gt;&lt;P&gt;Y&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;X&lt;/P&gt;&lt;P&gt;Y&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The validation is like this it should follow XYZZ or XYZZZZ or XYZZZZZZZ else it should throw an error message&lt;/P&gt;&lt;P&gt;How to identify whether the file format is in the above order or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yamini.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2007 17:47:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-09T17:47:13Z</dc:date>
    <item>
      <title>reading data from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-internal-table/m-p/2693968#M623420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when I read a data from the internal table I should be able to validate the correct entry&lt;/P&gt;&lt;P&gt;My internal table is like this&lt;/P&gt;&lt;P&gt;Field1 Field2&lt;/P&gt;&lt;P&gt;X&lt;/P&gt;&lt;P&gt;Y&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;X&lt;/P&gt;&lt;P&gt;Y&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The validation is like this it should follow XYZZ or XYZZZZ or XYZZZZZZZ else it should throw an error message&lt;/P&gt;&lt;P&gt;How to identify whether the file format is in the above order or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yamini.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 17:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-internal-table/m-p/2693968#M623420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-09T17:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-internal-table/m-p/2693969#M623421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: begin of itab occurs 0,
      field1 type c,
      fleld2 type c,
      end of itab.

data: istr type table of string with header line..

itab-field1 = 'X'.  append itab.
itab-field1 = 'Y'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'X'.  append itab.
itab-field1 = 'Y'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'X'.  append itab.
itab-field1 = 'Y'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.
itab-field1 = 'Z'.  append itab.

loop at itab.

  if itab-field1 = 'X'
    and sy-tabix &amp;gt; 1.
    append istr.
    clear istr.
  endif.

  concatenate istr itab-field1 into istr.

 at last.
 append istr.
 endat.

endloop.


loop at istr.
  write:/ istr.
  if istr(3) &amp;lt;&amp;gt; 'XYZ'.
   write:/  'There is a problem with the format'.
  endif.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 18:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-internal-table/m-p/2693969#M623421</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-09T18:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-internal-table/m-p/2693970#M623422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;case field1.&lt;/P&gt;&lt;P&gt;when 'X'.&lt;/P&gt;&lt;P&gt;if sy-tabix &amp;gt; 1.&lt;/P&gt;&lt;P&gt;*-- skip the first time&lt;/P&gt;&lt;P&gt;if v_zcount &amp;lt; 2.&lt;/P&gt;&lt;P&gt;clear v_zcount.&lt;/P&gt;&lt;P&gt;*-- error&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;clear v_zcount.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;when 'Y'.&lt;/P&gt;&lt;P&gt;when 'Z'.&lt;/P&gt;&lt;P&gt;v_zcount = v_zcount + 1.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2007 22:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-internal-table/m-p/2693970#M623422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-09T22:29:53Z</dc:date>
    </item>
  </channel>
</rss>

