I try to write a sowftware so the production can easily confirm the material items. Now when I want to get a production order by a key, it can't find a PO. If I do the same thing with business partner, it works. We use the PPS One addon for the SAP B1, so is there the problem? Is it not possible to access the data from this addon or what have I to change?
SAPbobsCOM.BusinessPartners vBP = connection.company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
SAPbobsCOM.ProductionOrders vPO = connection.company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductionOrders);
if(vBP.GetByKey("L22437"))
{
WriteLogLine("Name: " + vBP.CardName); // Works, i get the Name!
}
else { WriteLogLine("No matching customer record was found!"); }
if (vPO.GetByKey(anyKey)) // tried a lot of keys, no one worked
{
WriteLogLine(vPO.GetAsXML());
}
else { WriteLogLine("No matching production order record was found!"); }
There is also a weird thing, in the SAP GUI the po are displayed as work orders, but the coresponding table in the db is @PPSONE_PRDORDERS. But it works neither if I change from SAPbobsCOM.ProductionOrders to SAPbobsCOM.WorkOrders.