1. 程式人生 > >匯出SAP系統內的使用者-角色-TCode關係

匯出SAP系統內的使用者-角色-TCode關係

SELECT
    SAPSR3.agr_users.AGR_NAME,
    SAPSR3.agr_users.UNAME,
    SAPSR3.AGR_TCODES.TCODE,
    SAPSR3.v_username.NAME_TEXT
FROM (SAPSR3.AGR_TCODES INNER JOIN SAPSR3.agr_users ON SAPSR3.AGR_TCODES.AGR_NAME =SAPSR3.agr_users.AGR_NAME)
INNER JOIN SAPSR3.v_username ON SAPSR3.agr_users.UNAME=v_username.BNAME

where (SAPSR3.agr_users.AGR_NAME like 'Role_%' or SAPSR3.agr_users.AGR_NAME like 'COMPROLE_%')
order by SAPSR3.agr_users.UNAME,SAPSR3.AGR_TCODES.TCODE
 ;


o_userid-role-tcode.jpg