Automate

 View Only
  • 1.  Script BAPI_CUSTOMER_HIERARCHIE_INS

    Posted 20 days ago

    Hi,

    I am trying to use BAPI_CUSTOMER_HIERARCHIE_INS to create customer hierarchies. While the BAPI works for one record, I cannot understand how to prepare the file structure if I have multiple records. I would expect a flat file structure without header/item relationship as the data sits in one table.

    But Automate creates a loop on the BAPI and the log which I cannot get rid of. I cannot understand how to format the file for Header and item rows.

    Has anyone tried this before?

    Thanks



    ------------------------------
    Preeti Yadav
    FUCHS SE
    ------------------------------


  • 2.  RE: Script BAPI_CUSTOMER_HIERARCHIE_INS

    Employee
    Posted 20 days ago

    Hi Preeti 

    Thank you for reaching out. Regarding your query to upload multiple entries, this is the whole purpose of Loops.

    Studio automatically adds loops in the Mapper and selects padding for some data types when you create a BAPI-based script.
     
    Changing the Loops
    If you have related data across multiple tables - for example, the fields for a line item - you can replace the separate loops with one longer loop:
     
    Delete the second loop by selecting the row, right-clicking, and then clicking Delete.
    Click the remaining loop, and then change the row number in the through box to the last row that you want to include in the loop.
    Repeat steps 1 and 2 for any additional tables and fields that need to be part of the line item. 

     Please see below for how direct works, and let me know if you still need further assistance. Please create a support ticket at support.precisely.com.

    https://help.precisely.com/r/t/1016755833/2023-12-31/Automate-Studio/Connect/Latest/en-US/Automate-Studio-with-Studio-Administrator-User-Guide/Create-a-script-from-a-BAPI

    https://help.precisely.com/r/t/1016755809/2023-12-31/Automate-Studio/Connect/Latest/en-US/Automate-Studio-with-Studio-Administrator-User-Guide/Looping-overview

    Thanks

    Archana



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



  • 3.  RE: Script BAPI_CUSTOMER_HIERARCHIE_INS

    Posted 20 days ago

    Thanks Archana. I had checked the threads but it was not helpful. I am now getting the error "Invalid Reference Range" and there is no explanation for the error.

    I have also created a support ticket.

    Thanks



    ------------------------------
    Preeti Yadav
    FUCHS SE
    ------------------------------



  • 4.  RE: Script BAPI_CUSTOMER_HIERARCHIE_INS

    Posted 19 days ago

    Using the same BAPI but I don't use loops in it.

    where needed, i just repeat the higher level customer with another subordinate.

    hope this helps



    ------------------------------
    Ed Meiners
    Wessanen Nederland Holding BV
    ------------------------------



  • 5.  RE: Script BAPI_CUSTOMER_HIERARCHIE_INS

    Posted 19 days ago

    Hi Ed,

    Thanks a lot for the hint. It works like a charm :). 



    ------------------------------
    Preeti Yadav
    FUCHS SE
    ------------------------------



  • 6.  RE: Script BAPI_CUSTOMER_HIERARCHIE_INS

    Employee
    Posted 19 days ago

    Hi @Preeti Yadav

    Since the tips shared so far are not helping you, it would be good for you to help us understand exactly what you want to do, what you tried plus specific errors.

    Can you please share your script and template, as well?  Please remove any sensitive data, as needed.

    Thanks,

    Sigrid



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