Automate

 View Only
  • 1.  RFM called twice for one Excel line

    Posted 06-03-2022 07:09

    In a direct script we call an RFM that converts parameters into an extension structure and then calls BAPI_RE_RO_CREATE. The RFM has the same input parameters as BAPI_RE_RO_CREATE plus a table for additional fields to be coded into the extension table of BAPI_RE_CREATE.

     

    In one pass, the RFM was called twice for some lines. We can recognize this by the automatically assigned number of the rental objects. In these cases, two Rental Objects have been created, but only the number of the second Rental Object has been written in the excel row.

     

    It is possible that during the execution of the script, the quality of the network connection between Winshuttle and the SAP server was poor. But this must not lead to duplicate data records.

     

    How can we ensure that no data is created twice when executing a direct script?

     

     

    Mit freundlichen Grüßen / Kind regards

     

    Stéphane Schmuck
    Executive Digital Business Consultant-Leader Digitalization

     

     

    ATCP Management GmbH

     

     



  • 2.  RE: RFM called twice for one Excel line

    Employee
    Posted 06-07-2022 13:15
    Hi Stephane

    Can you please elaborate on what you're doing?

    You shared you: call an RFM that converts parameters into an extension structure and then calls BAPI_RE_RO_CREATE.

    I'm assuming the RFM is custom, correct?   If so, can you try to run the BAPI_RE_RO_CREATE with already populated extension structures successfully?  If that works, I would suggest you ask for the BASIS team who built it what is going on.   You might want to see if you call each part (BAPI/rFM) individually and then chain them, so that you have better control over what is occurring.

    As to your questions, BAPIs should only post one record.   Are you doing some type of validation or read that generates a new number in the first call?

    What happens in SAP if there are connectivity problems will depend on when this occurs, as the data is uploaded and committed.  Slowness shouldn't affect it unless you are losing connectivity or timeout, which is rare.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 3.  RE: RFM called twice for one Excel line

    Posted 06-09-2022 08:09
    Hi Sigrid,

    The RFM has the same interface like BAPI_RE_RO_CREATE, plus a table for the values, which shall be converted into the extension tables (Z-fields).

    The RFM only converts the values of the z-fields into the table EXTENSION_IN of BAPI_RE_RO_CREATE as populating the EXTENSION_IN in excel is not manageable.

    After populating the EXTENSION_IN, the RFM calls BAPI_RE_RO_CREATE and returns all output tables of BAPI_RE_RO_CREATE.

    So it only covers one call of BAPI_RE_RO_CREATE. It does no validation or read or any other calls.

    If the RFM is only called once, the BAPI_RE_RO_CREATE must also be called only one time.

     

    The RFM worked well all the time. The errors occurred only in one run of the script and only for a few of the rows. The error is not reproducible.

     

    How can it happen, that Winshuttle calls the RFM two times for one single row? What can be the reason? And how can we avoid this?

     

    Thanks for your support.

    Stéphane



    ------------------------------
    Stéphane Schmuck | Executive Digital Business Consultant-Leader Digitalization
    ATCP Management GmbH | 015114575608
    ------------------------------



  • 4.  RE: RFM called twice for one Excel line

    Employee
    Posted 06-09-2022 10:22
    Hi again Stéphane,
    I am not entirely sure, but I'm willing to take a look at it.  Can you attach an example?  
    Thanks,
    Sigrid


    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 5.  RE: RFM called twice for one Excel line

    Posted 06-14-2022 03:25
    Hi Sigrid,
    thanks for the answer.

    The error can't be reproduced for each run, it happens sometimes...

    Winshuttle log shows creation of MO 8029/1343/134 directly after MO 8029/1343/132

     

    The creation date in SAP table shows, that MO 8029/1343/133 has bee created directly before MO 8029/1343/134.


    As MO 8029/1343/133 has been created with the same data as 8029/1343/134 it can therefore be ruled out that this rental property was created by another user. It must have been created by Winshuttle.

     

    Regards,
    Stéphane

    ------------------------------
    Stéphane Schmuck | Executive Digital Business Consultant-Leader Digitalization
    ATCP Management GmbH | 015114575608
    ------------------------------