📚 SAP Business One SDK Help

Items Object
See Also  Members  Example

Description

Items is a business object that represents the items master data in the Inventory and Production module.

This object enables you to:

  • Add an item details.
  • Retrieve an item by its key.
  • Update item details.
  • Save the object in XML format.

Source table: OITM.

Object Model































Remarks

Mandatory fields in SAP Business One: ItemCode and Manufacturer.

To display the Item Master Data window, from the SAP Business One Main Menu, choose Inventory --> Item Master Data.

SAP Business One also lets you manage all fixed assets in the asset master data. To access the Asset Master Data window, from the SAP Business One Main Menu, choose Financials --> Fixed Assets --> Asset Master Data.

Example

The following example shows how to use the GetByKey method to retrieve the object data from the database.
GetByKey Method (Visual Basic)Copy Code
Dim vItem As SAPbobsCOM.Items
Dim RetVal As Long
Set vItem = vCmp.GetBusinessObject(oItems)

'Retrieve a record by its key from the database
RetVal = vItem.GetByKey("A00043")

'Check errors
  If RetVal <> 0 Then
     vCmp.GetLastError ErrCode, ErrMsg
     MsgBox "Failed to Retrieve the record " & ErrCode & " " & ErrMsg
     Exit Sub
  End If

Example

See Also