<?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: Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717963#M313666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want change  in program  and see whether I can do some thing to improve perfromance of my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically some body wrote this  program and initially it is SELECTING from bkpf table  into internal table and then looping through that internal table and each time it is selecting from BSEG . and then from BSET.&lt;/P&gt;&lt;P&gt;How can I compare my performance of my program WITH and WITH OUT my changes...&lt;/P&gt;&lt;P&gt;my program i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Nov 2006 18:49:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-13T18:49:39Z</dc:date>
    <item>
      <title>Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717950#M313653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have issue and need to solve urgenlty. &lt;/P&gt;&lt;P&gt;The program is dumping here. How can I solve this issue.&lt;/P&gt;&lt;P&gt;Could you please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT BUKRS BELNR GJAHR BUZEI LIFNR SGTXT MWSKZ HKONT MENGE WRBTR&lt;/P&gt;&lt;P&gt;         EBELN EBELP PRCTR WERKS SHKZG ZEKKN NPLNR KOSTL PROJK MATNR&lt;/P&gt;&lt;P&gt;         AUFPL APLZL MEINS&lt;/P&gt;&lt;P&gt;         FROM BSEG&lt;/P&gt;&lt;P&gt;         INTO TABLE INTBSEG&lt;/P&gt;&lt;P&gt;         WHERE BUKRS = TBKPF-BUKRS&lt;/P&gt;&lt;P&gt;           AND BELNR = TBKPF-BELNR&lt;/P&gt;&lt;P&gt;           AND GJAHR = TBKPF-GJAHR&lt;/P&gt;&lt;P&gt;           AND MWART NE 'V'&lt;/P&gt;&lt;P&gt;           AND  TXJCD IN TXJCODE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:00:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717950#M313653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717951#M313654</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;Check the sequence of the fields declared in the internal table and given in the select statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were not able to find out..Use INTO CORRESPONDING FIELDS OF TABLE instead of INTO TABLE..If the field names are same..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALso Give us the description of the SHORT DUMP..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717951#M313654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717952#M313655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The SELECT looks OK. Are you sure that all of the fields you are selecting are in your internal table? In the same order?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:05:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717952#M313655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717953#M313656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happened?                                                                                &lt;/P&gt;&lt;P&gt;The program "ZKRAR232" has exceeded the maximum permitted runtime without  &lt;/P&gt;&lt;P&gt;interruption, and has therefore been terminated.                           &lt;/P&gt;&lt;P&gt;Error analysis                                                                                &lt;/P&gt;&lt;P&gt;After a certain length of time, the program is terminated. In the case       &lt;/P&gt;&lt;P&gt;of a work area, this means that                                              &lt;/P&gt;&lt;P&gt;- endless loops (DO, WHILE, ...),                                            &lt;/P&gt;&lt;P&gt;- database accesses producing an excessively large result set,               &lt;/P&gt;&lt;P&gt;- database accesses without a suitable index (full table scan)               &lt;/P&gt;&lt;P&gt;do not block the processing for too long.                                                                                &lt;/P&gt;&lt;P&gt;The system profile "rdisp/max_wprun_time" contains the maximum runtime of a  &lt;/P&gt;&lt;P&gt; program. The                                                                &lt;/P&gt;&lt;P&gt;current setting is 900 seconds. Once this time limit has been exceeded,      &lt;/P&gt;&lt;P&gt;the system tries to terminate any SQL statements that are currently          &lt;/P&gt;&lt;P&gt;being executed and tells the ABAP processor to terminate the current         &lt;/P&gt;&lt;P&gt;program. Then it waits for a maximum of 60 seconds. If the program is        &lt;/P&gt;&lt;P&gt;still active, the work process is restarted.                                                                                &lt;/P&gt;&lt;P&gt;successfully processed, the system gives it another 900 seconds.             &lt;/P&gt;&lt;P&gt;Hence the maximum runtime of a program is at least twice the value of        &lt;/P&gt;&lt;P&gt;the system profile parameter "rdisp/max_wprun_time".                                                                                &lt;/P&gt;&lt;P&gt;How to correct the error                                                                                &lt;/P&gt;&lt;P&gt;You should usually execute long-running programs as batch jobs.         &lt;/P&gt;&lt;P&gt;If this is not possible, increase the system profile parameter          &lt;/P&gt;&lt;P&gt; "rdisp/max_wprun_time".                                                                                &lt;/P&gt;&lt;P&gt;Depending on the cause of the error, you may have to take one of the    &lt;/P&gt;&lt;P&gt;following measures:                                                     &lt;/P&gt;&lt;P&gt;- Endless loop: Correct program;                                        &lt;/P&gt;&lt;P&gt;- Dataset resulting from database access is too large:                  &lt;/P&gt;&lt;P&gt;  Instead of "SELECT * ... ENDSELECT", use "SELECT * INTO internal table&lt;/P&gt;&lt;P&gt;  (for example);                                                        &lt;/P&gt;&lt;P&gt;- Database has an unsuitable index: Check index generation.                                                                                &lt;/P&gt;&lt;P&gt;You may able to find an interim solution to the problem                 &lt;/P&gt;&lt;P&gt;in the SAP note system. If you have access to the note system yourself, &lt;/P&gt;&lt;P&gt;use the following search criteria:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717953#M313656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717954#M313657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Itis using the fields as same order as interenal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:12:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717954#M313657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717955#M313658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is using fields in the same order as Internal table.But not in the same order of Bseg table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717955#M313658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717956#M313659</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;Looks like the program is taking long time and it has exceeded the limit of 900 seconds..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you SELECT is with in a LOOP AT ...ENDLOOP..Move it outside the loop..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think TBKPF is an internal table..Use the FOR ALL ENTRIES ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF NOT TBKPF IS INITIAL.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR BUZEI LIFNR SGTXT MWSKZ HKONT MENGE WRBTR&lt;/P&gt;&lt;P&gt;EBELN EBELP PRCTR WERKS SHKZG ZEKKN NPLNR KOSTL PROJK MATNR&lt;/P&gt;&lt;P&gt;AUFPL APLZL MEINS&lt;/P&gt;&lt;P&gt;FROM BSEG&lt;/P&gt;&lt;P&gt;INTO TABLE INTBSEG&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FOR ALL ENTRIES IN TBKPF&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;WHERE BUKRS = TBKPF-BUKRS&lt;/P&gt;&lt;P&gt;AND BELNR = TBKPF-BELNR&lt;/P&gt;&lt;P&gt;AND GJAHR = TBKPF-GJAHR&lt;/P&gt;&lt;P&gt;AND MWART NE 'V'&lt;/P&gt;&lt;P&gt;AND TXJCD IN TXJCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ENDIF.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:13:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717956#M313659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717957#M313660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you doing this SELECT inside a LOOP? If so, would you post that code as well, please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:14:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717957#M313660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717958#M313661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No  this SELECT is not in the loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:16:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717958#M313661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717959#M313662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - would you post the section of the dump that gives the source code extract? I don't see a problem with the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:21:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717959#M313662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717960#M313663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Source code extract                                                                                &lt;/P&gt;&lt;P&gt;004660       PERFORM TOTAL-BSET-DATA.                                                  &lt;/P&gt;&lt;P&gt;004670                                                                                &lt;/P&gt;&lt;P&gt;004680       PERFORM FILL-TABLES.                                                      &lt;/P&gt;&lt;P&gt;004690                                                                                &lt;/P&gt;&lt;P&gt;004700     ENDLOOP.                                                                    &lt;/P&gt;&lt;P&gt;004710                                                                                &lt;/P&gt;&lt;P&gt;004720   END-OF-SELECTION.                                                             &lt;/P&gt;&lt;P&gt;004730                                                                                &lt;/P&gt;&lt;P&gt;004740     PERFORM MODIFY_DETAIL.                                                      &lt;/P&gt;&lt;P&gt;004750                                                                                &lt;/P&gt;&lt;P&gt;004760     PERFORM PRINT-COVER-PAGE.                                                   &lt;/P&gt;&lt;P&gt;004770                                                                                &lt;/P&gt;&lt;P&gt;004780     PERFORM PRINT-DETAIL-REPORT.                                                &lt;/P&gt;&lt;P&gt;004790                                                                                &lt;/P&gt;&lt;P&gt;004800     INCLUDE ZZEZ410C.    "Variant capture                                       &lt;/P&gt;&lt;P&gt;004810                                                                                &lt;/P&gt;&lt;P&gt;004820   ************************************************************************      &lt;/P&gt;&lt;P&gt;004830   *   BEGIN OF FORM SUBROUTINES                                          *      &lt;/P&gt;&lt;P&gt;004840   ************************************************************************      &lt;/P&gt;&lt;P&gt;004850                                                                                &lt;/P&gt;&lt;P&gt;004860   *                                                                      *      &lt;/P&gt;&lt;P&gt;004870   *       Form  GET_BSEG                                                 *      &lt;/P&gt;&lt;P&gt;004880   *                                                                      *      &lt;/P&gt;&lt;P&gt;004890   FORM GET_BSEG.                                                                &lt;/P&gt;&lt;P&gt;004900   *  Read all record that belong to the document number                         &lt;/P&gt;&lt;P&gt;004910                                                                                &lt;/P&gt;&lt;P&gt;004920     REFRESH:  VBSEG, BSEG_NT, INTBSEG.                                          &lt;/P&gt;&lt;P&gt;004930     CLEAR:   VBSEG, BSEG_NT.                                                    &lt;/P&gt;&lt;P&gt;004940     CLEAR : QTY_TOTAL, INTBSEG_TABIX.     &lt;/P&gt;&lt;P&gt;004950                                                                                &lt;/P&gt;&lt;P&gt;&amp;gt;     SELECT BUKRS BELNR GJAHR BUZEI LIFNR SGTXT MWSKZ HKONT MENGE WRBTR       &lt;/P&gt;&lt;P&gt;004970            EBELN EBELP PRCTR WERKS SHKZG ZEKKN NPLNR KOSTL PROJK MATNR       &lt;/P&gt;&lt;P&gt;004980            AUFPL APLZL MEINS                                                 &lt;/P&gt;&lt;P&gt;004990            FROM BSEG                                                         &lt;/P&gt;&lt;P&gt;005000            INTO TABLE INTBSEG                                                &lt;/P&gt;&lt;P&gt;005010            WHERE BUKRS = TBKPF-BUKRS                                         &lt;/P&gt;&lt;P&gt;005020              AND BELNR = TBKPF-BELNR                                         &lt;/P&gt;&lt;P&gt;005030              AND GJAHR = TBKPF-GJAHR                                         &lt;/P&gt;&lt;P&gt;005040              AND MWART NE 'V'                                                &lt;/P&gt;&lt;P&gt;005050              AND  TXJCD IN TXJCODE.                                          &lt;/P&gt;&lt;P&gt;005060                                                                              &lt;/P&gt;&lt;P&gt;005070     DESCRIBE TABLE INTBSEG LINES NO_OF_INTBSEG_LINES. " # 1   : Jaideep      &lt;/P&gt;&lt;P&gt;005080                                                                              &lt;/P&gt;&lt;P&gt;005090     LOOP AT INTBSEG.                                                         &lt;/P&gt;&lt;P&gt;005100       INTBSEG_TABIX = SY-TABIX.           " # 2   : Jaideep Fadia 12/05/97   &lt;/P&gt;&lt;P&gt;005110                                                                              &lt;/P&gt;&lt;P&gt;005120   *  CMS 17969  If quantity is 0, default it to 1.                           &lt;/P&gt;&lt;P&gt;005130       IF INTBSEG-MENGE = 0.                                   "17969         &lt;/P&gt;&lt;P&gt;005140         INTBSEG-MENGE = 1.                                    "17969         &lt;/P&gt;&lt;P&gt;005150         MODIFY INTBSEG INDEX SY-TABIX.                        "17969&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717960#M313663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717961#M313664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK maybe there is a problem with the select. Using NE may prevent the use of an index. Try:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT  bukrs belnr gjahr buzei lifnr sgtxt mwskz hkont menge wrbtr
        ebeln ebelp prctr werks shkzg zekkn nplnr kostl projk matnr
        aufpl aplzl meins mwart
  FROM bseg
  INTO TABLE intbseg
  WHERE bukrs = tbkpf-bukrs
    AND belnr = tbkpf-belnr
    AND gjahr = tbkpf-gjahr
    AND txjcd IN txjcode.

