Deleting main EAN (MEAN-HPEAN = 'X') in retail material master data

Hello experts,
I have a customer (IS Retail) that realized, after data migration from legacy system, that many EAN including the main ones were obsolete or wrong. They asked me to clean all the EANs for a set of items, before deciding the new ones to be migrated.
I tried 'BAPI_MATERIAL_MAINTAINDATA_RT' that deletes all EAN but not the main one, and I can manage to remove the flag of main ean (MEAN-HPEAN = 'X'), but after that I cannot cancel the last EAN anyway, because in effect it's not correct, as SAP best practices suggest.
Please consider that all OSS notes available have been implemented, and that I have checked with all available threads and posts on the network with no answer.
Could please somebody help me?
thanks in advance
Chiara

Hello,
I used this 'BAPI_MATERIAL_MAINTAINDATA_RT' (that works for RETAIL solutions, otherwise you have to use 'BAPI_MATERIAL_SAVEDATA')
DATA: T_BAPIE1MATHEAD TYPE BAPIE1MATHEAD OCCURS 0 WITH HEADER LINE.
DATA: T_RET TYPE BAPIRETURN1 OCCURS 0 WITH HEADER LINE..
DATA: T_MEAN TYPE BAPIE1MEANRT  OCCURS 0 WITH HEADER LINE.
(You have to select the material number and EANs you want to delete in two internal tables, such as T_MARA1 and *T_MEAN1, then loop at those tables and:)
      REFRESH: T_BAPIE1MATHEAD, T_MEAN. "T_MARA, T_MARAX.
*header
      T_BAPIE1MATHEAD-FUNCTION = '003'. "function code for DELETING
      T_BAPIE1MATHEAD-MATERIAL = T_MARA1-MATNR.
      T_BAPIE1MATHEAD-NO_APPL_LOG = 'X'.
      APPEND T_BAPIE1MATHEAD.
*mean
        T_MEAN-FUNCTION = '003'.
        T_MEAN-MATERIAL = T_BAPIE1MATHEAD-MATERIAL.
        T_MEAN-UNIT = 'ST'.
        T_MEAN-UNIT_ISO = 'PCE'.
        T_MEAN-EAN_UPC = T_MEAN1-EAN11.
        T_MEAN-EAN_CAT = T_MEAN1-EANTP.
        APPEND T_MEAN.
      CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
         EXPORTING
           HEADDATA                   = T_BAPIE1MATHEAD
        IMPORTING
          RETURN                     = T_RET
     TABLES
      INTERNATIONALARTNOS        = T_MEAN
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT = 'X'.
*(Close the loops) This works for all NON MAIN EAN, but not for the main.
If you are in a non-retail system, this changes into:
**header
      T_BAPIMATHEAD-MATERIAL = T_MARA1-MATNR.
      APPEND T_BAPIMATHEAD.
        T_MEAN-UNIT = 'ST'.
        T_MEAN-UNIT_ISO = 'PCE'.
        T_MEAN-EAN_UPC = T_MEAN1-EAN11.
        T_MEAN-EAN_CAT = T_MEAN1-EANTP.
        T_MEAN-DEL_FLAG = 'X'.
        APPEND T_MEAN.
     CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
        HEADDATA            = T_BAPIMATHEAD
      TABLES
          INTERNATIONALARTNOS = T_MEAN.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
        WAIT = 'X'.
hope this can help
kind regards
chiara

