on 03-23-2006 1:59 AM
I want to get Item's cost price. I get a business boject 'item',g_oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems),There are two key to decide one cost price,one is 'itemcode',another is 'whscode',How to get one record by using 'GetByKey' method? Thanks.
Hi Lu Xilin,
I suggest you use the recordset of SAP to query your way to the pricelist. Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lu,
You can get the price in the warehouse as following if you don't want to use a recordset:
Dim oItem As SAPbobsCOM.Items
Dim dPrice As Double
Dim i As Integer
oItem = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
oItem.GetByKey("MyItem")
For i = 0 To oItem.WhsInfo.Count - 1
oItem.WhsInfo.SetCurrentLine(i)
If oItem.WhsInfo.WarehouseCode = "TheWarehouseIWant" Then
dPrice = oItem.WhsInfo.StandardAveragePrice
End If
Next
Hope it helps,
Adele
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.