Automate

 View Only
  • 1.  MD61-MD62 GUI Script field find / loop

    Posted 06-01-2020 16:00
    Looking for help as may much time spent could not find all my needs for write the needed script to find a field and then loop on a particular window in MD61-MD62. I have used the Identify Disabled Fields button and is working in the first step in the main screen area for MD61-MD62. When I select a Requirement Date and select Configuration: Maintain Usage Probabilities button to open the window. In this window I follow the same steps as in the main screen. I am not getting the result in finding the correct planning table /combination key then changing the required quantity. To add to that the request is to create a loop to update all required quantity.

    I am attaching a file to see the two screens one being SAP and one of WS showing the steps being done it that area as called out.

    I did see a post of selecting the coulomb header of planning table/combination key with no luck.
    Another aspect is the planning table/combination key fields and values what I should be using? GN_KW/80 KW what shows should be what I use in my if statement to look up or should it be only 80 KW or something else?

    Any help is appreciated. 
    Sigrid Kok can you come to my rescue again!? 

    Thanks


    ------------------------------
    Benjamin Kielas | SAP Data lead
    Generac Power Systems, Inc. | 2625106580
    ------------------------------

    Attachment(s)



  • 2.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-02-2020 11:16
    Hi Benjamin -

    Your first IF is not on the right field.  It needs to be some kind of selection field.  Right now it's set on a setfocus field, which just means where your cursor is. You need to have selected a row to be able to go further into its details.  This typically would mean selecting that entire row on the grid itself.  That's what you want to put the If on Index around. 
    select
    It will end up looking something like this.

    select 1
    Your second IF was also on the wrong field. It needs to be on the field above where you have it currently.  Again, you put it on a setfocus field, but you needed it on the actual field you want updated.  The defined condition itself is fine as is.  The setfocus row does not need anything. 

    second if

    Good luck!

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



  • 3.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-02-2020 11:20

    Thanks

    I will test it out the adjustments you are recommending.

     

    Ben Kielas

     






  • 4.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-09-2020 15:05
      |   view attached
    Jennifer Hwang
    I have tried the steps you called out with no luck. I tried on how I understood your steps and able to match your screens but did not have luck.
    I have attached the step buy step on how I was going about it. I am able to get the first look up to work as shown in my step by step and using the set focus with no issue. 

    The big help I need is second find to change the qty per model.
    I have tried many ways but with no luck.

    If you have time walk though a step by step as I think I am misinterpreting how you are explaining the process.

    Thanks for your help.


    ------------------------------
    Benjamin Kielas | Supervisor SAP Material Master Data
    Generac Power Systems, Inc. | 2625106580
    ------------------------------

    Attachment(s)

    docx
    md61 gui find add qty.docx   5.58 MB 1 version


  • 5.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-09-2020 16:21
    Hey Ben - 
    Can you send me the script .Txr file? I'd like to see what's being captured.
    Thank you!

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



  • 6.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-09-2020 22:14

    This script the finding the date works. As I recorded on 29/2020 and changed to look for 28/2020.

     

    The issue comes when selecting required qty field. Maybe I need to be laying it out a difent way for this one. I tried the focus from the first files I sent.

     

    I will send to other recordings selecting the unit size as well as the row selection for required qty. To allow testing of if statement to input data into required qty field.

     

    Ben Kielas

     






  • 7.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-09-2020 23:44

    I was able to get both to be located and put data in the needed field for one quantity.

    Now I am trying to loop it to update other field quantities. I copied the second if stamen section down and added a loop around it. Tried full section and just around the IF statement with no luck.

    Any Ideas?

     

    I did try to record making a few changes and add the loop but get the same results.

     

    Thanks

    Ben Kielas

     




    Attachment(s)

    xlsx
    MD61_try_with_loop.xlsx   5 KB 1 version
    Txr
    MD61_try_with_loop.Txr   100 KB 1 version


  • 8.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-10-2020 12:34
      |   view attached
    Hi Ben -

    I don't know that you need to copy the entire section.  If you do, I think you'd need additional steps to get back into that screen since I believe it takes you out of it first.  Try the attached.  I've looped just the line being updated itself.  Ideally you would want to update all of the lines you want changed before you take the action instead of updating one and taking an action and going back in and updating the next one and taking the same action, and repeating that. Since we're using GUI scripting and if on index, looping here is a bit different. Let me know if this one works.

    Thank you!

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

    Attachment(s)



  • 9.  RE: MD61-MD62 GUI Script field find / loop

    Posted 06-10-2020 12:39

    Thanks so much I will review.

    Ben