采购订单 价格 条件权限控制 授权账户
1、事务代码 me21/22/23/N
2、权限对像如下几个 M_BEST_BSA/EKG/EKO/WRK ACTVT 09
SELECT DISTINCT a.* FROM ( SELECT DISTINCT
agr_users.uname
FROM agr_1251
INNER JOIN agr_users ON agr_1251.agr_name = agr_users.agr_name AND agr_1251.MANDT = agr_users.MANDT
JOIN usrefus ON usrefus.bname = agr_users.uname AND usrefus.MANDT = agr_users.MANDT
WHERE agr_1251.agr_name LIKE 'Z%' AND agr_1251.deleted <> 'X' AND agr_users.MANDT = '800' and
agr_1251.OBJECT = 'M_BEST_EKG' AND agr_1251.field = 'ACTVT' AND agr_1251.low IN ('09','*')
UNION ALL
SELECT DISTINCT
agr_users.uname
FROM agr_1251
INNER JOIN agr_users ON agr_1251.agr_name = agr_users.agr_name AND agr_1251.MANDT = agr_users.MANDT
JOIN usrefus ON usrefus.bname = agr_users.uname AND usrefus.MANDT = agr_users.MANDT
WHERE agr_1251.agr_name LIKE 'Z%' AND agr_1251.deleted <> 'X' AND agr_users.MANDT = '800' and
agr_1251.OBJECT = 'M_BEST_BSA' AND agr_1251.field = 'ACTVT' AND agr_1251.low IN ('09','*')
UNION ALL
SELECT DISTINCT
agr_users.uname
FROM agr_1251
INNER JOIN agr_users ON agr_1251.agr_name = agr_users.agr_name AND agr_1251.MANDT = agr_users.MANDT
JOIN usrefus ON usrefus.bname = agr_users.uname AND usrefus.MANDT = agr_users.MANDT
WHERE agr_1251.agr_name LIKE 'Z%' AND agr_1251.deleted <> 'X' AND agr_users.MANDT = '800' AND
agr_1251.OBJECT = 'M_BEST_WRK' AND agr_1251.field = 'ACTVT' AND agr_1251.low IN ('09','*')
UNION ALL
SELECT DISTINCT
agr_users.uname
FROM agr_1251
INNER JOIN agr_users ON agr_1251.agr_name = agr_users.agr_name AND agr_1251.MANDT = agr_users.MANDT
JOIN usrefus ON usrefus.bname = agr_users.uname AND usrefus.MANDT = agr_users.MANDT
WHERE agr_1251.agr_name LIKE 'Z%' AND agr_1251.deleted <> 'X' AND agr_users.MANDT = '800' AND
agr_1251.OBJECT = 'M_BEST_EKO' AND agr_1251.field = 'ACTVT' AND agr_1251.low IN ('09','*')
UNION ALL
SELECT DISTINCT
agr_users.uname
FROM agr_1251
INNER JOIN agr_users ON agr_1251.agr_name = agr_users.agr_name AND agr_1251.MANDT = agr_users.MANDT
JOIN usrefus ON usrefus.bname = agr_users.uname AND usrefus.MANDT = agr_users.MANDT
WHERE agr_1251.agr_name LIKE 'Z%' AND agr_1251.deleted <> 'X' AND agr_users.MANDT = '800' AND
agr_1251.OBJECT = 'S_TCODE' AND agr_1251.field = 'TCD' AND agr_1251.low in ('ME21','ME21N','ME22','ME22N','ME23','ME23N')
) a GROUP BY a.uname HAVING count(*) = 5
ORDER BY a.uname