SAP权限查询(事务码)
SELECT distinct B.AGR_NAME,B.UNAME,right(B.UNAME,6) as xuhao,A.TCODE
FROM AGR_TCODES AS A INNER JOIN AGR_USERS AS B
ON A.AGR_NAME = B.AGR_NAME INNER JOIN V_USERNAME AS C
ON B.UNAME = C.BNAME
where B.UNAME like '%***%'
ORDER BY B.UNAME,A.TCODE