点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
添加文档时出现此错误"基本文档卡和目标文档卡不匹配"
SAPbobsCOM.Documents oPDPMRequest =(SAPbobsCOM.Documents)fmCo.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDownPayments); 如果(oPDPMRequest.GetByKey(int.Parse(FldVal))) SAPbobsCOM.Documents oPDPMInvoice =(SAPbobsCOM.Documents)fmCo.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDownPayments); //设置预付款标题值 oPDPMInvoice.CardCode = oPDPMRequest.CardCode; oPDPMInvoice.DocDueDate = DateTime.Now; oPDPMInvoice.DownPaymentPercentage = oPDPMRequest.DownPaymentPercentage; oPDPMInvoice.VatPercent = oPDPMRequest.VatPercent; oPDPMInvoice.DiscountPercent = 0; oPDPMInvoice.DocTotal = oPDPMRequest.DocTotal; oPDPMInvoice.DocRate = oPDPMRequest.DocRate; oPDPMInvoice.GroupNumber = oPDPMRequest.GroupNumber; oPDPMInvoice.DeferredTax = oPDPMInvoice.DeferredTax; //设置预付款类型 oPDPMInvoice.DownPaymentType = SAPbobsCOM.DownPaymentTypeEnum.dptInvoice; //设置预付款行值 oPDPMInvoice.Lines.BaseType = 22; oPDPMInvoice.Lines.BaseEntry = oPDPMRequest.DocEntry; 如果(oPDPMInvoice.Add()!= 0) { Application.SBO_Application.MessageBox(fmCo.GetLastErrorDescription()); 返回; } 其他 { Application.SBO_Application.MessageBox("购买发票[" + fmCo.GetNewObjectKey()+"]已创建!"); } }
类型错误
一周热门 更多>