Automate

 View Only
  • 1.  Delete banking details in Customer Master

    Posted 03-17-2021 14:22
    Hi,

    I am building Winshuttle script using Studio 12.1 to delete customer master banking details (Transaction code : FD02 / XD02) based on a list of customer, bank key, bank account, bank type. 

    I tried to achieve this using 'If on index' condition (GUI mode) to identify which row to delete. However, I can only make it work to check the bank account only. I don't find a way to make it check both bank account and bank key.

    Doing a delete action based on bank account only is risky because there are customers with the same bank accounts but different bank keys and we may want to delete one of them only.

    Is this something that can be achieved using Winshuttle ?
    I found discussion on this subject using Winshuttle Function Module (WFM)  /WINSHTLQ/TRN_FUNC_CUSTOMER but we don't have WFM activated so this is not an option.

    Thank you !
    Lara

    ------------------------------
    Larasari Adianto | SAP Analyst
    Canadian National Railway Co. |
    ------------------------------


  • 2.  RE: Delete banking details in Customer Master

    Posted 03-17-2021 14:59
    Hi Lara -

    Unfortunately you can only have one IF on Index, you cannot have nested If on Index statements.  Have you considered possibly using this as an opportunity to get the WFM installed? Is this an impossibility?

    Thank you!

    ------------------------------
    Jennifer Hwang | SE
    Winshuttle North America
    ------------------------------



  • 3.  RE: Delete banking details in Customer Master

    Posted 03-18-2021 08:55
    Hi Jennifer,

    Thank you for your quick reply ! Right now, installing WFM is not an option. Is there any other way that this can be done using Winshuttle without the WFM or IF on Index ?

    Thanks,
    Lara

    ------------------------------
    Larasari Adianto | SAP Analyst
    Canadian National Railway Co. |
    ------------------------------



  • 4.  RE: Delete banking details in Customer Master

    Posted 03-18-2021 09:11
    Hi Lara -

    Your only option left is then to use the old school approach that was required before If on Index existed and before the custom rFM. It means you need to do a two-step process.

    In the first step you would do a read, using XD02 or FD02, or XD03 or FD03, and you would need to read down the bank key and bank account values, for the first three rows, into 3 sets of unique columns. There's only up to three rows you would be able to capture as there is no way to move around on that table, so that is a set limitation.

    After you download the data in step one, then you would record a separate XD02 for the actual update. You would have 3 if statements, one that deletes row one, one that deletes row two, one that deletes row three. And your if statements would be built on whether the bank key and the bank account you want to delete (those would be in a set of columns in your excel), match the downloaded columns from step one. You would do a compare to column and you would have to do it nested to capture both bank key and bank account values being matches. Based on whether the conditions match, it would delete the right row from the first three. 

    This does not require gui scripting, but obviously, as you can see, it will require some effort to set up. But once it is set up, it will work fine, at least if you only have 3 banking entries to deal with. 

    Good luck!

    ------------------------------
    Jennifer Hwang | SE
    Winshuttle North America
    ------------------------------