<?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: Question reg. select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317295#M794617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answers. &lt;/P&gt;&lt;P&gt;Reg. the second one, is it possible to achieve this using loop statement? (instead of achieving this with 'read' statement multiple times)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2008 17:10:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-06T17:10:49Z</dc:date>
    <item>
      <title>Question reg. select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317292#M794614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a question reg. select statement.&lt;/P&gt;&lt;P&gt;1. If I want to select the records in table vbpa for two partner types (AG and WE), how to write the statement?&lt;/P&gt;&lt;P&gt;(I know how to get records based on just one partner type AG or WE by mentioning as below  in where condition, but I am stuck how to get records for multipe partner types)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT vbeln parvw adnr&lt;/P&gt;&lt;P&gt;    FROM vbpa&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE itab_vbpa&lt;/P&gt;&lt;P&gt;    WHERE vbeln = itab_likp-vbeln&lt;/P&gt;&lt;P&gt;    AND posnr = '000000'&lt;/P&gt;&lt;P&gt;    AND parvw = 'WE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the way as below to get records for multiple partner types? but it's giving syntax error!&lt;/P&gt;&lt;P&gt;    SELECT vbeln parvw adrnr&lt;/P&gt;&lt;P&gt;    FROM vbpa&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE itab_vbpa&lt;/P&gt;&lt;P&gt;    WHERE vbeln = itab_likp-vbeln&lt;/P&gt;&lt;P&gt;    AND posnr = '000000'&lt;/P&gt;&lt;P&gt;    AND parvw in ( WE, AG).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If I get all records in a table from vbpa and if I just want to loop on this table so I read only records for 'AG' and 'WE', how to achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 17:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317292#M794614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T17:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317293#M794615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT vbeln parvw adrnr
FROM vbpa
INTO CORRESPONDING FIELDS OF TABLE itab_vbpa
WHERE vbeln = itab_likp-vbeln
AND posnr = '000000'
AND parvw in ( 'WE', 'AG' ). "&amp;lt;&amp;lt;&amp;lt;&amp;lt;

read table itab_likp into wa_likp where parvw eq 'AG'.
if sy-subrc eq 0.
code....
endif.


read table itab_likp into wa_likp where parvw eq 'WE'.
if sy-subrc eq 0.
code....
endif.
"opps.. you wanted loop right!!
loop at itab_likp where parvw in ('WE','AG').
code....
endloop.

or 

loop at itab_likp.
if itab_likp-parvw eq 'WE' or itab_likp-parvw eq 'AG'.
code...
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 17:05:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317293#M794615</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-02-06T17:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317294#M794616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT vbeln parvw adrnr&lt;/P&gt;&lt;P&gt;FROM vbpa&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab_vbpa&lt;/P&gt;&lt;P&gt;WHERE vbeln = itab_likp-vbeln&lt;/P&gt;&lt;P&gt;AND posnr = '000000'&lt;/P&gt;&lt;P&gt;AND parvw in ( WE, AG).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You forgot the quotes. try this &lt;/P&gt;&lt;P&gt;where parvw IN ('WE','AG').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 17:08:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317294#M794616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T17:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Question reg. select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317295#M794617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answers. &lt;/P&gt;&lt;P&gt;Reg. the second one, is it possible to achieve this using loop statement? (instead of achieving this with 'read' statement multiple times)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 17:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/question-reg-select-statement/m-p/3317295#M794617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T17:10:49Z</dc:date>
    </item>
  </channel>
</rss>

