点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
在通过编码添加批准阶段时,"下表(ODBC -2035)[الرسالة131-183]中已经存在该条目。"
私人子AddApprovalStages()
尝试
将oApprovalStage设置为SAPbobsCOM.ApprovalStage
将Dio oApprovalStageApprovers设置为SAPbobsCOM.ApprovalStageApprovers
将oFirstApprover设置为SAPbobsCOM.ApprovalStageApprover
Dim oSecondApprover作为SAPbobsCOM.ApprovalStageApprover
将Dim oApprovalStageParams设置为SAPbobsCOM.ApprovalStageParams
将oCompanyService设置为SAPbobsCOM.CompanyService
oCompanyService = oCompany.GetCompanyService Dim oApprovalStagesService作为SAPbobsCOM.ApprovalStagesService
oApprovalStagesService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.ApprovalStagesService)
oApprovalStage = oApprovalStagesService.GetDataInterface(SAPbobsCOM.ApprovalStagesServiceDataInterfaces.assdiApprovalStage)
'oApprovalStageParams = oApprovalStagesService.GetDataInterface(ApprovalStagesServiceDataInterfaces.assdiApprovalStageParams)
'oApprovalStageParams.Code = 26'oApprovalStage = oApprovalStagesService.GetApprovalStage(oApprovalStageParams)'oApprovalStage.Code = 1 oApprovalStage.Name =" Sample_Repeat" oApprovalStage.Remarks =" Comment12115"
oApprovalStageApprovers = oApprovalStage.ApprovalStageApprovers
oFirstApprover = oApprovalStageApprovers.Add
oFirstApprover.UserID = 3
oSecondApprover = oApprovalStageApprovers.Add
oSecondApprover.UserID = 2
oApprovalStage.NoOfApproversRequired = 1
oApprovalStageParams = oApprovalStagesService.AddApprovalStage(oApprovalStage)'调用oApprovalStagesService.AddApprovalStage(oApprovalStage)异常捕获MessageBox.Show(ex.Message&ex.StackTrace)End Try End Sub
我的代码和错误即将出现
" oApprovalStageParams = oApprovalStagesService.AddApprovalStage(oApprovalStage)
"
检查数据库中是否有名称为" Sample_Repeat"的批准
否。 数据库中没有这样的命名批准
我得到了答案,错误是由于数据损坏而引起的。
一周热门 更多>