Categories Uncategorized How to cancel Inventory Transfer with current date April 9, 2012 | 128 Views | Former Member SAP Business One SDK sap business one software development kit share share tweet share Follow 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, Alert Moderator To report this post you need to login first. 5 Replies 5 Comments You must be Logged on to comment or reply to a post. Former Member April 9, 2012 at 11:01 am 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 Regards, like (0) Former Member Post authorApril 10, 2012 at 3:33 am 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) oInv.GetByKey(1) sErrID = oInv.Cancel() If sErrID <> 0 Then oCompany.GetLastError(sErrID, sErrMsg) MsgBox(sErrMsg) oCompany = Nothing Exit Sub End If like (0) Former Member April 10, 2012 at 3:40 pm Did you try to use again the DocDate? oInv.Docdate = frmIncoming.DataSources.UserDataSources.Item(“txt_DateF”).Value like (0) Former Member April 10, 2012 at 3:44 pm Did you try to use again the DocDate? oInv.Docdate = frmIncoming.DataSources.UserDataSources.Item(“txt_DateF”).Value like (0) Former Member Post authorApril 11, 2012 at 4:58 am 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. like (0) Leave a Reply Cancel replyYou must be logged in to post a comment.