实施公司 sap b1 9.2存储过程
--------------------------------------------------------【1】物料主数据---------------------------------------------------------
------------------------1.1物料主数据中默认仓库必须选择-------------------------------------------------
IF (@object_type='4' and @transaction_type in(N'A',N'U') )
BEGIN
IF EXISTS (SELECT 1 FROM OITM T0 WHERE T0.DfltWH IS NULL AND T0.ItemCode=@list_of_cols_val_tab_del)
BEGIN
SET @error=1
SET @error_message=N'管理提示1.1:物料主数据中"库存数据"页签中"默认仓库"必须选择,请检查确认!'
SELECT @Error,@Error_Message
END
END
------------------------1.2物料主数据中库存单位必须维护-------------------------------------------------
IF (@object_type='4' and @transaction_type in(N'A',N'U') )
BEGIN
IF EXISTS (SELECT 1 FROM OITM T0 WHERE ISNULL(T0.InvntryUom,0) NOT IN(SELECT [Uomname] FROM OUOM) AND T0.ItemCode=@list_of_cols_val_tab_del)
BEGIN
SET @error=1
SET @error_message=N'管理提示1.2:物料主数据中"库存数据"页签中"库存计量单位"必须填写,请检查确认!'
SELECT @Error,@Error_Message
END
END
1