Automate

 View Only
  • 1.  BP Partner Functions - Adding a new line to a variable length list with Automate Studio in SAP

    Posted 06-17-2025 16:26
    Edited by Samuel Varney 06-17-2025 16:26

    Has anybody else run across this somewhat specific issue with Automate Studio and have a solution for it?

    What we are trying to do: Add a Partner Function to a Business Partner role.

    The issue: Adding the Partner Function involves a variable length list. Because of this, during the recording with Studio, it isn't really possible to capture exactly what line the new Partner Function will fall on in the list. This is the specific use case we are having this issue with now, but something similar will likely come up with other use cases where we are trying to add lines to variable length lists.

    Example: Let's say I first open up a Business Partner. Upon opening, the Business Partner opens to its General Data role page;

    In order to add a new Partner Function for this example, I change roles and head to the proper screen where the Partner Functions exist. So far in Studio and for recording, there are no issues up until this point:

    At this point in the recording and process, the issue appears: there are no buttons or anything like that in our UI for adding a new Partner Function to this list of existing Partner Functions. Just the grid you can see in the above image. If there are 7 Partner Functions (and therefore lines) in the grid, I have to enter a new one on line 8. If there are 4, as pictured above, the new Partner Function goes on line 5. The problem is that during the recording, it is impossible to capture an empty line without knowing in advance how many Partner Functions (lines) already exist. Since this varies greatly from Business Partner to Business Partner, we have an issue in capturing an empty line in a recording to add a new one with a script.

    We are aware that a potential solution to an issue such as this is using the GUI Scripting mode and "indexed looping" functionality. Before we enable GUI scripting, I am wondering if there is another work-around to this issue without having to go down that route? This is probably not the only time we will come across a variable length grid we need to add lines to, so this question is relevant not just to this specific circumstance.

    Our system, by the way, is S4



    ------------------------------
    Samuel Varney
    Cooperative Regions Of Organic Producer Pools
    ------------------------------



  • 2.  RE: BP Partner Functions - Adding a new line to a variable length list with Automate Studio in SAP

    Employee
    Posted 06-17-2025 17:35
    Edited by Sigrid Kok 06-17-2025 17:38

    Hi Samuel

    Business Partner can be a beast to automate, and partner functions make it even "funner" :)

    Here is my "trick", but you may have to adjust based on your partner types.  Here is the full screen for partners

    I click in Partner type and click sort descending.  For me that puts SP on the bottom - it may be different for you.

    Now I use the bottom search options and enter "SP"

    When I hit enter, SP is on top and there are lots of blank rows below:

    Now you can enter your new partner in an empty row - I tend to go toward the bottom. 

    Then hit enter to re-sort everything

    Now repeat those steps to add more.

    In S4 there may be a BAPI for that, but I'm not so sure.  You can try Fiori automation, which doesn't worry about positions, instead. I would avoid GUI scripting unless that was my only option.

    Many customers have "Z" partners, i.e. custom partners, and that may be at the end (or top).  You can change the sort order and the partner type to search for that work for you.

    I hope this gives you an idea. 

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------



  • 3.  RE: BP Partner Functions - Adding a new line to a variable length list with Automate Studio in SAP

    Posted 06-18-2025 12:22

    Hello Sigrid, 

    I appreciate your speedy response. This is indeed a clever trick, and appears to work in this circumstance. Thanks for your help! 



    ------------------------------
    Samuel Varney
    Cooperative Regions Of Organic Producer Pools
    ------------------------------



  • 4.  RE: BP Partner Functions - Adding a new line to a variable length list with Automate Studio in SAP

    Employee
    Posted 06-18-2025 13:58

    Glad it might work for you, Samuel!



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------