<?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 Changing data from MARA table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344800#M517202</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;1) Can we change(Edit, Delete) data from MARA &amp;amp; MAKT table?  If yes then what is the procedure to do so? And if not why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Can we protect the material created by a particular user(eg. PP) in MARA table?&lt;/P&gt;&lt;P&gt;If yes how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance..........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2007 11:58:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-15T11:58:41Z</dc:date>
    <item>
      <title>Changing data from MARA table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344800#M517202</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;1) Can we change(Edit, Delete) data from MARA &amp;amp; MAKT table?  If yes then what is the procedure to do so? And if not why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Can we protect the material created by a particular user(eg. PP) in MARA table?&lt;/P&gt;&lt;P&gt;If yes how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance..........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 11:58:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344800#M517202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T11:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Changing data from MARA table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344801#M517203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;        1. If MARA is really the table you want to delete records from, maybe better to use BAPI_MATERIAL_DELETE to flag it for deletion. And if you do that, then you only need to store the material numbers. Saves memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: mara.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: wa_mara LIKE mara.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Copy of the internal table, which is (I assume) the same as MARA.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES: t_itab_keep   LIKE mara,&lt;/P&gt;&lt;P&gt;       t_itab_delete LIKE mara.&lt;/P&gt;&lt;P&gt;DATA: itab_keep      TYPE TABLE OF t_itab_keep WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: itab_delete    TYPE TABLE OF t_itab_delete WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA: h_lines TYPE i.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT * FROM mara UP TO 10 ROWS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TEST FILL itab_keep.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DESCRIBE TABLE itab_keep LINES h_lines.&lt;/P&gt;&lt;P&gt;  IF h_lines &amp;lt; 9.&lt;/P&gt;&lt;P&gt;    MOVE mara TO itab_keep.&lt;/P&gt;&lt;P&gt;    APPEND itab_keep.&lt;/P&gt;&lt;P&gt;    CLEAR itab_keep.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;END OF TEST FILL itab_keep&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  READ TABLE itab_keep WITH KEY matnr = mara-matnr.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.            "Not in ITAB, must be deleted from MARA&lt;/P&gt;&lt;P&gt;    APPEND mara TO itab_delete.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;LOOP AT itab_delete.&lt;/P&gt;&lt;P&gt;  WRITE:/ itab_delete.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Be very careful (should lock too), and allow restore!&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DELETE mara FROM TABLE itab.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.By giving Autorization u can protect your code.&lt;/P&gt;&lt;P&gt;anyway material creation is responsibilty of functional guys so u can better to consult functional people.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 12:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344801#M517203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T12:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Changing data from MARA table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344802#M517204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) It is NOT best practice to write code to directly update standard SAP system tables. You should use:&lt;/P&gt;&lt;P&gt;  Batch Input on MM02 or&lt;/P&gt;&lt;P&gt;  BAPI_MATERIAL_EDIT or&lt;/P&gt;&lt;P&gt;  RMDATIND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Assign such materials to their own Authorisation Group (MARA-BEGRU), then set users up to have/not have access to the via their authorisation profiles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 12:41:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344802#M517204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T12:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Changing data from MARA table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344803#M517205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should never update directly in SAP standard tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You ask  &amp;lt;b&amp;gt;And if not why?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess at least hundreds of tables in your SAP database contains material numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give you an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a sales order the material number will be stored in table VBAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you delete the material number from MARA, there is a database inconsistency - the VBAP record links to a not existing MARA record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will probably result in a dump if the users try to change the sales order in transaction VA02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Thomas Madsen Nielsen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 12:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-data-from-mara-table/m-p/2344803#M517205</guid>
      <dc:creator>TMNielsen</dc:creator>
      <dc:date>2007-06-21T12:05:04Z</dc:date>
    </item>
  </channel>
</rss>

