<?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 Performance in BSIS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913401#M685709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your help. I have more than 10,000 entries in BSIS and it took me 5mins to retireve it. Here's my code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SELECT a~mandt
         a~belnr
         A~BUZEI
         a~mwskz
         a~budat
         A~SHKZG
         A~DMBTR
         b~lifnr
         B~NAME1
         b~ktokk
  APPENDING CORRESPONDING
  FIELDS OF TABLE lt_tab
  FROM bsak AS a
  INNER JOIN lfa1 AS b
  ON a~lifnr = b~lifnr
  WHERE a~bukrs EQ so_ccode
  AND A~GJAHR EQ LV_YEAR
  AND a~budat IN so_postp
  AND MWSKZ IN SO_TXCDE.

  SORT lt_tab1 BY lifnr belnr.
  DELETE LT_TAB WHERE KTOKK EQ 'UEMP'.

  if not lt_tab[] is initial.
    SELECT BELNR
           MWSKZ
           SHKZG
           DMBTR
           WAERS
           HKONT
    INTO CORRESPONDING FIELDS OF TABLE LT_TAB2_TEMP
    FROM BSIS
   for all entries in lt_tab
    WHERE BUKRS EQ SO_CCODE
    AND hkont ne c_hkont
    AND GJAHR EQ LV_YEAR
    AND belnr eq lt_tab-belnr
    AND MWSKZ IN SO_TXCDE
    AND BUDAT IN SO_POSTP.

  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2007 05:41:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-17T05:41:31Z</dc:date>
    <item>
      <title>Performance in BSIS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913401#M685709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your help. I have more than 10,000 entries in BSIS and it took me 5mins to retireve it. Here's my code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SELECT a~mandt
         a~belnr
         A~BUZEI
         a~mwskz
         a~budat
         A~SHKZG
         A~DMBTR
         b~lifnr
         B~NAME1
         b~ktokk
  APPENDING CORRESPONDING
  FIELDS OF TABLE lt_tab
  FROM bsak AS a
  INNER JOIN lfa1 AS b
  ON a~lifnr = b~lifnr
  WHERE a~bukrs EQ so_ccode
  AND A~GJAHR EQ LV_YEAR
  AND a~budat IN so_postp
  AND MWSKZ IN SO_TXCDE.

  SORT lt_tab1 BY lifnr belnr.
  DELETE LT_TAB WHERE KTOKK EQ 'UEMP'.

  if not lt_tab[] is initial.
    SELECT BELNR
           MWSKZ
           SHKZG
           DMBTR
           WAERS
           HKONT
    INTO CORRESPONDING FIELDS OF TABLE LT_TAB2_TEMP
    FROM BSIS
   for all entries in lt_tab
    WHERE BUKRS EQ SO_CCODE
    AND hkont ne c_hkont
    AND GJAHR EQ LV_YEAR
    AND belnr eq lt_tab-belnr
    AND MWSKZ IN SO_TXCDE
    AND BUDAT IN SO_POSTP.

  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 05:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913401#M685709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-17T05:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in BSIS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913402#M685710</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;Can you check other alternative of using other table not BSIS as in actual production env you may face more performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 05:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913402#M685710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-17T05:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in BSIS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913403#M685711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before deleting the data from lt_tab, sort the internal table.&lt;/P&gt;&lt;P&gt;And also delete the duplicate belnr entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a~mandt&lt;/P&gt;&lt;P&gt;         a~belnr&lt;/P&gt;&lt;P&gt;         A~BUZEI&lt;/P&gt;&lt;P&gt;         a~mwskz&lt;/P&gt;&lt;P&gt;         a~budat&lt;/P&gt;&lt;P&gt;         A~SHKZG&lt;/P&gt;&lt;P&gt;         A~DMBTR&lt;/P&gt;&lt;P&gt;         b~lifnr&lt;/P&gt;&lt;P&gt;         B~NAME1&lt;/P&gt;&lt;P&gt;         b~ktokk&lt;/P&gt;&lt;P&gt;  APPENDING CORRESPONDING&lt;/P&gt;&lt;P&gt;  FIELDS OF TABLE lt_tab&lt;/P&gt;&lt;P&gt;  FROM bsak AS a&lt;/P&gt;&lt;P&gt;  INNER JOIN lfa1 AS b&lt;/P&gt;&lt;P&gt;  ON a&lt;SUB&gt;lifnr = b&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;  WHERE a~bukrs EQ so_ccode&lt;/P&gt;&lt;P&gt;  AND A~GJAHR EQ LV_YEAR&lt;/P&gt;&lt;P&gt;  AND a~budat IN so_postp&lt;/P&gt;&lt;P&gt;  AND MWSKZ IN SO_TXCDE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  SORT lt_tab1 BY lifnr belnr.&lt;/P&gt;&lt;P&gt;  SORT LT_TAB BY KTOKK.&lt;/P&gt;&lt;P&gt;  DELETE LT_TAB WHERE KTOKK EQ 'UEMP'.&lt;/P&gt;&lt;P&gt;  SORT LT_TAB BY BELNR.&lt;/P&gt;&lt;P&gt;  DELETE ADJACENT DUPLICATES FROM LT_TAB COMPARING BELNR.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if not lt_tab[] is initial.&lt;/P&gt;&lt;P&gt;    SELECT BELNR&lt;/P&gt;&lt;P&gt;           MWSKZ&lt;/P&gt;&lt;P&gt;           SHKZG&lt;/P&gt;&lt;P&gt;           DMBTR&lt;/P&gt;&lt;P&gt;           WAERS&lt;/P&gt;&lt;P&gt;           HKONT&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE LT_TAB2_TEMP&lt;/P&gt;&lt;P&gt;    FROM BSIS&lt;/P&gt;&lt;P&gt;   for all entries in lt_tab&lt;/P&gt;&lt;P&gt;    WHERE BUKRS EQ SO_CCODE&lt;/P&gt;&lt;P&gt;    AND hkont ne c_hkont&lt;/P&gt;&lt;P&gt;    AND GJAHR EQ LV_YEAR&lt;/P&gt;&lt;P&gt;    AND belnr eq lt_tab-belnr&lt;/P&gt;&lt;P&gt;    AND MWSKZ IN SO_TXCDE&lt;/P&gt;&lt;P&gt;    AND BUDAT IN SO_POSTP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 06:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913403#M685711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-17T06:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in BSIS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913404#M685712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. you are using "hkont ne c_hkont" in the where condition, as far as I remember NE can not be supported by the index&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. AUGDT &amp;amp; AUGBL are - if I remember correct - in BSIS always 00000000 or space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. check how ZUONR is filled in your system; if filled in vendor line and G/L account line equal select in the join also ZUONR into lt_tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my suggestion on the BSIS code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

   SELECT BELNR
           MWSKZ
           SHKZG
           DMBTR
           WAERS
           HKONT
    INTO CORRESPONDING FIELDS OF TABLE LT_TAB2_TEMP
    FROM BSIS
   for all entries in lt_tab
    WHERE BUKRS EQ SO_CCODE
    AND hkont in r_hkont                             "your accounts needed 
    and augdt EQ '00000000'               "please review if they are really always initial
    and augbl EQ space                     "please review if they are really always initial
    and zuonr EQ lt_tab-zuonr            "only if filled equal as BSAK otherwise not!
    AND GJAHR EQ LV_YEAR
    AND belnr eq lt_tab-belnr
    AND MWSKZ IN SO_TXCDE
    AND BUDAT IN SO_POSTP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 06:41:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913404#M685712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-17T06:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in BSIS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913405#M685713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But do you think even if they have numbers of gl account, I should include it in the filter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 07:48:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913405#M685713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-17T07:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Performance in BSIS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913406#M685714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even without testing yes I think you should. &lt;/P&gt;&lt;P&gt;But I think best way that you try out both options on your system and then choose the better one for the final version of the program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 11:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-in-bsis/m-p/2913406#M685714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-17T11:34:22Z</dc:date>
    </item>
  </channel>
</rss>

