<?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: How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486488#M1419756</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;You can achieve it in another way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before Passing Data to BAPI , Check whether the material is existing or not..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If material is existing (Present in Material Master Tables e.g. MARA ) using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: l_matnr like mara-matnr.

Select single matnr from mara into l_matnr.

IF sy-subrc EQ 0.
" Material is existing ==&amp;gt; Do Not Pass to BAPI
else.
" Material is NOT existing ==&amp;gt; Pass to BAPI for creation.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Repeat above logic for every material in batch..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope it will solve your problem..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ilesh Nandaniya&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Dec 2009 04:09:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-22T04:09:42Z</dc:date>
    <item>
      <title>How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486487#M1419755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using BAPI  'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.&lt;/P&gt;&lt;P&gt;But this BAPI also can be used for change mode.&lt;/P&gt;&lt;P&gt;How to forbid the change of MAT data when use this BAPI?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TKS a lot~~&lt;/P&gt;&lt;P&gt;I am looking foward to your response~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: lorryhappy on Dec 22, 2009 11:35 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 03:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486487#M1419755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-22T03:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486488#M1419756</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;You can achieve it in another way..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before Passing Data to BAPI , Check whether the material is existing or not..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If material is existing (Present in Material Master Tables e.g. MARA ) using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: l_matnr like mara-matnr.

Select single matnr from mara into l_matnr.

IF sy-subrc EQ 0.
" Material is existing ==&amp;gt; Do Not Pass to BAPI
else.
" Material is NOT existing ==&amp;gt; Pass to BAPI for creation.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Repeat above logic for every material in batch..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope it will solve your problem..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ilesh Nandaniya&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 04:09:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486488#M1419756</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-22T04:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486489#M1419757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fisrt reason is performance,i will do many materials,also contains one material in different plants' data.&lt;/P&gt;&lt;P&gt;Second reason as i want to change 90 fileds of mat master data,there will be 10 fields were forbidden to change!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So...In this BAPI, is there any parameter to control it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: lorryhappy on Dec 22, 2009 1:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 05:07:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486489#M1419757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-22T05:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486490#M1419758</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;For each paramater, there is a corresponding control structure to control the update of material.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;for paramater 'CLIENTDATA ', the control structure is 'CLIENTDATAX'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for paramater 'PLANTDATA', the control structure is 'PLANTDATAX'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you pass 'X' to each field in the control structre then only, the fields will get updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you dotn want to update few fields then dont pass 'X' to that field in the corresponding control structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the documenttaion present for this function module and its paramater usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Swarna Munukoti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2009 05:21:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486490#M1419758</guid>
      <dc:creator>former_member217544</dc:creator>
      <dc:date>2009-12-22T05:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can forbid changging data when using BAPI  'BAPI_MATERIAL_SAVEREPLICA'?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486491#M1419759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From MARC to judge plant data&lt;/P&gt;&lt;P&gt;     MARA to judge basis data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear the update flag...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 15:16:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-forbid-changging-data-when-using-bapi-bapi-material-savereplica/m-p/6486491#M1419759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T15:16:44Z</dc:date>
    </item>
  </channel>
</rss>

