Automate

 View Only
  • 1.  S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Posted 09-05-2021 22:01

    Hi All

    S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    I'm trying to write a script to Add a new Partner to the Partner Functions tab. 
    The row it needs to add will differ depending information already held on the record.  Ie.  it could be the 4th row in one record but the 9th in another.
    I'm having difficulty figuring out how to map it to select the next empty row - my script keeps going to the row number I used during the recording:


    Does anyone have a handy tip for this please?



    ------------------------------
    Gabrielle Falls | Master Data Team Leader
    Ballance | 07 5728545
    ------------------------------


  • 2.  RE: S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Posted 09-06-2021 02:56
    Hi Gabrielle, I see a great trick from Sigrid before, if you enter 'SP' in 'Partner Role' (bottom of screen in your screenshot) and the click on 'Sort in descending order' the SP partner will be in the top row (1st row) and then you can add the new partner in the bottom row (9th row), once you hit enter the SP moves down one. You can add up to 9 partners this way as each time one is added the SP moves down. Good for adding one or multiple in a script. Hope this helps!

    ------------------------------
    Kelly Nicholson | Master Data Services Manager
    Yara International Asa | +447738271024
    ------------------------------



  • 3.  RE: S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Posted 09-06-2021 21:02
    Appreciate this, thanks very much Kelly.  It works beautifully during recording; however it's still not quite there on a subsequent run and, when debugging, it keeps returning to the row in the script (eg PARVW(05) in my upload script above).  I've tried manually changing that but to no avail either  .. grrrr  :-)

    ------------------------------
    Gabrielle Falls | Master Data Team Leader
    Ballance | 07 5728545
    ------------------------------



  • 4.  RE: S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Employee
    Posted 09-07-2021 09:34
    Hey Gabrielle,
    With Kelly's suggestion, the idea is to point to the last partner function (in most cases, this is SP), so we know that everything below it is a blank row. 
    In your case, please point it to ZT which is your last entry. 

    Here is the sample script from Sigrid - perhaps you can test this & compare with your version. 

    https://community.winshuttle.com/viewdocument/re-bapi-to-add-business-partner-fu-1?CommunityKey=38e230c6-6617-4960-a664-beb6b492e9b2&tab=librarydocuments



    ------------------------------
    Jayasri Varyani | Solutions Engineer
    Winshuttle North America |
    ------------------------------



  • 5.  RE: S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Posted 09-08-2021 18:35
    Jayasri/Sigrid, 

    I was able to get the script to work but I had to remove the Sales Org, Distribution Channel and Division for the script as it stated those were not input fields.  Thanks for script.

    ------------------------------
    Elisa Vadla | DeveloperClear Process Solutions
    ------------------------------



  • 6.  RE: S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Posted 09-08-2021 18:36
    Jayasri/Sigrid,

    I tried this script and it did not insert the New Partner.  I changes the pinned data for my customer information.  No message was returned in the log column.  I have attached my script and data file. 


    ------------------------------
    Elisa Vadla | DeveloperClear Process Solutions
    ------------------------------

    Attachment(s)



  • 7.  RE: S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Employee
    Posted 09-09-2021 13:24
    Hi Elisa, 
    I took a quick look. It appears that the run did not do anything - No Records were uploaded as the per the log.
    Your Loop ID was blank. 


    Can you run it again with a input structure  with header and the detail row (like shown below) ? 



    Another thing you can do is try in DEBUG mode to see if your data makes it to the correct screens. 

    Also, Is it possible that this BP# in your example does not have the partner function XP? In which case, the position button does not do anything. 
    Are you able to identify a mandatory partner function that exists by default for all BPs and is usually the last on the list? 
    we will still enter our new data several rows below leaving room for anything else that may be present after you position your cursor. 

    Hope this helps
    Jayasri



    ------------------------------
    Jayasri Varyani | SE
    Winshuttle North America |
    ------------------------------



  • 8.  RE: S/4HANA - Business Partner - Sales and Distribution - Partner Functions > Add Partner

    Posted 09-09-2021 22:51

    'Afternoon All  

    Thank you so much for your interest and assistance - I have finally written an Add Partner script and got it working ... I think!

    I'll run a few more records through it on Monday morning to confirm.
    Great to close out the week with a win :-)

    Gab.



    ------------------------------
    Gabrielle Falls | Master Data Team Leader
    Ballance | 07 5728545
    ------------------------------