<?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: performance improvance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727687#M317100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is also an index on ERDAT, so you have to make sure that &amp;lt;b&amp;gt;either&amp;lt;/b&amp;gt; s_vbeln or s_erdat is not empty; otherwise, it will be slow. If s_erdat has a large range of dates, this will slow it down as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you done a performance trace (ST05) to find out where the problem lies?&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, 20 Dec 2006 17:19:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-20T17:19:17Z</dc:date>
    <item>
      <title>performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727682#M317095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way the performance of this report can be improved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN ERDAT ERNAM AUART NETWR FROM VBAK INTO TABLE ITAB WHERE&lt;/P&gt;&lt;P&gt;VBELN IN S_VBELN AND ERDAT IN S_ERDAT AND ERNAM IN USERID AND ERNAM NE 'BATCHSCHED' AND AUART IN AUART AND VKORG IN S_VKORG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;INPUT = ITAB-VBELNS&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;OUTPUT = ITAB-VBELNS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM CDHDR&lt;/P&gt;&lt;P&gt;  INTO TABLE T_CDHDR&lt;/P&gt;&lt;P&gt;    WHERE OBJECTCLAS = 'VERKBELEG'&lt;/P&gt;&lt;P&gt;      AND OBJECTID = ITAB-VBELNS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT T_CDHDR[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM CDPOS&lt;/P&gt;&lt;P&gt;  INTO TABLE T_CDPOS&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN T_CDHDR&lt;/P&gt;&lt;P&gt;      WHERE OBJECTCLAS = T_CDHDR-OBJECTCLAS&lt;/P&gt;&lt;P&gt;        AND OBJECTID = T_CDHDR-OBJECTID&lt;/P&gt;&lt;P&gt;        AND CHANGENR = T_CDHDR-CHANGENR&lt;/P&gt;&lt;P&gt;        AND TABNAME = 'VBAK'&lt;/P&gt;&lt;P&gt;        AND FNAME = 'FAKSK'&lt;/P&gt;&lt;P&gt;        AND CHNGIND = 'U'&lt;/P&gt;&lt;P&gt;        AND VALUE_NEW = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    READ TABLE T_CDPOS INDEX 1.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;        READ TABLE T_CDHDR WITH KEY CHANGENR = T_CDPOS-CHANGENR.&lt;/P&gt;&lt;P&gt;        IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;             MOVE ITAB TO ITAB2.&lt;/P&gt;&lt;P&gt;             ITAB2-ERNAMB = T_CDHDR-USERNAME.&lt;/P&gt;&lt;P&gt;             ITAB2-ERDATB = T_CDHDR-UDATE.&lt;/P&gt;&lt;P&gt;             APPEND ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             ZINDEX = SY-TABIX.&lt;/P&gt;&lt;P&gt;             SELECT NAME_FIRST NAME_LAST INTO (ITAB2-FIRSTNAMES,&lt;/P&gt;&lt;P&gt;             ITAB2-LASTNAMES) FROM USER_ADDR WHERE BNAME = ITAB2-ERNAMS.&lt;/P&gt;&lt;P&gt;             MODIFY ITAB2 INDEX ZINDEX.&lt;/P&gt;&lt;P&gt;             ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             SELECT NAME_FIRST NAME_LAST INTO (ITAB2-FIRSTNAMEB,&lt;/P&gt;&lt;P&gt;             ITAB2-LASTNAMEB) FROM USER_ADDR WHERE BNAME = ITAB2-ERNAMB.&lt;/P&gt;&lt;P&gt;             MODIFY ITAB2 INDEX ZINDEX.&lt;/P&gt;&lt;P&gt;             ENDSELECT.&lt;/P&gt;&lt;P&gt;         ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&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;SORT ITAB2 BY VBELNS .&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING ALL FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF MATCHING = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if the check box is checked retreive records where person&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;who created the order and the person who released it for billing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;are same , selected all the records otherwise&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT ITAB2 .&lt;/P&gt;&lt;P&gt;   IF ITAB2-ERNAMS = ITAB2-ERNAMB.&lt;/P&gt;&lt;P&gt;     MOVE ITAB2 TO ITAB1.&lt;/P&gt;&lt;P&gt;     APPEND ITAB1.&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;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE ITAB2[] TO ITAB1[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 17:01:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727682#M317095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T17:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727683#M317096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Deepti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of selecting data from CDPOS you can use the FM&lt;/P&gt;&lt;P&gt;CHANGEDOCUMENT_READ_POSITIONS&lt;/P&gt;&lt;P&gt;CHANGEDOCUMENT_READ_HEADERS - CDHDR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will definetly improve the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 17:05:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727683#M317096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T17:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727684#M317097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;within LOOP ur using CDHDR &amp;amp; CDPOS which will take lot of time...May be try to use CDHDR &amp;amp; CDPOS outside LOOP &amp;amp; use read statements within LOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 17:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727684#M317097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T17:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727685#M317098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first thing to do is to make sure s_vbeln is not empty before doing the select on VBAK.&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, 20 Dec 2006 17:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727685#M317098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T17:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727686#M317099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how do we change the select statement if s_vbeln is empty .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 17:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727686#M317099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T17:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727687#M317100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is also an index on ERDAT, so you have to make sure that &amp;lt;b&amp;gt;either&amp;lt;/b&amp;gt; s_vbeln or s_erdat is not empty; otherwise, it will be slow. If s_erdat has a large range of dates, this will slow it down as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you done a performance trace (ST05) to find out where the problem lies?&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, 20 Dec 2006 17:19:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727687#M317100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T17:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727688#M317101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I donno how to use st05 exactly .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 18:04:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727688#M317101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T18:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727689#M317102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create two sessions. In the first one, prepare to run your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the other session, go to transaction ST05 and press the "activate trace" button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go back to the first session and run the program. When the program completes, go back to the ST05 session an press "deactivate trace". and then "display trace". The list will display the time for each select statement. Particulary long running ones are highlighted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find it useful to set breakpoints in the code just before and after the code that I am interested in. Then in ST05, I turn the trace on after I reach the first breakpoint and turn it off at the second one. It reduces the size of the list.&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, 20 Dec 2006 18:44:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727689#M317102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T18:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727690#M317103</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;Check the modified code...I moved the SQL to outside the loop..Changes are marked in bold..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN ERDAT ERNAM AUART NETWR FROM VBAK INTO TABLE ITAB WHERE&lt;/P&gt;&lt;P&gt;VBELN IN S_VBELN AND ERDAT IN S_ERDAT AND ERNAM IN USERID AND ERNAM NE 'BATCHSCHED' AND AUART IN AUART AND VKORG IN S_VKORG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_CDHDR LIKE CDHDR OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: T_CDPOS LIKE CDPOS OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;DATA: BEGIN OF T_OBJECTID OCCURS 0,&lt;/P&gt;&lt;P&gt;        OBJECTID LIKE CDHDR-OBJECTID,&lt;/P&gt;&lt;P&gt;      END OF T_OBJECTID.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;* Get the objectid which is required for FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;INPUT = ITAB-VBELNS&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;OUTPUT = ITAB-VBELNS.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE ITAB-VBELNS TO T_OBJECTID-OBJECTID.&lt;/P&gt;&lt;P&gt;APPEND T_OBJECTID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;* Sort and remove the duplicates.&lt;/P&gt;&lt;P&gt;SORT T_OBJECTID BY OBJECTID.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM T_OBJECTID COMPARING OBJECTID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the CDHDR.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF NOT T_OBJECTID[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT * FROM CDHDR&lt;/P&gt;&lt;P&gt;  INTO TABLE T_CDHDR&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN T_OBJECTID&lt;/P&gt;&lt;P&gt;  WHERE OBJECTCLAS = 'VERKBELEG'&lt;/P&gt;&lt;P&gt;  AND OBJECTID = T_OBJECTID-OBJECTID.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT T_CDHDR[] IS INITIAL.&lt;/P&gt;&lt;P&gt; SELECT * FROM CDPOS&lt;/P&gt;&lt;P&gt; INTO TABLE T_CDPOS&lt;/P&gt;&lt;P&gt; FOR ALL ENTRIES IN T_CDHDR&lt;/P&gt;&lt;P&gt; WHERE OBJECTCLAS = T_CDHDR-OBJECTCLAS&lt;/P&gt;&lt;P&gt; AND OBJECTID = T_CDHDR-OBJECTID&lt;/P&gt;&lt;P&gt; AND CHANGENR = T_CDHDR-CHANGENR&lt;/P&gt;&lt;P&gt; AND TABNAME = 'VBAK'&lt;/P&gt;&lt;P&gt; AND FNAME = 'FAKSK'&lt;/P&gt;&lt;P&gt; AND CHNGIND = 'U'&lt;/P&gt;&lt;P&gt; AND VALUE_NEW = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_CDHDR_TMP LIKE CDHDR OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: T_CDPOS_TMP LIKE CDPOS OCCURS 0 WITH HEADER LINE.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;INPUT = ITAB-VBELNS&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;OUTPUT = ITAB-VBELNS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;REFRESH: T_CDHDR_TMP,&lt;/P&gt;&lt;P&gt;         T_CDPOS_TMP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;LOOP AT T_CDHDR WHERE OBJECTID = ITAB-VBELNS.&lt;/P&gt;&lt;P&gt;  APPEND T_CDHDR TO T_CDHDR_TMP.&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;IF NOT T_CDHDR_TMP[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_CDHDR_TMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_CDPOS WHERE OBJECTCLAS = T_CDHDR_TMP-OBJECTCLAS&lt;/P&gt;&lt;P&gt;        AND OBJECTID = T_CDHDR_TMP-OBJECTID&lt;/P&gt;&lt;P&gt;        AND CHANGENR = T_CDHDR_TMP-CHANGENR&lt;/P&gt;&lt;P&gt;        AND TABNAME = 'VBAK'&lt;/P&gt;&lt;P&gt;        AND FNAME = 'FAKSK'&lt;/P&gt;&lt;P&gt;        AND CHNGIND = 'U'&lt;/P&gt;&lt;P&gt;        AND VALUE_NEW = SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE T_CDPOS TO T_CDPOS_TMP.&lt;/P&gt;&lt;P&gt;  APPEND T_CDPOS_TMP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;READ TABLE T_CDPOS_TMP INDEX 1.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;READ TABLE T_CDHDR_TMP WITH KEY CHANGENR = T_CDPOS-CHANGENR.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;MOVE ITAB TO ITAB2.&lt;/P&gt;&lt;P&gt;ITAB2-ERNAMB = T_CDHDR-USERNAME.&lt;/P&gt;&lt;P&gt;ITAB2-ERDATB = T_CDHDR-UDATE.&lt;/P&gt;&lt;P&gt;APPEND ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZINDEX = SY-TABIX.&lt;/P&gt;&lt;P&gt;SELECT NAME_FIRST NAME_LAST INTO (ITAB2-FIRSTNAMES,&lt;/P&gt;&lt;P&gt;ITAB2-LASTNAMES) FROM USER_ADDR WHERE BNAME = ITAB2-ERNAMS.&lt;/P&gt;&lt;P&gt;MODIFY ITAB2 INDEX ZINDEX.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT NAME_FIRST NAME_LAST INTO (ITAB2-FIRSTNAMEB,&lt;/P&gt;&lt;P&gt;ITAB2-LASTNAMEB) FROM USER_ADDR WHERE BNAME = ITAB2-ERNAMB.&lt;/P&gt;&lt;P&gt;MODIFY ITAB2 INDEX ZINDEX.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&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;SORT ITAB2 BY VBELNS .&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING ALL FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF MATCHING = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if the check box is checked retreive records where person&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;who created the order and the person who released it for billing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;are same , selected all the records otherwise&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB2 .&lt;/P&gt;&lt;P&gt;IF ITAB2-ERNAMS = ITAB2-ERNAMB.&lt;/P&gt;&lt;P&gt;MOVE ITAB2 TO ITAB1.&lt;/P&gt;&lt;P&gt;APPEND ITAB1.&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;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE ITAB2[] TO ITAB1[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Wed, 20 Dec 2006 19:10:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727690#M317103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T19:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: performance improvance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727691#M317104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deepthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the modified code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbeln&lt;/P&gt;&lt;P&gt;       erdat&lt;/P&gt;&lt;P&gt;       ernam&lt;/P&gt;&lt;P&gt;       auart&lt;/P&gt;&lt;P&gt;       netwr&lt;/P&gt;&lt;P&gt;  FROM vbak&lt;/P&gt;&lt;P&gt;  INTO TABLE itab&lt;/P&gt;&lt;P&gt; WHERE vbeln IN s_vbeln&lt;/P&gt;&lt;P&gt;   AND erdat IN e_erdat&lt;/P&gt;&lt;P&gt;   AND ernam IN userid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  AND ERNAM NE 'BATCHSCHED'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   AND auart IN auart&lt;/P&gt;&lt;P&gt;   AND vkorg IN s_vkorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE itab WHERE ernam = 'BATCHSCHED'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT itab[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM cdhdr&lt;/P&gt;&lt;P&gt;           INTO TABLE t_cdhdr&lt;/P&gt;&lt;P&gt;           FOR ALL ENTRIES IN itab&lt;/P&gt;&lt;P&gt;          WHERE objectclas = 'VERKBELEG'&lt;/P&gt;&lt;P&gt;            AND objectid   = itab-vbelns.&lt;/P&gt;&lt;P&gt;  SORT t_cdhdr BY objectid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT t_cdhdr[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    SELECT * FROM cdpos&lt;/P&gt;&lt;P&gt;            INTO TABLE t_cdpos&lt;/P&gt;&lt;P&gt;            FOR ALL ENTRIES IN t_cdhdr&lt;/P&gt;&lt;P&gt;           WHERE objectclas = t_cdhdr-objectclas&lt;/P&gt;&lt;P&gt;             AND objectid   = t_cdhdr-objectid&lt;/P&gt;&lt;P&gt;             AND changenr   = t_cdhdr-changenr&lt;/P&gt;&lt;P&gt;             AND tabname    = 'VBAK'&lt;/P&gt;&lt;P&gt;             AND fname      = 'FAKSK'&lt;/P&gt;&lt;P&gt;             AND chngind    = 'U'&lt;/P&gt;&lt;P&gt;             AND value_new  = space.&lt;/P&gt;&lt;P&gt;    SORT t_cdpos BY objectclas objectid changenr.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;fs_itab&amp;gt; LIKE LINE OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab ASSIGNING &amp;lt;fs_itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE t_cdhdr WITH KEY objectid = &amp;lt;fs_itab&amp;gt;-vbelns&lt;/P&gt;&lt;P&gt;                              BINARY SEARCH.&lt;/P&gt;&lt;P&gt;  IF sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE t_cdpos WITH KEY objectclas = t_cdhdr-objectclas&lt;/P&gt;&lt;P&gt;                                objectid   = t_cdhdr-objectid&lt;/P&gt;&lt;P&gt;                                changenr   = t_cdhdr-changenr&lt;/P&gt;&lt;P&gt;                                BINARY SEARCH.&lt;/P&gt;&lt;P&gt;    IF sy-subrc IS INITIAL.&lt;/P&gt;&lt;P&gt;      MOVE &amp;lt;fs_itab&amp;gt; TO itab2.&lt;/P&gt;&lt;P&gt;      itab2-ernamb = t_cdhdr-username.&lt;/P&gt;&lt;P&gt;      itab2-erdatb = t_cdhdr-udate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      PERFORM get_first_last_name USING itab2-ernamb&lt;/P&gt;&lt;P&gt;                               CHANGING itab2-firstnameb&lt;/P&gt;&lt;P&gt;                                        itab2-lastnameb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      PERFORM get_first_last_name USING itab2-ernams&lt;/P&gt;&lt;P&gt;                               CHANGING itab2-firstnames&lt;/P&gt;&lt;P&gt;                                        itab2-lastnames.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND itab2.&lt;/P&gt;&lt;P&gt;      CLEAR itab2.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;sort itab2 by vbelns .&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM itab2 COMPARING ALL FIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF matching = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if the check box is checked retreive records where person&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;who created the order and the person who released it for billing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;are same , selected all the records otherwise&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT itab2 WHERE ernams = ernamb.&lt;/P&gt;&lt;P&gt;    MOVE itab2 TO itab1.&lt;/P&gt;&lt;P&gt;    APPEND itab1.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  itab1[] = itab2[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  get_first_last_name&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_ERNAM  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_FIRST_NAME  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_LAST_NAME  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_first_last_name USING    p_ernam&lt;/P&gt;&lt;P&gt;                         CHANGING p_first_name&lt;/P&gt;&lt;P&gt;                                  p_last_name.&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF lt_adrp OCCURS 0,&lt;/P&gt;&lt;P&gt;         include structure adrp.&lt;/P&gt;&lt;P&gt;  DATA:  END OF lt_adrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REOI_DATA_GET_USERDATA'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            iv_bname = p_ernam&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            cr_adrp  = lt_adrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  p_first_name = lt_adrp-name_first.&lt;/P&gt;&lt;P&gt;  p_last_name  = lt_adrp-name_last.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " get_first_last_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Subhash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Dec 2006 19:53:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-improvance/m-p/1727691#M317104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-20T19:53:05Z</dc:date>
    </item>
  </channel>
</rss>

