<?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: Need help reading an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867015#M49176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have written &amp;lt;i&amp;gt;exactly&amp;lt;/i&amp;gt; the same SELECT statement as you have posted here, then it is in error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this one out, instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single hkunnr 
              datab 
              hzuor  
         from knvh 
         into (itab_hier_output-old_kunnr,
               itab_hier_output-old_datab,
               itab_hier_output-old_hzuor)
        where kunnr = itab_kunnr-kunnr
          and datbi = itab_hier_output-new_datab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Feb 2005 12:40:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-02-18T12:40:25Z</dc:date>
    <item>
      <title>Need help reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867011#M49172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table (itab_knvh) that contains all the entries from table KNVH for a specified sales area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have another internal table (itab_kunnr) that contains all the customers that I need data for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I read all the entries from itab_knvh where the 'date from' value (datab) is greater than today's date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I have:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  LOOP AT itab_kunnr.&lt;/P&gt;&lt;P&gt;    &amp;lt;i&amp;gt;READ TABLE itab_knvh WITH KEY kunnr = itab_kunnr-kunnr.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      IF itab_knvh-datab GE p_validh.&lt;/P&gt;&lt;P&gt;        WRITE:/ itab_kunnr.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I don't think this will work if more than one customer entry exists in itab_knvh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there a way of writing:&lt;/P&gt;&lt;P&gt;READ TABLE itab_knvh WITH KEY kunnr = itab_kunnr-kunnr&lt;/P&gt;&lt;P&gt;                              datab GE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2005 11:24:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867011#M49172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-02-18T11:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867012#M49173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this instead of the read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab_knvh where kunnr = itab_kunnr
                        datab gt sy-datum.
  exit.
endloop.
if sy-subrc eq 0.
  write itab_kunnr.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2005 11:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867012#M49173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-02-18T11:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need help reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867013#M49174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you could choose to reverse the loops as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab_knvh where datab gt sy-datum.
  read table itab_kunnr with key itab_kunnr eq itab_knvh-kunnr 
                                 transporting no fields.
  if sy-subrc eq 0.
    write: / itab_knvh-kunnr.
  endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What say ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2005 11:40:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867013#M49174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-02-18T11:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867014#M49175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thansk for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortuantely the logic routines that you stated caused duplicate entries to appear - but his is mostly due to me not explainging my problem properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyhow If someone could explain how to do the following then that would be really great:&lt;/P&gt;&lt;P&gt;I just need to pass the values from a select into fields of an internal table (whose names i am not allowed to chnage):&lt;/P&gt;&lt;P&gt;currently I have :&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;      select single hkunnr datab hzuor from knvh &lt;/P&gt;&lt;P&gt;(itab_hier_output-old_datab &lt;/P&gt;&lt;P&gt;itab_hier_output-old_kunnr &lt;/P&gt;&lt;P&gt;itab_hier_output-old_hzuor)&lt;/P&gt;&lt;P&gt;      where kunnr = itab_kunnr-kunnr&lt;/P&gt;&lt;P&gt;      and datbi = itab_hier_output-new_datab.&lt;/P&gt;&lt;P&gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this doesn't work...&lt;/P&gt;&lt;P&gt;Anyone got any ideas....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2005 12:31:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867014#M49175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-02-18T12:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help reading an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867015#M49176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have written &amp;lt;i&amp;gt;exactly&amp;lt;/i&amp;gt; the same SELECT statement as you have posted here, then it is in error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this one out, instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single hkunnr 
              datab 
              hzuor  
         from knvh 
         into (itab_hier_output-old_kunnr,
               itab_hier_output-old_datab,
               itab_hier_output-old_hzuor)
        where kunnr = itab_kunnr-kunnr
          and datbi = itab_hier_output-new_datab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2005 12:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-help-reading-an-internal-table/m-p/867015#M49176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-02-18T12:40:25Z</dc:date>
    </item>
  </channel>
</rss>

