{"audience":"SAP authorization administrators, license managers, IT managers and internal audit.","authorization_objects":[{"note":"Display authorization for user data by user group","object":"S_USER_GRP"},{"note":"Display authorization for role assignments","object":"S_USER_AGR"}],"components":[],"countries":[],"effort_days_max":4,"effort_days_min":2,"effort_size":"S","faq":[{"a":"No. From USR02 the report only reads administrative fields such as user type, group, validity, lock and last logon date; no field related to passwords or password hashes is selected.","q":"Does the report read password data?"},{"a":"The report only lists. Approved users can be locked in bulk with SU10, or the separate automatic lock program can run on a schedule.","q":"Can I lock inactive users from the report?"},{"a":"In license measurement, dialog users without an assigned type are usually counted in the highest category. Assigning the right type before measurement avoids unexpected license differences.","q":"Why do users without a license type matter?"}],"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 in display mode."},{"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":"The monthly list of findings can be sent to the license manager."}],"functions":[],"gap":"SUIM can list users by last logon date and SU01 shows the license type per user. No standard screen, however, combines license type, last logon, number of valid roles and department; to find users with a Professional license who have not logged on for months before license measurement, several lists are merged in Excel. The custom report does this in one run and writes the finding per line.","id":"basis-user-license-type-last-logon","industries":[],"input_columns":[],"kind":"report","language":"en","lastmod":"2026-11-17","logic":"1. Users in the selection are read from USR02: user type (USTYP), user group (CLASS), validity (GLTGV, GLTGB), lock status (UFLAG), creation date (ERDAT) and last logon date (TRDAT).\n2. The license type (LIC_TYPE) is added from USR06 and shown with its USMM text; users without an entry are flagged as \"no license type\".\n3. Role assignments valid on the key date are counted from AGR_USERS.\n4. Inactive days = key date − TRDAT. For users who never logged on (TRDAT empty), the days since the creation date are used.\n5. Findings: inactivity threshold exceeded; never logged on; validity ended but not locked; no license type assigned; active user without any valid role.\n6. Full name and department are added from ADRP and ADCP through USR21. The result is listed with subtotals per license type.","module":"BASIS","object_type":"alv_report","output_columns":[{"calculated":false,"formula":"","label":"User","source_field":"BNAME","source_table":"USR02"},{"calculated":false,"formula":"","label":"Full name","source_field":"NAME_TEXT","source_table":"ADRP"},{"calculated":false,"formula":"","label":"Department","source_field":"DEPARTMENT","source_table":"ADCP"},{"calculated":false,"formula":"","label":"User type","source_field":"USTYP","source_table":"USR02"},{"calculated":false,"formula":"","label":"User group","source_field":"CLASS","source_table":"USR02"},{"calculated":false,"formula":"","label":"License type","source_field":"LIC_TYPE","source_table":"USR06"},{"calculated":false,"formula":"","label":"Valid to","source_field":"GLTGB","source_table":"USR02"},{"calculated":false,"formula":"","label":"Lock status","source_field":"UFLAG","source_table":"USR02"},{"calculated":false,"formula":"","label":"Last logon","source_field":"TRDAT","source_table":"USR02"},{"calculated":true,"formula":"Key date − USR02-TRDAT (no logon: − USR02-ERDAT)","label":"Inactive days","source_field":null,"source_table":null},{"calculated":true,"formula":"Number of AGR_USERS entries valid on the key date","label":"Valid roles","source_field":null,"source_table":null},{"calculated":true,"formula":"Threshold exceeded, never logged on, validity ended, no license type or no role","label":"Finding","source_field":null,"source_table":null}],"parameters":[{"example":"*","kind":"select_option","label":"User","name":"S_UNAME","ref_field":"USR02-BNAME","required":false},{"example":"PUR","kind":"select_option","label":"User group","name":"S_CLASS","ref_field":"USR02-CLASS","required":false},{"example":"A","kind":"select_option","label":"User type","name":"S_USTYP","ref_field":"USR02-USTYP","required":false},{"example":"","kind":"select_option","label":"License type","name":"S_LICTY","ref_field":"USR06-LIC_TYPE","required":false},{"example":"90","kind":"parameter","label":"Inactivity threshold (days)","name":"P_DAYS","ref_field":"","required":true},{"example":"X","kind":"checkbox","label":"Users with findings only","name":"P_FINDO","ref_field":"","required":false},{"example":"","kind":"checkbox","label":"Include locked users","name":"P_LOCKD","ref_field":"","required":false}],"part_of":[],"performance":"The tables are small, so the report also runs fast in dialog. On multi-client systems, run it in each client separately or schedule it as a monthly background job and receive the result by email.","quote_url":"https://nekuhub.com/en/request-a-quote/?report=basis-user-license-type-last-logon","related":["basis-inactive-user-auto-lock-job","basis-sod-conflicts-by-user"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Lists users by last logon date; license type, department and number of valid roles are not in the same list.","tcode":"SUIM"},{"note":"Shows license type and logon data for one user at a time.","tcode":"SU01"}],"summary":"A custom ALV report that shows each user's license type, last logon date, number of valid roles and department in one list. Users who have not logged on for a long time, never logged on, are past their validity but not locked, or have no license type are flagged, which makes the clean-up before license measurement straightforward.","tables":[{"access":"read","join_on":"","role":"User type, group, validity, lock and last logon date (driving table)","table":"USR02","variant":"both"},{"access":"read","join_on":"USR06-BNAME = USR02-BNAME","role":"License type assigned for license measurement","table":"USR06","variant":"both"},{"access":"read","join_on":"AGR_USERS-UNAME = USR02-BNAME","role":"Number of valid role assignments","table":"AGR_USERS","variant":"both"},{"access":"read","join_on":"USR21-BNAME = USR02-BNAME","role":"Person and address number of the user","table":"USR21","variant":"both"},{"access":"read","join_on":"ADRP-PERSNUMBER = USR21-PERSNUMBER","role":"Full name","table":"ADRP","variant":"both"},{"access":"read","join_on":"ADCP-PERSNUMBER = USR21-PERSNUMBER AND ADCP-ADDRNUMBER = USR21-ADDRNUMBER","role":"Department","table":"ADCP","variant":"both"}],"title":"User License Type and Last Logon Report (Inactive Users)","url":"https://nekuhub.com/en/reports/user-license-type-and-last-logon-report/","vendor_id":"nekudos"}