Author: Michael Nicholls
Submitted: 09 Mar 2007
It is useful to be able to disable the password for a set of ABAP users. This prevents user from accessing the ABAP system directly, but they can still access through single sign on from an SAP NetWeaver Portal
Use with caution This code directly accesses user tables in ABAP and inappropriate use could prevent administrators from accessing the system.
REPORT ZDEACTIVATEPASSWORD. tables: usr02. select-options users for usr02-bname. initialization. * set default selection move: 'I' to users-sign, 'CP' to users-option, 'TESTUSERS.*' to users-low. append users. start-of-selection. * find all the users who match the selection select * from usr02 where bname in users. usr02-codvn = 'X'. clear usr02-bcode. write: / 'Deactivating ', usr02-bname. update usr02. endselect.