biuan SAP® BUSINESS ONE SDK
DTW Inventory / Item Master Data / Items - Prices
API Items Prices

Description

Items_Prices is a child object of the Items object that represents the items' prices in the Inventory and Production module. This object enables you to specify prices for various price lists.

Source table: ITM1

Object Model

Remarks

Mandatory fields in SAP Business One: Price and PriceList.

To display the form in the application:

  1. Select Inventory --> Item Master Data.
  2. Select a Price List, and set a price.

Example

The sample prints the pricelist of the Item and updates the price of the Item in the current price list.
Price_list (Visual Basic)
Name=Code_VB>
Dim lErrCode As Long Dim sErrMsg As String Dim bRetVal As Boolean Dim oItems As SAPbobsCOM.Items Dim oItemPrice As SAPbobsCOM.Items_Prices Dim i As Integer 'Retrieve Items object oItems = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems) 'Retrieve specific item bRetVal = oItems.GetByKey("X0004") 'Check errors If Not bRetVal Then oCompany.GetLastError(lErrCode, sErrMsg) MsgBox("Failed to Retrieve the record " & lErrCode & " " & sErrMsg) Exit Sub End If 'get item price object oItemPrice = oItems.PriceList 'print price lists names and prices For i = 0 To oItemPrice.Count - 1 oItemPrice.SetCurrentLine(i) 'print price list name Debug.WriteLine(oItemPrice.PriceListName()) 'print the items price Debug.WriteLine(oItemPrice.Price()) Next 'change the price of the item in the last price list oItemPrice.Price = 600 'save changes oItems.Update()

See Also

SAP® B1 DI-API C# definition

public class Items_PricesClass : IItems_Prices, Items_Prices { public virtual string AdditionalCurrency1 { get; set; } public virtual string AdditionalCurrency2 { get; set; } public virtual double AdditionalPrice1 { get; set; } public virtual double AdditionalPrice2 { get; set; } public virtual int BasePriceList { get; set; } public virtual int Count { get; } public virtual string Currency { get; set; } public virtual double Factor { get; set; } public virtual double Price { get; set; } public virtual int PriceList { get; } public virtual string PriceListName { get; } public virtual SAPbobsCOM.UoMPrices UoMPrices { get; } public virtual SAPbobsCOM.UserFields UserFields { get; } public extern Items_PricesClass(); public virtual extern void SetCurrentLine(int LineNum); }

Related information


Uo M Prices UoMPrices Object· Table: ITM9
UoMPrices Class
   Parent: Items Prices Items_Prices Object· Table: ITM1


SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates