<?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: MARA table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952594#M392278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         can you tell the same for above query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Feb 2007 09:50:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-07T09:50:32Z</dc:date>
    <item>
      <title>MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952588#M392272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I have one issue like selection should be like this.&lt;/P&gt;&lt;P&gt;Select the materials from the MARA which have the material types: ZXXX, ZXXY.&lt;/P&gt;&lt;P&gt;	Select the materials from the MVER table and exclude the material which has the zero consumption in the past 36 months .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do i nedd to do this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 08:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952588#M392272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T08:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952589#M392273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM MARA
               into itab
               where mtart IN ( 'ZXXX', 'ZXXY' ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 08:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952589#M392273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T08:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952590#M392274</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;  what about second select statement.can any one tell me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 08:43:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952590#M392274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T08:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952591#M392275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Can you tell me solution for this.&lt;/P&gt;&lt;P&gt;Select the materials from the MVER table and exclude the material which has the zero consumption in the past 36 months .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 09:06:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952591#M392275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T09:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952592#M392276</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;U need to calculate the period to analyze:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;YEAR_TO      = SY-DATUM(4).
YEAR_FROM = SY-DATUM(4) - 3.

MONTH          = SY-DATUM+4(2).

SELECT * FROM MVER INTO TABLE T_MVER
      FOR ALL ENTRIES IN T_MARA WHERE MATNR = T_MARA-MATNR
                                                           AND ( GJAHR =&amp;gt; YEAR_FROM AND
                                                                     GJAHR &amp;lt;= YEAR_TO ).

SORT T_MVER BY MATNR GJAHR.

LOOP AT T_MVER.
  IF T_MVER-GJAHR = YEAR_FROM.
* ---&amp;gt; U should consider only value of the fields from mothes =&amp;gt;  MONTH
  ELSIF T_MVER-GJAHR = YEAR_TO.
* ---&amp;gt; U should consider only values of the fields from mothes &amp;lt;=  MONTH
  ELSE.
* ---&amp;gt; U should consider all values 
  ENDIF.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 09:08:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952592#M392276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T09:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952593#M392277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I need to exclude the materials from mver which have zero consumption in past 36 months.&lt;/P&gt;&lt;P&gt;for this what do i need to do.&lt;/P&gt;&lt;P&gt;after the loop statement you menthoned is&lt;/P&gt;&lt;P&gt;IF T_MVER-GJAHR = YEAR_FROM.&lt;/P&gt;&lt;P&gt;after this what can i do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 09:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952593#M392277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T09:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952594#M392278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         can you tell the same for above query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 09:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952594#M392278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T09:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: MARA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952595#M392279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Trying to combine the two replies . May be it will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MARA&lt;/P&gt;&lt;P&gt;               into T_MARA&lt;/P&gt;&lt;P&gt;               where mtart IN ( 'ZXXX', 'ZXXY' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Selected all materials with material type ZXXX and ZYYY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YEAR_TO      = SY-DATUM(4).&lt;/P&gt;&lt;P&gt;YEAR_FROM = SY-DATUM(4) - 3.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MONTH          = SY-DATUM+4(2).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT * FROM MVER INTO TABLE T_MVER&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN T_MARA WHERE MATNR = T_MARA-MATNR&lt;/P&gt;&lt;P&gt;                                                           AND ( GJAHR =&amp;gt; YEAR_FROM AND&lt;/P&gt;&lt;P&gt;                                                                     GJAHR &amp;lt;= YEAR_TO ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*selected  all material consumptions of type ZXXX and ZYYY in the last 3 years.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT T_MVER BY MATNR GJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I am not sure how will you get the month of consumption from MVER to implement max logic below.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;But basically in the loop of T_MVER you need to check if all the consmption fields are ZERO &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;for a material over the last 3 years then put it in an internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT T_MVER.&lt;/P&gt;&lt;P&gt;  IF T_MVER-GJAHR = YEAR_FROM.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;---&amp;gt; U should consider only value of the fields from mothes =&amp;gt;  MONTH&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ELSIF T_MVER-GJAHR = YEAR_TO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;---&amp;gt; U should consider only values of the fields from mothes &amp;lt;=  MONTH&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;---&amp;gt; U should consider all values &lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;*So my loop would look like&lt;/P&gt;&lt;P&gt;LOOP AT T_MVER INTO LS_MVER.&lt;/P&gt;&lt;P&gt; AT NEW MATNR.&lt;/P&gt;&lt;P&gt;  CLEAR L_CONSUMPTION_ZERO.&lt;/P&gt;&lt;P&gt; END AT.&lt;/P&gt;&lt;P&gt; IF NOT LS_MVER-GSV01 is INTIAL AND &lt;/P&gt;&lt;P&gt;        LS_MVER-GSV02 is INITIAL AND ..&lt;/P&gt;&lt;P&gt;        ......&lt;/P&gt;&lt;P&gt;        LS_MVER-GSV13 in INTIAL.&lt;/P&gt;&lt;P&gt;	  L_CONSUMPTION_ZERO = 'X'.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt; AT END OF MATNR.&lt;/P&gt;&lt;P&gt;	IF L_CONSUMPTION_ZERO is INITIAL.&lt;/P&gt;&lt;P&gt;		INSERT LS_MVER INTO TABLE T_ZERO_CONS.  &lt;/P&gt;&lt;P&gt;	END IF.&lt;/P&gt;&lt;P&gt; END AT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 14:35:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mara-table/m-p/1952595#M392279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T14:35:15Z</dc:date>
    </item>
  </channel>
</rss>

