Automate

Welcome to the Automate community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements

 View Only
  • 1.  Is there a BAPI/RFM for a Mass Update of BP (Customer, Supplier, Contact Person)?

    Posted 09-04-2026 04:31

    Is there a BAPI/RFM for a Mass Update of BP (Customer, Supplier, Contact Person)?

    I've tried via XD99 T-Code but that doesn't list all fields, like 'Street2' 'Street3', 'ContactPerson FirstName'

    Example data structure in load file:



    ------------------------------
    Best Regards,
    Nart
    ------------------------------


  • 2.  RE: Is there a BAPI/RFM for a Mass Update of BP (Customer, Supplier, Contact Person)?

    Employee
    Posted 09-04-2026 05:05

    Hi Nart

    Thank you for reaching out.

    Have you tried to record the script by following the steps below?

    https://customer.precisely.com/s/article/Creating-a-Script-for-BP-Business-Partner-maintenance-360024517472

    Additionally, please see below the BAPI's available.If you need further assistance, you can create a support ticket at support.precisely.com, and an engineer will be able to help.

    BAPI / RFM Type Purpose
    /WINSHTLQ/TRN_FUNC_CUSTOMER Precisely AFM RFM Update/Delete Customer, Partner Functions, Bank Details
    BAPI_ADDRESSORG_GETDETAIL Standard BAPI Get BP Address/Email attributes
    BAPI_ADDRESSORG_CHANGE Standard BAPI Update BP Address/Email (Customer & Supplier)
    BAPI_CREATE_FROM_DATA Standard BAPI Create Contact Person BP
    /WINSHTLQ/SD_CUST_MAINTAIN_ALL Precisely AFM RFM Maintain Customer Master Data

    Regarding BAPIs, normally, we advise reaching out to your ABAP/SAP Basis team, who can provide BAPI for a particular T-code.

    Thanks

    Archana



    ------------------------------
    Archana Chandar
    *Precisely Software Inc.
    ------------------------------



  • 3.  RE: Is there a BAPI/RFM for a Mass Update of BP (Customer, Supplier, Contact Person)?

    Employee
    Posted 09-04-2026 05:07

    Hi Nart,

    Thanks for reaching out.

    Recommended BAPIs/RFMs for Business Partner Mass Update

    1. Address Update (Customer / Vendor / BP General Address)

    BAPI_ADDRESSORG_GETDETAIL and BAPI_ADDRESSORG_CHANGE will allow you to get and update many of the BP attributes, including Email. An example to get the Vendor BP emails would include LFA1 as Vendor. KNA1 would work for Customer.

    You will want to focus on BAPIADSMTP for emails, and BAPICOMREM if you need the remark/note.

    These BAPIs operate on the address (Central Address Management) layer, which means they have access to a broader set of address fields than XD99, including Street2, Street3, and supplemental address lines.

    2. Contact Person Creation

    Use BAPI_CREATE_FROM_DATA, set to Category "Person" and Grouping "ZCOP" (or the equivalent standard grouping). This populates First Name and Last Name and generates a BP Number.

    Next, with a BP recording, open the BP (Customer), go to the Relationships screen, select Category FBUR001 (Has Contact Person), and enter the Contact Person number. You can also add Department, Function, and Note at this step.

    You can also go the other way, starting from the Contact Person and assigning Customers using the "Is Contact Person" relationship.

    3. Partner Function Assignment (Sales Role)

    For adding a Contact Person as a Partner Function on a sales role, use the RFM:

    /WINSHTLQ/TRN_FUNC_CUSTOMER

    and pass data to the PF_XKNVP structure.

    4. BUP2 Transaction Script (Fallback)

    As a fallback, since there does not seem to be a dedicated BAPI that covers all BP fields, transaction scripts based on T-Code BUP2 can be used. For example, one script can be used to download the existing data from SAP and a second script can perform the updates.

    5. BP Email Update via T-Code BP

    A step-by-step approach for updating a Business Partner using T-Code BP:

    1. Enter Business Partner number on SAP screen.
    2. Click the Change icon.
    3. Add an "If First Transaction" condition for the first two actions.
    4. Open the Folder icon in SAP.
    5. Enter the Business Partner.
    6. Enter the required details (for example, email information).
    7. Back out.
    8. Exit the transaction.

    Community Sample Files Available

    The following downloadable sample scripts were shared in the Precisely Community Forum:

    • BAPI_ADDRESSORG_CHANGE_VendorEmailAddress_Excel.Txr
    • BAPI_ADDRESSORG_CHANGE_VendorEmailAddress_Excel.xlsx
    • BAPI_ADDRESSORG_GETDETAIL_VendorEmailAddresses_XLS.Txr

    You can access these directly from the Precisely Community thread:

     
    Kind Regards
    Jagat Kaushal


    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------



  • 4.  RE: Is there a BAPI/RFM for a Mass Update of BP (Customer, Supplier, Contact Person)?

    Posted 09-07-2026 03:19
    Edited by Nart Paksamut 09-07-2026 03:19

    Hi Jagat,

    Which script is suitable for the attached data structure in my first comment? This is for Mass Update though, not creation.



    ------------------------------
    Best Regards,
    Nart
    ------------------------------



  • 5.  RE: Is there a BAPI/RFM for a Mass Update of BP (Customer, Supplier, Contact Person)?

    Employee
    Posted 30 days ago
    Hi Nart,
    Thanks for following up! Since you're focusing on a mass update rather than creation, here are my suggestions based on what has worked well for others in similar cases.
    Start by extracting existing data from SAP.
    Before making any changes, run the script BAPI_ADDRESSORG_GETDETAIL_VendorEmailAddresses_XLS.Txr first. This provides a clear view of the current data-such as email addresses and remarks-and allows you to verify it against your source data beforehand. It uses LFA1 for Vendors, KNA1 for Customers, BAPIADSMTP for emails, and BAPICOMREM for notes or remarks.
    Skipping this step can cause avoidable issues later, so it's worth taking a few extra minutes.
    Next, perform the actual update.
    Once your Excel file is prepared and verified, run:
    BAPI_ADDRESSORG_CHANGE_VendorEmailAddress_Excel.Txr
    BAPI_ADDRESSORG_CHANGE_VendorEmailAddress_Excel.xlsx
    Be careful not to mix Inserts with Updates or Deletes in the same execution, as the BAPI handles these operations poorly together. Keep inserts separate; however, updates and deletes can be combined.

    Why go BAPI over a transaction script?
    Honestly, using the BAPI route is far more dependable for large-scale updates. Since it operates at the Central Address Management level, it provides access to fields that XD99 doesn't reveal-such as Street2, Street3, and extra address lines. In contrast, transaction-based scripts like BUP2 can be more fragile and slower when handling high volumes.

    Where to get the scripts
    All three files are available to download directly from the community thread here:  Business Partner data update in S4 Hana – Precisely Community
    Just make sure you test everything in a non-production environment first - especially if your data structure has any quirks compared to the standard setup these scripts were built against.
    Hope that helps
    Hope that helps
    For further queries, I would suggest you open a ticket on the support portal.
    Kind Regards


    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------



  • 6.  RE: Is there a BAPI/RFM for a Mass Update of BP (Customer, Supplier, Contact Person)?

    Employee
    Posted 29 days ago

    Hi Nart

    Please see below the BAPI's available.If you need further assistance, you can create a support ticket at support.precisely.com, and an engineer will be able to help.

    BAPI / RFM Type Purpose
    /WINSHTLQ/TRN_FUNC_CUSTOMER Precisely AFM RFM Update/Delete Customer, Partner Functions, Bank Details
    BAPI_ADDRESSORG_GETDETAIL Standard BAPI Get BP Address/Email attributes
    BAPI_ADDRESSORG_CHANGE Standard BAPI Update BP Address/Email (Customer & Supplier)
    BAPI_CREATE_FROM_DATA Standard BAPI Create Contact Person BP
    /WINSHTLQ/SD_CUST_MAINTAIN_ALL Precisely AFM RFM Maintain Customer Master Data


    ------------------------------
    Archana Chandar
    *Precisely Software Inc.
    ------------------------------