{"audience":"Authorization administrators, IT support teams handling temporary access requests, and managers tracking consultant and project users.","authorization_objects":[{"note":"Display user data by user group (ACTVT 03)","object":"S_USER_GRP"},{"note":"Display role assignments","object":"S_USER_AGR"}],"components":[],"countries":[],"effort_days_max":4,"effort_days_min":3,"effort_size":"S","faq":[{"a":"No. The report only lists and reminds; an extension decision should go through approval. To remove expired profiles from users, the standard user comparison (report PFCG_TIME_DEPENDENCY) should be scheduled as a daily job.","q":"Does the report extend or remove assignments automatically?"},{"a":"When a composite role is assigned, its single roles are also stored in AGR_USERS with the same dates. Depending on the selection, the report shows only the composite role or the single roles as well; by default it lists at composite level to avoid duplicates.","q":"How do single roles inside composite roles appear?"},{"a":"In the basic version the email goes to the user. If role owners are defined per role in a settings table, they can also receive a summary of their roles; this takes about one extra day.","q":"Is an email also sent to the role owner?"}],"features":[{"code":"alv","label":"ALV list (sort, filter, subtotals)","note":""},{"code":"layout","label":"User-specific layout variants","note":""},{"code":"drilldown","label":"Double-click drill-down to the document","note":"Double-clicking the user opens SU01, double-clicking the role opens PFCG."},{"code":"excel","label":"Export to Excel","note":""},{"code":"background","label":"Runs as a background job","note":""},{"code":"email","label":"Send the result by email","note":"Each user receives their ending roles and directions for an extension request."}],"functions":[],"gap":"SU01 and PFCG show the validity dates of a role assignment one user or role at a time. Role assignments can be listed in SUIM, but there is no window such as \"ending in the next 30 days\", no days-left calculation and no reminder to the user's email. If the profile of an expired assignment is still on the user because PFUD has not run, the standard list does not show that either.","id":"basis-role-assignment-expiry","industries":[],"input_columns":[],"kind":"report","language":"en","lastmod":"2026-11-17","logic":"1. Assignments of the selected users and roles are read from AGR_USERS; those whose validity end (TO_DAT) is between today and today + N days and, depending on the selection, those already ended are taken. Unlimited assignments (31.12.9999) are left out.\n2. Days left = TO_DAT − today; a negative value means the assignment has expired.\n3. For expired assignments, the role's profile is taken from AGR_1016; if it is still on the user in UST04, the flag \"user comparison needed\" is set.\n4. The role description is added from AGR_TEXTS and the parent role of a derived role from AGR_DEFINE.\n5. User group, user validity end and last logon are added from USR02; full name and email from USR21/ADRP/ADR6. If the user's own validity ends before the role assignment, this is noted as well.\n6. The result is sorted by days left; if the email option is on, each user receives the list of their ending roles.","module":"BASIS","object_type":"alv_report","output_columns":[{"calculated":false,"formula":"","label":"User","source_field":"UNAME","source_table":"AGR_USERS"},{"calculated":false,"formula":"","label":"Full name","source_field":"NAME_TEXT","source_table":"ADRP"},{"calculated":false,"formula":"","label":"Email","source_field":"SMTP_ADDR","source_table":"ADR6"},{"calculated":false,"formula":"","label":"User group","source_field":"CLASS","source_table":"USR02"},{"calculated":false,"formula":"","label":"Role","source_field":"AGR_NAME","source_table":"AGR_USERS"},{"calculated":false,"formula":"","label":"Role description","source_field":"TEXT","source_table":"AGR_TEXTS"},{"calculated":false,"formula":"","label":"Parent role","source_field":"PARENT_AGR","source_table":"AGR_DEFINE"},{"calculated":false,"formula":"","label":"Valid from","source_field":"FROM_DAT","source_table":"AGR_USERS"},{"calculated":false,"formula":"","label":"Valid to","source_field":"TO_DAT","source_table":"AGR_USERS"},{"calculated":true,"formula":"AGR_USERS-TO_DAT − today","label":"Days left","source_field":null,"source_table":null},{"calculated":true,"formula":"Expiring / Expired / Expired, user comparison needed (profile in UST04)","label":"Status","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"User valid to","source_field":"GLTGB","source_table":"USR02"},{"calculated":false,"formula":"","label":"Last logon","source_field":"TRDAT","source_table":"USR02"},{"calculated":false,"formula":"","label":"Assignment changed on","source_field":"CHANGE_DAT","source_table":"AGR_USERS"}],"parameters":[{"example":"","kind":"select_option","label":"User","name":"S_UNAME","ref_field":"AGR_USERS-UNAME","required":false},{"example":"ROL_*","kind":"select_option","label":"Role","name":"S_AGR","ref_field":"AGR_USERS-AGR_NAME","required":false},{"example":"DANISMAN","kind":"select_option","label":"User group","name":"S_CLASS","ref_field":"USR02-CLASS","required":false},{"example":"30","kind":"parameter","label":"Next number of days","name":"P_DAYS","ref_field":"","required":true},{"example":"X","kind":"checkbox","label":"Also show expired assignments","name":"P_EXPIR","ref_field":"","required":false},{"example":"X","kind":"checkbox","label":"Flag assignments whose profile is still on the user","name":"P_PFUD","ref_field":"","required":false},{"example":"","kind":"checkbox","label":"Send reminder emails to users","name":"P_MAIL","ref_field":"","required":false}],"part_of":["basis-audit-compliance-pack"],"performance":"Narrow AGR_USERS by the TO_DAT range; the assignment table is usually small, so the report finishes in seconds. Read UST04 and address data only for the users found. Schedule a weekly background run for the reminders.","quote_url":"https://nekuhub.com/en/request-a-quote/?report=basis-role-assignment-expiry","related":["basis-critical-authorizations-by-user","basis-user-license-type-last-logon"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Lists role assignments; no end window, days left, PFUD need or email reminder.","tcode":"SUIM"},{"note":"Shows the users of a role and their validity dates one role at a time.","tcode":"PFCG"}],"summary":"A custom ALV report that lists role assignments whose validity ends within the next N days or that have ended but are still on the user, with the user's email, the parent role, user validity and last logon. It also flags expired assignments whose profile is still in the user master because the user comparison (PFUD) has not run, and it can send reminder emails to users.","tables":[{"access":"read","join_on":"","role":"User-to-role assignment, validity and change date (driving table)","table":"AGR_USERS","variant":"both"},{"access":"read","join_on":"AGR_TEXTS-AGR_NAME = AGR_USERS-AGR_NAME AND AGR_TEXTS-SPRAS = SY-LANGU AND AGR_TEXTS-LINE = 0","role":"Role description","table":"AGR_TEXTS","variant":"both"},{"access":"read","join_on":"AGR_DEFINE-AGR_NAME = AGR_USERS-AGR_NAME","role":"Parent role of a derived role","table":"AGR_DEFINE","variant":"both"},{"access":"read","join_on":"AGR_1016-AGR_NAME = AGR_USERS-AGR_NAME","role":"Generated profile of the role","table":"AGR_1016","variant":"both"},{"access":"read","join_on":"UST04-BNAME = AGR_USERS-UNAME AND UST04-PROFILE = AGR_1016-PROFILE","role":"Whether the profile is still on the user","table":"UST04","variant":"both"},{"access":"read","join_on":"USR02-BNAME = AGR_USERS-UNAME","role":"User group, user validity and last logon","table":"USR02","variant":"both"},{"access":"read","join_on":"USR21-BNAME = AGR_USERS-UNAME","role":"Person and address number of the user","table":"USR21","variant":"both"},{"access":"read","join_on":"ADRP-PERSNUMBER = USR21-PERSNUMBER","role":"Full name of the user","table":"ADRP","variant":"both"},{"access":"read","join_on":"ADR6-ADDRNUMBER = USR21-ADDRNUMBER AND ADR6-PERSNUMBER = USR21-PERSNUMBER","role":"Email address of the user for the reminder","table":"ADR6","variant":"both"}],"title":"Expiring and Expired Role Assignments Report","url":"https://nekuhub.com/en/reports/expiring-and-expired-role-assignments-report/","vendor_id":"nekudos"}