<?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: Joining FI tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069665#M428541</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is wrong with this SQL statement? abap dump generated&lt;/P&gt;&lt;P&gt;checking through ST11...found this..&lt;/P&gt;&lt;P&gt;ERROR =&amp;gt; max. statement length (65536) exceeded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are &lt;/P&gt;&lt;P&gt;114 records in r_blart&lt;/P&gt;&lt;P&gt;44 records in itab&lt;/P&gt;&lt;P&gt;in this selection statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    SELECT
      bukrs
      belnr
      gjahr
      kunnr
      blart
      buzei
      budat
      bldat
      mansp
      shkzg
      xblnr
      bschl
      dmbtr
      zuonr
      INTO TABLE i_bsid
      FROM bsid
      FOR ALL ENTRIES IN itab
      WHERE bukrs = itab-bukrs
        AND kunnr = itab-kunnr
        AND budat BETWEEN backdate_13 AND p_r_date
        AND blart IN r_blart
        AND zuonr IN szuonr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2007 10:59:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-16T10:59:28Z</dc:date>
    <item>
      <title>Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069656#M428532</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'm trying to join the following FI tables into 1 table:&lt;/P&gt;&lt;P&gt;bkpf&lt;/P&gt;&lt;P&gt;kna1&lt;/P&gt;&lt;P&gt;knb1&lt;/P&gt;&lt;P&gt;bsid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and these into another table:&lt;/P&gt;&lt;P&gt;bkpf&lt;/P&gt;&lt;P&gt;kna1&lt;/P&gt;&lt;P&gt;knb1&lt;/P&gt;&lt;P&gt;bsad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...so any efficient way of joining these? Current code uses inner joins.. but its causing performance issues.&lt;/P&gt;&lt;P&gt;i'm thinking of using for all entries...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any comments on which method? and why that method? if use for all entries...&lt;/P&gt;&lt;P&gt;what is the order i should start with?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 02:57:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069656#M428532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T02:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069657#M428533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can go for for all entries start from bkpf you can get belnr gjahr bukrs and you can link to bsid or bsad to get kunnr for kna1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another way you can create some views for those tables and access that in your program.&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>Wed, 14 Mar 2007 03:23:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069657#M428533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T03:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069658#M428534</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;in the select statement take all the fields from the corresponding tables and put the inner join condition between the table ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bkpf and bsid have the common key  ie company code bukrs and bsid, kna1, knb1 have the common filed kunnr. so u can join the those table with those fields in the where condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second one is also same keys so go ahead try to write the select statement with inner joins&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~~Guduri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 03:25:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069658#M428534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T03:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069659#M428535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i wont' use inner join to join the 4tables..&lt;/P&gt;&lt;P&gt;i'm doing performance tuning. the current code is using inner join, which is very slow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 03:44:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069659#M428535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T03:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069660#M428536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm also taking into consideration this information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;total no of records in tables:&lt;/P&gt;&lt;P&gt;kna1: 2,356,681&lt;/P&gt;&lt;P&gt;knb1: 6,430,912&lt;/P&gt;&lt;P&gt;bkpf: 30,489,104&lt;/P&gt;&lt;P&gt;bsid: 507,874&lt;/P&gt;&lt;P&gt;bsad: 18,075,629&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 03:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069660#M428536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T03:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069661#M428537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have answered you in another post, here it is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You first need to understand what is contained in the secondary index tables as compared to the main FI document posting table BKPF. Then you can make a better decision in joining.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The index tables BSID (only customer active postings) and BSAD (only customer and that too cleared postings, huge piles up over time) are much smaller in size compared to BKPF which also contains postings to general ledger, vendor posting and so on. So BSID is subset of BSAD which in turn is subset of BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KNA1 on the other hand is master data table and should be still smaller in size (why because for each customer there may be many FI postings)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the MOST IMPORTANT point is which fields are available to you for selection? For example, if you have customer number, first join KNA1 with KNB1 and then with BSAD or BSID, then join with BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So tell us the selection fields that are available to you to seed the query&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 03:50:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069661#M428537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T03:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069662#M428538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the input. I'll reward after i try them out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm also taking into consideration this information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;total no of records in tables:&lt;/P&gt;&lt;P&gt;kna1: 2,356,681&lt;/P&gt;&lt;P&gt;knb1: 6,430,912&lt;/P&gt;&lt;P&gt;bkpf: 30,489,104&lt;/P&gt;&lt;P&gt;bsid: 507,874&lt;/P&gt;&lt;P&gt;bsad: 18,075,629&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some fields include:&lt;/P&gt;&lt;P&gt;bukrs "Company code, mandatory, usually single value selection&lt;/P&gt;&lt;P&gt;kunnr "Customer No, mandatory, may be single, range or selecting all&lt;/P&gt;&lt;P&gt;busab "Accounting clerk, mandatory, may be single or range values&lt;/P&gt;&lt;P&gt;ktokd "Customer Account Group, mandatory, usually single value selection&lt;/P&gt;&lt;P&gt;budat "13 months selection, mandatory, range, fixed range based on current date&lt;/P&gt;&lt;P&gt;zuonr " not mandatory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 03:57:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069662#M428538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T03:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069663#M428539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any more input? thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 07:42:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069663#M428539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T07:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069664#M428540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm thinking of the following steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) inner join kna1, kbb1&lt;/P&gt;&lt;P&gt;2) access bsid with for all entries (kna1, kbb1)&lt;/P&gt;&lt;P&gt;3) access bsad with for all entries (kna1, kbb1)&lt;/P&gt;&lt;P&gt;4) append bsad to bsid itab&lt;/P&gt;&lt;P&gt;5) acess bkpf with for all entries (bsid itab)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is i'm cant really make use of indexes for accessing bsid and bsad...&lt;/P&gt;&lt;P&gt;which is causing the slowness...&lt;/P&gt;&lt;P&gt;accessing bsid has the same selection criteria and where condition as bsad..&lt;/P&gt;&lt;P&gt;but these the where fields are either using IN and ranges.. index cannot be used..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"select with quite a number of fields....
      WHERE bukrs IN s_bukrs 
        AND kunnr IN s_kunnr
        AND budat BETWEEN backdate_13 AND p_r_date  
        AND blart IN r_blart 
        AND zuonr IN szuonr. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:08:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069664#M428540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069665#M428541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is wrong with this SQL statement? abap dump generated&lt;/P&gt;&lt;P&gt;checking through ST11...found this..&lt;/P&gt;&lt;P&gt;ERROR =&amp;gt; max. statement length (65536) exceeded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are &lt;/P&gt;&lt;P&gt;114 records in r_blart&lt;/P&gt;&lt;P&gt;44 records in itab&lt;/P&gt;&lt;P&gt;in this selection statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    SELECT
      bukrs
      belnr
      gjahr
      kunnr
      blart
      buzei
      budat
      bldat
      mansp
      shkzg
      xblnr
      bschl
      dmbtr
      zuonr
      INTO TABLE i_bsid
      FROM bsid
      FOR ALL ENTRIES IN itab
      WHERE bukrs = itab-bukrs
        AND kunnr = itab-kunnr
        AND budat BETWEEN backdate_13 AND p_r_date
        AND blart IN r_blart
        AND zuonr IN szuonr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 10:59:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069665#M428541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T10:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069666#M428542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone have better ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just a normal report with total of almost 30 variants, not using alv...&lt;/P&gt;&lt;P&gt;but requires calculation..so no choice but to combine everything into a big itab...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is with the inner join of the 4 tables.&lt;/P&gt;&lt;P&gt;&amp;amp; this is done 2 times.. 1st with bsid.. then 2nd with bsad.. &amp;amp; then both itabs are combined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i realised if i break up this 2 inner join statements into smaller statements and use for all entries... i may encounter other problems..&lt;/P&gt;&lt;P&gt;eg. if i start by inner join kna1 and knb1..&lt;/P&gt;&lt;P&gt;some variants will result in a huge amount of customer data... so for all entries would have problem here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Mar 2007 09:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069666#M428542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-17T09:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069667#M428543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The max statement length may be exceeded due to big number of entries in your select-options &amp;amp; internal table (itab, r_blart, szuonr).&lt;/P&gt;&lt;P&gt;For all entries usually splits the table itab into packages of ~ 10 values and passes to DB request like where kunnr in ('...','...').&lt;/P&gt;&lt;P&gt;In your case these 10 kunnrs + 114 blarts + if anything in szuonr is causing overflow of where clause. &lt;/P&gt;&lt;P&gt;To fix - just split your big select-options (if they have too many entries) into smaller parts (use ranges) and use select ... appending your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On your steps :&lt;/P&gt;&lt;P&gt;1) inner join kna1, kbb1&lt;/P&gt;&lt;P&gt;2) access bsid with for all entries (kna1, kbb1)&lt;/P&gt;&lt;P&gt;3) access bsad with for all entries (kna1, kbb1) &amp;lt;&amp;lt;&amp;lt; you may use "appending table your internal table" here...&lt;/P&gt;&lt;P&gt;4) append bsad to bsid itab &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; remove duplicates before selecting from bkpf.&lt;/P&gt;&lt;P&gt;5) acess bkpf with for all entries (bsid itab)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT, if select from bkpf is more restrictive than BSID/BSAD, you may actually use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) inner join kna1, kbb1&lt;/P&gt;&lt;P&gt;2) inner join bsid, bkpf with for all entries (kna1, kbb1)&lt;/P&gt;&lt;P&gt;3) inner join bsad, bkpf with for all entries (kna1, kbb1), "appending table"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Mar 2007 14:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069667#M428543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-17T14:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069668#M428544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;problem already occurs at&lt;/P&gt;&lt;P&gt;2) access bsid with for all entries (kna1, kbb1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there r too many rows in blart.. which cannot use range&lt;/P&gt;&lt;P&gt;plus.. if the variant selects a range of kunnr (customers)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it either cause abap dump...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or in some variants.. slower than the inner join of 4 tables... although in some variants... it is faster..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Mar 2007 14:59:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069668#M428544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-17T14:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069669#M428545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any more ideas?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can't seem to improve the performance for this 2 inner join SQL statements..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2007 05:56:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069669#M428545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-18T05:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069670#M428546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- I would definitely add GJAHR to the list of select-options for your bsid, bsad.&lt;/P&gt;&lt;P&gt;you can use something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: r_blart ...&lt;/P&gt;&lt;P&gt;if your s_blart has &amp;gt; 20 entries, use somehting like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_blart&lt;/P&gt;&lt;P&gt;  if counter = 20.&lt;/P&gt;&lt;P&gt;    select from bsid ... as before.... APPENDING table itab_bsid ...&lt;/P&gt;&lt;P&gt;    refresh r_blart.&lt;/P&gt;&lt;P&gt;    clear counter.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  increment counter.&lt;/P&gt;&lt;P&gt;  append s_blart into r_blart.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;if r_blart is not initial - repeat select for the last package of r_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an option, you can include all your logic into this loop... it will reduce the size of internal tables .. like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at s_blart&lt;/P&gt;&lt;P&gt;  if you collected 20 blarts &lt;/P&gt;&lt;P&gt;     - select from bsid&lt;/P&gt;&lt;P&gt;     - select from bsad&lt;/P&gt;&lt;P&gt;     - select from bkpf  "appending table" !!!&lt;/P&gt;&lt;P&gt;     refresh it_bsid, it_bsad.&lt;/P&gt;&lt;P&gt;  endif&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check which iindexes are available for your bsid/bsad/bkpf.&lt;/P&gt;&lt;P&gt;adding GJAHR (you can calculate it based on budat) will help for bsid for sure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 17:41:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069670#M428546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T17:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069671#M428547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;will open cursor help in this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 12:12:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069671#M428547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T12:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Joining FI tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069672#M428548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah , that is the best option to get data from FI tables.&lt;/P&gt;&lt;P&gt;&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;prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 12:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-fi-tables/m-p/2069672#M428548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T12:26:30Z</dc:date>
    </item>
  </channel>
</rss>

