BAPI_MATERIAL_MAINTAINDATA_RT - no way to set MAIN EAN?

Hi,
I'm using BAPI_MATERIAL_MAINTAINDATA_RT to create new materials. Everything was going fine until I added an EAN to the material, when it started giving the following error:
M3-535: First specify the main EAN for the unit PC
What this error says makes sense. But in structure MARM (parameter INTERNATIONALARTNOS) of this BAPI the field "main EAN" (HPEAN) is not available. So, how can I set it if it is not available?
I do see that in structure VENDOREAN has field main ean but I tried to set it and still nothing happened. Besides, I believe it doesnt make sense to set it from here since we don't need vendor data in order to add EANs to an article.
Having debugged I found the data flowing from INTERNATIONALARTNOS structure to internal table MEAN_ME_TAB which has a structure similar to MEAN and then the place where this internal table the existence of a main EAN is tested. Of course it always fails, since there is no way to fill that field from the BAPI.
Unless I'm missing something, I don't see how I can set the main EAN from the BAPI.
Please help.
Regards,
Nuno

I found the solution. Main EAN goes in MARM but when I had tried it and it failed it was actually because I forgot to set this field in X structure.
Thanks.

Similar Messages

  • 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

  • MAIN EAN Number of artcile

    Hi
    I m creating a new EAN number for artcile through  BAPI_MATERIAL_MAINTAINDATA_RT but how to make that ean number as main EAN number.
    is there any other F.M or Bapi exsit to make a Ean as main ean.
    reagrds
    bunty

    Hi bunty,
    I am using BAPI_MATERIAL_MAINTAINDATA_RT to create new materials and also cannot find a way to flag an EAN as main. My problem is that I cannot even create the material since I always get this error:
    M3-535: First specify the main EAN for the unit PC
    Here's the thread I just started on this issue:
    BAPI_MATERIAL_MAINTAINDATA_RT for MARA 'Z' fields
    Did you solve your problem? If so please let me know how.
    Thanks,
    Nuno

  • What's the best way to set up new imac for logic etc?

    In brief:
    Getting new imac (27", 3.4 i7, 8-16GB ram, 1TB HD). Will be using it mainly to run Logic Studio (loads of plugins) and Final Cut Express. I also have 2 external Hard drives one 500G one 1TB.
    The last imac I bought was my first and just went ahead and threw everything at it not really knowing where things should go. This time I want to set things up correctly.
    Basically, with what I've got, what is the best way to set things up. I.e where do I put logic files, samples, BFD2, Amplitube etc. Where do I put videos for use in FCE. Storing projects and backups for use with Time Machine.
    Also noticed the new imac will only have 1 firewire port. I will need to plug in the Hard drives (daisy chained), camera and RME Fireface 800. Was thinking of getting a Thunderbolt Hard drive but they are expensive and hard to find.
    Would really appreciate any help before I get the new machine and start messing things up again.
    Thanks.

    Adding to babowa, enable the system firewall in System Preferences>Security>Firewall tab. Click Advanced and check Stealth Mode.
    Lion is a pretty steady and secure operating system, and as there really aren't MANY Mac viruses, there ARE viruses out there still. OS X is pretty good about letting you know if you do accidently download a virus, and it will help you throw it away if it detects one, such as the MACDefender virus. OS X has built in security features such as sandboxing that doesn't allow viruses in as easily as a Windows PC. As for hackers, as long as you have the firewall enabled and a secure password (for your computer and email accounts), then you should be fine.
    It's the user that lets the virus in, not the computer (unless there's some untold serious vulnerability in OS X, which is highly unlikely). Keep your apps up to date, don't download pirated software, and be street smart on the internet. Don't download things or visit websites that you don't think are real. Safari includes a Phishing feature that automatically detects known phishing sites, protecting you from that big problem. Keep your passwords secure and you should be fine.
    There are antivirus solutions out there, one notable one available in the AppStore is Intego's VirusBarrier (free and plus versions), if you feel you still need one.
    I wouldn't worry about it. Windows users who switch to Mac are always asking these questions.
    Here's some good reading as well
    http://www.apple.com/macosx/what-is/security.html
    Enjoy OS X Lion

  • How do you assign a main EAN in BAPI_MATERIAL_SAVEDATA

    I am trying to assign a main EAN to an existing material (which does not currently have an EAN) using BAPI_MATERIAL_SAVEDATA.  I have implemented the following steps in an ABAP program:
    (a) Load the BAPI_MARM (unitsofmeasure) table with one row containing data for the main EAN, including its unit of measure.
    (b) I have a matching row in BAPI_MARMX  with the relevant fields set.
    (c) Load the BAPI_MEAN (internationalartnos) table with one row containing relevant data for the EAN.
    (d) After calling BAPI_MATERIAL_SAVEDATA I am calling BAPI_TRANSACTION_COMMIT.
    When I run the program it does not add the EAN or assign a main EAN.
    In debug the FM is returning the message MG 160 – ‘First specify the main EAN for the unit EA’
    I have read that there are problems with this BAPI and EAN's, but we seem to have applied the various notes (eg 406160 and others) that address this issue.
    Any help would be appreciated - thanks.

    why not use a BDC to update the same.

  • Best way to set up iPad mini for child?

    So I bought my 3yr old an iPad Mini since he already knows how to fully operate most things on my iPhone! Now when I go to set it up, I don't want my music and apps and other content popping up on his iPad. Now can I create an Apple ID for him but set it up to where I can still have control over it? The guy in the store suggested I set it up using iCloud Family Sharing. When I got home and looked more into the family sharing option, I am not sure that is what I want either. That sounds like everybody in your family would have access to everything on the main device correct or am I wrong?
    So this is what I want. I want to be the one who can purchase apps or download free apps by typing in his Apple ID info (if possible). I want him to have his own favorite songs via iTunes. The only thing I would want to share is probably a Family photo album in iCloud.
    So what is the best way of setting this device up?
    Before he mentioned the iCloud Family Sharing option, the guy in the store suggested I leave the iCloud info blank when it asked for it but set up the iPad Mini as if it was my device. I think that just confused me even more.
    If I chose the Family Sharing option, can I select exactly what gets shared or no? If yes? Can apps be shared?
    Lastly if I set him up with his own Apple ID, and he wants a new song or some music or download a movie etc. will he need his own iTunes Library?
    Thanks for your help!

    I think that, if you read through these forums and familiarize yourself with the number of problems allowing children the ability to exercise and maintain control of an iDevice, and to purchase and download content, you'll change your mind.

  • Best way to set up partitions on 250GB external drive

    Hi all,
    I've decided to go with an Iomega eGo 250-GB FireWire portable drive to back up my iBook's hard disk (30 GB) plus to store my photos and maybe hold a bootable copy of OS9.
    This is my first time using an external drive, so I don't really know how to go about setting things up.
    What would be the best way to set up the partitions on the external drive?
    1) I know I should create a 30GB partition for the iBook backup, but what about for the remaining volume? Is it best to leave it as a single large 200GB partition, or split it into two 100GB chunks? Other than the clone of my iBook, I'll mainly be storing photos (at the moment no more than around 10-12GB).
    2) I don't yet have a huge iTunes collection, but if I later want to store iTunes music that doesn't fit on my internal drive, is it fine to put it in the same partition as the photos, or would it be preferable to create a separate partition?
    3) If I want to install OS9 on the drive, how much space should I allot to it? Would this enable me to run legacy apps on my iBook?
    4) Does it matter how I name the partitions (i.e. should the name for my iBook back-up be the same as the original volume or should it be different?)
    5) As I still don't know exactly what I need, If today I decide to create only 30GB partition to backup the iBook, can I later partition the remaining space without having to start all over again?
    6) Also, the drive came out of the box with Mac OS Extended format. Is this the best format or is there another that would be better?
    Thanks for any advice
    Message was edited by: Lutetia

    1) I know I should create a 30GB partition for the iBook backup, but what about for the remaining volume? Is it best to leave it as a single large 200GB partition, or split it into two 100GB chunks? Other than the clone of my iBook, I'll mainly be storing photos (at the moment no more than around 10-12GB).
    2) I don't yet have a huge iTunes collection, but if I later want to store iTunes music that doesn't fit on my internal drive, is it fine to put it in the same partition as the photos, or would it be preferable to create a separate partition?
    The answer to both question is that it's completely up to you. Partitioning or not partitioning won't affect operation significantly.
    3) If I want to install OS9 on the drive, how much space should I allot to it? Would this enable me to run legacy apps on my iBook?
    The iBook G4 can not boot from OS 9 so you would only be able to run OS 9 in the "classic" environment.
    4) Does it matter how I name the partitions (i.e. should the name for my iBook back-up be the same as the original volume or should it be different?)
    No
    5) As I still don't know exactly what I need, If today I decide to create only 30GB partition to backup the iBook, can I later partition the remaining space without having to start all over again?
    There are a few tools which promise the ability to change the partitioning without destroying the data on the drive. But you should never do this without making a backup of the data on the drive. Data loss can easily happen and in a big way.
    6) Also, the drive came out of the box with Mac OS Extended format. Is this the best format or is there another that would be better?
    That is the best format.

  • What is easiest way to set up a remote network between countries online?

    What is easiest way to set up a remote network between countries online?
    My main Mac is in England, UK and I'm spending time in the USA with my Mac laptop for 3 months. I'm in the USA right now, but neighbour in the UK has keys to my apartment so he can go in there and follow my instructions.
    How can I access my Mac back in England via my Mac laptop in the USA as there are files on my UK computer that I need to transfer back/forth while I'm here in America.
    I know there are things like Log-me-In as in per link below, but I don't think you need things like this on the Mac do you, isn't there an easy way to set something like this up via the Mac's OS?
    https://secure.logmein.com/welcome/access/fasteasy/2/?wt.srch=1&originid=4373&ut pk=log%20me%20in&destination=/welcome/access/fasteasy/2/
    Any advice on the easiest way for me to get this set up finally would be great as I just can't figure out the most straight forward way of doing this.
    Thanks a ton all.

    Is there any chance of being able to set up and use something such as
    the Apple Remote Desktop in these computers? Sure, there is a matter
    of setting up the computer on the far end, including any update to the OS
    and having the Apple Remote Desktop client side ready and able.
    And then having (owning) the ARD software within the computer you have
    there while traveling so as to contact and control the remote computer.
    This should be capable of allowing you to move files between the Macs
    but may be cumbersome without planning ahead; before traveling away.
    • Apple - Remote Desktop - Tutorials - Easy Set Up
    To install or upgrade to Apple Remote Desktop 3 on either admin or client...
    1- http://www.apple.com/remotedesktop/tutorials/easysetup.html
    2- http://www.apple.com/remotedesktop/tutorials/
    • Apple - Support - Remote Desktop
    The Apple Remote Desktop Support page provides new users with plenty of ...
    http://www.apple.com/support/remotedesktop/
    While this is not exactly a network in one sense, it would allow you to see
    and control the other Mac at some distance; depending on IP connection
    bandwidth and other preparation before leaving the home computer. A
    backup power supply and other matters would be recommended so you
    won't have a hung computer or grid issues while at a distance, for example.
    {And this does not sound so easy when away from the remote computer to me.}
    Good luck & happy computing!

  • JDBC & setQueryTimeout - or is there another way to set query timeout?

    I am trying to set query timeout for TimesTen using jdbc library. But it seems like TimesTen jdbc library does not support setQueryTimeOut. Is there a way to set it without having to set it statically in the DNS?
    I tried to set the SqlQueryTimeout in the connection string but it doesn't work either:
         Connection connection = DriverManager.getConnection(
         "jdbc:timesten:client:TTC_SERVER=bleh;TCP_PORT=17013;TTC_Server_DSN=blah;TTC_Timeout=0;SqlQueryTimeout=5;");
    Thanks for your help!

    Thanks for replying. I don't know have good knowledge on Cache Connect. I will have to read on that first.
    It seems like TimesTen does not support jdbc setQueryTimeout. Calling this method on TimesTen jdbc library will return false: supportsQueryTimeout().
    I created a test class for testing the SqlQueryTimeout. I set the TTC_Timeout to 400 seconds and SqlQueryTimeOut to 5 seconds. So after 5 seconds it should time out.
    The way I test it is by putting a break point before executing the query, do a route add DBServer to an un-connectible gateway to simulate the network delay/connection problem and then continue after I added the route.
    After executing the query, instead of timing out after 5 second, it will wait for a few minutes before timing out.
    The code for testing the timeout is as follow:
    public class TTTest {
         public static void main(String[] args) throws ClassNotFoundException {
         Class.forName("com.timesten.jdbc.TimesTenDriver");
         try {
         Connection connection = DriverManager.getConnection(
         "jdbc:timesten:client:TTC_SERVER=server;TCP_PORT=17013;TTC_Server_DSN=server_dns;"
         + "TTC_Timeout=400;SqlQueryTimeout=5;");
         System.out.println(connection.getClass().getName());          
         Statement stmt = connection.createStatement();
         //com.timesten.jdbc.JdbcOdbcStatement stmt = (JdbcOdbcStatement)connection.createStatement();     
         System.out.println(stmt.getClass().getName());
         System.out.println("Query started " + new Date());
    // Pause here, put a route add and continue
         ResultSet rs = stmt.executeQuery("select count(*) from mse");
         rs.next();
         System.out.println("there are " + rs.getInt(1) + " rows");
         rs.close();
         stmt.close();
         connection.close();          
         } catch (Exception x) {           
         x.printStackTrace(System.err);
         System.err.println(new Date());
    }

  • Best way to set up a second monitor with a Touchsmart

    What's the best way to set up a second monitor for the Touchsmart IQ506?  Is a USB to VGA cable the only way and how well does that work (I've read that they can be buggy)?  
    Are they any recommendations for products and setting it up?

    Leopard wont be out befor the second half of this year, sofar i cannot tell you what options you are going to have with the new system. Seems like with time machine is going to be a perfect backup for your whole system.
    10.4.x:
    Software RAID you can do 0 -1:
    To setup a RAID of your system you have to format the drive and setup the RAID type you want from the disk utility.
    To have some security i suggest the "mirror" options but you are going to lose some perfomance, depending you want is your main job it mighn't be noticed.
    RAID 5:
    This would be the nicest option but you need to buy an additional RAID controller. This is mostly used on servers and not on client computers.

  • Best way to set up a second/family iPad?

    I am using a new Air2 as my main iPad and now want to setup my iPad2 as a general usage iPad that anyone in my house can use for things like surfing the web and viewing a baby monitor, etc.
    I'm trying to figure out the best way to set it up, I'm not sure if I need to synch over my safari tabs, pages, numbers, etc. Can anyone give me any advice with regards to doing something like this?
    If I want to keep everything separate from my current iCloud account, do I just register a new iCloud account or should I use my current account and only synch over certain things? Any pros/cons of doing this either way?
    Thanks in advance!

    I am using a new Air2 as my main iPad and now want to setup my iPad2 as a general usage iPad that anyone in my house can use for things like surfing the web and viewing a baby monitor, etc.
    I'm trying to figure out the best way to set it up, I'm not sure if I need to synch over my safari tabs, pages, numbers, etc. Can anyone give me any advice with regards to doing something like this?
    If I want to keep everything separate from my current iCloud account, do I just register a new iCloud account or should I use my current account and only synch over certain things? Any pros/cons of doing this either way?
    Thanks in advance!

  • Best way to set up home network using Time Capsule

    Hi
    My current home network consists of Macbook Pro 17 connected wirelessly, another Mac and few pcs. I have a Time Capsule, new netgear router and several hard drives. At the moment my main drive is plugged in via usb to the mac, however id like to set up a proper mini network where i can at least share several drives between macs, HOWEVER i also want to back up this data via TC, which is why at the moment my hard drive is plugged into the mac, so it can be backed up. Am i correct is saying that TC will not backup netwrok drives?
    ..any suggestions for best way to set up a network with TC backing up drives?
    Thanks

    paulsutt wrote:
    Am i correct is saying that TC will not backup network drives?
    Yes.
    ..any suggestions for best way to set up a network with TC backing up drives?
    You could share the locally-connected drive.  That would require that your Mac be on whenever any other network client needed to access the drive.

  • Best way to set up a new system with RAID?

    I'll be buying a new Intel Mac Pro when Leopard comes out (for my office). I can get it with as many drives as fits into the bays (4?). My question is, what's the best way to set up a disk redundancy? I'm assuming I want one of the drives for Time Machine. That leaves 3; what kind of RAID do I want to maximize safety if and when one of the drives dies? I'd also like to optimize disk access time, as a secondary consideration. So, 1) what RAID do I want and how many drives will that take, and 2) how do I set it up? Presumably the thing will arrive all set up with Leopard installed. So, will I have to hose that installation to change the file system to RAID? Any problem with that (is it worth it)? If so, what disk do I boot from to set that up, and what's the right way to do this and get a working system back?
    Mike

    Leopard wont be out befor the second half of this year, sofar i cannot tell you what options you are going to have with the new system. Seems like with time machine is going to be a perfect backup for your whole system.
    10.4.x:
    Software RAID you can do 0 -1:
    To setup a RAID of your system you have to format the drive and setup the RAID type you want from the disk utility.
    To have some security i suggest the "mirror" options but you are going to lose some perfomance, depending you want is your main job it mighn't be noticed.
    RAID 5:
    This would be the nicest option but you need to buy an additional RAID controller. This is mostly used on servers and not on client computers.

  • Is there any easy & simple way to set specify font to all text

    Is there any way to set a specific font to all text of Swing controls (JLabel, JButton, etc)? And their font's style (bold, underscore...) and font's size still remain to their customized settings.
    Thanks in advance.
    null

    perhaps you're just after deriveFont()
    run this, you'll see both fonts the same
    import javax.swing.*;
    import java.awt.*;
    class Testing
      public void buildGUI()
        JLabel label_1 = new JLabel("Hello");
        JLabel label_2 = new JLabel("World");
        label_1.setFont(new Font("monospaced",Font.BOLD|Font.ITALIC,12));
        label_2.setFont(label_1.getFont());
        //label_1.setFont(label_1.getFont().deriveFont(36f));//<----------
        JFrame f = new JFrame();
        f.getContentPane().add(label_1,BorderLayout.NORTH);
        f.getContentPane().add(label_2,BorderLayout.SOUTH);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);
      public static void main(String[] args)
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new Testing().buildGUI();
    }now uncomment the indicated line, recompile/rerun
    you'll see the style remains, but the size increased

  • HT3819 what is the best way to set up my childs iphone with apple id and as part of home sharing?

    what is the best way to set up my childs iphone with apple id and as part of home sharing?

    So do I have to hook up an Ethernet cable to both the Uverse AND my computer from the Time Capsule?
    I'm not sure that I understand everything that you want to do and where devices will be located.
    The Time Capsule must connect to the "main" Uverse router using a permanent, wired Ethernet cable connection. An Ethernet cable can be run up to 300+ feet with virtually no loss, so you should be able to locate the Time Capsule wherever you want.....unless you have a very large estate.
    If you want the Time Capsule to strengthen the wireless signal provided by the Uverse router, then the Time Capsule must be located in the area where you need that additional signal strength.
    If I understand your post correctly, you plan to install the Time Capsule in the office? When you do this, you can configure the Time Capsule to create a wireless signal that uses the exact same wireless network name and password as the Uverse wireless network.
    That will provide a much stronger signal for your Uverse wireless network in the office area. Hopefully, the bedroom that you mention is close to the office, so it will pick up the stronger wireless signal from the Time Capsule.
    The iMac in the office can connect to the Time Capsule using another short Ethernet cable connection, or the iMac can connect using wireless.  A wired connection is always preferred, if possible.
    At this point, I guess the first question would be.......
    Do you have a location for the Time Capsule that will be close to the office....and...the bedroom where you want a stronger wireless signal?

Maybe you are looking for

  • How to install Open Office 3 on Leopard 10.5.5

    Hello everyone, I just bought a new MacBook (the 13" version) and I'm new to all this Mac stuff, you know the Mac OS and everything. I'm trying to add some of the programs I usually use in my other two systems (Windows Server 2008 and Linux) and one

  • Iphone not recognized by windows and itunes

    I have an iphone 4 and it doesn't start. It says to connect it to itunes but it is not recognized by several PCs. Iphone only displays the apple when connected to the computer. Anyone can help?

  • Create user just use for show running-config

    Dear Cisco support team, I want to create a user account on ASA 5520, which just has one function: show running-config. How to modify privilege, and set this privilege just excute this command: show running-config. Can you help me ? Thank you. Dang N

  • Needed insight into transaction MASS

    Hi Experts, I needed to learn about the transaction MASS in detail. I have gone through the threads but they answer very specific questions and scenarios. I would be grateful if you could share some documentation on the transaction. Warm Regards, Som

  • Confirmation of production order cancel

    dear experts          I want to cancel one producter order(last month), but want to set the posting data as current month, if OK, This may not affect the previous month's data.         but CO13,  can not change the posting data. is this business requ