on 06-19-2023 9:38 AM
使用GetNewObjectKey()获取sap最后一次创建的对象主键容易出错。特别是在多线程情况下,会有很多拿错值的数据
Company Company;
//...
StockTransfer oTgtStock = (StockTransfer)Company.GetBusinessObject(BoObjectTypes.oStockTransferDraft); errCode = oTgtStock.Add();
//...
int errCode = oTgtStock.Add();
if (errCode == 0)
{
oTgtStock.GetByKey(int.Parse(Company.GetNewObjectKey()));
}
User | Count |
---|---|
101 | |
12 | |
10 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.