Skip to Content

Hi All,

When I cancel Inventory Transfer by SDK, the posting and document date of cancel document always get from original date of base document, but I want to get from current date. So, anyone has an idea for this?

Thanks and Regards,

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member

    First of all do not create Document. It should be Discussion.

    Anyway, for your concern you should add first a datasource.

    frmIncoming.DataSources.UserDataSources.Add(“txt_DateF”, SAPbouiCOM.BoDataType.dt_DATE)

    ‘Set Value

    txt_DateF.Value = Format(Date.Today, “yyyyMMdd”)

    ‘Posting to SAP

            Dim oIP As SAPbobsCOM.Payments

            oIP = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)

    oIP.DocDate = frmIncoming.DataSources.UserDataSources.Item(“txt_DateF”).Value


    1. Former Member Post author

      Hi Bry,

      When we cancel Inventory Transfer, SAP will create a new one with negative quantity. But It always get posting date from posting date of original document. How can I set posting date = current date in cancel transfer document. This is my code for cancel transfer:

      Dim oInv As SAPbobsCOM.StockTransfer = Nothing

      oInv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransfer)


      sErrID = oInv.Cancel()

      If sErrID <> 0 Then

                  oCompany.GetLastError(sErrID, sErrMsg)


                  oCompany = Nothing

                  Exit Sub

      End If

        1. Former Member Post author

          Hi Bry,

          Thanks for your supporting, I tried to use your way but the Posting Date in Cancel Inventory Transfer document still get from original document date. I think SDK doesn’t support to set Cancel Date of Cancel Transfer document.


Leave a Reply