<?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: select single in the loop doesn't work ! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254154#M1015501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove 'MVKE-' from the fields in your where clause.  It is not necessary to specify the table name since you are only selecting from MVKE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris H.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Aug 2008 15:51:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-08T15:51:52Z</dc:date>
    <item>
      <title>select single in the loop doesn't work !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254152#M1015499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;with the bellow code I'd like to fill the column vmsta in my itab from the table vmke.&lt;/P&gt;&lt;P&gt;My question is why the compiler says "The field mvke-matnr unknown". Even if I delete mvke-matnr it would say "The field mvke-vkorg is unknow".&lt;/P&gt;&lt;P&gt;I have already declared the table mvke and itab has head line as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT itab.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE vmsta INTO itab-vmsta&lt;/P&gt;&lt;P&gt;      FROM mvke&lt;/P&gt;&lt;P&gt;      WHERE mvke-matnr = itab-matnr&lt;/P&gt;&lt;P&gt;       AND&lt;/P&gt;&lt;P&gt;        mvke-vkorg = itab-vkorg.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        MODIFY itab.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 15:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254152#M1015499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T15:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: select single in the loop doesn't work !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254153#M1015500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need to specifiy the Table name in the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change query to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE vmsta INTO itab-vmsta
FROM mvke
WHERE MATNR = itab-matnr   " &amp;lt;&amp;lt;
AND
VKORG = itab-vkorg.   "&amp;lt;&amp;lt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 15:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254153#M1015500</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-08T15:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: select single in the loop doesn't work !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254154#M1015501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove 'MVKE-' from the fields in your where clause.  It is not necessary to specify the table name since you are only selecting from MVKE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris H.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 15:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254154#M1015501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T15:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: select single in the loop doesn't work !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254155#M1015502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT itab.
SELECT SINGLE vmsta INTO itab-vmsta
FROM mvke
WHERE mvke-matnr = itab-matnr
AND vkorg = itab-vkorg.  &amp;lt;---change to vkorg from mvke-vkorg
IF sy-subrc = 0.
MODIFY itab.
ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 15:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254155#M1015502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T15:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: select single in the loop doesn't work !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254156#M1015503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;O no you all are right. I just didn't see it. Sorry guys.&lt;/P&gt;&lt;P&gt;I better stop working today and go home.&lt;/P&gt;&lt;P&gt;Thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 15:55:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254156#M1015503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T15:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: select single in the loop doesn't work !</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254157#M1015504</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;LOOP AT itab.&lt;/P&gt;&lt;P&gt;SELECT SINGLE vmsta INTO itab-vmsta&lt;/P&gt;&lt;P&gt;FROM mvke&lt;/P&gt;&lt;P&gt;WHERE &lt;STRONG&gt;matnr = itab-matnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vkorg = itab-vkorg.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MODIFY itab.&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;&lt;/P&gt;&lt;P&gt;hope it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kamesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 15:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-in-the-loop-doesn-t-work/m-p/4254157#M1015504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T15:55:37Z</dc:date>
    </item>
  </channel>
</rss>

