我尝试编写一个软件,以便生产可以轻松确认材料项目。现在当我想通过key获取生产订单时,找不到PO。如果我对商业伙伴做同样的事情,它会起作用。我们为 SAP B1 使用 PPS One 插件,那么有问题吗?是否无法从此插件访问数据或我要更改什么?
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!"); }
还有一件奇怪的事情,在 SAP GUI 中,po 显示为工单,但 db 中的对应表是@PPSONE_PRDORDERS。但如果我从 SAPbobsCOM.ProductionOrders 更改为 SAPbobsCOM.WorkOrders,它也不起作用。