Automate

  • 1.  Winshuttle scripting

    Posted 04-26-2022 05:30

    Hello Winshuttle experts! 

    Good day.
    I was tasked to modify an existing Winshuttle script to add some sort of 'indicator' to Winshuttle postings (please find attached). My partners have an FI document posting script, and they want an indicator whether the posting is from Winshuttle or not. In this case, they want to put the string 'WSXXXXX' on the field XREF1_HD in the header of the posted document. The script is a recording of FB01, and it works well. The issue I'm having is that the field XREF1_HD is only filled up internally, during batch input. 

    Now I'm exploring (option 1) Business Add-ins within SAP but the additional Reference Key 1 field in FB01 screens  is just not possible business-wise. I'm also considering (option 2) creating a script from scratch using the Winshuttle BAPI option, but then the XREF1_HD field is not available within the funciton module BAPI_ACC_DOCUMENT_POST. Searching online I've figured I could use a Badi, ACC_DOCUMENT, for this option, but then I still need to choose one of the fields in BAPI_ACC_DOCUMENT_POST in order to past the value to ACCIT-XREF1_HD, which is a bit complicated.

    Anyone has experience in filling up the XREF1_HD field via Winshuttle?

    Screenshot above is the goal after a Winshuttle posting.

    Appreciate any help, thanks!

    Best regards,

    Bagani



    ------------------------------
    Bagani Sularte | Technology Consultant
    DXC Technology
    ------------------------------


  • 2.  RE: Winshuttle scripting

    Employee
    Posted 04-27-2022 10:18
    Hi Bagani

    Am not familiar with those fields in a journal entry.  So from some quick research, those fields are used in RE for other purposes and otherwise they are not editable by default.
    https://wiki.scn.sap.com/wiki/display/ERPFI/Field+BKPF-XREF1_HD+and+BKPF-XREF2_HD+in+FI+posting 

    This post says you can use tcode OB32 to add the field - basically configuration
    https://answers.sap.com/questions/8573019/header-ref-key-bkpf-bkpf-xref1hd--bkpf-xref2hd.html 
    I tried it

    and it shows up in FB02/3 in the document header as editable

    So I think the easiest way to accomplish this, if that field is editable - or you make it editable, is to record an FB02 to update that field, and then chain the FB01 with the FB02 to set the ref key, aka xref1_hd.  A quick test shows that is possible, once it is editable

    Hope that helps,
    Sigrid




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



  • 3.  RE: Winshuttle scripting

    Posted 04-28-2022 03:56

    Hi, Sigrid.

    Thank you very much for the response! My colleagues and I are already considering implementing this solution. We're just finding areas we can tweak for our own purposes. 

    Best regards,

    Bagani



    ------------------------------
    Bagani Sularte | Technology Consultant
    DXC Technology
    ------------------------------