Automate

 View Only
  • 1.  Removing Bank details from a Customer

    Posted 10-02-2018 15:23
      |   view attached

    Hi everyone. I've been using Winshuttle Studio and Composer now for over 2 years, and I appreciate the establishment of this community and the interesting posts and contributions. My co-worker Karla, who has way more experience than I do in creating Transaction scripts, has a question:
            "Does anyone know how to write an XD01 script, without gui scripting, that will allow us to select and remove all rows of bank information given that each c
    ustomer can have a varied number of these records?  Attached is the method I think might work, but is there a better way to go about this?"

     

    ------------------------------
    Barbara Ballee | Senior Analyst | Global Data Management & Governance
    Kellogg Company
    ------------------------------

    Attachment(s)

    docx
    Remove Bank Details.docx   88 KB 1 version


  • 2.  RE: Removing Bank details from a Customer

    Posted 10-03-2018 02:46
    ​I'd like to correct myself and note that we are trying to create an XD02 transaction, not XD01.

    ------------------------------
    Barbara Ballee | Senior Analyst | Global Data Management & Governance
    Kellogg Company
    ------------------------------



  • 3.  RE: Removing Bank details from a Customer

    Posted 10-03-2018 03:27
    Well, you can always use either LSMW to automate data upload or similar, or create a Batch input recording with SHDB

    This will be inside SAP, and will not be able to be reused or published in a Winshuttle portal, and this should be called either directly or via the batch input processing sap has or via job, depends on your needs.

    These are very different solutions, as winshuttle is directly integrated in the client machine running things from inside SAP makes this a little more complex, so depending on the scenario, and what the recording needs to do, could not tell which of the three options would be best if any.

    Hope this helps, regards
    Luis

    ------------------------------
    Luis Esteban Giner

    ------------------------------



  • 4.  RE: Removing Bank details from a Customer

    Posted 10-03-2018 04:30

    ​Hi,

    Create a script to remove the bank details on the first row. With the first row deleted, I am assuming that what was the second row will move up to fill the blank line and become the first row. If this is NOT the case, this solution won't work.


    Edit the script and include a loop that checks if a field such as Bank Key is blank and keep looping until it is blank.

    The only issue with this is that I know Winshuttle can have trouble working with tables and may not pick up correctly whether there is data in the cell.  This fixed oin ver 11 I think.

    Regards

    Mark



    ------------------------------
    Mark Tiller | Delivery Enhancement Developer
    Transport for London (TfL) | London | 0203 054 4196
    ------------------------------



  • 5.  RE: Removing Bank details from a Customer

    Posted 10-03-2018 08:19
    ​Mark's solution would be ideal, though I have not seen a way to create a loop that checks SAP values. 

    My solution was to similarly delete the row, but then edit the script and create an If condition based on KNBK-BANKS(01) being {NOT_BLANK}. Copy and paste this section into the script which equals the maximum number of entries that may occur in KNBK for any individual customer.  Now winshuttle will run the delete command enough times to clear out all of the bank details.

    ------------------------------
    Christopher Clark
    Data Analyst
    ------------------------------



  • 6.  RE: Removing Bank details from a Customer

    Posted 10-03-2018 09:02
    This would require a round-trip, but there is actually a Winshuttle created BAPI/rFM for customer that could do this: /WINSHTLQ/TRN_FUNC_CUSTOMER

    It does require that you provide the current banking details that you want to delete, so as long as you get that as a first step using an extract, you could use the rFM to delete those.

    Good luck!

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



  • 7.  RE: Removing Bank details from a Customer

    Posted 12-10-2018 00:52
    Hi,
    Using Function - /WINSHTLQ/TRN_FUNC_CUSTOMER would be ideal for this.




    ------------------------------
    Rahul Gupta
    SSE | India
    ------------------------------



  • 8.  RE: Removing Bank details from a Customer

    Posted 01-21-2019 18:00
    Hi,
    Is there any example and documentation on how to use this Function Module: WINSHTLQ/TRN_FUNC_CUSTOMER

    Thanks
    Ocal

    ------------------------------
    OCAL YILMAZ | Sr. Mgr, Enterprise data governance
    Ascend Performance Materials Holdings Inc. | 4084314619
    ------------------------------



  • 9.  RE: Removing Bank details from a Customer

    Employee
    Posted 01-21-2019 20:13
    Hi Barbara and All

    Attached is a copy of a Direct script to delete a Customer's bank using our custom remote-enabled Function Module:  /WINSHTLQ/TRN_FUNC_CUSTOMER 

    • You you have to pass in customer number, bank country, bank key and account.    There are two places for these parameters - in the ExportOthers table, as well as I_BANKDATA.  I mapped them to the same columns in the script.
    • Make sure you turn off zero padding in the properties for customer number, bank key and account number
    • There are also a number fields to pass that tell the rFM what you're going to do:
    • I_MODE_BANK:  DELETE (or EXIST to check if it's already defined, ADD, CHANGE)
    • I_KOART: D (D for customer, K for vendor)
    • I_CONFIRM_CHANGES: X
    • I_MODE: IBAN (this is used for banks, email, taxes and partner functions)
    • I_CREATE_IBAN: N 
    • There are a number of message fields.  The one that has the most information is MSGTX in the T_MESSAGES group.

    I have asked our documentation team to add instructions to our public documentation.  I have something rough that I can share if you're interested.  If so, private message me and I'll send it.

    Hope this helps,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle North America
    ------------------------------