<?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 SQL query joins in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811390#M41840</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;
  &lt;P&gt;I am having trouble to get field data from structure.&lt;/P&gt;
  &lt;P&gt;select single * into @data(wa_vbap2)&lt;BR /&gt; from vbap as v&lt;BR /&gt; left outer join vbfa as x&lt;BR /&gt; on v~vbeln = x~vbelv&lt;BR /&gt; left outer join vbfa as y&lt;BR /&gt; on x~vbeln = y~vbelv and x~vbtyp_v = 'G'&lt;BR /&gt; where y~vbeln = @vbeln and y~vbtyp_v = 'C'.&lt;/P&gt;
  &lt;P&gt;this is my query and in debugging mode i have this. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/275526-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;i want to fetch fields from V. how can i do this?&lt;/P&gt;
  &lt;P&gt;like &lt;/P&gt;
  &lt;P&gt;zproj_name = wa_vbap2-zproj_name. (giving error)&lt;/P&gt;
  &lt;P&gt;thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2019 07:01:55 GMT</pubDate>
    <dc:creator>amysh95</dc:creator>
    <dc:date>2019-02-20T07:01:55Z</dc:date>
    <item>
      <title>SQL query joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811390#M41840</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;
  &lt;P&gt;I am having trouble to get field data from structure.&lt;/P&gt;
  &lt;P&gt;select single * into @data(wa_vbap2)&lt;BR /&gt; from vbap as v&lt;BR /&gt; left outer join vbfa as x&lt;BR /&gt; on v~vbeln = x~vbelv&lt;BR /&gt; left outer join vbfa as y&lt;BR /&gt; on x~vbeln = y~vbelv and x~vbtyp_v = 'G'&lt;BR /&gt; where y~vbeln = @vbeln and y~vbtyp_v = 'C'.&lt;/P&gt;
  &lt;P&gt;this is my query and in debugging mode i have this. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/275526-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;i want to fetch fields from V. how can i do this?&lt;/P&gt;
  &lt;P&gt;like &lt;/P&gt;
  &lt;P&gt;zproj_name = wa_vbap2-zproj_name. (giving error)&lt;/P&gt;
  &lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 07:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811390#M41840</guid>
      <dc:creator>amysh95</dc:creator>
      <dc:date>2019-02-20T07:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: SQL query joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811391#M41841</link>
      <description>&lt;P&gt;You can try specifying only fields from V  like below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single v~* into @data(wa_vbap2)
 from vbap as v
 left outer join vbfa as x
 on v~vbeln = x~vbelv
 left outer join vbfa as y
 on x~vbeln = y~vbelv and x~vbtyp_v = 'G'
 where y~vbeln = @vbeln and y~vbtyp_v = 'C'.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Feb 2019 07:46:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811391#M41841</guid>
      <dc:creator>s1252</dc:creator>
      <dc:date>2019-02-20T07:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: SQL query joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811392#M41842</link>
      <description>&lt;P&gt;because you dont specific field name ( select * from a join ) then fields of each table will save in corresponding nested structure of return structure. you can access field like below:&lt;/P&gt;&lt;P&gt;zproj_name = wa_vbap2-v-zproj_name.(i suppose zproj_name is under vbap which you define alias as V in query, if not you have to change it)&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 08:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811392#M41842</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-02-20T08:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: SQL query joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811393#M41843</link>
      <description>&lt;P&gt;i am using  @data(wa_vbap2) it will create itselft.&lt;/P&gt;&lt;P&gt;after executing query i am getting the data but don't know how to display or pass that data into another field.&lt;/P&gt;&lt;P&gt;anyway Thank you all, I resolve my issue. i checked that structure filed in debugging and got my answer.&lt;/P&gt;&lt;P&gt;now i am using like this.&lt;/P&gt;&lt;P&gt;zproj_name = wa_vbap2-v-zproj_name&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 09:14:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-joins/m-p/811393#M41843</guid>
      <dc:creator>amysh95</dc:creator>
      <dc:date>2019-02-20T09:14:55Z</dc:date>
    </item>
  </channel>
</rss>

