on 12-19-2008 11:43 AM
hello,,,
I want to ask can i delete my bom items through DI API.
Will the changes of addings and deleting of items through DI API(coding n sdk)be reflected in our SBO.
Yes,
U can delete BOM through DI API.The changes will reflect in SAP Business One.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dim objBOM As SAPbobsCOM.ProductTrees
Dim intCnt As Integer
Dim strCode As String
Dim objItem As SAPbobsCOM.Items
Dim objRS As SAPbobsCOM.Recordset
Dim boolFlag As Boolean
objItem = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
objRS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
objRS.DoQuery("Select Code from OITM ")
If (objRS.RecordCount > 0) Then
For intI = 0 To objRS.RecordCount - 1
strCode = objRS.Fields.Item(0).Value
boolFlag = objItem.GetByKey(strCode)
If boolFlag = True Then
lngStatus = objBOM.Remove()
End If
objRS.MoveNext()
Next
End If
Note - This code will delete all BOM's.Change the as per u r requirement.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
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.