<?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: read statement coding in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034420#M717908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read table itab with key field1 = var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this statement reads the internal table and first record satisfying this condition will come into header.....!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so of course header will be changed..... previous value will be lost and the read line will come into header....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example....&lt;/P&gt;&lt;P&gt; consider itab declared with headerline....&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;var1 type i,&lt;/P&gt;&lt;P&gt;var2(3) type c,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab has 2 fields with following values...&lt;/P&gt;&lt;P&gt;var1 var2&lt;/P&gt;&lt;P&gt;1    abc&lt;/P&gt;&lt;P&gt;2    def&lt;/P&gt;&lt;P&gt;3    ghi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab with key var1 = 1.&lt;/P&gt;&lt;P&gt;*--now itab header will contain&lt;/P&gt;&lt;P&gt;var1  var2&lt;/P&gt;&lt;P&gt;1      abc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now if u write...&lt;/P&gt;&lt;P&gt;read table itab with key var1 = 2.&lt;/P&gt;&lt;P&gt;*--now itab header will contain&lt;/P&gt;&lt;P&gt;var1  var2&lt;/P&gt;&lt;P&gt;2     def&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is header is replaced with newly read value...!!!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Nov 2007 09:59:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-12T09:59:22Z</dc:date>
    <item>
      <title>read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034419#M717907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read table it_qmel where ... some codn.&lt;/P&gt;&lt;P&gt;it will check with what data is present in header only in it_qmel.ie header value won't change.is it? I am not clear. Plz explain me with examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 09:55:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034419#M717907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T09:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034420#M717908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read table itab with key field1 = var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this statement reads the internal table and first record satisfying this condition will come into header.....!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so of course header will be changed..... previous value will be lost and the read line will come into header....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example....&lt;/P&gt;&lt;P&gt; consider itab declared with headerline....&lt;/P&gt;&lt;P&gt;data : begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;var1 type i,&lt;/P&gt;&lt;P&gt;var2(3) type c,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab has 2 fields with following values...&lt;/P&gt;&lt;P&gt;var1 var2&lt;/P&gt;&lt;P&gt;1    abc&lt;/P&gt;&lt;P&gt;2    def&lt;/P&gt;&lt;P&gt;3    ghi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab with key var1 = 1.&lt;/P&gt;&lt;P&gt;*--now itab header will contain&lt;/P&gt;&lt;P&gt;var1  var2&lt;/P&gt;&lt;P&gt;1      abc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now if u write...&lt;/P&gt;&lt;P&gt;read table itab with key var1 = 2.&lt;/P&gt;&lt;P&gt;*--now itab header will contain&lt;/P&gt;&lt;P&gt;var1  var2&lt;/P&gt;&lt;P&gt;2     def&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is header is replaced with newly read value...!!!&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 09:59:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034420#M717908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T09:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034421#M717909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suganuya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        There are two types of read stmt,&lt;/P&gt;&lt;P&gt;             1. Using header of the table &lt;/P&gt;&lt;P&gt;             2. Using work area of the table.&lt;/P&gt;&lt;P&gt;       In ur case its the first u have opted, so the read stmt will replace the value in the header of the table by the record that is read from the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Sarath.C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 10:00:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034421#M717909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T10:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034422#M717910</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; When you use read statement on a particular internal table, it will check for that entry in the internal table body based on the conditions provides in with key...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 10:00:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034422#M717910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T10:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034423#M717911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi assume that u have an internal table with 5 records like the below..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F1     F2      F3&lt;/P&gt;&lt;P&gt;1       abc     78&lt;/P&gt;&lt;P&gt;2        bcd   89&lt;/P&gt;&lt;P&gt;3         jhf     90&lt;/P&gt;&lt;P&gt;4        jkj       53&lt;/P&gt;&lt;P&gt;5        uio      11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This internal table can be with header line or with out... not an issue for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we are using READ TABLE ITAB with key F1 = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will give the 4th record. into the header of the internal tbale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if without header line then... READ TABLE ITAB into wa_tab with key F1 = 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will give 4th record into wa_tab..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope u got it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 10:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034423#M717911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T10:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034424#M717912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Loop at  gt_marc into gs_marc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table gt_mara into gs_mara with key matnr = gs_marc-matnr.&lt;/P&gt;&lt;P&gt;If sy-subrc =0.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this statement will read value from internal table gt_mara into workarea gs_mara&lt;/P&gt;&lt;P&gt;where matnr is eual to gt_marc table matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 10:03:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034424#M717912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T10:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034425#M717913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi veera,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read statement works to retrieve data from an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;different types of read statements are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;EMPTAB&amp;gt; options:&lt;/P&gt;&lt;P&gt;1	READ TABLE &amp;lt;EMPTAB&amp;gt;.&lt;/P&gt;&lt;P&gt;2	 READ TABLE &amp;lt;EMPTAB&amp;gt;  WITH KEY &amp;lt;k1&amp;gt; = &amp;lt;v1&amp;gt;&amp;#133;&lt;/P&gt;&lt;P&gt;				                  &amp;lt;kn&amp;gt; = &amp;lt;vn&amp;gt;.&lt;/P&gt;&lt;P&gt;3	 READ TABLE &amp;lt;EMPTAB&amp;gt;  WITH TABLE KEY &amp;lt;k1&amp;gt; = &amp;lt;v1&amp;gt; ... &lt;/P&gt;&lt;P&gt;     	 				  &amp;lt;kn&amp;gt; = &amp;lt;vn&amp;gt;.&lt;/P&gt;&lt;P&gt;4	 READ TABLE &amp;lt;EMPTAB&amp;gt;  WITH KEY  = &amp;lt;value&amp;gt;.&lt;/P&gt;&lt;P&gt;5	 READ TABLE &amp;lt;EMPTAB&amp;gt;  WITH KEY . . . BINARY SEARCH.&lt;/P&gt;&lt;P&gt;6	 READ TABLE &amp;lt;EMPTAB&amp;gt;  INDEX &amp;lt;i&amp;gt;.&lt;/P&gt;&lt;P&gt;7	 READ TABLE &amp;lt;EMPTAB&amp;gt; COMPARING &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt; . . . .&lt;/P&gt;&lt;P&gt;8  READ TABLE &amp;lt;EMPTAB&amp;gt; COMPARING ALL FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward if useful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 10:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034425#M717913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T10:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034426#M717914</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 you want to Read it for multiple records use loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_qmel.&lt;/P&gt;&lt;P&gt;Read table it_qmel with key ....&lt;/P&gt;&lt;P&gt;If sy-subrc = 0.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 10:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034426#M717914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T10:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: read statement coding</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034427#M717915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3709358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3709358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3709358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3709358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 10:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-coding/m-p/3034427#M717915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T10:21:31Z</dc:date>
    </item>
  </channel>
</rss>

