<?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 TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579017#M861601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With in read statement you can't use same key 2 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With in READ statement you can't use AND &amp;amp; OR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better use &lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;tab&amp;gt; WHERE &amp;lt;COND&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2008 09:54:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-18T09:54:54Z</dc:date>
    <item>
      <title>READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579014#M861598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the ECC6.0 system,the following code is showing syntax error (msgtyp should be used only once)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone pls give me a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sajid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:40:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579014#M861598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579015#M861599</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;you can read the table only with different keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgart = 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to work with an workingarea so that you can go over more then one msgtyp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;DATA: spfli_tab TYPE SORTED TABLE OF spfli &lt;/P&gt;&lt;P&gt;                WITH UNIQUE KEY carrid connid, &lt;/P&gt;&lt;P&gt;      spfli_key LIKE LINE OF spfli_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;spfli&amp;gt; TYPE spfli. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO TABLE spfli_tab &lt;/P&gt;&lt;P&gt;       WHERE carrid = 'LH'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spfli_key-carrid = 'LH'. &lt;/P&gt;&lt;P&gt;spfli_key-connid = '0400'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE spfli_tab FROM spfli_key ASSIGNING &amp;lt;spfli&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &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;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Nicole&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nicole Lorenz on Mar 18, 2008 5:44 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nicole Lorenz on Mar 18, 2008 5:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:41:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579015#M861599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579016#M861600</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;I think there is no gap between msgtyp.Put space .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE bdcmsg WITH KEY msgtyp = 'E' &lt;/P&gt;&lt;P&gt;                                                     msgtyp = 'A'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579016#M861600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579017#M861601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With in read statement you can't use same key 2 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With in READ statement you can't use AND &amp;amp; OR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better use &lt;/P&gt;&lt;P&gt;LOOP AT &amp;lt;tab&amp;gt; WHERE &amp;lt;COND&amp;gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579017#M861601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579018#M861602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how will i write the code if i want to read the internal table with key = either E or A.&lt;/P&gt;&lt;P&gt;The following code does not work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE bdcmsg WITH KEY msgtyp = 'E' or msgtyp = 'A'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:55:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579018#M861602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579019#M861603</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;The same key cannot be used twice in the same read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead you can try doing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;READ TABLE bdcmsg with key msgtyp = 'E'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if sy-subrc ne 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;read table bdcmsg with key msgid = 'A'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Abhisek.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:57:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579019#M861603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579020#M861604</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;STRONG&gt;READ TABLE bdcmsg&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WITH KEY msgtyp = 'E'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;                &lt;/P&gt;&lt;P&gt;                 &lt;STRONG&gt;msgtyp = 'A'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above statement would try to read a record from table bdcmsg where msgtyp = 'E' &lt;STRONG&gt;and&lt;/STRONG&gt; msgtyp = 'A'&lt;/P&gt;&lt;P&gt;This is incorrect as for the same record it is not possible to have two different message types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to get the records whose message type is 'E' or 'A' you could refer the code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT bdcmsg INTO ls_bdcmsg.&lt;/P&gt;&lt;P&gt;IF ls_bdcmsg-msgtyp = 'E' OR  ls_bdcmsg-msgtyp = 'A' .&lt;/P&gt;&lt;P&gt;    " This is a record with message type as Error or Abort&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;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Farheen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579020#M861604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579021#M861605</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;U can use the string relational operator CA which means contains any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Anon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:58:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579021#M861605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579022#M861606</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;The same key cannot be used twice in the same read statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead you can try doing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;READ TABLE bdcmsg with key msgtyp = 'E'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if sy-subrc ne 0.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;read table bdcmsg with key msgid = 'A'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Abhisek.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 09:59:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579022#M861606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T09:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579023#M861607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read the table twice...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE bdcmsg WITH KEY msgtyp = 'E' .&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;      READ TABLE bdcmsg WITH KEY msgtyp = 'A' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 10:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579023#M861607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T10:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579024#M861608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best way is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE bdcmsg with key msgtyp = 'E'.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;read table bdcmsg with key msgid = 'A'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks 4 all.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 10:17:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579024#M861608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T10:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579025#M861609</link>
      <description>&lt;P&gt;CLEAR flag_error.&lt;/P&gt;&lt;P&gt;LOOP AT bdcmsg TRANSPORTING NO FIELDS WHERE msgtyp CO 'EA'.&lt;/P&gt;&lt;P&gt;      flag_error = 'X'.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2019 05:10:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579025#M861609</guid>
      <dc:creator>edwin_romero</dc:creator>
      <dc:date>2019-10-13T05:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: READ TABLE bdcmsg WITH KEY msgtyp = 'E' msgtyp = 'A'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579026#M861610</link>
      <description>&lt;P&gt;This is working, however if done with variables it's giving a syntax error.&lt;/P&gt; READ TABLE mt_return&lt;BR /&gt;      TRANSPORTING NO FIELDS&lt;BR /&gt;&lt;P&gt;      WITH KEY type = 'E''A'.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 08:52:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-table-bdcmsg-with-key-msgtyp-e-msgtyp-a/m-p/3579026#M861610</guid>
      <dc:creator>klausschaffer353</dc:creator>
      <dc:date>2022-08-10T08:52:34Z</dc:date>
    </item>
  </channel>
</rss>

