<?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: SAP SQL question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-sql-question/m-p/3434709#M824857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No trickery:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: awkey TYPE bkpf-awkey.

CONCATENATE cobk-refbn cobk-aworg INTO awkey.

SELECT * FROM bkpf
  WHERE awtyp = cobk-awtyp
    AND awkey = awkey
    AND bukrs = cobk-refbk.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure of the order of the concatenation. If it doesn't work one way, reverse the concatenation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Feb 2008 22:50:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-08T22:50:35Z</dc:date>
    <item>
      <title>SAP SQL question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-sql-question/m-p/3434708#M824856</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;in one of the OSS notes it is suggested to use this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM BKPF&lt;/P&gt;&lt;P&gt;        WHERE AWTYP = COBK-AWTYP                 &lt;/P&gt;&lt;P&gt;        AND AWKEY = (COBK-REFBN + COBK-AWORG)   &lt;/P&gt;&lt;P&gt;        AND BUKRS = COBK-REFBK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't work with error: Field "(COBK-REFBN + COBK-AWORG)" is unknown. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried to use this: AWKEY CS COBK-REFBN &lt;/P&gt;&lt;P&gt;AND AWKEY CS COBK-AWORG it did not work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AWKEY(10) =  COBK-REFBN  did not work as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know any other tricks to solvve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vitaly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 22:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-sql-question/m-p/3434708#M824856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T22:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAP SQL question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-sql-question/m-p/3434709#M824857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No trickery:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: awkey TYPE bkpf-awkey.

CONCATENATE cobk-refbn cobk-aworg INTO awkey.

SELECT * FROM bkpf
  WHERE awtyp = cobk-awtyp
    AND awkey = awkey
    AND bukrs = cobk-refbk.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure of the order of the concatenation. If it doesn't work one way, reverse the concatenation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 22:50:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-sql-question/m-p/3434709#M824857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T22:50:35Z</dc:date>
    </item>
  </channel>
</rss>

