<?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 creating table data from multiple tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547785#M248906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to be able to create a extract file  of the data in the BKPF and BSEG tables. I need to create one line that contains a combination of fields from each table. I am thinking that I have to select the data that I need from the BKPF table into a work table and select the data that I need from the BSEG using the document number field from the BKPF as part of the selection into another work table. after I get the two work tables, I am going to have to read the BKPF table and move the fileds that I want to a third table and then read every entry in the bseg work table that matches the document number and move those field to the third work table. after that is completed, I will a one table that has data from both tables. is this the correct way to handle this. if there is a easier way to perform this operation, could someone please let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Aug 2006 19:52:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-29T19:52:28Z</dc:date>
    <item>
      <title>creating table data from multiple tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547785#M248906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to be able to create a extract file  of the data in the BKPF and BSEG tables. I need to create one line that contains a combination of fields from each table. I am thinking that I have to select the data that I need from the BKPF table into a work table and select the data that I need from the BSEG using the document number field from the BKPF as part of the selection into another work table. after I get the two work tables, I am going to have to read the BKPF table and move the fileds that I want to a third table and then read every entry in the bseg work table that matches the document number and move those field to the third work table. after that is completed, I will a one table that has data from both tables. is this the correct way to handle this. if there is a easier way to perform this operation, could someone please let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 19:52:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547785#M248906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T19:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: creating table data from multiple tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547786#M248907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since BSEG is a cluster table, that's probably about right but it depends on what data you are retrieving and what you are using as your selection criteria.  There are alternate index tables if you are selecting by customer, vendor, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 19:56:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547786#M248907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T19:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: creating table data from multiple tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547787#M248908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Timothy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this would suffice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab like bkpf occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data: itab1 like bseg occurs o with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM BKPF INTO TABLE itab&lt;/P&gt;&lt;P&gt;               WHERE BUKRS EQ P_BUKRS AND&lt;/P&gt;&lt;P&gt;                     BELNR IN S_BELNR AND&lt;/P&gt;&lt;P&gt;                     GJAHR IN S_GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	&lt;/P&gt;&lt;P&gt;  SELECT * FROM BSEG INTO TABLE ITAB1 &lt;/P&gt;&lt;P&gt;		FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;                    WHERE BUKRS eq ITAB-BUKRS&lt;/P&gt;&lt;P&gt;                    AND BELNR eq ITAB-BELNR&lt;/P&gt;&lt;P&gt;                    AND GJAHR eq ITAB-GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 19:57:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547787#M248908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T19:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: creating table data from multiple tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547788#M248909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Much of the work may have been done for you already. Are you familiar with the secondary index tables:&lt;/P&gt;&lt;P&gt;BSIS&lt;/P&gt;&lt;P&gt;BSAS&lt;/P&gt;&lt;P&gt;BSID&lt;/P&gt;&lt;P&gt;BSAD&lt;/P&gt;&lt;P&gt;BSIK&lt;/P&gt;&lt;P&gt;BSAK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each of these tables have data from BKPF and BSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 20:11:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-table-data-from-multiple-tables/m-p/1547788#M248909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T20:11:37Z</dc:date>
    </item>
  </channel>
</rss>

