<?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: please explain me the code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636146#M606503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are selecting lifnr, matnr, kbetr from the database table zitab into the internal table t_data based on the lifnr given in the selection scree. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are intialising the values of r_matnr-sign, r_matnr, option, r_matnr-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you are selecting mblnr, matnr, menge for all entries in lt_data into data_menge depending on the values of mblnr in the internal table lt_data and the values of matnr in r_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if u giv the entire code explanation can be more specific.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*&lt;STRONG&gt;reward for useful answers&lt;/STRONG&gt;*&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jul 2007 17:08:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-24T17:08:44Z</dc:date>
    <item>
      <title>please explain me the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636144#M606501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT lifnr&lt;/P&gt;&lt;P&gt;         matnr&lt;/P&gt;&lt;P&gt;         kbetr&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE t_data&lt;/P&gt;&lt;P&gt;    FROM zitdata&lt;/P&gt;&lt;P&gt;   WHERE lifnr = p_lifnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  LOOP AT t_data .&lt;/P&gt;&lt;P&gt;    r_matnr-sign   = 'I' .&lt;/P&gt;&lt;P&gt;    r_matnr-option = 'EQ' .&lt;/P&gt;&lt;P&gt;    r_matnr-low    = t_data-matnr .&lt;/P&gt;&lt;P&gt;    APPEND r_matnr .&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mblnr&lt;/P&gt;&lt;P&gt;         matnr&lt;/P&gt;&lt;P&gt;         menge&lt;/P&gt;&lt;P&gt;    INTO TABLE data_menge&lt;/P&gt;&lt;P&gt;    FROM mseg&lt;/P&gt;&lt;P&gt;     FOR ALL ENTRIES IN lt_data&lt;/P&gt;&lt;P&gt;   WHERE mblnr = lt_data-mblnr&lt;/P&gt;&lt;P&gt;     AND matnr IN r_matnr&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 17:00:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636144#M606501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-24T17:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: please explain me the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636145#M606502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically you are getting material document line items from MSEG for all materials that are listed for a particular vendor in your custom table ZITDATA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 17:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636145#M606502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-24T17:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: please explain me the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636146#M606503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are selecting lifnr, matnr, kbetr from the database table zitab into the internal table t_data based on the lifnr given in the selection scree. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are intialising the values of r_matnr-sign, r_matnr, option, r_matnr-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you are selecting mblnr, matnr, menge for all entries in lt_data into data_menge depending on the values of mblnr in the internal table lt_data and the values of matnr in r_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if u giv the entire code explanation can be more specific.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*&lt;STRONG&gt;reward for useful answers&lt;/STRONG&gt;*&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 17:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636146#M606503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-24T17:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: please explain me the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636147#M606504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Srinivas for ur reply , please tell me the use of ranges in this . if u want i can send u the entire code to ur mail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 17:15:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636147#M606504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-24T17:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: please explain me the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636148#M606505</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;All Material code selected from table zitdata is alocate in Range r_matnr. Thus, we can control value interval. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exemple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select material code equal 100. &lt;/P&gt;&lt;P&gt;r_matnr-sign = 'I' .&lt;/P&gt;&lt;P&gt;r_matnr-option = 'EQ' . &lt;/P&gt;&lt;P&gt;r_matnr-low = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select material code betwen 200 and 300. &lt;/P&gt;&lt;P&gt;r_matnr-sign = 'I' .&lt;/P&gt;&lt;P&gt;r_matnr-option = 'BT' . &lt;/P&gt;&lt;P&gt;r_matnr-low = 200.&lt;/P&gt;&lt;P&gt;r_matnr-hight = 300.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select material code less them 010. &lt;/P&gt;&lt;P&gt;r_matnr-sign = 'I' .&lt;/P&gt;&lt;P&gt;r_matnr-option = 'LT' . &lt;/P&gt;&lt;P&gt;r_matnr-low = 010.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 17:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636148#M606505</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-07-24T17:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: please explain me the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636149#M606506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first the data fetch is made into an itab.&lt;/P&gt;&lt;P&gt;then the matnr from that itab is stored into ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use this ranges in any select queries with in statement where ever u need to fetch data based on that matnr.&lt;/P&gt;&lt;P&gt;this avoids looping at t_data and passing each matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the second select it will only take the mblnr for the matnr in the ranges and the occurence of mblnr in lt_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this wiil improve the performance while fetching data from mseg because its a huge table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 03:28:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636149#M606506</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2007-07-25T03:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: please explain me the code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636150#M606507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can declare ranges in two three ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ranges: r_matnr for marc-matnr,&lt;/P&gt;&lt;P&gt;            r_dat for mkpf-budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_matnr-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_matnr-sign = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_dat-option = 'BT',&lt;/P&gt;&lt;P&gt;r_dat-sign = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while appending data to r_dat.u can appen it to low and high and specify "in" in select statements......it will take all the values between low and high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;earlier one is as the same...hope so u got the difference&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 03:31:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-explain-me-the-code/m-p/2636150#M606507</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2007-07-25T03:31:49Z</dc:date>
    </item>
  </channel>
</rss>

