<?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 with Join?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411090#M1407904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am not understanding whats the purpose though..If all you need is a SINGLE record , why bother with a join ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Deepthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Dec 2009 10:55:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-01T10:55:48Z</dc:date>
    <item>
      <title>Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411083#M1407897</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;Can we use SELECT SINGLE stataement with INNER JOIN??&lt;/P&gt;&lt;P&gt;Please give me a sample example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:36:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411083#M1407897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T10:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411084#M1407898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why dont you just try once and see if its working or not before posting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411084#M1407898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T10:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411085#M1407899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is possible.&lt;/P&gt;&lt;P&gt;Of course you have to pay attention with this, because only 1 record from the join will be shown in the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extract from the SAP help:&lt;/P&gt;&lt;P&gt;If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:41:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411085#M1407899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T10:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411086#M1407900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tied but it gave me syntax error " Incorrect structure of FROM clause"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried as follows:&lt;/P&gt;&lt;P&gt;    SELECT to&lt;SUB&gt;bukrs  t1&lt;/SUB&gt;periv INTO (ws_bukrs , ws_periv)&lt;/P&gt;&lt;P&gt;        FROM TVKO as to&lt;/P&gt;&lt;P&gt;        INNER JOIN t001 as t1&lt;/P&gt;&lt;P&gt;        WHERE to~vkorg = p_vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ws_bukrs and  ws_periv are globally declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:44:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411086#M1407900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T10:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411087#M1407901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two things:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1- TO is a reserved word in many languages... try to not use it as an alias&lt;/P&gt;&lt;P&gt;2- I miss the ON clause of your JOIN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main point is the 2nd one: if you don't say the DBMS which fields must compare to join the tables, it will become angry with you and will not help you to fetch the data &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:47:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411087#M1407901</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2009-12-01T10:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411088#M1407902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Obviously you can:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: p_matnr TYPE matnr.

DATA:
      BEGIN OF st_mat,
        matnr TYPE matnr,
        matkl TYPE matkl,
        maktx TYPE maktx,
      END OF st_mat.

SELECT SINGLE a~matnr a~matkl b~maktx
  INTO st_mat
  FROM mara AS a INNER JOIN makt AS b
  ON b~matnr = a~matnr
  WHERE a~matnr = p_matnr
  AND   spras = sy-langu.

IF sy-subrc = 0.
  WRITE st_mat.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not give a SLIN error as well &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411088#M1407902</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-12-01T10:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411089#M1407903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change your select query this way,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

parameters: p_vkorg type tvko-vkorg.

data: ws_bukrs type tvko-bukrs,
      ws_periv type t001-periv.

SELECT single to~bukrs t1~periv INTO
(ws_bukrs , ws_periv)
FROM TVKO as to
INNER JOIN t001 as t1
on to~bukrs = t1~bukrs
WHERE to~vkorg = p_vkorg.


write: ws_bukrs, ws_periv.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You dint mention the ON condition and SINGLE addition in your query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:54:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411089#M1407903</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T10:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select single with Join??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411090#M1407904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am not understanding whats the purpose though..If all you need is a SINGLE record , why bother with a join ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Deepthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 10:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-with-join/m-p/6411090#M1407904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-01T10:55:48Z</dc:date>
    </item>
  </channel>
</rss>