DELETE intbseg WHERE mwart = 'V'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You have to add MWART to the end of your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2006 22:27:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717961#M313664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-10T22:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717962#M313665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I don't know which release you are on and whether BSEG is still in the cluster or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would try a completely different approach:&lt;/P&gt;&lt;P&gt;Find an Index (BSIS, BSAS, BKPF etc... ) to narrow down your extract from BSEG and give you the primary key for the BSEG records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Retrieve all the information on the BSEG records (and I mean the full BSEG record because if the table is still clustered it will be faster) into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete the records you don't need from the internal table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Nov 2006 14:03:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717962#M313665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-12T14:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717963#M313666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want change  in program  and see whether I can do some thing to improve perfromance of my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically some body wrote this  program and initially it is SELECTING from bkpf table  into internal table and then looping through that internal table and each time it is selecting from BSEG . and then from BSET.&lt;/P&gt;&lt;P&gt;How can I compare my performance of my program WITH and WITH OUT my changes...&lt;/P&gt;&lt;P&gt;my program i&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 18:49:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717963#M313666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T18:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717964#M313667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I asked earlier if this select was in a loop and you said no. Since this SELECT doesn't look so bad, how do you know it's not in a different SELECT. Particularly the one on BKPF. could you post that portion of the code please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the performance trace (ST05) to look at the results with and without your changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 19:08:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717964#M313667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T19:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717965#M313668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT BUKRS BELNR GJAHR BLART BLDAT BUDAT XBLNR HWAER&lt;/P&gt;&lt;P&gt;         FROM  BKPF INTO TABLE &amp;lt;b&amp;gt;TBKPF&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;         WHERE BUKRS IN COMPCODE&lt;/P&gt;&lt;P&gt;        AND    BSTAT NE 'M'&lt;/P&gt;&lt;P&gt;        AND    BSTAT NE 'D'&lt;/P&gt;&lt;P&gt;        AND    BUDAT IN POSTDATE   "shifted  position&lt;/P&gt;&lt;P&gt;        AND    BLART IN R_BLART                                    "5205&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       AND  ( BLART EQ 'KG' OR                                   "17969&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              BLART EQ 'KR' OR                                   "17969&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              BLART EQ 'RE' )                                    "17969&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;               %_HINTS ORACLE 'INDEX (BKPF  BKPF______Z1)'. "17969&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              order by primary key.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;b&amp;gt;TBKPF&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;    PERFORM GET_BSEG.&lt;/P&gt;&lt;P&gt;    PERFORM GET_BSET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE VBSEG LINES TAB_LINES.&lt;/P&gt;&lt;P&gt;    CHECK TAB_LINES &amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM TOTAL-BSEG-DATA.&lt;/P&gt;&lt;P&gt;    PERFORM TOTAL-BSET-DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM FILL-TABLES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_BSEG.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Read all record that belong to the document number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH:  VBSEG, BSEG_NT, INTBSEG.&lt;/P&gt;&lt;P&gt;  CLEAR:   VBSEG, BSEG_NT.&lt;/P&gt;&lt;P&gt;  CLEAR : QTY_TOTAL, INTBSEG_TABIX.     " # 1   : Jaideep Fadia 11/26/97&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT BUKRS BELNR GJAHR BUZEI LIFNR SGTXT MWSKZ HKONT MENGE WRBTR&lt;/P&gt;&lt;P&gt;         EBELN EBELP PRCTR WERKS SHKZG ZEKKN NPLNR KOSTL PROJK MATNR&lt;/P&gt;&lt;P&gt;         AUFPL APLZL MEINS&lt;/P&gt;&lt;P&gt;         FROM BSEG&lt;/P&gt;&lt;P&gt;         INTO TABLE INTBSEG&lt;/P&gt;&lt;P&gt;         WHERE BUKRS = TBKPF-BUKRS&lt;/P&gt;&lt;P&gt;           AND BELNR = TBKPF-BELNR&lt;/P&gt;&lt;P&gt;           AND GJAHR = TBKPF-GJAHR&lt;/P&gt;&lt;P&gt;           AND MWART NE 'V'&lt;/P&gt;&lt;P&gt;           AND  TXJCD IN TXJCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE INTBSEG LINES NO_OF_INTBSEG_LINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT INTBSEG.&lt;/P&gt;&lt;P&gt;    INTBSEG_TABIX = SY-TABIX.         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CMS 17969  If quantity is 0, default it to 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF INTBSEG-MENGE = 0.                                 &lt;/P&gt;&lt;P&gt;      INTBSEG-MENGE = 1.                                  &lt;/P&gt;&lt;P&gt;      MODIFY INTBSEG INDEX SY-TABIX.                    &lt;/P&gt;&lt;P&gt;    ENDIF.                                                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF NOT INTBSEG-LIFNR IS INITIAL.&lt;/P&gt;&lt;P&gt;      MOVE: INTBSEG-LIFNR TO TBKPF-LIFNR,&lt;/P&gt;&lt;P&gt;            INTBSEG-SGTXT TO TBKPF-TEXT.&lt;/P&gt;&lt;P&gt;      MODIFY TBKPF.&lt;/P&gt;&lt;P&gt;    ELSEIF INTBSEG-MWSKZ = SPACE AND BSEG-HKONT = '0074400010'.&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING INTBSEG TO BSEG_NT.&lt;/P&gt;&lt;P&gt;      APPEND   BSEG_NT.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    RE &amp;amp; 0021300011             &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IF TBKPF-BLART = TEXT-TYP AND INTBSEG-HKONT = TEXT-GL1.&lt;/P&gt;&lt;P&gt;        QTY_TOTAL = QTY_TOTAL + INTBSEG-MENGE.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                             &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CHECK  INTBSEG-MWSKZ IN TAXCODE AND INTBSEG-WRBTR NE 0."11/26&lt;/P&gt;&lt;P&gt;*avoid duplicate DB access  AH 8/97.&lt;/P&gt;&lt;P&gt;      IF NOT INTBSEG-EBELN IS INITIAL AND&lt;/P&gt;&lt;P&gt;         NOT INTBSEG-EBELP IS INITIAL.&lt;/P&gt;&lt;P&gt;        IF INTBSEG-EBELN NE EKPOTMP-EBELN AND         " next record&lt;/P&gt;&lt;P&gt;           INTBSEG-EBELP NE EKPOTMP-EBELP.&lt;/P&gt;&lt;P&gt;          READ TABLE EKPOTMP WITH KEY EBELN = INTBSEG-EBELN&lt;/P&gt;&lt;P&gt;                                      EBELP = INTBSEG-EBELP&lt;/P&gt;&lt;P&gt;                                      BINARY SEARCH.&lt;/P&gt;&lt;P&gt;          IF SY-SUBRC NE 0.          " record found&lt;/P&gt;&lt;P&gt;            EKPOTMP-EBELN = INTBSEG-EBELN.&lt;/P&gt;&lt;P&gt;            EKPOTMP-EBELP = INTBSEG-EBELP.&lt;/P&gt;&lt;P&gt;            CLEAR EKPO.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE WERKS INTO EKPOTMP-WERKS&lt;/P&gt;&lt;P&gt;                   FROM EKPO WHERE EBELN = INTBSEG-EBELN AND&lt;/P&gt;&lt;P&gt;                                   EBELP = INTBSEG-EBELP.&lt;/P&gt;&lt;P&gt;            IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;              CLEAR EKPOTMP-WERKS.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;            INSERT EKPOTMP INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;          ENDIF.                      " record found&lt;/P&gt;&lt;P&gt;        ENDIF.                         " next record&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      IF NOT INTBSEG-PRCTR IS INITIAL.&lt;/P&gt;&lt;P&gt;        CHECK INTBSEG-PRCTR IN PRCENTER.&lt;/P&gt;&lt;P&gt;      ELSEIF NOT INTBSEG-WERKS IS INITIAL.&lt;/P&gt;&lt;P&gt;        IF INTBSEG-WERKS CO '0123456789'.&lt;/P&gt;&lt;P&gt;          UNPACK INTBSEG-WERKS TO INTBSEG-PRCTR.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          MOVE INTBSEG-WERKS TO INTBSEG-PRCTR.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        CHECK INTBSEG-PRCTR IN PRCENTER.&lt;/P&gt;&lt;P&gt;      ELSEIF NOT EKPOTMP-WERKS IS INITIAL.&lt;/P&gt;&lt;P&gt;        IF EKPOTMP-WERKS CO '0123456789'.&lt;/P&gt;&lt;P&gt;          UNPACK EKPOTMP-WERKS TO INTBSEG-PRCTR.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          MOVE EKPOTMP-WERKS TO INTBSEG-PRCTR.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        CHECK INTBSEG-PRCTR IN PRCENTER.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLEAR VBSEG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF INTBSEG-SHKZG  = 'H'.&lt;/P&gt;&lt;P&gt;        INTBSEG-WRBTR = INTBSEG-WRBTR * -1.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF INTBSEG-BUZEI EQ NO_OF_INTBSEG_LINES. &lt;/P&gt;&lt;P&gt;        VBSEG-QTY_TOTAL = QTY_TOTAL.&lt;/P&gt;&lt;P&gt;      ENDIF.                                  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING INTBSEG TO VBSEG.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   modify intbseg index sy-tabix.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      MODIFY INTBSEG INDEX INTBSEG_TABIX." # 2  &lt;/P&gt;&lt;P&gt;      APPEND  VBSEG.  "apped vbseg original.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endselect.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "GET_BSEG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 20:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717965#M313668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T20:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717966#M313669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your problem is here:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT bukrs belnr gjahr blart bldat budat xblnr hwaer
  FROM bkpf INTO TABLE tbkpf
  WHERE bukrs IN compcode
    AND bstat NE 'M'
    AND bstat NE 'D'
    AND budat IN postdate "shifted position
    AND blart IN r_blart                                        "5205
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Make sure compcode is not empty and only tests for equality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than specifying BSTAT NE ...&lt;/P&gt;&lt;P&gt;Specify BSTAT EQ (all the other possibilities).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/rob.burbank/blog/2006/09/13/using-an-index-when-you-dont-have-all-of-the-fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 20:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717966#M313669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T20:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717967#M313670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem is it is timing out at BSEG select .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 20:46:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717967#M313670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T20:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717968#M313671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I understand that, but it may be tha the program spent so much time on the BKPF select, it ran out of time on BSEG. So long as you looked at the issues I pointed out earlier, the BSEG SELECT looks OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you run the performance trace on this code? It should tell you where the problem is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 21:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717968#M313671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T21:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717969#M313672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in st05, shall I run performance race.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;i will take .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 21:20:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue/m-p/1717969#M313672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T21:20:56Z</dc:date>
    </item>
  </channel>
</rss>

