on 10-13-2014 2:24 PM
I want to Update PurchaseUnitWeight of an Item with DI API. The SourceCode works on all Items with the UoM-Group is set to Manual. But it doesn't work with other UoM-Groups. Even that I can update the Weight in SBO manually.
Here the simple Code that creates the problem:
SAPbobsCOM.Items item = WUD_Standard.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
item.GetByKey("00000001");
item.PurchaseUnitWeight = 15.0;
int ret = item.Update();
Solution from SAP Support:
SAPbobsCOM.Items item = WUD_Standard.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
item.GetByKey("00000001");
item.UnitOfMeasurements.SetCurrentLine(1); // Purchase
item.UnitOfMeasurements.Weight1 = 15;
item.UnitOfMeasurements.Weight1Unit = 3; // kg
item.UnitOfMeasurements.SetCurrentLine(5); // Sale
item.UnitOfMeasurements.Weight1 = 15;
item.UnitOfMeasurements.Weight1Unit = 3; // kg
item.Update();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
I can reproduce this faulty behavior in SBO 9.0 PL 12. Which PL are you using ( they changed some problems with item/uom in recent PL ) ?
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try to set also
oItms.PurchaseUnit =
oItms.PurchaseItemsPerUnit =
oItms.PurchasePackagingUnit =
oItms.PurchaseQtyPerPackUnit =
oItms.PurchaseUnitVolume =
oItms.PurchaseUnitWeight1 =15.0
maybe the object need one of these field.
Regards alessandro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same Problem with this Code: SAPbobsCOM.Items item = WUD_Standard.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems); | |
item.GetByKey("00000001"); | |
item.PurchaseUnitWeight = 15.0; | |
item.PurchaseUnit = "Stk"; | |
item.PurchaseItemsPerUnit = 1; | |
item.PurchasePackagingUnit = "Stk"; | |
item.PurchaseQtyPerPackUnit = 1; | |
item.PurchaseUnitVolume = 1; | |
item.PurchaseUnitWeight1 = 1.0; | |
int ret = item.Update(); |
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
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.