<?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: Reg: select query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query/m-p/4195715#M1002911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi in the second internal table try to replace the * with the % may be it is useful for that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jul 2008 08:44:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-25T08:44:49Z</dc:date>
    <item>
      <title>Reg: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query/m-p/4195713#M1002909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all ,&lt;/P&gt;&lt;P&gt;I have requirement of selecting the data from z table ZWM_TBL_MAT_ALOG where plant is equal to selection screen plant and there is a exclude field which if empty then that record need to be considered .Afte getting the data into internal table itab_table3 .Then correspoding to the material number and plant there are many batch numbers we need to move those records into an internal table itab_mchb.but the problem is that the entries in the z table are as follows .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plant   mat type    mat no.          exclude  &lt;/P&gt;&lt;P&gt;1241   COUP          *&lt;/P&gt;&lt;P&gt;1241   ZFIP          *&lt;/P&gt;&lt;P&gt;1241   ZFIP          P9905&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when the second select query is executed then in mchb table there are no material no... with ' * '.So the batch numbers corresponding to plant material combination 1241   ZFIP          P9905 &lt;/P&gt;&lt;P&gt;are only retrieved but for the other 2 records which are below&lt;/P&gt;&lt;P&gt;1241   COUP          *&lt;/P&gt;&lt;P&gt;1241   ZFIP          *&lt;/P&gt;&lt;P&gt;batch numbers are not retrieved .Any pointers or any sample code .Thanx in advance .I have below pasted the two select queries &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Querying the table3 for plant entered on selection screen and&lt;/P&gt;&lt;P&gt;*--getting material no. and type&lt;/P&gt;&lt;P&gt;  SELECT werks mtart matnr exclude INTO TABLE&lt;/P&gt;&lt;P&gt;  itab_table3 FROM ZWM_TBL_MAT_ALOG WHERE werks IN s_werks&lt;/P&gt;&lt;P&gt;                                   AND exclude EQ ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Filtering out the records which are obtained from table3&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    IF NOT itab_table3[] IS INITIAL.&lt;/P&gt;&lt;P&gt;      SELECT matnr werks charg clabs FROM MCHB&lt;/P&gt;&lt;P&gt;      INTO TABLE itab_mchb&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN itab_table3&lt;/P&gt;&lt;P&gt;      WHERE matnr = itab_table3-matnr&lt;/P&gt;&lt;P&gt;      AND werks in s_werks.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 08:09:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query/m-p/4195713#M1002909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T08:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query/m-p/4195714#M1002910</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;Try to use the wild card cahracters also in the selection then check the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Chandralekha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 08:17:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query/m-p/4195714#M1002910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T08:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query/m-p/4195715#M1002911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi in the second internal table try to replace the * with the % may be it is useful for that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 08:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-select-query/m-p/4195715#M1002911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-25T08:44:49Z</dc:date>
    </item>
  </channel>
</rss>

