Automate

 View Only
  • 1.  Optimising Script Running Time

    Posted 12-06-2019 03:00
    Hi Winshuttle Community, 

    I have a ME21N script recorded in batch mode and what I am finding is no matter the amount of data I have on the input file the script takes approximately the same amount of time to run. 

    For example if I have 50 or 100 lines of data, they both take around 4 mins. 

    So I am thinking that there must be some form of load time before the data is written to SAP?

    My question, is there a way that you can optimise the initial load time to make the script run faster? 

    Thanks

    ------------------------------
    Ben
    Woodside Energy Ltd
    ben.crerar@woodside.com.au
    ------------------------------


  • 2.  RE: Optimising Script Running Time

    Employee
    Posted 12-06-2019 09:38
    Hi Ben,

    For your ME21N script, can you tell me if the steps to set the Filter in the details section is inside of your loop or outside of your loop? In other words, is it going through the filter selection process for each line item or is that set outside of the loop? That may be impacting processing time.

    In terms of an initial load time, there wouldn't be a specific setting for that to be controlled. The next step may be to create an SAP trace during the run to try to determine where the lag is occurring. 

    - James

    ------------------------------
    James Lofgren | Solutions Engineer
    Winshuttle North America | [City] |
    ------------------------------



  • 3.  RE: Optimising Script Running Time

    Posted 12-08-2019 20:12
    Hi James, 

    The filter is outside the loop mate. 

    How do I create the SAP trace? 

    Thanks

    ------------------------------
    Ben
    Woodside Energy Ltd
    ben.crerar@woodside.com.au
    ------------------------------



  • 4.  RE: Optimising Script Running Time

    Employee
    Posted 12-09-2019 11:59
    Hey Ben,

    You can follow the steps here: https://support.winshuttle.com/hc/en-us/articles/360026530911-How-to-enable-trace-logs-in-Studio

    I would also recommend opening a support case if you can so our team can take a further look.

    I was also wondering a few other things that may help narrow down the issue:
    1. Is this issue happening on any other SAP systems?
    2. Which version of the Winshuttle Function Module is installed 
      1. https://support.winshuttle.com/hc/en-us/articles/360023686291-How-to-check-SAP-Basis-Kernel-Information-or-Winshuttle-Function-Module-versions
    3. Are other scripts taking this long too?


    ------------------------------
    James Lofgren | Solutions Engineer
    Winshuttle North America | [City] |
    ------------------------------



  • 5.  RE: Optimising Script Running Time

    Employee
    Posted 12-10-2019 11:47
    Hi Ben

    Both PO's and Sales Orders to a ton of checks in SAP, so both are resource and time intensive.

    A BAPI would make it faster.  If you want to pursue that, I can post an example.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------



  • 6.  RE: Optimising Script Running Time

    Posted 12-11-2019 02:42
    Hi Sigrid, 

    Yes please if you could post an example that would be great!

    ------------------------------
    Ben
    Woodside Energy Ltd
    ben.crerar@woodside.com.au
    ------------------------------



  • 7.  RE: Optimising Script Running Time

    Employee
    Posted 12-11-2019 09:10
    Hi Ben

    Example attached.   

    A few things to note:
    - Note that if you have PIR's, you can skip the net price and let it default.
    - I assumed one schedule line, i.e. one delivery date, so it's hard coded. Otherwise you can let delivery dates default and omit that section.
    - I enabled the Test Run field - if you put an "X" in that column on the header row, it checks the data.  You can also create 2 scripts - one to check data with Test Run hard-coded and one that posts without it.

    Link to the online Direct training is here, in case you want to learn more:  https://winshuttle.ancileuperform.com/gm/folder-1.11.1874 

    Hope this helps give you an idea of what is possible.

    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------

    Attachment(s)

    xlsx
    BAPI_PO_CREATE1_Excel.xlsx   48 KB 1 version
    Txr
    BAPI_PO_CREATE1_Excel.Txr   888 KB 1 version


  • 8.  RE: Optimising Script Running Time

    Posted 12-15-2019 20:00
    Awesome thanks Sigrid!

    ------------------------------
    Ben
    Woodside Energy Ltd
    ben.crerar@woodside.com.au
    ------------------------------