如何在 SDK 中的 Item Masterdata PriceList 上更新项目的价格?
这是我的示例代码:
Try
Dim aItemMas As SAPbobsCOM.Items
aItemMas = SAP_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
With aItemMas
.ItemCode = "SMPLE-23456"
.ItemName = "Sample Test Item222"
.ForeignName = "01-29992"
.PriceList.PriceListName(1).GetType()
.PriceList.Currency = ""
.PriceList.Price = 100
.ItemType = SAPbobsCOM.ItemTypeEnum.itItems
.InventoryItem = SAPbobsCOM.BoYesNoEnum.tNO
.SalesItem = SAPbobsCOM.BoYesNoEnum.tYES
.PurchaseItem = SAPbobsCOM.BoYesNoEnum.tNO
.ItemsGroupCode = 100
.SalesVATGroup = "ZO"
End With
Dim Result As Integer
Dim ErrNo As Long
Dim ErrMsg As String = ""
Result = aItemMas.Add
SAP_Company.GetLastError(ErrNo, ErrMsg)
If (ErrNo <> 0) Then
MsgBox(ErrNo & ": " & ErrMsg, vbCritical)
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try