Automate

 View Only
  • 1.  Change SalesGroup

    Posted 09-23-2025 03:33

    Hello, I want to change the Sales Group in BP. In Debug mode it works, but in Run mode I get an exception error. What am I doing wrong?



    ------------------------------
    PP Wortman
    Master Data Specialist
    Dekker Zevenhuizen B.V.
    ------------------------------

    Attachment(s)

    Txr
    BP_20250923_091130.Txr   969 KB 1 version
    xlsx
    BP_20250923_092437.xlsx   5 KB 1 version


  • 2.  RE: Change SalesGroup

    Posted 09-23-2025 13:08

    Hi Wortman, 

    Try with the scritp attached, if I´m not wrong, try to avoid manual "enter key" when you are creating scripts, and only use a controls or buttons located on SAP screen,  apparently the error that you have is because the script require an interaction from user, that's why when you debug it works but when you run fail.



    ------------------------------
    Luis Rodriguez
    Nissan Mexicana S.A. de C.V.
    Ciudad de México
    ------------------------------

    Attachment(s)

    Txr
    BP_20250923_091130.Txr   890 KB 1 version
    xlsx
    BP_20250923_092437.xlsx   5 KB 1 version


  • 3.  RE: Change SalesGroup

    Posted 09-24-2025 05:03

    Thanks, I've made some progress and now it creates the first one via run, but the next ones get stuck. I've tried everything, but nothing helps."



    ------------------------------
    PP Wortman
    Master Data Specialist
    Dekker Zevenhuizen B.V.
    ------------------------------

    Attachment(s)

    xlsx
    BP_20250924_085412.xlsx   5 KB 1 version
    Txr
    BP_20250924_085412.Txr   972 KB 1 version


  • 4.  RE: Change SalesGroup

    Posted 09-24-2025 10:19

    Hi Wortman

    Which field are you trying to update? The script is going to the company code section, but there is not a sales group field and it errors that field GS_KNVV-VKGRP does not exist. In my system, the field is in the "sales and distribution" section, on view "Orders". Is this maybe the issue?

    Try this recording. 



    ------------------------------
    Vanessa Kutasi
    Foundation Admin./Application Analyst II
    Idexx Operations, Inc.
    USA
    ------------------------------

    Attachment(s)

    xlsx
    BP_20250924_100920.xlsx   4 KB 1 version
    Txr
    BP_20250924_100920.Txr   974 KB 1 version


  • 5.  RE: Change SalesGroup

    Employee
    Posted 09-24-2025 12:45

    Hi PP,

    Please note that with BP, it will remember where you left off. So if the first works, you might need to put an IF first row around the section that navigates to the sales area data.  OR you can back out to the first general role before saving.  I prefer to use the IF.

    For example in this script

    It swaps to edit and then goes to the sales area data to a specific tab on the first row.  After that the second row and onwards will be positioned to the right screen automatically, so you can skip those steps.

    The first step it picks up is the switch sales area data and makes the adjustments.

    FYI

    Sigrid

    Best Regards,

    Sigrid



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



  • 6.  RE: Change SalesGroup

    Posted 09-25-2025 02:17

    Thank you for your help. It was my first experience with transaction BP. With Sigrid's tip, it worked out. Thanks to all of you."



    ------------------------------
    PP Wortman
    Master Data Specialist
    Dekker Zevenhuizen B.V.
    ------------------------------



  • 7.  RE: Change SalesGroup

    Employee
    Posted 09-25-2025 10:07

    Glad I could help, PP.

    Now you know why I call the BP tcode "the Beast"! :)

    The Fiori app is an alternative, if you have Fiori automation, and I think it makes automation simpler. However there are a number of save points if creating.

    Best Regards,

    Sigrid



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