on 11-29-2018 9:32 AM
I am trying to update prices based on a previous article here but I am at a bit of loss as what Ors should be I persume it should be a recordset of some description what is hapening is the customer is having two price lists and we need to update one based on the other price times 0.08. Oh by the way I am using the 9.3 DI in this case.
Can someone help me out here
Link to orginal artcile is here
https://archive.sap.com/discussions/thread/1882181
Also what should the values of spurchasepricelist,spuchasepricefield,scurrency
The reason we have to do this is the customer updates prices via values and not a percentage.
SAPbobsCOM.Items oMM = null; oMM = (SAPbobsCOM.Items)globalD.oCompany.GetBusinessObject(BoObjectTypes.oItems);
int lretcode = 0;if (oMM.GetByKey(itemcode)) <br>{ <br> bool need2update = false; <br><br> for (int p = 0; p < oMM.PriceList.Count; p++) <br> { <br> oMM.PriceList.SetCurrentLine(p); <br> if (oMM.PriceList.PriceList.ToString() == spurchasepricelist) { <br> price = Convert.ToDouble(oRs.Fields.Item(spuchasepricefield).Value); oMM.PriceList.Price = price; <br> oMM.PriceList.Currency = scurrency; <br> need2update = true; <br> break; <br> } <br> } <br> if (need2update) <br> { <br> lretcode = oMM.Update(); <br> if (lretcode != 0) <br> throw new Exception(string.Format("(pricelist){0}-{1}", globalD.oCompany.GetLastErrorCode(), globalD.oCompany.GetLastErrorDescription()));
}
}
The "SAP BusinessObjects - BI Platform - SDK" tag is for the BusinessObjects SDK, which is not the same as the SAP BusinessOne SDK. You will get a better response if you ask this question under one of the B1 tags.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.