<?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 Outer Join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/outer-join/m-p/3185529#M758496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;i have two tables BSEG and SKAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a company code(BUKRS) i need to select Account number (HKONT) from BSEG table and after that for that particular (Account number) HKONT i need to select the TXT50 from SKAT table.BUt i couldnt see any common fields in BSEG and SKAT and i tried using outer join which i was not successful.Please provide me the particular piece of code where i can retrieve the data.If its about outer join please provide me the code for the above condition.Am also mention the structure below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF ty_hkont occurs 0,&lt;/P&gt;&lt;P&gt;      HKONT TYPE BSEG-HKONT,&lt;/P&gt;&lt;P&gt;      SAKNR TYPE SKAT-SAKNR,&lt;/P&gt;&lt;P&gt;      TXT50 TYPE SKAT-TXT50,&lt;/P&gt;&lt;P&gt;      END OF ty_hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2007 05:07:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-12T05:07:43Z</dc:date>
    <item>
      <title>Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outer-join/m-p/3185529#M758496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;i have two tables BSEG and SKAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a company code(BUKRS) i need to select Account number (HKONT) from BSEG table and after that for that particular (Account number) HKONT i need to select the TXT50 from SKAT table.BUt i couldnt see any common fields in BSEG and SKAT and i tried using outer join which i was not successful.Please provide me the particular piece of code where i can retrieve the data.If its about outer join please provide me the code for the above condition.Am also mention the structure below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF ty_hkont occurs 0,&lt;/P&gt;&lt;P&gt;      HKONT TYPE BSEG-HKONT,&lt;/P&gt;&lt;P&gt;      SAKNR TYPE SKAT-SAKNR,&lt;/P&gt;&lt;P&gt;      TXT50 TYPE SKAT-TXT50,&lt;/P&gt;&lt;P&gt;      END OF ty_hkont.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 05:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outer-join/m-p/3185529#M758496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T05:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outer-join/m-p/3185530#M758497</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;/P&gt;&lt;P&gt;Do like this it will solve your problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for a particular company code fetch the data from BSEG and fetch the  account number and put that account number in skat table in the field &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAKNR --&amp;gt; GIVE THAT ACCOUNT NUMBER WHICH U HAD FETCHED FROM BSEG AND THEN  u can get the long text from this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for outer join &lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS p_cityfr TYPE spfli-cityfrom.

DATA: BEGIN OF wa,
carrid TYPE scarr-carrid,
carrname TYPE scarr-carrname,
connid TYPE spfli-connid,
END OF wa,
itab LIKE SORTED TABLE OF wa
WITH NON-UNIQUE KEY carrid.

SELECT s~carrid s~carrname p~connid
INTO CORRESPONDING FIELDS OF TABLE itab
FROM scarr AS s
LEFT OUTER JOIN spfli AS p ON s~carrid = p~carrid
AND p~cityfrom = p_cityfr.

LOOP AT itab INTO wa.
IF wa-connid = '0000'.
WRITE: / wa-carrid, wa-carrname.
ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 07:28:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outer-join/m-p/3185530#M758497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T07:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/outer-join/m-p/3185531#M758498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;check tables BSID/BSAD for account receivable scenario&lt;/P&gt;&lt;P&gt;or BSIK/BSAK for accout payable scenario. these table holds most of fields u need. and these are good performance wise also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 07:36:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/outer-join/m-p/3185531#M758498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-12T07:36:42Z</dc:date>
    </item>
  </channel>
</rss>

