Working with Item Object
Administration of items
NOTE:
If possible, use BeasServiceLayer Item
Only this Object support complete beas functionality
Load Item 10003 and change Item Name and default warehouse
declare=di_item=ue_api_sbo
di_item=getbusinessobject=oitems
di_item=getbykey=10003
if <value> <> 1 then
message=error$item not found <di_item.getlasterror>
return failure
end if
di_item=itemname=newname
// with di-api-name
di_item=defaultaultwarehouse=01
// or width columnname
di_item=dfltwh=01
// Write change
di_item=update
Note: Wrong: declare=item=ue_api_spo user not "item", this is a sbo-gui-api-methode
items
|_ Pricelist
|_ whsinfo
add |
add item |
cancel |
Cancels a record from the object table. |
close |
Not supported. |
getasxml |
Returns the object from XML data, which is stored as string in a buffer. |
getbykey |
get itemcode. value=1=ok |
savetofile |
Save the object to a file as XML data. |
remove |
delete the item |
savexml |
Saves the object data to XML formatted data. |
update |
Updates the object data in the company database. |
AssetItem |
Determines whether or not this item is a Fixed Assets. (field name: AssetItem). |
AvgStdPrice |
sets the Item Cost. (field name: AvgPrice). |
BarCode |
sets the Bar Code (EAN code) for this item. (field name: CodeBars). Length: 16 characters. |
BaseUnitName |
sets the inventory Unit Name. (field name: BaseUnit). Length: 20 characters. |
Browser |
Returns the DataBrowser object. |
CommissionGroup |
sets the Commission Group code. (field name: CommisGrp). |
CommissionPercent |
sets the commission percentage for the specified Business Partner. (field name: CommisPcnt). |
CommissionSum |
sets the Total Commission for Item. (field name: CommisSum). |
CostAccountingMethod |
sets the Valuation Method used to evaluate inventory. (field name: EvalSystem). |
CustomsGroupCode |
sets the Customs Group code. Customs groups determine the customs duty for an item purchased abroad. |
DataExportCode |
sets the Data Export Code. (field name: ExportCode). Length: 20 characters. |
DefaultWarehouse |
sets the Default Warehouse. (field name: DfltWH). Length: 8 characters. |
DefaultCountingUom |
|
DesiredInventory |
sets the Preferred Quantity in Purchase Units. (field name: ReorderQty). |
ForceSelectionOfSerialNumber |
sets a valid value of "Y" or "N" type that specifies whether or not to force selection of serial numbers for documents. (field name: BlockOut). |
ForeignExpensesAccount |
sets the foreign expenses account. Length: 15 characters. |
ForeignName |
sets the item name or a description in foreign language. Length: 100 characters. |
Frozen |
sets a valid value of "Y" or "N" type that specifies whether or not this item is on hold. |
FrozenFrom |
sets the start date for keeping the item on hold. |
FrozenRemarks |
sets the remarks regarding the on hold period. Length: 30 characters. |
FrozenTo |
sets the end date for keeping the item on hold. |
GLMethod |
valid values are: 0 - Warehouses 1 - Item Group 2 - Item Level |
IncomeAccount |
Not used from DI API version 6.2 and up. |
IncomingServiceCode |
sets the incoming service code. (field name: ISvcCode). This is a foreign key to the Service Code table (OSCD), not exposed through the DI API. |
IndirectTax |
sets a valid value of "Y" or "N" type that specifies whether or not to apply indirect tax. |
InventoryItem |
sets a valid value of "Y" or "N" type that specifies whether or not this item is a warehouse item (not a service). |
InventoryUOM |
sets the Unit of Measurement for the item (for example: box, case, piece). Length: 5 characters. |
IsPhantom |
sets a valid value of "Y" or "N" type that specifies whether or not the item is a phantom item. |
IssueMethod (issuemthd) |
sets a valid value that specifies the method for issuing the item from the inventory: Backflash (automatic) or Manual. 1 or M = The user issues specified items manually from the inventory. |
ItemClass |
sets that determines wether or not current Item is a Service or Material. (field name: ItemClass). |
ItemCode |
sets the item code in the inventory. The item code must be unique. Mandatory property. Length: 20 characters. ItemCode is the primary key of item records in SAP Business One and used to distinguish between items in the system. |
ItemCountryOrg |
sets the origin country of the item. Length: 3 characters. |
ItemName |
sets the item name/description. Length: 100 characters. |
ItemsGroupCode |
sets the items group code. The user can classify items by groups. Each item can be assigned to one group only. The items group is used for reports and evaluations. |
ItemType |
sets a valid value of this Item Type. (field name: ItemType). |
IUomEntry |
|
LeadTime |
sets the lead time in days for ordering the item. |
Mainsupplier |
sets the card code of the main supplier of this item. Length: 15 characters. |
ManageBatchNumbers |
sets a valid value of "Y" or "N" type that specifies whether or not this item is managed by batch numbers. |
ManageSerialNumbers |
sets a valid value of "Y" or "N" type that specifies whether or not this item is managed by serial numbers. |
ManageSerialNumbersOnReleaseOnly |
sets a valid value of "Y" or "N" type that determines whether or not to create automatic serial numbers upon reception. (field name: ManOutOnly). |
ManageStockByWarehouse |
sets a valid value of "Y" or "N" type that specifies whether or not the inventory is managed by the warehouse quantity levels. |
Manufacturer |
sets the manufacturer code of the item (foreign key of the Manufacturers object). Mandatory property. |
MaterialGroup |
sets the Material Group. (field name: MatGrp). This is a foreign key to the Material Group OMGP object, not exposed through the DI API. |
MaterialType |
sets a valid value of BoMaterialTypes that determines current material state from Raw Material to Finished Goods. (field name: MatType). |
MaxInventory |
sets the maximum inventory quantity for this item. |
MinInventory |
sets the minimum inventory quantity for this item. |
MinOrderQuantity |
sets this Item Minimum Order Quantity limitation . (field name: MinOrdrQty). |
MovingAveragePrice |
Returns the average price of an item calculated according to quantities and prices. |
ManageStockByWareHouse |
|
NCMCode |
Returns the classification of item that is issued by the Brazilian government and used to determine the IPI tax rate. (field name: NCMCode). This is a foreign key to the NCM Code table (ONCM), not exposed through the DI API. |
OrderIntervals |
sets the inventory cycle such as, every week on Monday, or every first day of the month. The inventory cycles are defined in SAP Business One (OCYC table, which is not exposed through the DI API). |
OrderMultiple |
sets the multiple quantity in addition to the minimum quantity of items in a single order. |
OutgoingServiceCode |
sets the Outgoing Service Code. (field name: OSvcCode). This is a foreign key to the Service Code Table (OSCD), not exposed through the DI API. |
Picture |
sets the picture file name to attach to an item. (field name: PicturName). Length: 200 characters. |
PlanningSystem |
sets a valid value of BoPlanningSystem type that specifies the inventory planning system: MRP or None. |
PriceList |
set pricelist. see pricelistmethode |
ProcurementMethod |
sets a valid value of BoProcurementMethod type that specifies the procurement method of items: Buy or Make. |
ProductSource |
sets a valid value of BoProductSources that determines the product source. (field name: ProductSrc). |
Properties |
sets a valid value of "Y" or "N" type that specifies whether or not this item belongs to one or more query groups. |
PurchaseFactor1 |
sets the factor #1 by which the base price list is multiplied to calculate the purchase prices. |
PurchaseFactor2 |
sets the factor #2 by which the base price list is multiplied to calculate the purchase prices. |
PurchaseFactor3 |
sets the factor #3 by which the base price list is multiplied to calculate the purchase prices. |
PurchaseFactor4 |
sets the factor #4 by which the base price list is multiplied to calculate the purchase prices. |
PurchaseHeightUnit |
sets the units for the purchase unit width (cm, inch, etc.). Length: 6 characters. |
PurchaseHeightUnit1 |
sets the secondary units for the purchase unit width (cm, inch, etc.). |
PurchaseItem |
sets a valid value of "Y" or "N" type that specifies whether or not this item is for purchase (for example, an item can be defined as an asset). |
PurchaseItemsPerUnit |
sets the number of items per purchasing unit. |
PurchaseLengthUnit |
sets the units for the purchase unit length (cm, inches, etc.). |
PurchaseLengthUnit1 |
sets the secondary units for the purchase unit length (cm, inches, etc.). |
PurchasePackagingUnit |
sets the purchase packaging unit. Length: 8 characters. |
PurchaseQtyPerPackUnit |
sets the number of items per purchase packaging unit. |
PurchaseUnit |
sets the purchasing unit. For example, an item, which is sold in bottles, is purchased in crates of 12 bottles. The purchasing unit is, in this case, a crate. Length: 5 characters. |
PurchaseUnitHeight |
sets the height of the purchase unit. |
PurchaseUnitHeight1 |
sets the secondary height of the purchase unit. |
PurchaseUnitLength |
sets the length of the purchase unit. |
PurchaseUnitLength1 |
sets the secondary length of the purchase unit. |
PurchaseUnitVolume |
sets the volume of the purchase unit. |
PurchaseUnitWeight |
sets the weight of the purchase unit. |
PurchaseUnitWeight1 |
sets the secondary weight of the purchase unit. |
PurchaseUnitWidth |
sets the width of the purchase unit. |
PurchaseUnitWidth1 |
sets the secondary width of the purchase unit. |
PurchaseVATGroup |
sets the VAT group for a purchase item. Length: 8 characters. |
PurchaseVolumeUnit |
sets the units for the purchase unit volume (m3, ft3, litter, gallon, etc.). |
PurchaseWeightUnit |
sets the units for the purchase unit weight (kg, lb, etc.). |
PurchaseWeightUnit1 |
sets the secondary units for the purchase unit weight (kg, lb, etc.). |
PurchaseWidthUnit |
sets the units for the purchase unit width (cm, inch, etc.). |
PurchaseWidthUnit1 |
sets the secondary units for the purchase unit width (cm, inch, etc.). |
PUomEntry |
|
QuantityOnStock |
sets the total quantity of the item in the warehouse. |
QuantityOrderedByCustomers |
sets the total quantity of the items ordered by customers. |
QuantityOrderedFromVendors |
sets the total quantity of the items ordered from vendors. |
SalesFactor1 |
sets the factor #1 by which the base price list is multiplied to calculate the sale prices. |
SalesFactor2 |
sets the factor #2 by which the base price list is multiplied to calculate the sale prices. |
SalesFactor3 |
sets the factor #3 by which the base price list is multiplied to calculate the sale prices. |
SalesFactor4 |
sets the factor #4 by which the base price list is multiplied to calculate the sale prices. |
SalesHeightUnit |
sets the units for the sales unit height (cm, inch, etc.). |
SalesHeightUnit1 |
sets the secondary units for the sales unit height (cm, inch, etc.). |
SalesItem |
sets a valid value of "Y" or "N" type that specifies whether or not this item is a sales item. |
SalesItemsPerUnit |
sets the number of items per sales unit. |
SalesLengthUnit |
sets the units for the sales unit length (cm, inch, etc.). |
SalesLengthUnit1 |
sets the secondary units for the sales unit length (cm, inch, etc.). |
SalesPackagingUnit |
sets the sales packaging unit. Length: 8 characters. |
SalesQtyPerPackUnit |
sets the number of items per sales packaging unit. |
SalesUnit |
sets the sales unit. Length: 5 characters. |
SalesUnitHeight |
sets the height of the sales unit. |
SalesUnitHeight1 |
sets the secondary height of the sales unit. |
SalesUnitLength |
sets the length of the sales unit. |
SalesUnitLength1 |
sets the secondary length of the sales unit. |
SalesUnitVolume |
sets the volume of the sales unit. |
SalesUnitWeight |
sets the weight of the sales unit. |
SalesUnitWeight1 |
sets the secondary weight of the sales unit. |
SalesUnitWidth |
sets the width of the sales unit. |
SalesUnitWidth1 |
sets the secondary width of the sales unit. |
SalesVATGroup |
sets the VAT group for a sales item. Length: 8 characters. |
SalesVolumeUnit |
sets the units for the sales unit volume (m3, ft3, litter, gallon, etc.). |
SalesWeightUnit |
sets the units for the sales unit weight (kg, lb, etc.). |
SalesWeightUnit1 |
sets the secondary units for the sales unit weight (kg, lb, etc.). Length: 6 characters. |
SalesWidthUnit |
sets the units for the sales unit width (cm, inch, etc.). Length: 6 characters. |
SalesWidthUnit1 |
sets the secondary units for the sales unit width (cm, inch, etc.). |
SerialNum |
sets the serial number of the item. Length: 17 characters |
ServiceGroup |
sets the Service Group. (field name: ServiceGrp). This is a foreign key to the OSGP object, not exposed through the DI API). |
ShipType |
sets the shipping type of the item (air cargo, courier, etc.). |
SRIAndBatchManageMethod |
sets a valid value that specifies the method for managing serial numbers and batch numbers. |
SupplierCatalogNo |
sets the item catalog number as provided by the main supplier. Length: 17 characters. |
SWW |
sets an additional identifier of the item. Length: 16 characters. |
SUomEntry |
|
TreeType |
Returns a valid value of BoItemTreeTypes type that specifies the product tree type of the item (also known as bill of material type). |
User_Text |
sets a free text string for this item. Length: 10 characters. |
UomGroupEntry |
|
UserFields |
Property Userfields does not exist. Example to set userfield myitem=u_fieldname=myvalue
|
Valid |
sets a valid value of "Y" or "N" type that specifies whether or not this item is valid. |
ValidFrom |
sets the start date of the item's validity. |
ValidRemarks |
sets the remarks regarding the validity period. Length: 30 characters. |
ValidTo |
sets the end date of the item's validity. |
VatLiable |
sets a valid value of "Y" or "N" type that specifies whether or not this item is subject to VAT. |
WarrantyTemplate |
sets the template for service warranty. Length: 20 characters. |
WhsInfo |
set whsinfo. see whsinfo methode |
WTLiable |
sets a valid value of "Y" or "N" type that specifies whether or not this item is subject to Withholding tax. |
(^1) Quelle: SAP Business One SDK
declare=di_item=ue_api_sbo
di_item=getbusinessobject=oitems
di_item=itemcode=10003
di_item=itemname=Sofa
di_item=invntryuom=Peace
di_item=u_me_verbr=Peace
di_item=saleunitmsr=Peace
di_item=buyunitmsr=Peace
di_item=add
destroy di_item
All Properties can be mentioned about the table field name.
di_item=defaultaultwarehouse=01
di_item=dfltwh=01
Partly available discrepancies are avoided
Example
di_item=validfrom=
delete the date in the field.