<?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 with Single key with multiple values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324837#M1030544</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;try this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table itab with key type =   'E' or type = 'S'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Aug 2008 13:14:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-17T13:14:15Z</dc:date>
    <item>
      <title>Read Statement with Single key with multiple values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324834#M1030541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ECC 4.6c, I wrote statement like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table message with key type = 'E' or 'S'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populated the message log to output internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i transported to QA which is ECC 6.0, it is giving error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one help me in modifying this qurey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plse read my question thoroughly and reply me back. &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Santosh Kumar M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 11:39:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324834#M1030541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-17T11:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement with Single key with multiple values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324835#M1030542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; In ECC 4.6c, I wrote statement like this.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Read table message with key type = 'E' or 'S'.&lt;/P&gt;&lt;P&gt;&amp;gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Populated the message log to output internal table.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; endif.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at message where key = 'E' or 
                                   key = 'S'.
"Populated the message log to output internal table. and now exit for first instance
exit.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 12:02:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324835#M1030542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-17T12:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement with Single key with multiple values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324836#M1030543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can't use OR condition with READ table. it is always AND condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here 2 ways for ur problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to have just one message in the log then use multiple reads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE message WITH KEY type = 'E'.&lt;/P&gt;&lt;P&gt;If sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;populate log.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;READ TABLE message WITH KEY type = 'S'.&lt;/P&gt;&lt;P&gt;If sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;populate log.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want all messages then u have to loop through and populate the log as sugested by Vijay but &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Without exit in loop&lt;/STRONG&gt;.(Since u need all the messages)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT message into wa WHERE type = 'E' or type = 'S'.&lt;/P&gt;&lt;P&gt;populate log.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 12:36:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324836#M1030543</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-08-17T12:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement with Single key with multiple values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324837#M1030544</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;try this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table itab with key type =   'E' or type = 'S'.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;*****&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 13:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324837#M1030544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-17T13:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement with Single key with multiple values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324838#M1030545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use like below code..it will work as same as you want with both key conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE message WITH KEY type = 'E'.&lt;/P&gt;&lt;P&gt;If sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;READ TABLE message WITH KEY type = 'S'.&lt;/P&gt;&lt;P&gt;if sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 19:02:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324838#M1030545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-17T19:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read Statement with Single key with multiple values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324839#M1030546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Dear Friends,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; In ECC 4.6c, I wrote statement like this.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;STRONG&gt;Read table message with key type = 'E' or 'S'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Santosh Kumar M&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really? Are you sure?  To the best of my 10+ years experience, this has never been part of the syntax of READ.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Aug 2008 20:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-statement-with-single-key-with-multiple-values/m-p/4324839#M1030546</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-08-17T20:04:14Z</dc:date>
    </item>
  </channel>
</rss>

