Example #1
0
        /// <summary>
        /// Delete SAP record if exist
        /// </summary>
        /// <param name="sap">SAP connection</param>
        /// <param name="docEntry">Doc entry to delete</param>
        /// <returns></returns>
        public bool Delete(SAPConnection sap, int docEntry)
        {
            IDocuments document = sap.Company.GetBusinessObject(BoObjectTypes.oOrders);

            if (document.GetByKey(docEntry))
            {
                sap.CheckResponse(document.Cancel());
                return(true);
            }
            return(false);
        }