<?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: QUERY REGARDING FETCHING AND JOIN in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030699#M416712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello M.T.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               Thanks for your response! Let me tell you this is more detail. I have these fields to take input of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for sales:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tvko-vkorg, tvtw-vtweg, tspa-spart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for sales order information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbak-erdat, vbak-vbeln, kna1-kunnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, as u said MANDT maynot take the same value for each of the tables used, how am I to cross-check them for common values? I understand it won't be a primary key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 08:09:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T08:09:52Z</dc:date>
    <item>
      <title>QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030694#M416707</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;&lt;/P&gt;&lt;P&gt;         I am doing an assignment in which I take an input from user for the corresponding fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TVKO-VKORG&lt;/P&gt;&lt;P&gt;TVTW-VTWEG&lt;/P&gt;&lt;P&gt;TSPA-SPART&lt;/P&gt;&lt;P&gt;VBAK-ERDAT&lt;/P&gt;&lt;P&gt;VBAK-VBELN&lt;/P&gt;&lt;P&gt;KNA1-KUNNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and after that, I print a list containing corresponding values from the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBAP-VBELN&lt;/P&gt;&lt;P&gt;VBAP-POSNR&lt;/P&gt;&lt;P&gt;VBAP-MATNR&lt;/P&gt;&lt;P&gt;VBAP-ARKTX&lt;/P&gt;&lt;P&gt;VBAP-KWMENG&lt;/P&gt;&lt;P&gt;VBAP-VRKME&lt;/P&gt;&lt;P&gt;VBAP-NETWR&lt;/P&gt;&lt;P&gt;VBAK-WAERK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the tables mentioned here have one key field MANDT in common. How do I map the input values with the values to be displayed in the final list? How do I determine if joining is necessary?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 07:47:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030694#M416707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T07:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030695#M416708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Join the table VBAK and VBAP and give the input fields in where condn:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select VBAK~VBELN&lt;/P&gt;&lt;P&gt;VBAP~POSNR&lt;/P&gt;&lt;P&gt;VBAP~MATNR&lt;/P&gt;&lt;P&gt;VBAP~ARKTX&lt;/P&gt;&lt;P&gt;VBAP~KWMENG&lt;/P&gt;&lt;P&gt;VBAP~VRKME&lt;/P&gt;&lt;P&gt;VBAP~NETWR&lt;/P&gt;&lt;P&gt;VBAK~WAERK&lt;/P&gt;&lt;P&gt;from vbak join vbap &lt;/P&gt;&lt;P&gt;on vbak&lt;SUB&gt;vbeln = vbap&lt;/SUB&gt;vbeln &lt;/P&gt;&lt;P&gt;where vbak~VKORG in s_vkorg and&lt;/P&gt;&lt;P&gt;vbak~VTWEG in s_vtweg and&lt;/P&gt;&lt;P&gt;vbak~SPART in s_spart and&lt;/P&gt;&lt;P&gt;VBAK~ERDAT in s_erdat and&lt;/P&gt;&lt;P&gt;VBAK~VBELN  in s_vbeln and&lt;/P&gt;&lt;P&gt;vbak~KUNNR in s_kunnr.&lt;/P&gt;&lt;P&gt;reward if useful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 07:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030695#M416708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T07:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030696#M416709</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;use LDB AAV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; fetch customizing and MD into internal table and use command read table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 07:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030696#M416709</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2007-03-13T07:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030697#M416710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to get some field other than the MANDT,bcz MANDT is a kind of field which would be similar for all the table if the tables are client dependent tables.&lt;/P&gt;&lt;P&gt;than you can use the Join statement to get the data from these table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 07:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030697#M416710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T07:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030698#M416711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Anji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Thanks for a prompt response! Let me re-explain the situation. First I have taken user inputs for these fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TVKO-VKORG&lt;/P&gt;&lt;P&gt;TVTW-VTWEG&lt;/P&gt;&lt;P&gt;TSPA-SPART&lt;/P&gt;&lt;P&gt;VBAK-ERDAT&lt;/P&gt;&lt;P&gt;VBAK-VBELN&lt;/P&gt;&lt;P&gt;KNA1-KUNNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then depending on these inputs I will have to display. So, First, I will have to combine the input values to find a key value, which is MANDT field (it is present in every table TVKO, TVTW, TSPA, VBAK, KNA1). Now, when I have the value of MANDT, then I can think of joining and displaying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, kindly help me on the fetching section please! Once again, I am to take these field values from user:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VKORG from TVKO&lt;/P&gt;&lt;P&gt;VTWEG from TVTW&lt;/P&gt;&lt;P&gt;SPART from TSPA&lt;/P&gt;&lt;P&gt;ERDAT from VBAK&lt;/P&gt;&lt;P&gt;VBELN from VBAK&lt;/P&gt;&lt;P&gt;KUNNR from KNA1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 08:03:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030698#M416711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T08:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030699#M416712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello M.T.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               Thanks for your response! Let me tell you this is more detail. I have these fields to take input of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for sales:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tvko-vkorg, tvtw-vtweg, tspa-spart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for sales order information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vbak-erdat, vbak-vbeln, kna1-kunnr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, as u said MANDT maynot take the same value for each of the tables used, how am I to cross-check them for common values? I understand it won't be a primary key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 08:09:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030699#M416712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T08:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030700#M416713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TVKO-VKORG&lt;/P&gt;&lt;P&gt;TVTW-VTWEG&lt;/P&gt;&lt;P&gt;TSPA-SPART&lt;/P&gt;&lt;P&gt;VBAK-ERDAT&lt;/P&gt;&lt;P&gt;VBAK-VBELN&lt;/P&gt;&lt;P&gt;KNA1-KUNNR&lt;/P&gt;&lt;P&gt;all your input fields are available in vbak table then why are you going for tvko or tvtw or tspa?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give the input field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBAK-VKORG&lt;/P&gt;&lt;P&gt;VBAK-VTWEG&lt;/P&gt;&lt;P&gt;VBAK-SPART&lt;/P&gt;&lt;P&gt;VBAK-ERDAT&lt;/P&gt;&lt;P&gt;VBAK-VBELN&lt;/P&gt;&lt;P&gt;VBAK-KUNNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and use select query as told before it will give you the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 08:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030700#M416713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T08:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030701#M416714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Shiba!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       You have offered the most informative reply. 10 points awarded! Now, can you tell me where SELECT &amp;lt;...&amp;gt; FOR ALL ENTRIES is typically used? I am a little confused.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 08:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030701#M416714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T08:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: QUERY REGARDING FETCHING AND JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030702#M416715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we are using select for all entries to avoid inner joins..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suppose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select vbeln from vbak into corresponding fields of table itab.&lt;/P&gt;&lt;P&gt;if not  itab[] is initial.&lt;/P&gt;&lt;P&gt;select &amp;lt;fields&amp;gt; from vbap into corresponding fields of table itab1 for all entries in itab where vbeln = itab-vbeln.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will fetch the data by comparing vbeln of itab and vbap but one thing you have to check itab is initial or not if it is not initial(not contain any data) then you should not use for all entries it will fetch all the values from vbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 08:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-fetching-and-join/m-p/2030702#M416715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T08:44:59Z</dc:date>
    </item>
  </channel>
</rss>

