cancel
Showing results for 
Search instead for 
Did you mean: 

Delete BOM items via DI API

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes,

U can delete BOM through DI API.The changes will reflect in SAP Business One.

Former Member
0 Kudos

Tell me the exact method for deleting BOM via DI API in Detail...

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

Can u go through this blog

it will help you.