biuan SAP® BUSINESS ONE SDK
API Special Prices

Description

Represents a discount for a specific item in a specific price list. The discount can apply to a specific business partner or for all business partners.

  • Specific Partners: To view discounts for specific business partners, select Inventory --> Price Lists --> Special Prices --> Special Prices for Business Partners.
  • All Business Partners: To view discounts for all business partners, select Inventory --> Price Lists --> Period and Volume Discounts. In previous versions, this was called Hierarchies and Expansions.

For a specific business partner, the item and business partner must be unique; for all business partners, the item and price list must be unique.

Source table: OSPP

Mandatory fields: ItemCode

Object Model

Remarks

For marketing documents, the system checks for special prices in the following order:

  1. Special prices (this object) for the specified business partner
  2. Discount groups (DiscountGroups) for the specified business partner and item
  3. Special prices (this object) for all business partners

If no special prices are found, the price is set by the default price list for the business partner.

Example

Adding a special price -- Specific Partners (Visual Basic)
'Call the object Dim vSP As SAPbobsCOM.SpecialPrices Set vSP = vCompany.GetBusinessObject(oSpecialPrices) 'set object's properties vSP.CardCode = "D10002" vSP.Currency = "Eur" vSP.DiscountPercent = 30.3 vSP.ItemCode = "A00001" vSP.Price = 355.3 vSP.PriceListNum = 0 'Call the Add method Call vSP.Add
Adding a special price -- All Business Partners (Visual Basic)
Dim oSpp As SAPbobsCOM.SpecialPrices oSpp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSpecialPrices) oSpp.PriceListNum = 4 oSpp.ItemCode = "I0001" oSpp.Price = 33.033 oSpp.SpecialPricesDataAreas.PriceListNo = 4 oSpp.SpecialPricesDataAreas.DateFrom = #10/20/2007 12:14:00 PM# oSpp.SpecialPricesDataAreas.Dateto = #11/20/2007 12:14:00 PM# oSpp.SpecialPricesDataAreas.Discount = 5 oSpp.SpecialPricesDataAreas.Add() oSpp.SpecialPricesDataAreas.PriceListNo = 4 oSpp.SpecialPricesDataAreas.DateFrom = #11/21/2007 12:14:00 PM# oSpp.SpecialPricesDataAreas.Dateto = #11/30/2007 12:14:00 PM# oSpp.SpecialPricesDataAreas.Discount = 6 oSpp.SpecialPricesDataAreas.Add() oSpp.SpecialPricesDataAreas.PriceListNo = 4 oSpp.SpecialPricesDataAreas.DateFrom = #12/21/2008 12:14:00 PM# oSpp.SpecialPricesDataAreas.Dateto = #12/30/2008 12:14:00 PM# oSpp.SpecialPricesDataAreas.SpecialPrice = 28.808 oSpp.SpecialPricesDataAreas.SpecialPricesQuantityAreas.Quantity = 101 oSpp.SpecialPricesDataAreas.SpecialPricesQuantityAreas.SpecialPrice = 25.012 oSpp.SpecialPricesDataAreas.SpecialPricesQuantityAreas.Add() oSpp.SpecialPricesDataAreas.SpecialPricesQuantityAreas.Quantity = 401 oSpp.SpecialPricesDataAreas.SpecialPricesQuantityAreas.SpecialPrice = 24.98 Dim retV As Integer = oSpp.Add()

See Also

SAP® B1 DI-API C# definition

public class SpecialPricesClass : ISpecialPrices, SpecialPrices { public virtual BoYesNoEnum AutoUpdate { get; set; } public virtual DataBrowser Browser { get; } public virtual string CardCode { get; set; } public virtual string Currency { get; set; } public virtual double DiscountPercent { get; set; } public virtual string ItemCode { get; set; } public virtual double Price { get; set; } public virtual int PriceListNum { get; set; } public virtual SourceCurrencyEnum SourcePrice { get; set; } public virtual SAPbobsCOM.SpecialPricesDataAreas SpecialPricesDataAreas { get; } public virtual SAPbobsCOM.UserFields UserFields { get; } public extern SpecialPricesClass(); public virtual extern int Add(); public virtual extern string GetAsXML(); public virtual extern bool GetByKey( string ItemCode, string CardCode); public virtual extern bool GetByKeyDiscounts( string ItemCode, int PriceListNum); public virtual extern int Remove(); public virtual extern void SaveToFile( string FileName); public virtual extern void SaveXML( ref string FileName); public virtual extern int Update(); }

Related information


Special Prices Data Areas SpecialPricesDataAreas Object· Table: SPP1
SpecialPricesDataAreas is a child object of SpecialPrices object and represents special prices that are valid only for specified periods such as, holidays and season sales. Source table: SPP1.
   Parent: Special Prices SpecialPrices Object· Table: OSPP

Source Currency Enum SourceCurrencyEnum Enumeration
   Parent: Special Prices SpecialPrices Object· Table: OSPP


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