Automate

Welcome to the Automate community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements

 View Only

MM01 Extend Material to plant using Copy from

  • 1.  MM01 Extend Material to plant using Copy from

    Posted 30 days ago
      |   view attached

    I am getting this error when I run using the Test button

    When I Debug this is what happens

    there is no prompt to click to move to the next screen



    ------------------------------
    Jane Dobbs
    Canadian Pacific Railway
    ------------------------------

    Attachment(s)

    Txr
    Material Extensions.Txr   4.57 MB 1 version


  • 2.  RE: MM01 Extend Material to plant using Copy from

    Posted 30 days ago

    It's been a while since I build my script to do this.  I remember working with SAP to try to turn off the message.  We ended up selecting the Industry and Material type before hitting enter.



    ------------------------------
    Anita Mefford
    ConocoPhillips Company
    ------------------------------



  • 3.  RE: MM01 Extend Material to plant using Copy from

    Posted 30 days ago

    Hi,

    It's normal for the debug to stop on warning messages (yellow one on the bottom of the screen). It might be that just by pressing ENTER your script will move forward and stop on an actual error.
    The script enters a view selections screen but it doesn't actually select any views. Is it just relying on the default view selection saved?



    ------------------------------
    Tomasz Tomaszewski
    Self-Registration Shared Account
    ------------------------------



  • 4.  RE: MM01 Extend Material to plant using Copy from

    Employee
    Posted 30 days ago

    Hi Jane,

    Anita's right. Add Industry (RMMG1-MBRSH) and Material Type (RMMG1-MTART) to the first screen of your script and map them to your sheet. If those fields are already filled when you hit Enter, SAP doesn't copy them from the reference material, and you won't get that "copied from master record" warning. That warning is why the screen sits there in Debug.

    The error also says SAP is showing the Select View(s) pop-up (screen 0070), but your script jumps straight to the Org Levels screen (0080). That usually means the pop-up didn't come up when you recorded, probably because of your MM01 defaults. The easiest fix is to go into MM01 > Defaults > Views, uncheck the "only on request" options, and re-record so the pop-up gets captured. Then pick the views you need in it.

    One thing to watch: the order of views in that pop-up can vary by material, so try it on a few different materials before running the whole file.

     If that doesn't resolve the issue, please open a ticket through the support portal and share the script file. We'll assist you.

    Kind Regards



    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------



  • 5.  RE: MM01 Extend Material to plant using Copy from

    Posted 29 days ago

    Thanks everyone for the input, I added the Industry and Material Type and the needle has moved.  I am now getting this error. There is an entry for Plant 8045 and Storage Location ST1A in T001L

    I have tried:

    1. Copy Storage Location/Reference
    2. Copy Storage Location/Reference as well as setting it in the Plant/Storage
    3. Only in Plant/Storage

     

    Thanks,
    Jane



    ------------------------------
    Jane Dobbs
    Canadian Pacific Railway
    ------------------------------



  • 6.  RE: MM01 Extend Material to plant using Copy from

    Employee
    Posted 29 days ago

    Hi Jane,

    No worries.

    The error gives it away: "Entry 8045 E" means SAP is getting the letter E as the storage location, not ST1A.

    If you look at rows 8 and 9 (Storage Location and Reference Storage Location), they have the pin icon, so they're set to a fixed value of "E" and aren't pulling from column E. Row 24 has the upload icon, which is why that one works.

    To fix it, change the mapping on rows 8 and 9 to map to column E, the same way row 24 is set up. Do the same for rows 10 and 11 (Sales Org and Reference Sales Org). They're fixed to "F" right now and will throw a similar error next.

    Also check Industry and Material Type (rows 3 and 4). Their values look blank in your screenshot. Make sure they're filled in with something like R and Z001, or mapped to columns in your sheet. Otherwise SAP will go back to copying them and you'll get the warning again.

    Give that a try. If it doesn't solve the problem, please open a ticket on the support portal and include the script file so we can investigate.

    Kind Regards





    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------



  • 7.  RE: MM01 Extend Material to plant using Copy from

    Posted 29 days ago

    Needed another cup of coffee!! I scaled the whole script down to only Material/Plant/Sloc. Don't need Sales Org and it worked great.  Thanks everyone for the input as I did learn a lot doing this transaction. 



    ------------------------------
    Jane Dobbs
    Canadian Pacific Railway
    ------------------------------



  • 8.  RE: MM01 Extend Material to plant using Copy from

    Employee
    Posted 29 days ago

    Hi Jane,

    Glad to hear it works.

    Thanks



    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------



  • 9.  RE: MM01 Extend Material to plant using Copy from

    Posted 2 days ago

    Hi Jane,

    Is that possible to attach successful script worked for you? if possible, want to refer and go through on that?

    Regards,

    Surendar



    ------------------------------
    Surendar C
    Vibrantz Corporation
    ------------------------------



  • 10.  RE: MM01 Extend Material to plant using Copy from

    Posted 29 days ago

    Perhaps this suggestion is somewhat helpful. I never use basically, the initial "select views" and tick what i need. In fact I always first click "unselect all" and then only select the Basic Data1 view. After going into the basic data view and moving to other views, I use the dropdown (right side of the screen) to select the next view I need.

    The reason I do it this way is that this records a "view number" as OK Code. Something like "SP30".

    When we went from ECC to S4, the views were changed. For me it was "only" a matter of changing these SP codes from X to Z in my scripts.

    Furthermore, about defaults like Plant codes or SalesOrgs or Storage Locations and the "only on request" it is important to realize whether you use always the same user (system runner in Evolve) for a script or a personal user setting. 

    Hope it helps.



    ------------------------------
    Ed Meiners
    Wessanen Nederland Holding BV
    ------------------------------



  • 11.  RE: MM01 Extend Material to plant using Copy from

    Employee
    Posted 29 days ago

    Morning Ed,

    Yes, this is the best approach when recording MM01/MM02 scripts.

    Regards

    Archana



    ------------------------------
    Archana Chandar
    *Precisely Software Inc.
    ------------------------------



  • 12.  RE: MM01 Extend Material to plant using Copy from

    Employee
    Posted 29 days ago

    Morning Ed,

    Thanks for sharing this, really useful.

    Jane, I'd go with this approach. When you tick views in the Select View(s) popup, the script relies on where each view sits in the list, and that can change depending on the material. If you only select Basic Data 1 and then switch views from the dropdown, the script records an OK code like =SP05 or =SP30 for each view. Those stay the same no matter which material you're working on. Your script already does this on the 4000 screens, so you're most of the way there.

    Good point too about the "only on request" defaults and default plant/sales org/storage location. Those are saved per SAP user. If the script runs under a different user in Evolve (like a system runner), that user's defaults may not match yours. A script that works for you in Studio can then hit different screens when it runs in Evolve. Before you go live, check the defaults for whichever user will actually run it.

    Thanks,
    Jagat



    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------