Automate

 View Only
Expand all | Collapse all

ME21N - PO creation with multiple items

  • 1.  ME21N - PO creation with multiple items

    Posted 01-05-2021 03:32

    Happy New Year

    I have created a script to create multiple line POs (ME21M). I have followed the online instructions however when I run it it fails.

    Does anyone have any advice on how to create one that does not fail?



    ------------------------------
    Gilda Govier |
    L'Oréal (U.K.) Ltd |
    ------------------------------



  • 2.  RE: ME21N - PO creation with multiple items

    Posted 01-05-2021 09:38
    Hi Gilda -

    We do have an ME21N template available. Feel free to look at that one so you can get an idea on how to create the script properly. 

    It should be recorded in Batch mode and you need to use the Filter in order to create the loop. The first line item also needs to be entered in the Header row, not the Detail row. 

    https://community.winshuttle.com/sap-module-templates/viewdocument/create-purchase-order?CommunityKey=8a12989f-fefe-4b81-8147-4bbb11af6820&tab=librarydocuments 

    Thank you!

    ------------------------------
    JENNIFER HWANG | SE
    Winshuttle North America
    ------------------------------



  • 3.  RE: ME21N - PO creation with multiple items

    Posted 01-06-2021 09:53

    Hi

     

    When I try to the script in my own drive I get this message:

     

     

    Do you know what I need to do in order to open the script so I can have look at the script to work out how to write my own.

     

    I've had a look at the user guide on the website but I can't quite follow it.

     

    Many thanks for your help

    Gilda

     

     

     

     

     

     

    C1 - Internal use






  • 4.  RE: ME21N - PO creation with multiple items

    Employee
    Posted 01-07-2021 10:20
    Hi Gilda
    Have you extracted the TXR and XLS file from the zip file before running?
    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 5.  RE: ME21N - PO creation with multiple items

    Posted 01-08-2021 10:20
    Hi Gilda,

    What version of the software are you running? If you are on an older version below 11.x then you will see this error. You will either have to upgrade the software or the script will need to be opened by someone with 11.x or higher and save a copy as an older version.

    Thank you,
    -Shelby

    ------------------------------
    Winshuttle Support |
    Winshuttle North America |
    ------------------------------



  • 6.  RE: ME21N - PO creation with multiple items

    Posted 06-22-2021 06:16
    Hi Jennifer,
    Thank you very much for this example.
    I have created a script based on your tips, but I get an error in the step to apply the filter. 
    It seems the field to apply the filter is not being defined. Is there any parameter missing here?

    Thank you
    Helder

    ------------------------------
    helder souza | manager
    Hydro Aluminium | +4746936923
    ------------------------------



  • 7.  RE: ME21N - PO creation with multiple items

    Posted 06-22-2021 09:08
    Hi Helder -

    Do you mean the field that you want to be able to filter on?  From your screenshot, you actually cut off the part that would have shown the filtering field (row 126 is the screen name).  Are you saying nothing is showing there?

    What field(s) below do you want to use for filtering? You need to single click and select which field(s) you want to include in your filter and left arrow each of them to add it to the filter criteria. If you do not explicitly select one, it will only pick the default one at the top, which is typically selected by default, and use that as the criteria. In the example below it will use Item. In the template, it also uses Item. 


    What error are you getting? Did you record in batch mode? 

    Thank you,

    ------------------------------
    Jennifer Hwang | SE
    Winshuttle North America
    ------------------------------



  • 8.  RE: ME21N - PO creation with multiple items

    Posted 06-22-2021 09:42
    Hi Jennifer,
    Thank you for your quick replay

    Yes, you got the point. I recorded exactly how you said: I choose "Item" to be used, but it seems when I run the scrip it is not there.
    Debugging the script, the error happens in that screen. See below your template, same part in mine and the screen where i get the error.

    Template

    My script

    Error


    So, the script finish after  step with the error above.

    Thank you
    Helder

    ------------------------------
    helder souza | manager
    Hydro Aluminium | +4746936923
    ------------------------------



  • 9.  RE: ME21N - PO creation with multiple items

    Posted 06-22-2021 09:46
    Just realised I recorded in Standard mode.
    Will try in batch mode now

    ------------------------------
    helder souza | manager
    Hydro Aluminium | +4746936923
    ------------------------------



  • 10.  RE: ME21N - PO creation with multiple items

    Posted 06-22-2021 09:50
    Hi Helder -

    That error is not related to the filter field, it's a runtime issue because you are trying to run something in the background that was only designed to be run in the foreground (the filtering). 

    https://support.winshuttle.com/hc/en-us/articles/360023442852 

    Do you have the Start SAP Gui button checked? 

    Also, you can just change the recording mode in the mapper's properties. 


    Thank you

    ------------------------------
    Jennifer Hwang | SE
    Winshuttle North America
    ------------------------------



  • 11.  RE: ME21N - PO creation with multiple items

    Posted 06-22-2021 10:18
    Hi Jennifer,

    Start SAP GUI was checked.​
    I changed to batch mode and now it is working :)

    Thank you very much for your help!

    ------------------------------
    helder souza | manager
    Hydro Aluminium | +4746936923
    ------------------------------



  • 12.  RE: ME21N - PO creation with multiple items

    Posted 01-06-2021 09:53
    Gilda,

    I have found the BAPI to be the best bet for PO Creation, using BAPI_PO_CREATE1.

    ------------------------------
    Peter Gonella | Winshuttle Functional Analyst
    Refresco Beverages North America, Inc.
    ------------------------------



  • 13.  RE: ME21N - PO creation with multiple items

    Employee
    Posted 01-15-2021 08:55
    Hi Gilda,

    I have forwarded your request for assistance to create a script to your account rep, who can guide you on your options.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 14.  RE: ME21N - PO creation with multiple items

    Posted 01-15-2021 09:34

    Many thanks

     

     

    C1 - Internal use