Similar Messages

  • How to delete MRP view data after create in Material master data ?

    Hi all ,
          After user  create a useless MRP view data in Material master data , how to remove it ?

    Hi
    Material master once created cannot be deleted.Only thing u can do is to mark it for deletion
    Go to Logistics > Materials management > Material master > Material > Flag for deletion > Immediately.
    Give the necessary data that is needed for the view you want to delete.
    Press and flag the view you want to delete.
    Now the view is flagged for deletion. This means that it's use is limited and it will be cleaned up or really deleted at the next clean up of the system.
    regards
    Anand

  • SAP Retail : Article Master Data Transfer using LSMW/ARTMAS05: EAN Error

    Hi Bjorn Panter,
    I want to thank you for providing very informative articles on the Master Data of ERP Retail.
    We are currently loading articles to SAP from legacy and use your articles on ERP Retail as part of our knowledge warehouse.
    We have encountered an error which has stumped our conversion.
    We are getting an M3 535 error stating that "First specify the main EAN for the unit EA".  We are using LSMW (IDOC Method, Basic Type ARTMAS05).
    Our MARM segments have generic and variants.  The UPC and UPC category (set to UC) are filled for the variants and blank in the segment containing the generic.
    Our MEAN segments contain variants only with the UPC and UPC category (set to UC) filled.
    Our UC EAN category is configured with a blank check digit algorithm and a number range of 12 digits.  We are loading our variants with EANs that are 12 digits.
    When debugged IDOC_INPUT_ARTMAS, I noticed that :
    In routine  MARM_UEBERGEBEN (in function module BAPI_MATERIAL_MAINTAINDATA_RT), this code clears our MARMX indicators :
       LOOP AT UNITSOFMEASURE.
        ART_DATA_EXISTS = 'X'.    "JH/05.01.00/4.6C Entkopplung der MALG
        IF UNITSOFMEASURE-FUNCTION NE C_MSGFN_D.   ->>>> this checks if our function code is 003 (which is a delete).
    *     TMFIELDRES aufbauen
          CLEAR UNITSOFMEASUREX.                   ->>>> Since we are doing a create, it clears the indicators in unitsofmeasureX
    To bypass this clear, I debugged the program and overlayed the indicators and marked UPC and UPC category as 'X'.  This worked and we were able to post our IDOC successfully... THe UPCs showed in the MARM and MEAN tables.
    However, knowing that there are a lot of Retail companies loading articles into their SAP system, it would seem odd that no one has reported this as a bug or no one has posted this issue in SDN.  I could not find any OSS note related to this issue either.
    Can you please help us figure out what is wrong ? Have you encountered this error in the past ?  Is there something in config that we should check ?  Should we look at fields in our segments ?
    Any help from you would be greatly appreciated.
    Thanks,
    Sarah

    Dear Sarah,
    please open an OSS customer message.
    Put in a valid IDOC ARTMAS number with this error and open your system.
    I guess either it is a bug in IODC structure or you found a bug in software.
    My colleages will take care.
    Regards
    Björn

  • Documentation on Delete Material Master Data

    Hi SAPers,
    Is there any documentation about the process of deleting a material master record?
    Regards,
    Miguel

    Please check these links:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/8d/3e59bc462a11d189000000e8323d3a/frameset.htm
    http://www.sap-img.com/bc003.htm

  • Retail - material master

    Hi gurus!!
    I modified in SAP retail a description of a configurable article.
    Why only some variant have modify their description and not all the variant???
    Does a rule exist??
    Thanks in advance
    Gio

    Hey those fields are mandatory fields which needs to be populated in the bapi.
    Please try to give some values in those fields and execute the bapi now..
    It should work fine..
    If you need any further information please let me know..
    Regards
    Satish Boguda

  • SAP Retail: Material Master, tab Logistics: DC, Safety stock

    Hello,
    I need some help on the following: In the field Safety Stock (MARC-EISBE). It is possiblre to fill in this field without choosing a specific DC. Is it also posible to maintain this on a generic level (without giving the DC) and that this is copied to all the (relevant) DC's which are created for a specific material? At this moment it is not being copied to all the DCs.
    Thanks
    Oktay

    Hi Yannick,
    I am trying to do the exact same thing. Have you gotten any further on this issue?

  • BAPIs for IS-RETAIL Article Master data.

    Hi frnds,
    I need a standard Bapi to display all existing merchandise categories( material grp), article type(material type) when executing without giving any input parameters.
    Regards,
    Krishna.

    Hi Kumar,
    Go to MM41, enter your article A1 and vendor 1.Select purchasing view then enter your purchasing group and purchase price for that vendor1 and save it.Again go to the same purchasing view and click validity area, you will get a pop up box where u can enter
    your vendor 2  enter your purchasing group and purchase price of vendor 2 then save it.Do the same for yr other 3 vendors.

  • Needs to delete one Master Data from main process chain in development syst

    Hi All,
    Can any one pls suggest how we can delete the master data load from main process chain in development system.
    In the main process chain nearly i am having 52 master data loads in that i required to delete one master data.
    Thnanks in Advance.
    karuna.

    Hi...
    1) go to RSPC1
    2) Give the technical name of the process chain
    3) in the top where we write tcode....there write COPY..and press enter...
    4) then remove the start process and the desired master data loads..
    5) create a new start process with a new variant..if you want to put ant condition you can put it there...
    6) then link the start process with the first process..
    7) activate your process chain...and schedule it as per your require...you can make it immediate run or can scedule it for a particular time...
    Or if you don't want to create anew process chain...then go to the design view of the PC and remove the desired load and again activate it...
    Hope this helps you...
    Regards,
    Debjani...
    Edited by: Debjani  Mukherjee on Sep 4, 2008 4:35 PM

  • "master data deletion for requisition" before master data loading

    Hello Gurus,
             in our bw syetem , for   process chains for loading  master infoobjects, all include "u201C master data deletion for requisition" ABAP
    process  except for one process chain. my question is:
           why that process chain for master data loading is different from others as for lacking "master data deletion for requisition" in it?
    so it does not matter if you include " master data deletion for requisition" ABAP  process in process chain for master data loading ?
    Many thank.

    Hi,
    ABAP Process means some ABAP program is being executed in this particular step.
    It's possible that for all of your process chains except for that one requirement was to do some ABAP program processing.
    You can check which program is executed by following below process:
    Open your process chain in planning view -> Double click on that particular ABAP process -> Here you can see program name as well as program variant.
    Hope this helps!
    Regards,
    Nilima

  • Deletion of master data with / without SID

    Hi Experts,
    Client have requested for master data clean up.
    Requirement:
    "Several masterdata tables in Production system contain wrong entries. These entries should be cleaned up. The attached Excel contains the keys of the entries to be deleted"
    Steps to be taken:
    1. emptied/deleted content of all the cube.
    2. delete data from master data
    Help required:
    What will be impact of deleting master data with SID when DSO data is not deleted.
    What if i choose without SID option for deletiing master data
    Regards
    Suresh Kumar

    Hi Suresh,
    Deleting master data is one critical job and ned to be very care ful.
    First try to find out the where used list of that particular IO. delete data from all the CUBEs and DSOs. i don't think without deleting the transaction data from all the objects that you see from where used list, you will be able to delete the maste data.
    System doesn't allow you, it will say "Not all selected data is deleted" Some message of this sort when you try deleting the master data.
    If you are deleting the TD and  master data, why do you need the SID to be spared, delete them too. next time you load the correct master data. the SIDs are again generated.
    Go thru the below thread, this gives you lot if info on MD deletion.
    [Re: SID Tables]

  • To enhance 0EMPLOYEE master data attributes, need to delete and load again?

    Dear Support,
    In order to meet business intelligence demands, I had three more attributes (region, time rate and worksite) to 0employee time dependent characteristic.  The datasource to load 0employee attributes and its structure were enhanced to fill the new fields.
    After first load, 0employee master data could not be activated. So I deleted 0employee master data, what I couldnu2019t do without deleting its data from transactional HR infocubes. I deleted transactional data and afterwards master data. I load it again and activated, with no errors this time.
    This occured in development system.
    Changes are about to go to production environment and deleting almost all transactional RH area infocubes and 0employee master data is something that we all want to avoid.
    I am asking if there is a workaround in order to solve this without doing the stated time and resources consuming task.
    Thanks in advance for your help,
    Best Regards,
    André Oliveira

    Hi Andre,
    You should be able to do a full load to achieve this. No need to delete the data. If there are corrupt data in BI with overlapping time periods, fix it by maintaining the master data. If corrupt data comes from source fix it in PSA.
    Also you can specify to load the data for a time range only which might be easier than to load all history.
    good luck,
    vijay

  • Master Data Deletion in SAP BW

    Hi,
    We are having HR Master Data in BW - 0EMPLOYEE. User has deleted some of the personel numbers in the source system (SAP HR system) as the contract of the employee was ended.
    My problem here is that the Personnel numbers are still existing in SAP BW - 0EMPLOYEE master data. Eventhough when i am trying to delete these un wanted personel numbers in maintain masterdata screen, that are not allowing me to delete as they have used some other placess in Transaction data.
    Can you please suggest me, how to delete this specific Master Data in SAP-BW?
    Best regards,
    Venkata Challapalli.

    Hi,
    Why do you want to delete ?
    No need to delete any Master Data
    If you want to really delete ,you can do one thing
    Right click on Master data Info Object 0EMPLOYEE
    select Delete master data
    And reload Master data for employee with full load
    if delta Initilize delta with data transfer
    Regards
    Hari

  • Want to delete 0BPARTNER and 0PRODUCT master data

    Dear friends / Experts
    i want to delete the whole master data which is availabe in 0BPARTNER and 0PRODUCT  ,  while deleting the master data using right click and deleting --> am getting the message like some of the master data can not be deleted but using se11 i came to know that still 3 million records are available in database.
    so am kindly requesting you to help me out to delete those master data ..
    even i have tried using 'RSDMD_DEL_MASTER_DATA'  functional module too.
    but same result i got i.e. some master data can not be deleted.
    please help me friends....
    thanks in advance...
    regrds
    anand

    Hi,
    As mentioned earlier, you need to delete all the transaction data wherever this master data is being used. One option is to use to the where used list from the master data and the other and more effective way to do the same is to first right click and delete the master data, it will give u a message that all the master data cannot be deleted. After that goto t-code SLG1 and check the log for deletion, it will tell u the exact objects where this master data is being used and then you can go ahead and delete the same.
    You can also use t-code SE14 to delete the data but keep it as the last option.
    Regards,
    Arminder singh

  • Material Master Record - How to remove or delete storage location

    Dear all,
    Is there a way to remove or delete a storage location accidentally extended via MM01 due to extending the general plant view?
    I've tried the following:
    1. I've used MM06 to flag the particular storage lcoation for deletion. However, when go to MM02 and select the plant view, the storage location that already been flag still exist for selection. I only get the warning prompt "The storage location has been flag for deletion".
    2. I tried MMSC attempt to delete and I get either messages with different material master record:
    a) "Material not fully maintained for this transaction/event"
    OR
    b) "Storage location 60BF already exists and cannot be deleted"
    P/S: If this question has been asked before by others, please point me to that thread.
    I'm grateful for any suggestion. Thanks.
    Steven

    Hi Jurgen,
    I've gone through the data archiving project in the past. I was actually hoping I don't have to go through this big exercise for this minor situation.
    The storage locations in the SAP system are fine. The problem is that when I came in to this organization, I found out that the procurement users have accidentally extended material master record to those storage location irrelevant to them. Those users don't post any stock to those accidentally extended storage location. They admit that it was a mistake. So, I don't really have to do stock movement or GI out from those affected storage location because there's nothing in them.
    Now that I've initially flag for deletion (MM06) of those mistakes done by those procurement users over the few years counting to 2000+ material master records affected. But the standard behavior of the SAP system allows change to proceed in MM02 except for that warning message MM081. So, I was actually asking around to explore if there's actually an option to make it an error prompt instead and stop the whole change process at MM02 transaction level.
    If I may re-confirm, what I've done so far via flaging for deletion of material master record at storage location level - is this the only correct solution available?
    Hope this clarifies my intention of opening this thread. Sometimes, users are quite tough in accepting the results from standard SAP system behavior.
    Thanks for the time in explaining.
    Steven

  • EAN error in material master

    Hi Everyone,
    We have an issue with International Article Number (EAN/UPC) being enetered in the material master.
    When the user enters particular EAN he gets an error which says "The EAN # may not be assigned externally"
    Message no. WE216.
    I have checked the config & it is ok. The EAN Number entered is well within the number range assigned to the particular EAN category.
    I also did a config check as per SAP note 879460 & corrected it in test sever, but still the error persists.
    Any suggestion on what may be wrong.
    Thanks.
    Akshay

    unfortunatly you did not post the EAN, as the number itself could explain some errors.
    Read OSS Note 545520 - FAQ: International Article Number (EAN/UPC)
    but the error itself explains already that you enter something manual, were SAP expects no manual entry.
    is your number range an external or internal number range?
    Edited by: Jürgen L. on Jan 11, 2011 11:16 PM

Maybe you are looking for