cancel
Showing results for 
Search instead for 
Did you mean: 

How to create discounts for customer?

Former Member
0 Kudos

Hello Forum,

how can I create temporal limited discounts for specific Customer? If someone has a service contract with out company, we want to deliver spare parts to him without any costs. Currently we have to enter the data manually into the Inventory->PriceList->SpecialPrices->SpecialPricesForBusinessPartner.

It seems to be the SPP1 table we are looking for. How Can I add a discount for a BusinessPartner and a article (by Code)?

Thanks

Mark

Accepted Solutions (1)

Accepted Solutions (1)

pedro_magueija
Active Contributor
0 Kudos

Hi Mark,

You can find a sample in the SDK Help Center file. Type SpecialPrices in the search box and you can find more information.

Here is the sample:

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()


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

In this Chm file is a lot of useful information. Thanks for the hint

pedro_magueija
Active Contributor
0 Kudos

Hi Mark,

Just to be complete, in the same directory there is a Samples folder with code samples for many of the common tasks needed to create addons. Worth to have a look as well.

Cheers.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Answers (0)