on 12-02-2022 2:21 AM
Hello All,
I am trying to update the price according to the period range (Valid From-Valid To) using SAP HANA Service Layer.
Period and Volume Discounts uses the same table as Special Price.
In table CardCode column has *2 value which is Price List Internal Number.
When I fetch the data using service layer, the CardCode columns has blank value.
https://xx.xx.xx.xx:50000/b1s/v1/SpecialPrices(CardCode='*2',ItemCode='TEST0001' )<br>
I tried several combinations to update the price, but it did not work.
Following error comes every time.
Does anyone have any idea how to update the price using service layer?
SAP Business One 10 version for HANA FP 2202
Thanks & Regards.
Manish Pant
Hi manish.pant005,
According to SAP Note 3006734, this is a system limitation.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi manish.pant005,
I would suggest you to check using DI API. Following sample code should help:
SpecialPrices speciaPrice = g_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSpecialPrices);
speciaPrice.GetByKey("18900275", "*7");
speciaPrice.ItemCode = "18900275";
speciaPrice.PriceListNum = 2;
speciaPrice.SpecialPricesDataAreas.SpecialPricesQuantityAreas.SetCurrentLine(0);
speciaPrice.SpecialPricesDataAreas.SpecialPricesQuantityAreas.Quantity = 20.0;
speciaPrice.SpecialPricesDataAreas.SpecialPricesQuantityAreas.PriceCurrency = "EUR";
speciaPrice.SpecialPricesDataAreas.SpecialPricesQuantityAreas.SpecialPrice = 40.0;
speciaPrice.SpecialPricesDataAreas.SetCurrentLine(0);
speciaPrice.SpecialPricesDataAreas.Dateto = Convert.ToDateTime("2020-08-13");
speciaPrice.SpecialPricesDataAreas.DateFrom = Convert.ToDateTime("2020-08-13");
speciaPrice.SpecialPricesDataAreas.PriceCurrency = "EUR";
speciaPrice.SpecialPricesDataAreas.SpecialPrice = 77.50;
speciaPrice.SpecialPricesDataAreas.PriceListNo = 3;
speciaPrice.Update();
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
Hi ankit.chauhan1,
Thank you for always supporting.
Yes with DI API it is working fine.
Thanks and Best Regards.
Manish Pant
User | Count |
---|---|
94 | |
11 | |
9 | |
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.