<?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 problem in code for MARD data in SAP Retail in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658765#M1096132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Solution I think, other then I have to run report for small stores variant, not for bulk run.&lt;/P&gt;&lt;P&gt;I still appreciate if any other solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Oct 2008 17:00:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-23T17:00:52Z</dc:date>
    <item>
      <title>performance problem in code for MARD data in SAP Retail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658761#M1096128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I am getting performance problem in following code.&lt;/P&gt;&lt;P&gt;Can any one guide how to improve the performance problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT werks matnr lgort labst FROM mard INTO TABLE gt_mardstk&lt;/P&gt;&lt;P&gt;                                    WHERE labst GT u20190u2019.&lt;/P&gt;&lt;P&gt;    LOOP AT gt_mardstk .&lt;/P&gt;&lt;P&gt;      gt_transfer-matnr = gt_mardstk-matnr .&lt;/P&gt;&lt;P&gt;      gt_transfer-werks = gt_mardstk-werks .&lt;/P&gt;&lt;P&gt;      gt_transfer-labst = gt_mardstk-labst .&lt;/P&gt;&lt;P&gt;      SHIFT gt_transfer-labst RIGHT UP TO '.'.&lt;/P&gt;&lt;P&gt;      SHIFT gt_transfer-labst RIGHT.&lt;/P&gt;&lt;P&gt;      SHIFT gt_transfer-labst LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;      APPEND gt_transfer .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      DELETE gt_mardstk WHERE matnr = gt_transfer-matnr&lt;/P&gt;&lt;P&gt;                          AND werks = gt_transfer-werks&lt;/P&gt;&lt;P&gt;                          AND labst = gt_transfer-labst.&lt;/P&gt;&lt;P&gt;      CLEAR gt_transfer .&lt;/P&gt;&lt;P&gt;    ENDLOOP .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE gt_transfer LINES lv_cnt .&lt;/P&gt;&lt;P&gt;    IF lv_cnt &amp;gt; 0 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      PERFORM open_file USING p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT gt_transfer .&lt;/P&gt;&lt;P&gt;        CONDENSE gt_transfer-labst.&lt;/P&gt;&lt;P&gt;        MOVE-CORRESPONDING gt_transfer TO ls_transfer .&lt;/P&gt;&lt;P&gt;        MOVE ls_transfer TO lv_string.&lt;/P&gt;&lt;P&gt;        TRANSFER lv_string TO p_file .&lt;/P&gt;&lt;P&gt;      ENDLOOP .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CLOSE DATASET p_file&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, 22 Oct 2008 22:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658761#M1096128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T22:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem in code for MARD data in SAP Retail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658762#M1096129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check Code Inspector and SE30 yourself to figure out potential issues yourself?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 22:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658762#M1096129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T22:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem in code for MARD data in SAP Retail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658763#M1096130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SE30&lt;/P&gt;&lt;P&gt;Evaluate option saying:&lt;/P&gt;&lt;P&gt;ABAP 55.1%&lt;/P&gt;&lt;P&gt;Database 10%&lt;/P&gt;&lt;P&gt;System 34.9%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see any kind of program improvement possibility?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program is taking more then 10 Hr run and still running,&lt;/P&gt;&lt;P&gt;But total records selected from MARD is 600000.&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, 22 Oct 2008 22:46:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658763#M1096130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T22:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem in code for MARD data in SAP Retail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658764#M1096131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are you specifying where condition in trhe Delete command below, it is already in the same loop , so just put delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT gt_mardstk .
gt_transfer-matnr = gt_mardstk-matnr .
gt_transfer-werks = gt_mardstk-werks .
gt_transfer-labst = gt_mardstk-labst .
SHIFT gt_transfer-labst RIGHT UP TO '.'.
SHIFT gt_transfer-labst RIGHT.
SHIFT gt_transfer-labst LEFT DELETING LEADING space.
APPEND gt_transfer .


DELETE gt_mardstk WHERE matnr = gt_transfer-matnr    &amp;lt;-------------------
AND werks = gt_transfer-werks     &amp;lt;-----------------
AND labst = gt_transfer-labst.       &amp;lt;--------------
CLEAR gt_transfer .
ENDLOOP .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 23:10:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658764#M1096131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T23:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem in code for MARD data in SAP Retail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658765#M1096132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Solution I think, other then I have to run report for small stores variant, not for bulk run.&lt;/P&gt;&lt;P&gt;I still appreciate if any other solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2008 17:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658765#M1096132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-23T17:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem in code for MARD data in SAP Retail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658766#M1096133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you see the post by MxG? I think that's where your 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>Thu, 23 Oct 2008 17:28:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658766#M1096133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-23T17:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem in code for MARD data in SAP Retail</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658767#M1096134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply, I just combined both loop like follows,&lt;/P&gt;&lt;P&gt;and program takes only 205 sec compared to 44359 with old code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    SELECT werks matnr lgort labst FROM mard 
                                          INTO TABLE gt_mardstk
                                                WHERE labst GT v_labst.
 

    DESCRIBE TABLE gt_mardstk LINES lv_cnt .
    IF lv_cnt &amp;gt; 0 .
      PERFORM open_file USING p_file.

      LOOP AT gt_mardstk .
        gt_transfer-matnr = gt_mardstk-matnr .
        gt_transfer-werks = gt_mardstk-werks .
        gt_transfer-labst = gt_mardstk-labst .
        SHIFT gt_transfer-labst RIGHT UP TO '.'.
        SHIFT gt_transfer-labst RIGHT.
        SHIFT gt_transfer-labst LEFT DELETING LEADING space.

        IF gt_transfer-labst NE 0.
          CONDENSE gt_transfer-labst.
          MOVE-CORRESPONDING gt_transfer TO ls_transfer .
          MOVE ls_transfer TO lv_string.
          TRANSFER lv_string TO p_file .
        ENDIF.
        CLEAR  gt_transfer .
      ENDLOOP .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 00:49:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-problem-in-code-for-mard-data-in-sap-retail/m-p/4658767#M1096134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-24T00:49:16Z</dc:date>
    </item>
  </channel>
</rss>

