<?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 Selecting data from BSEG in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240929#M142109</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;  I have selected the data from BKPF depending on the BUKRS &amp;amp; selecton screen dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to select data from BSEG depending on bukrs obtained in the above step &amp;amp; KUNNR which is in another internal T_CUST ... Will the select statement below ensure that the T_BSEG table will have the correct values of the documents no's corresponding to the customers in table T_CUST ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get BSEG data for all values in BKPF&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT T_BKPF[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT BUKRS&lt;/P&gt;&lt;P&gt;           BELNR&lt;/P&gt;&lt;P&gt;           GJAHR&lt;/P&gt;&lt;P&gt;           BUZEI&lt;/P&gt;&lt;P&gt;           BUZID&lt;/P&gt;&lt;P&gt;           BSCHL&lt;/P&gt;&lt;P&gt;           KOART&lt;/P&gt;&lt;P&gt;           SHKZG&lt;/P&gt;&lt;P&gt;           DMBTR&lt;/P&gt;&lt;P&gt;           KUNNR&lt;/P&gt;&lt;P&gt;      INTO TABLE T_BSEG_TEMP&lt;/P&gt;&lt;P&gt;      FROM BSEG&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN T_BKPF&lt;/P&gt;&lt;P&gt;      WHERE BUKRS = T_BKPF-BUKRS AND&lt;/P&gt;&lt;P&gt;            BELNR = T_BKPF-BELNR AND&lt;/P&gt;&lt;P&gt;            GJAHR = T_BKPF-GJAHR.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;FORM GET_BSEG_DATA .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get BSEG data for all customers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IF NOT T_CUST[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT BUKRS&lt;/P&gt;&lt;P&gt;        BELNR&lt;/P&gt;&lt;P&gt;        GJAHR&lt;/P&gt;&lt;P&gt;        BUZEI&lt;/P&gt;&lt;P&gt;        BUZID&lt;/P&gt;&lt;P&gt;        BSCHL&lt;/P&gt;&lt;P&gt;        KOART&lt;/P&gt;&lt;P&gt;        SHKZG&lt;/P&gt;&lt;P&gt;        DMBTR&lt;/P&gt;&lt;P&gt;        KUNNR&lt;/P&gt;&lt;P&gt;   INTO TABLE T_BSEG&lt;/P&gt;&lt;P&gt;   FROM BSEG&lt;/P&gt;&lt;P&gt;   FOR ALL ENTRIES IN T_CUST&lt;/P&gt;&lt;P&gt;   WHERE KUNNR = T_CUST-KUNNR.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " GET_BSEG_DATA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2006 06:06:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-15T06:06:58Z</dc:date>
    <item>
      <title>Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240929#M142109</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;  I have selected the data from BKPF depending on the BUKRS &amp;amp; selecton screen dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to select data from BSEG depending on bukrs obtained in the above step &amp;amp; KUNNR which is in another internal T_CUST ... Will the select statement below ensure that the T_BSEG table will have the correct values of the documents no's corresponding to the customers in table T_CUST ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get BSEG data for all values in BKPF&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT T_BKPF[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT BUKRS&lt;/P&gt;&lt;P&gt;           BELNR&lt;/P&gt;&lt;P&gt;           GJAHR&lt;/P&gt;&lt;P&gt;           BUZEI&lt;/P&gt;&lt;P&gt;           BUZID&lt;/P&gt;&lt;P&gt;           BSCHL&lt;/P&gt;&lt;P&gt;           KOART&lt;/P&gt;&lt;P&gt;           SHKZG&lt;/P&gt;&lt;P&gt;           DMBTR&lt;/P&gt;&lt;P&gt;           KUNNR&lt;/P&gt;&lt;P&gt;      INTO TABLE T_BSEG_TEMP&lt;/P&gt;&lt;P&gt;      FROM BSEG&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN T_BKPF&lt;/P&gt;&lt;P&gt;      WHERE BUKRS = T_BKPF-BUKRS AND&lt;/P&gt;&lt;P&gt;            BELNR = T_BKPF-BELNR AND&lt;/P&gt;&lt;P&gt;            GJAHR = T_BKPF-GJAHR.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;FORM GET_BSEG_DATA .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get BSEG data for all customers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IF NOT T_CUST[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT BUKRS&lt;/P&gt;&lt;P&gt;        BELNR&lt;/P&gt;&lt;P&gt;        GJAHR&lt;/P&gt;&lt;P&gt;        BUZEI&lt;/P&gt;&lt;P&gt;        BUZID&lt;/P&gt;&lt;P&gt;        BSCHL&lt;/P&gt;&lt;P&gt;        KOART&lt;/P&gt;&lt;P&gt;        SHKZG&lt;/P&gt;&lt;P&gt;        DMBTR&lt;/P&gt;&lt;P&gt;        KUNNR&lt;/P&gt;&lt;P&gt;   INTO TABLE T_BSEG&lt;/P&gt;&lt;P&gt;   FROM BSEG&lt;/P&gt;&lt;P&gt;   FOR ALL ENTRIES IN T_CUST&lt;/P&gt;&lt;P&gt;   WHERE KUNNR = T_CUST-KUNNR.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " GET_BSEG_DATA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:06:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240929#M142109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240930#M142110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code is alright.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is your requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:10:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240930#M142110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240931#M142111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hI sb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YES, THE SELECT STATEMENT WILL FETCH DATA FOR THE REQUIRED CUSTOMERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS&lt;/P&gt;&lt;P&gt;KISHORE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:10:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240931#M142111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240932#M142112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SB,&lt;/P&gt;&lt;P&gt; It will work perfectly..&lt;/P&gt;&lt;P&gt; do you have any problem with the query..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;satesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:11:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240932#M142112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240933#M142113</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;The data would be inconsistent, better way is to merge all into one final internal table and handle it appropriately.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:12:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240933#M142113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240934#M142114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My requirement is to get data from BSEG where bukrs = bkpf-bukrs and belnr= bkpf-belnr &amp;amp; knunnr = t_cust kunnr .. I was not sure about how to write a &amp;lt;b&amp;gt; "single select statement" with "where conditions from two different tables"&amp;lt;/b&amp;gt; .... so only I split up the tables as t_bseg &amp;amp; t_bseg_temp and also split up up the where condition ... but then by splitting up the where condition I was not sure whether the right BELNR &amp;amp; BUKRS will be selected just by giving the condition where KUNNR = T_CUST-KUNNR ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:20:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240934#M142114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240935#M142115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SB,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to merge the two internal tables (bkpf and t_cust) into the 3rd internal table say t_temp and now you can write the select statement by using the 3rd internal table in FOR-ALL-ENTRIES option where bukrs = t_temp-bukrs and belnr = t_temp-belnr and kunnr = t_temp-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:33:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240935#M142115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240936#M142116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MERGE THE TWO INTERNAL TABLE T_BKPF AND T_CUST INTO ANOTHER INTERNAL TABLE THEN USE FOR ALL ENTRIES FOPR THE SELECT STATEMENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGARDS&lt;/P&gt;&lt;P&gt;KISHORE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 06:36:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240936#M142116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T06:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240937#M142117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi SB,&lt;/P&gt;&lt;P&gt;   We can Merge two Internal tables with the help of &amp;lt;b&amp;gt;Innerjoins&amp;lt;/b&amp;gt; and collect the joined data in to third internal table and then use for all entries for the select statement ... but since BSEG is cluster table inner join shouldn't be used to merge cluster table data &lt;/P&gt;&lt;P&gt;....  So first with the help of one select statement merge the data of two internal tables in to third table and then use for all entries for the third internal table ..&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 07:15:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240937#M142117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T07:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240938#M142118</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;your 2nd part is &amp;lt;b&amp;gt;very bad&amp;lt;/b&amp;gt; for performance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FOR ALL ENTRIES IN T_CUST
WHERE KUNNR = T_CUST-KUNNR&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;better select bsid and bsad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 07:43:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240938#M142118</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-03-15T07:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240939#M142119</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; I am getting customer number with the help of account group ... Is there any table where I can get that the customer &amp;amp; account group as primary fields??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 11:46:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240939#M142119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T11:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240940#M142120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting customer number with the help of account group and Company code ... Is there any table where I can get that the customer &amp;amp; account group &amp;amp; Company code as primary fields?? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ignore my previous msg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 11:56:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240940#M142120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T11:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240941#M142121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi SB,&lt;/P&gt;&lt;P&gt;      look at KNB1 OR KNB2 TABLES ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2006 11:59:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240941#M142121</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T11:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data from BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240942#M142122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like Andreas said - BSID and BSAD. Definitely not 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>Wed, 15 Mar 2006 14:35:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-data-from-bseg/m-p/1240942#M142122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-15T14:35:31Z</dc:date>
    </item>
  </channel>
</rss>

