<?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 Code optimization - Urgent in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164114#M752663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have called the function module - 'CS_BOM_EXPL_MAT_V2' with respective parameters. Following the function call, i have written these lines, to display each material &amp;amp; the corresponding field from MARC. There is no syntax error, but the execution of this query takes a very long time, i had to terminate the execution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May i know what could be the reason for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;  LOOP AT IL_STBX INTO HL_STBX.&lt;/P&gt;&lt;P&gt;  WL_MATNR = HL_STBX-IDNRK.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE WEBAZ FROM MARC INTO WL_WEBAZ&lt;/P&gt;&lt;P&gt;      WHERE MATNR EQ HL_STBX-IDNRK.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; I have declared the DATA as mentioned below.&lt;/P&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;     IL_STBX        TYPE TABLE OF STPOX,&lt;/P&gt;&lt;P&gt;     HL_STBX      TYPE STPOX.&lt;/P&gt;&lt;P&gt;REFRESH :&lt;/P&gt;&lt;P&gt;     IL_STBX[].&lt;/P&gt;&lt;P&gt;CLEAR&lt;/P&gt;&lt;P&gt;     HL_STBX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Await your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Dec 2007 05:19:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-25T05:19:25Z</dc:date>
    <item>
      <title>Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164114#M752663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have called the function module - 'CS_BOM_EXPL_MAT_V2' with respective parameters. Following the function call, i have written these lines, to display each material &amp;amp; the corresponding field from MARC. There is no syntax error, but the execution of this query takes a very long time, i had to terminate the execution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May i know what could be the reason for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;  LOOP AT IL_STBX INTO HL_STBX.&lt;/P&gt;&lt;P&gt;  WL_MATNR = HL_STBX-IDNRK.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE WEBAZ FROM MARC INTO WL_WEBAZ&lt;/P&gt;&lt;P&gt;      WHERE MATNR EQ HL_STBX-IDNRK.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; I have declared the DATA as mentioned below.&lt;/P&gt;&lt;P&gt;DATA :&lt;/P&gt;&lt;P&gt;     IL_STBX        TYPE TABLE OF STPOX,&lt;/P&gt;&lt;P&gt;     HL_STBX      TYPE STPOX.&lt;/P&gt;&lt;P&gt;REFRESH :&lt;/P&gt;&lt;P&gt;     IL_STBX[].&lt;/P&gt;&lt;P&gt;CLEAR&lt;/P&gt;&lt;P&gt;     HL_STBX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Await your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 05:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164114#M752663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-25T05:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164115#M752664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why dont u select the relavent data from MARC into another table and read it in loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or    say for all entires in&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 05:27:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164115#M752664</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-25T05:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164116#M752665</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 am not quite clear of your inputs, can you please write down the code, so i can try to understand the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 05:32:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164116#M752665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-25T05:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164117#M752666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select matnr webaz from marc &lt;/P&gt;&lt;P&gt;   into table it_marc &lt;/P&gt;&lt;P&gt;   for all entires in IL_STBX&lt;/P&gt;&lt;P&gt; where matnr =  HL_STBX-IDNRK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IL_STBX INTO HL_STBX.&lt;/P&gt;&lt;P&gt;WL_MATNR = HL_STBX-IDNRK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; read table it_marc where matnr&lt;/P&gt;&lt;P&gt;    if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;ur moves &amp;lt;&amp;lt;&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;award points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 05:37:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164117#M752666</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-25T05:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164118#M752667</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;The system prompts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'The formal argument "MATNR" occurs twice.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am not able to figure out why&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 05:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164118#M752667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-25T05:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164119#M752668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the spellings and decelerations of tables and in select satament too....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 05:47:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164119#M752668</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-25T05:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164120#M752669</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 believe i have made a fundamental error &amp;amp; that is the reason the program is going on a infinite loop. I just checked with the debugger, the program enters the 'Record Processing' section, reads the function module explodes the BOM, reads info from MARC table, upto this point it is ok. But what is happening is, the execution of the program does not stop after reading the BOM once, it keeps re-reading the BOM &amp;amp; that is why it is on an infinite loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you let me know how i can limit the execution of this program to read the BOM only once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i was able to put across the problem. Await your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 06:18:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164120#M752669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-25T06:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164121#M752670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if ur output is a table use a read statement rather than loop... ( i am not sure what ur output is from the FM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you have couple of other methods using sy-tabix, index...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab&lt;/P&gt;&lt;P&gt;     if sy-index / sy-tabix GE 2.&lt;/P&gt;&lt;P&gt;     exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 06:34:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164121#M752670</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-25T06:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Code optimization - Urgent</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164122#M752671</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 help me with the READ &amp;amp; Write statement? As i am not sure how to use these statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table is IL_STBX &amp;amp; i need to read IDNRK &amp;amp; OJTXP fields in this &amp;amp; for each IDNRK i want to read MARC-WEBAZ &amp;amp; MARC-PLIFZ parameters &amp;amp; so i am not sure how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Sample output for your ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDNRK | WEBAZ | PLIFZ&lt;/P&gt;&lt;P&gt;Mtl123 |   2          | 23&lt;/P&gt;&lt;P&gt;Mtl124 |   5          | 12&lt;/P&gt;&lt;P&gt;&amp;amp; so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vivek on Dec 26, 2007 5:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2007 06:44:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-optimization-urgent/m-p/3164122#M752671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-25T06:44:50Z</dc:date>
    </item>
  </channel>
</rss>

